XFileSharing Pro - Problem with editing download button in ( download0.html )

Message
Author
Steve9e8
Posts: 81
Joined: Jun 19, 2014 11:27 am

Problem with editing download button in ( download0.html )

#1 Postby Steve9e8 » Apr 08, 2015 3:16 pm

Hello everyone

I need to change free download button in ( download0.html ) page .. The button that leads free user to ( download1.html)

it's code is :

Code: Select all

<Form method="POST" action=''>
		<input type="hidden" name="op" value="download1">
		<input type="hidden" name="usr_login" value="<TMPL_VAR usr_login>">
		<input type="hidden" name="id" value="<TMPL_VAR file_code>">
		<input type="hidden" name="fname" value="<TMPL_VAR file_name>">
		<input type="hidden" name="referer" value="<TMPL_VAR referer>">
		<input type="submit" name="method_free" value="<TMPL_VAR lang_free_download>">
		</Form>
As you know that last line is the required code...

Now I need to change the button with an image... image code is :

Code: Select all

<div class="Downloadfree" width="40%" ></div> 
I tried with :

Code: Select all

<input type="image" name="method_free" class="Downloadfre" width="40%">
and

Code: Select all

<input type="submit" name="method_free" class="Downloadfre" width="40%">
I also tried by putting the form code inside div .... unfortunately nothing of that word


Would you please help ...

Steve9e8
Posts: 81
Joined: Jun 19, 2014 11:27 am

#2 Postby Steve9e8 » Apr 14, 2015 3:32 pm

Waiting for help

AnotherIdiot
Posts: 101
Joined: Aug 23, 2014 2:59 pm

#3 Postby AnotherIdiot » Apr 16, 2015 7:13 am

You havent added an image path to the code so no image will show up.

Taken from the knowledge base:

How to change download button from text to image ?
08/03/2012 02:11 PM Printable Version | Email Article | Receive Email Updates

Question

What is the best way to change the default HTML button for download links to show an image instead ?

Answer

- Login to your server
- Download "download1.html"
- Open "download1.html" with free program "NotePad+Plus"
- Look for this snippet of code:
<! -- if direct links -- >
<input type="submit" id="btn_download" value="<!-- lang create link -->">
<! -- else -->
<input type="submit" id="btn_download" value="<!-- lang download file -->">
<! -- ::::::: -->
----------------------------------------------------------------
Change "submit" to "image" (as the type of input)
Change "value" to "src" and specify the URL of the image itself.
----------------------------------------------------------------
This is the final result:

<input type="image" id="btn_download" src="http://yoursite.com/images/downloadbutton.png">

So look at the final result and modify it to what you are trying to do

Steve9e8
Posts: 81
Joined: Jun 19, 2014 11:27 am

#4 Postby Steve9e8 » Apr 16, 2015 7:21 pm

AnotherIdiot wrote:You havent added an image path to the code so no image will show up.

Taken from the knowledge base:

How to change download button from text to image ?
08/03/2012 02:11 PM Printable Version | Email Article | Receive Email Updates

Question

What is the best way to change the default HTML button for download links to show an image instead ?

Answer

- Login to your server
- Download "download1.html"
- Open "download1.html" with free program "NotePad+Plus"
- Look for this snippet of code:
<! -- if direct links -- >
<input type="submit" id="btn_download" value="<!-- lang create link -->">
<! -- else -->
<input type="submit" id="btn_download" value="<!-- lang download file -->">
<! -- ::::::: -->
----------------------------------------------------------------
Change "submit" to "image" (as the type of input)
Change "value" to "src" and specify the URL of the image itself.
----------------------------------------------------------------
This is the final result:

<input type="image" id="btn_download" src="http://yoursite.com/images/downloadbutton.png">

So look at the final result and modify it to what you are trying to do
Hello and thanx for reply

My problem as I mentioned above with free download button that appears in the first download page ( download0.html ) ...

In the second download page ( download1.html ) I have no problem and that question in knowledge base worked with me perfectly.

alex.sa
Posts: 11
Joined: Mar 08, 2014 4:45 pm

#5 Postby alex.sa » Apr 17, 2015 10:00 pm

Change:

Code: Select all

<input type="submit" name="method_free" value="<TMPL_VAR lang_free_download>">
for

Code: Select all

<input type="submit" name="method_free" value=" " style="background:url('http://i.imgur.com/GAp5Ax4.png')no-repeat; height:58px; width:241px; ">
Or do the same thing by creating a class in your css.

Change:

Code: Select all

<input type="submit" name="method_free" value="<TMPL_VAR lang_free_download>">
for

Code: Select all

<input type="submit" name="method_free" value=" " class="downfree">
and add this line for css:

Code: Select all

.downfree{background-image: url("http://i.imgur.com/GAp5Ax4.png"); height:58px; width:241px;}

Steve9e8
Posts: 81
Joined: Jun 19, 2014 11:27 am

#6 Postby Steve9e8 » Apr 18, 2015 10:19 am

@alex.sa

Thanks for reply. I tried both methods before but it didn't work! ...Yes it's weird and actually it didn't happen with me before with any other button I edited in XFS script !

Finally it works after I definite ( downfree ) as an id :

Code: Select all

<input type="submit" name="method_free" value="" id="Downloadfre">
But now I have a new problem... downloadfre button which it is now an image leads to the same page after clicking on it, that really confused me !.

It means the image button works if I insert at least one letter in ( value="") and then clicked over that letter inside the image, and if I clicked on any place on image but outside that letter the button goes in a loop and returns me to the same page ( download0.html ) and it's not going to download1.html !

How can I fix the image button !

alex.sa
Posts: 11
Joined: Mar 08, 2014 4:45 pm

#7 Postby alex.sa » Apr 23, 2015 7:16 pm

Hey man, if you pay attention to my message will see that there is a blank space in within the attribute "Value" of the code.

That is the question. :)

Steve9e8
Posts: 81
Joined: Jun 19, 2014 11:27 am

#8 Postby Steve9e8 » Apr 24, 2015 7:48 am

alex.sa wrote:Hey man, if you pay attention to my message will see that there is a blank space in within the attribute "Value" of the code.

That is the question. :)
Thanx a lot mate for notice ... I deal with a lot of ( value=" " ) but I didn't know that there should be a space between ""

Now the problem is solved... hope this post be useful for anyone who might face the same problem in future.