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 |
#22
|
|||
|
|||
Have you installed any other hacks?
|
#23
|
|||
|
|||
This is the one I got
PHP Code:
Yes, I have a few hacks like: VB category Icons, Welcome PM, V3 arcade, Sort by Newest Thread, Allow thumbnail view per usergroup (tried to disable this), & Thread starter column |
#24
|
|||
|
|||
You have the right plugin code and now I'm thinking because of the number of hacks you have installed, there may be some conflict. I tried to locate some of them and saw that VB category Icons is only for rc1 and rc2, what version are you running(in this case I don't think that will effect it but I'll check it out anyway)? I'll try and look through some of them tomorrow and see if I can find the conflict as I have 4 hours left to sleep...
|
#25
|
|||
|
|||
I just tried to disable that hack aswell without luck & I am running 3.5.0
Ok, thanks for checking it out, I sure hope you can find out what's wrong |
#26
|
||||
|
||||
question:
can this be applied/controlled for specific forums only? (so I can exclude or include this function depending on the forums) |
#27
|
|||
|
|||
Quote:
|
#28
|
|||
|
|||
bpn:
I think I may have solved your problem, my previous code was replacing any changes to the query hook variable. This may have been what was conflicting with your other hacks. Try it out and let me know how it goes |
#29
|
|||
|
|||
Quote:
Here is the template as requested: HTML Code:
<tr> <td class="alt1" id="td_status_$thread[realthreadid]"> $thread[openclose_editable] <img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_status_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" /> </td> <if condition="$show['threadicons']"> <td class="alt2" align="center" valign="middle"> <if condition="$show['threadicon']"> <if condition="$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="/images/nothumb.gif" alt="" border="0" /> </if> <else /> <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /> </if> </if> </td> </if> <td class="alt1" id="td_title_$thread[realthreadid]" title="$thread[preview]"> $thread[title_editable] <div> <span style="float:$stylevar[right]"> <if condition="$show['moderated']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/moderated_small.gif" alt="<phrase 1="$thread[hiddencount]">$vbphrase[x_moderated_posts]</phrase>" /> </if> <if condition="$show['paperclip']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" alt="<phrase 1="$thread[attach]">$vbphrase[x_attachments]</phrase>" /> </if> <if condition="$show['subscribed']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" alt="$vbphrase[you_are_subscribed_to_this_thread]" /> </if> <if condition="$show['sticky']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/sticky.gif" alt="$vbphrase[sticky_thread]" /> </if> </span> <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if> $thread[movedprefix] $thread[typeprefix] $thread[moderatedprefix] <if condition="$show['gotonewpost']"> <strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a></strong> <else /> <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a> </if> <if condition="$thread['pagenav']">$stylevar[dirmark]<span class="smallfont" style="white-space:nowrap">( <img class="inlineimg" src="$stylevar[imgdir_misc]/multipage.gif" alt="$vbphrase[multipage_thread]" border="0" /> $thread[pagenav] <if condition="$show[pagenavmore]">... <a href="showthread.php?$session[sessionurl]t=$thread[threadid]&page=$thread[totalpages]$thread[highlight]">$vbphrase[last_page]</a></if> )</span></if> </div> <div class="smallfont"> <if condition="$show['threadratings'] AND $show['threadrating']"><span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" border="0" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span></if> <if condition="$show['guestuser']"> $thread[postusername] <else /> <span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]')">$thread[postusername]</span> </if> </div> <if condition="$show['unsubscribe']"> <div class="smallfont"> <a href="newreply.php?$session[sessionurl]do=newreply&t=$thread[threadid]">$vbphrase[reply]</a> | <a href="subscription.php?$session[sessionurl]do=removesubscription&return=ucp&t=$thread[threadid]">$vbphrase[unsubscribe]</a> </div> </if> </td> <if condition="$show['threadmoved']"> <td class="alt2" align="center">-</td> <else /> <td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>"> <div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap"> $thread[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$thread[lastposttime]</span></if><br /> <phrase 1="member.php?find=lastposter&t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase> <a href="showthread.php?$session[sessionurl]goto=lastpost&t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a> </div> </td> </if> <if condition="$show['notificationtype']"> <td class="alt1"><div class="smallfont"> <label for="sub$subscribethread[$threadid]">$thread[notification]</label> </div></td> <td class="alt2"><input type="checkbox" name="deletebox[$subscribethread[$threadid]]" id="sub$subscribethread[$threadid]" value="yes" /></td> <else /> <td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><a href="#" onclick="who($thread[threadid]); return false;">$thread[replycount]</a></if></td> <td class="alt2" align="center">$thread[views]</td> <if condition="$show['forumlink']"> <td class="alt1"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></td> </if> </if> <if condition="$show['inlinemod']"> <td class="alt1"> <input type="checkbox" name="tlist[$thread[realthreadid]]" id="tlist_$thread[realthreadid]" value="$thread[checkbox_value]" <if condition="$show['disabled']">disabled="disabled"</if> /> </td> </if> </tr> Code:
$thumbsforums = array(210); $displaythumbs = false; if (in_array($forumid, $thumbsforums)) { $displaythumbs = true; $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 "; } |
#30
|
|||
|
|||
trancetopia:
It looks as though you are running into the same problem as bpn, and I would guess you have installed other plugins for the forumdisplay_query hook? I believe this is solved with the last update 30 minutes ago. Redownload the xml and check if it is solved |
#31
|
|||
|
|||
I've downloaded the file again, uninstalled the hook code and re-installed with the version I just downloaded and I'm still getting the same problem
There is only one plugin occupying the forumdisplay_query hook and that is your "Thread Thumbnail" plugin. Anything else you want me to try? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|