The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Thread Thumbnail Details »» | |||||||||||||||||||||||||
The new version is available here.
This plugin was based on Thumbnail of Attachments on forum display by Dechevious(I hope its alright with you) It is mostly the same converted to the new 3.5 hook. I also fixed the "If the attachment is not an image, a thumbnail will not be shown" problem. Note: This plugin works in v3.68 Installation: In your AdminCP, go to Plugin System, Download/Upload Plugins and import the xml document. Be sure to change the forum ids in the $thumbsforums array to the forum ids you want to enable thumbnails in. Next you will need to modify your threadbit template: Find: Code:
<if condition="$show['threadicons']"> <td class="alt2"> <if condition="$show['threadicon']"> <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /> <else /> </if> </td> </if> Code:
<if condition="$show['threadicons']"> <td class="alt2" align="center" valign="middle"> <if condition="$tt_displaythumbs"> <if condition="($thread['attachmentid']) AND ($thread['thumbsize'])"> <a href="showthread.php?$session[sessionurl]t=$thread[threadid]"> <img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" /> </a> <else /> <img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" /> </if> <else /> <if condition="$show['threadicon']"> <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /> </if> </if> </td> </if> __________________________________________________ ___ Add-ons UserCP option to turn the thumbnails on/off on a per user basis Go into your admincp and click User Profile Fields->Add New User Profile Field. Select "single selection radio buttons", click continue. For title put "Thread Thumbnails", for description put "This will allow you to turn the thumbnails of threads on and off." For options, enter "On" and "Off". Skip down to Display Page and choose "Options: Thread Viewing". In your threadbit template(assuming you already applied the template changes above): Find: Code:
<if condition="$tt_displaythumbs"> Code:
<if condition="($tt_displaythumbs) AND ($bbuserinfo['field5'] <> 'Off' OR $show['guest'])"> Show Your Support
|
Comments |
#182
|
|||
|
|||
Trana:
You can edit this section in the postbit timeplate: Code:
<if condition="$show['thumbnailattachment']"> <fieldset class="fieldset"> <legend>$vbphrase[attached_thumbnails]</legend> <div style="padding:$stylevar[formspacer]px"> $post[thumbnailattachments] </div> </fieldset> </if> <if condition="$show['imageattachment']"> <fieldset class="fieldset"> <legend>$vbphrase[attached_images]</legend> <div style="padding:$stylevar[formspacer]px"> $post[imageattachments] </div> </fieldset> </if> Aery: You can edit the plugin through the control panel, there is no need to mess around in the xml file. On the following line you place the forum ids of the forums that will have thumbnails. So if you want to enable thumbnails on forums 6, 11, and 25, the code would look like: Code:
$tt_thumbsforums = array(6, 11, 25); |
#183
|
|||
|
|||
Thank you very much.
My dumb about editing XML file |
#184
|
||||
|
||||
A direct question to jasonmerchant:
Why is OR $show['guest'] part of the if tag that checks for the user chosen thumbnails On or Off option? (<if condition="($tt_displaythumbs) AND ($bbuserinfo['field5'] <> 'Off' OR $show['guest'])">) Why is it "necessary" to also check $show['quest'] in the if tag? The issue is whether or not the thread option is On or Off, right(??). |
#185
|
|||
|
|||
Quote:
|
#186
|
|||
|
|||
is there any update for 3.6.8?
|
#187
|
|||
|
|||
theOzer:
The $show['guest'] in the if statement turns thumbnails on for all guests. Guests don't have profile options, so they can not choose. nnjj.net: This plugin works in 3.6.8, maybe a moderator can move this plugin to the 3.6.8 forum? Trana: I believe you said that you don't want to display thumbnails in posts with this plugin, correct? All you need to do is replace the content of the first if statement with the second one. ie: Replace: Code:
<legend>$vbphrase[attached_thumbnails]</legend> <div style="padding:$stylevar[formspacer]px"> $post[thumbnailattachments] </div> Code:
<legend>$vbphrase[attached_images]</legend> <div style="padding:$stylevar[formspacer]px"> $post[imageattachments] </div> |
#188
|
|||
|
|||
PLEASE - does anyone know how to modify this line to make it show the LAST attachment:
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" /> |
#189
|
|||
|
|||
Casa:
I have not tested it yet, but you should be able to just change the MIN sql function to MAX. ie: Replace the following in the plugin: Code:
$hook_query_fields .= ", attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid "; With: Code:
$hook_query_fields .= ", attachment.thumbnail_filesize AS thumbsize , MAX(attachment.attachmentid) AS attachmentid "; |
#190
|
|||
|
|||
Quote:
Jason You rock, that worked. PM me if you are interested in other coding work. thanks |
#191
|
|||
|
|||
Be sure to change the forum ids in the $thumbsforums array to the forum ids you want to enable thumbnails in
where??? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|