View Full Version : Download button for attachments
techdeals07
03-23-2011, 04:11 PM
Looking for a way to mod attachments to show a download button that links to a posted attachment rather than the attachment file name. Basically just want to hide the filename replace with a button. Any relatively easy way to accomplish this?
techdeals07
03-25-2011, 02:21 PM
Hmm, surely somebody has implemented a mod like this.....could it be possible by editing phrases maybe?
Lynne
03-25-2011, 02:53 PM
Have you tried just modifying the postbit_attachment template to do this?
techdeals07
03-26-2011, 03:51 AM
Have you tried just modifying the postbit_attachment template to do this?
Ok, that makes sense. I'm no expert on this type of thing, but I'm guessing this is the bit of code from postbit_attachment I'm concerned with:
<a href="attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&d={vb:raw attachment.dateline}"<vb:if condition="$show['newwindow']"> target="_blank"</vb:if>>{vb:raw attachment.filename}</a>
Can somebody point me in the right direction as to how to go about editing this to get an image rather than the file name?
--------------- Added 1301116014 at 1301116014 ---------------
Ok, took a shot at it myself and it's pretty easy. For anybody else seeking to do the same here's what I did:.
<a href="attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&d={vb:raw attachment.dateline}"<vb:if condition="$show['newwindow']"> target="_blank"</vb:if>><img src="http://yourimage.png" border="0" alt="Download"></a>
Lynne
03-26-2011, 02:58 PM
Yep, good job and thanks for sharing the solution. :)
DaPike
01-27-2013, 03:27 PM
Hi,
how can I make the download button when I use a Hide-Hack for attachments?
The bbcode looks like Link to file
I only see the attach number. But instead of the number I wanna see a download button.
Can someone tell how to do this?
I'm on vB 4.1.10
Thx for help.
DaPike
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.