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 |
#32
|
|||
|
|||
hmm... well I'm not really sure what is wrong, can you test this:
Code:
$thumbsforums = array(210); $displaythumbs = false; if (in_array($forumid, $thumbsforums)) { $displaythumbs = true; $hook_query_fields = ""; $hook_query_joins = ""; $hook_query_where = ""; } If it still failed then run this test: Code:
$thumbsforums = array(210);
$displaythumbs = false;
if (in_array($forumid, $thumbsforums)) {
$hook_query_fields .= ", attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid ";
$hook_query_joins .= "LEFT JOIN " . TABLE_PREFIX . "attachment as attachment ON(attachment.postid = thread.firstpostid) ";
$hook_query_where .= "GROUP BY thread.threadid ";
}
Let me know what your results were. |
#33
|
|||
|
|||
Quote:
|
#34
|
|||
|
|||
Hi Jason, i've given those two scripts a try and here are the results:
The 1st script made little difference in the fact that it did not display any threads just like my initial problem. The 2nd script did exactly as you said, it displayed all the threads without any thumbnail images. Thanks for your help trying to work this out, it's really appreciated. |
#35
|
|||
|
|||
, then the answer is simple, one of your other hacks is using the variable $displaythumbs. This can be easily solved be changing the name to something more unique such as $tt_displaythumbs (tt for thread thumbnail). I've just updated the template and xml with "tt_" added to my variables.
|
#36
|
|||
|
|||
Hey it's working now, kind of. Sorry to give you more bad news but only one of the thumbnails is now showing.
You can view the forum here: http://www.littlewales.com/forumdisplay.php?f=210 |
#37
|
|||
|
|||
you have an old template, that was fixed a while back when I moved the <if condition="$show['threadicon']"> inside the else statement
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> |
#38
|
|||
|
|||
@Jason can you please provide the intructions in the zip file.
|
#39
|
|||
|
|||
Quote:
Cheers |
#40
|
|||
|
|||
Quote:
|
#41
|
|||
|
|||
Hi, nice hack here.
Is there any options of displaying the Avatar of the thread started instead of using attachments? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|