Jump to content
vBWarez - Rest In Peace

add Download Button next to attachments

Recommended Posts

[B][COLOR="#FF0000"]vB Version: 4.2.0[/COLOR][/B]

Add Download Button next to attachments


To do that, open postbit_attachment template

Search for:

[CODE]({vb:raw attachment.filesize}<vb:if condition="$show['views']">, {vb:rawphrase x_views, {vb:raw attachment.counter}}</vb:if>)[/CODE]

Below it add:

[CODE]<a class="downloadbutton_attachments" 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>>Download</a>[/CODE]

Then open additional.css template and add the following code:

[CODE]/* ***** Download Button for attachments by Mohammad Kamal */
color: black;
font-size: 8pt;
font-family: tahoma;
border: solid 1px;
padding: 3px;
text-decoration: none;
background-color: #DDD;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
a.downloadbutton_attachments:link { color: black; }
a.downloadbutton_attachments:hover { color:red; }[/CODE]

You can edit the color as you like!

Link to post
Share on other sites
  • 10 months later...
  • 1 year later...
  • 1 year later...
  • Create New...