Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Thread Thumbnail Details »»
Thread Thumbnail
Mod Version: 1.1, by jasonmerchant (Contributor) jasonmerchant is offline
Developer Last Online: Jun 2009 I like it Show Printable Version Email this Page

vB Version: 3.6.8 Rating: (21 votes - 4.81 average) Installs: 208
Released: 21 Sep 2007 Last Update: 21 Sep 2007 Downloads: 1376
Not Supported Uses Plugins Template Edits  

This plugin is the newest version of the Thread Thumbnail plugin

This plugin will display the first attachment as a thumbnail on forumdisplay.php

New Features:
  • If there are attachments that are not images, it will skip them and go to the first image attachment.
  • Optional - you can now display thumbnails on search results.



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.

The plugin comes with the Search Thumbnails enabled. If you do not want to have thumbnails show up in the search results, make sure you deactivate it.

If you would like thumbnails to display in the search results, you will need to replace your search.php page with the one in the zip file. Unfortunately vBulletin forgot to include a hook variable where it is necessary for this to work. I have added 1 line to search.php with the hook variable. There is no way around this until vbulletin adds it themselves.

Next you will need to modify your threadbit template:

Find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace With:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You will also need to upload an image to display if there are no image attachments here: $stylevar[imgdir_misc]/nothumb.jpg(ex: http://www.mysite.com/forums/images/misc/nothumb.jpg). I've made a simple one you can use or you can make your own. By default thumbnails are confined in a 100x100 px area, I found that it looks good to make the "no image" image about 100x83 px.

_____________________________________________________

Add-ons (Optional)

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You need to replace field5 with the field name of the profile field you created earlier.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	attachment.jpg
Views:	5438
Size:	36.5 KB
ID:	70123

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Thread Thumbnail jasonmerchant vBulletin 3.5 Add-ons 196 04 Jan 2009 09:26

  #31  
Old 25 Sep 2007, 06:37
Trana Trana is offline
 
Join Date: Apr 2005
Originally Posted by jasonmerchant View Post
Trana:
Did you have any success with the code I posted before?
No, I posted a reply stating that I wasn't sure what exactly you wanted me to edit in there.

Please explain.

Thanks!
Reply With Quote
  #32  
Old 25 Sep 2007, 06:46
htrshgytrs htrshgytrs is offline
 
Join Date: Aug 2005
Originally Posted by jasonmerchant View Post

htrshgytrs:

...That script will not work, it will prevent all thumbnails from showing on the search page. Are thumbnails are showing up?
yup, works exactly as i want it to with that above conditional ;





Images where there are thumbnails and nothing where there is not. Works both on the getnewposts and search results pages.


edit - actually i did change it after i posted earlier so i may have confused the issue.. The above result is achieved with the follow template edit within threadbit ;

<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="($tt_displaythumbs) AND ($bbuserinfo['field11'] <> 'Off' OR $show['guest'])">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">



<if condition="THIS_SCRIPT == 'search'">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" width=70 height=45 border="0" />
</a>
<else />

<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</if>
<if condition="THIS_SCRIPT != 'search'">
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
</if>
</if>

<else />


<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>

</td>
</if>

Last edited by htrshgytrs : 25 Sep 2007 at 06:51.
Reply With Quote
  #33  
Old 26 Sep 2007, 23:28
htrshgytrs htrshgytrs is offline
 
Join Date: Aug 2005
my above change to your code is still wrong, so i'll wait for someone who knows what they are talking about

This is the code i use now. The above screenshot shows the search pages and thumbs still display on the forumdisplay pages. The no thumb images are never shown though, ie if there is no attachment the field will be blank.

<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="($tt_displaythumbs) AND ($bbuserinfo['field11'] <> 'Off' OR $show['guest'])">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">



<if condition="THIS_SCRIPT == 'search'">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" width=70 height=45 border="0" />
</a>
<else />

<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</if>
</if>

<else />


<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>

</td>
</if>
Reply With Quote
  #34  
Old 29 Sep 2007, 09:39
bqtstudio bqtstudio is offline
 
Join Date: Oct 2006
Thx 4 this realea ! installed !
Reply With Quote
  #35  
Old 30 Sep 2007, 12:38
dontcry dontcry is offline
 
Join Date: Jul 2007
Great mod!

I would suggest 2 things:

1. When click on the thumb, the full-size image will be ajaxed-appeared. (HighSlide)

2. Changes the threads display of the specified forum from horizontal to vertical.

Thanks alots for this wonderful mod!

Last edited by dontcry : 01 Oct 2007 at 14:12.
Reply With Quote
  #36  
Old 30 Sep 2007, 17:13
theFAILURE's Avatar
theFAILURE theFAILURE is offline
 
Join Date: Jan 2005
Does this work on 3.6.7PL1? As soon as I installed it, I got an invalid SQL when searching for "new posts."

I quickly deleted it to resolve the issue.

Originally Posted by SQL
MySQL Error : Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
__________________
http://theScamBaiter.com
Fighting Scammers Worldwide for Fun and Justice
Reply With Quote
  #37  
Old 01 Oct 2007, 16:32
InTeNsE-HuMoR's Avatar
InTeNsE-HuMoR InTeNsE-HuMoR is offline
 
Join Date: Sep 2006
Can we have the option to specify our own thumbnail for non-attachments like embeded videos?
__________________
Free content for your forum! IGN Movie Trailers Embed BB Code | Live Video Embed BB Code | Game Trailers BB Code
Reply With Quote
  #38  
Old 01 Oct 2007, 19:06
rolfw1 rolfw1 is offline
 
Join Date: Nov 2005
Real name: Rolf
Love the mod as stated earlier, is it possible to add thumbnails to the search function when opting to show posts?
Reply With Quote
  #39  
Old 02 Oct 2007, 03:57
The Fat Boy The Fat Boy is offline
 
Join Date: Sep 2006
cant get this to work for anything... doesnt display anything. edited the threadbit... no luck

ok... working to some degree, except it will not show a thumbnail for anything, it always shows the no thumbnail image

Last edited by The Fat Boy : 02 Oct 2007 at 04:13.
Reply With Quote
  #40  
Old 02 Oct 2007, 14:34
theFAILURE's Avatar
theFAILURE theFAILURE is offline
 
Join Date: Jan 2005
Originally Posted by theFAILURE View Post
Does this work on 3.6.7PL1? As soon as I installed it, I got an invalid SQL when searching for "new posts."

I quickly deleted it to resolve the issue.
Did anyone get this working on 3.6.7PL1 or is this just a local problem with my database?
__________________
http://theScamBaiter.com
Fighting Scammers Worldwide for Fun and Justice
Reply With Quote
  #41  
Old 02 Oct 2007, 16:28
lasto lasto is offline
 
Join Date: Jan 2002
just installed on vb3.6.8

Database error in vBulletin 3.6.8:

Invalid SQL:

SELECT post.pagetext AS preview,
thread.threadid, thread.threadid AS postid, thread.title AS threadtitle, thread.iconid AS threadiconid, thread.dateline, thread.forumid,
thread.replycount, IF(thread.views=0, thread.replycount+1, thread.views) as views, thread.sticky,
thread.pollid, thread.open, thread.lastpost AS postdateline, thread.visible, thread.hiddencount, thread.deletedcount,
thread.lastpost, thread.lastposter, thread.lastpostid, thread.attach, thread.postusername, thread.forumid,


deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,

user.userid AS postuserid
, NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed

, attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid , attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid , post.pagetext AS previewbbcode
FROM thread AS thread
LEFT JOIN user AS user ON(user.userid = thread.postuserid)

LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')

LEFT JOIN subscribethread AS subscribethread
ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1 AND canview = 1)
LEFT JOIN post AS post ON(post.postid = thread.firstpostid)

LEFT JOIN attachment as attachment ON(attachment.postid = thread.firstpostid AND (attachment.extension = 'jpg' OR attachment.extension = 'gif' OR attachment.extension = 'png')) LEFT JOIN attachment as attachment ON(attachment.postid = thread.firstpostid AND (attachment.extension = 'jpg' OR attachment.extension = 'gif' OR attachment.extension = 'png'))
WHERE thread.threadid IN
(24907) GROUP BY thread.threadid GROUP BY thread.threadid;

MySQL Error : Not unique table/alias: 'attachment'
Error Number : 1066


i got that error by selecting `get new posts`
Reply With Quote
  #42  
Old 02 Oct 2007, 16:47
lasto lasto is offline
 
Join Date: Jan 2002
I fixed the above error - well sort of by going to plugin manager and disabling he 2 search boxes for it.Aint found no more errors at moment and the hack is working in the forum i selected.
Does anyone have a fix so i can have pics showing on search as well ?
Reply With Quote
  #43  
Old 03 Oct 2007, 16:22
Principe10's Avatar
Principe10 Principe10 is offline
 
Join Date: Sep 2007
Real name: Massimo
On my 3.6.8 show just the image "nothumb.jpg" no way to show any other image.
What's wrong? I've installed the xml plugin, modified the template, add the id number of tread and disabilited the "Thread Thumbnail - Search" because I don't like.

Any could help me please???


Thank's P.
Attached Images
File Type: jpg Istantanea.jpg (16.8 KB, 82 views)
Reply With Quote
  #44  
Old 03 Oct 2007, 17:39
lasto lasto is offline
 
Join Date: Jan 2002
im amazed search.php worked for u - gave me a sql error

are u sure the forums u have it set for have a valid attachment pic
Reply With Quote
  #45  
Old 03 Oct 2007, 17:54
Principe10's Avatar
Principe10 Principe10 is offline
 
Join Date: Sep 2007
Real name: Massimo
Originally Posted by lasto View Post
im amazed search.php worked for u - gave me a sql error

are u sure the forums u have it set for have a valid attachment pic
Now work. In my forum wasn't abilitated the Thambs

Thank's to all.
P.

Last edited by Principe10 : 03 Oct 2007 at 20:46.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 03:05.

Layout Options | Width: Wide Color: