vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Show Thread Enhancements - add Download Button next to attachments (https://vborg.vbsupport.ru/showthread.php?t=293873)

Mohammad Kamal 01-11-2013 11:00 PM

add Download Button next to attachments
 
1 Attachment(s)
Hello,

Now you can add a Download button next to attachments

Screenshot:

https://vborg.vbsupport.ru/attachmen...1&d=1358031450

To do that, open postbit_attachment template

Search for:

Code:

($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>)
below it add:

Code:

<a class="downloadbutton_attachments" href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>Download</a>
Then add the following code in Main CSS > Additional CSS Definitions :

Code:

/* ***** Download Button for attachments by Mohammad Kamal */
.downloadbutton_attachments{
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; }

You can edit the color as you like!

and that's it, Enjoy ;)

usHealthy 03-22-2013 11:01 PM

Little things that always help the looks of any board.

thanks

matrex722 03-23-2013 09:58 PM

nice work but im looking for somthing else
i want users when they click on attachments to download it
a new winow open and in it a Button to download the attachment file and another Button to back to thread
is there any mod do that ?

Zyon 05-08-2014 01:56 PM

Try this css:

Code:

/* ***** Download Button for attachments by Mohammad Kamal, edited by Zyon */
.downloadbutton_attachments{
font-size: 8pt;
font-family: tahoma, verdana, 'times new roman', arial;
border: solid 1px;
padding: 3px;
text-decoration: none;
background-color: #E1E4F2;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
a.downloadbutton_attachments:hover {
color:#FF4400;
}

It look better on vBulletin because it have vB colors :) .

Thanks for posting this ;)


All times are GMT. The time now is 02:41 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01190 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete