vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=158396

Thread Thumbnail
by jasonmerchant
21 Sep 2007 20:15

2 Attachment(s)
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.

V-T-H 21 Sep 2007 20:30

let me be the 1st to thank u

grazianno 21 Sep 2007 20:37

wow great :)

nnjj.net 21 Sep 2007 20:40

Be sure to change the forum ids in the $thumbsforums array to the forum ids you want to enable thumbnails in


where???

peterpigman 21 Sep 2007 20:44

Nice, i will update later ty.

ThomasR 21 Sep 2007 20:53

Is this plugin show the first -image- in attachement? I mean, if the first attachemnt is a file and the second an attachement, does it display the thumbnail and not an "no image" icon?

jasonmerchant 21 Sep 2007 21:17

nnjj.net:


On the first line:


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

Change 2 to the forum id. So if you want to enable thumbnails in forums 3, 7, and 12, it would look like:


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

A new version of the plugin is available. You can find the new thread here.


ThomasR:

If the first attachment is a non-image file(ie: zip, txt, etc.), it will be skipped, and it will show the first image attachment.

This is a new feature, just added in this version.

nnjj.net 21 Sep 2007 22:00

how I can disaply the image if there is no image attachment instead of showing no thumb?

Spank 21 Sep 2007 22:13

This will come in handy in the near future. Thanks.

theOZer 22 Sep 2007 01:16

Upgraded from TT V1.0. Works great. Seems a bit perkier, too. Excellent.
May I advise that if updating from TT V1.0, after noting the forums in your current Thread Thumbnail plugin that will need re-inserted, delete your TT V1.0 plugin, then install TT V1.1. Maybe this is just understood when doing plugin updates. I'm a rookie mostly. Whatever...
Also, the V1.0 template changes didn't appear to need massaged. Those changes are already in place. Good.
Great Hack/Mod. This adds so much to displayed art forums. Great idea.
Post Thoughts 9/22/2007:
Thumbnails in New Posts caps this off! Nice touch.

bing11 22 Sep 2007 01:20

thank you nice work

b65ran 22 Sep 2007 02:17

Thanks a lot. I was waiting for this for a long time. Is there a way to show thumbnails to unregistered users ?

Hornstar 22 Sep 2007 06:26

WOW this looks awesome, I will need to have a good look at this one for sure. Thanks.

ThomasR 22 Sep 2007 09:14

Quote:

Originally Posted by jasonmerchant (Post 1344079)
nnjj.net:
ThomasR:

If the first attachment is a non-image file(ie: zip, txt, etc.), it will be skipped, and it will show the first image attachment.

This is a new feature, just added in this version.

Ok, great !
And in the original hack of the thread thumbnail, if an attached image (I mean an image which is equal or less the size of the thumbnail size) and and attachement which is a full size image, the hack display in the threadlist only the attached image and not the thumbnail of the full size image. If no attached image, then, it's the thumbnail which is display.
It's the exact behavior of the original hack.
Anyway, the current one is better than the previous one, thank you for your update!

PS: if you don't understand what I mean, I can show you some sample on my own forum

rayphua 22 Sep 2007 09:30

Im not sure why mine isn't working. Using vb 3.6.7pl1.


All times are GMT. The time now is 14:55.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.