how to change the download button

Powerfull XFileSharing version

Moderator: admin

Message
Author
Oswaldt
Posts: 47
Joined: May 21, 2010 5:26 am

how to change the download button

#1 Postby Oswaldt » Jun 10, 2010 11:07 pm

I have a jpg 206x46 with which id like to replace the current download button.

thanks.

admin
Site Admin
Posts: 1785
Joined: Mar 22, 2006 12:32 pm

#2 Postby admin » Jun 11, 2010 11:56 am

Change input type to "image" and add "src" parameter.

Oswaldt
Posts: 47
Joined: May 21, 2010 5:26 am

#3 Postby Oswaldt » Jun 11, 2010 4:27 pm

in what file? download1.html?

komi
Posts: 161
Joined: Nov 27, 2009 12:41 pm

#4 Postby komi » Jun 11, 2010 7:52 pm

Yes.

Oswaldt
Posts: 47
Joined: May 21, 2010 5:26 am

#5 Postby Oswaldt » Jun 13, 2010 10:15 pm

so this

<TMPL_IF direct_links>
<input type="hidden" name="down_direct" value="1">
<input type="submit" id="btn_download" value="<TMPL_VAR lang_create_link>">
<TMPL_ELSE>
<input type="hidden" name="down_script" value="1">
<input type="submit" id="btn_download" value="<TMPL_VAR lang_download_file>">

wuold become:

<TMPL_IF direct_links>
<input type="hidden" name="down_direct" value="1">
<input type="submit" id="btn_download" value="<TMPL_VAR lang_create_link>">
<TMPL_ELSE>
<input type="hidden" name="down_script" value="1">
<input type="image" src="html/images/downloadblue.png "<TMPL_VAR lang_download_file>">

right??

admin
Site Admin
Posts: 1785
Joined: Mar 22, 2006 12:32 pm

#6 Postby admin » Jun 15, 2010 12:13 pm

There should be URL to image, but not local path

komi
Posts: 161
Joined: Nov 27, 2009 12:41 pm

#7 Postby komi » Jun 15, 2010 2:13 pm

The following code will do it:

Code: Select all

<TMPL_IF direct_links>
<input type="hidden" name="down_direct" value="1">
<input type="image" id="btn_download" src="/images/downloadblue.png">
<TMPL_ELSE>
<input type="hidden" name="down_script" value="1">
<input type="image" id="btn_download" src="/images/downloadblue.png">
</TMPL_IF>


Note that <TMPL_VAR lang_create_link> and <TMPL_VAR lang_download_file> can be safely removed since that's the text which will not be shown when using an image.

caremperador
Posts: 2
Joined: Jul 16, 2012 2:36 am

How do create a separate button for direct download and one

#8 Postby caremperador » Jul 16, 2012 2:38 am

How do create a separate button for direct download and one for slow download?


<TMPL_IF direct_links>
<input type="hidden" name="down_direct" value="1">
<input type="submit" id="btn_download" value="<TMPL_VAR lang_create_link>" class="premium">

<TMPL_ELSE>

<input type="hidden" name="down_script" value="1">

<input type="submit" id="btn_download" value="<TMPL_VAR lang_download_file>" class="slow">


</TMPL_IF>

okpa
Posts: 120
Joined: Apr 08, 2011 12:37 pm

#9 Postby okpa » Jul 16, 2012 11:55 am

thanks sir


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests