Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Thread Thumbnail Details »»
Thread Thumbnail
Version: 1.1, by jasonmerchant jasonmerchant is offline
Developer Last Online: Jun 2009 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.8 Rating:
Released: 09-20-2007 Last Update: 09-20-2007 Installs: 209
Uses Plugins Template Edits
 
No support by the author.

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:
Code:
<if condition="$show['threadicons']">
	<td class="alt2">
		<if condition="$show['threadicon']">
			<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
		<else />
			&nbsp;
		</if>
	</td>
</if>
Replace With:
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>
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:
Code:
<if condition="$tt_displaythumbs">
Replace with:
Code:
<if condition="($tt_displaythumbs) AND ($bbuserinfo['field5'] <> 'Off' OR $show['guest'])">
You need to replace field5 with the field name of the profile field you created earlier.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #292  
Old 02-12-2009, 04:48 PM
SVTCobraLTD SVTCobraLTD is offline
 
Join Date: Jul 2007
Location: PA
Posts: 841
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod here. However what about linked images? Any way to get them to show?
Reply With Quote
  #293  
Old 02-13-2009, 02:23 PM
theOZer's Avatar
theOZer theOZer is offline
 
Join Date: Mar 2007
Location: Colorado, USA
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just burned 30+ minutes perusing vB.org looking for a hack that would create a thumbnail when someone posts a linked image. I couldn't find anything.
I've also tried to find a commercial software package that offers this feature. No luck for me so far; maybe I need to improve my web searching abilities; maybe.
I've seen some impressive forums where on the main page there's an array of thumbnails that when clicked on take you to the post, etc... Where to find out how to do this or where to buy the code to do this is currently beyond my reach. Hmmm.
Reply With Quote
  #294  
Old 02-13-2009, 03:27 PM
theOZer's Avatar
theOZer theOZer is offline
 
Join Date: Mar 2007
Location: Colorado, USA
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 6piston View Post
so much more slower when all the thumbnails have to be loaded before the page actually displays
Hey 6piston,
Many issues come into play concerning performance and page displays in vB.
How many mods/hacks do you have running in addition to this TT mod. Don't forget their pull on your forum reserves.
This mod can't be DIV'd or JavaScripted or swanktified.
But, try adding Width and Height to your <img tag (see page 19, post #278).
Just the Width parameter works for IE but you need both Width and Height parameters for this to work in FireFox and other browsers, so use both parameters.
Reply With Quote
  #295  
Old 02-14-2009, 06:45 AM
Aery Aery is offline
 
Join Date: Mar 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theOZer View Post
I just burned 30+ minutes perusing vB.org looking for a hack that would create a thumbnail when someone posts a linked image. I couldn't find anything.
I've also tried to find a commercial software package that offers this feature. No luck for me so far; maybe I need to improve my web searching abilities; maybe.
I've seen some impressive forums where on the main page there's an array of thumbnails that when clicked on take you to the post, etc... Where to find out how to do this or where to buy the code to do this is currently beyond my reach. Hmmm.
Thanks for take a look around the world!
Anyway, if you found a way to create this hack I'm stick around this thread
Reply With Quote
  #296  
Old 02-14-2009, 01:11 PM
theOZer's Avatar
theOZer theOZer is offline
 
Join Date: Mar 2007
Location: Colorado, USA
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I, too, have nothing more to offer here.
Regards, theOZer
Reply With Quote
  #297  
Old 02-17-2009, 06:50 AM
hieronymous hieronymous is offline
 
Join Date: Dec 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for taking the time to look anyway
Reply With Quote
  #298  
Old 02-17-2009, 01:19 PM
MẪ$T?Я's Avatar
MẪ$T?Я MẪ$T?Я is offline
 
Join Date: Jan 2009
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
what can i add in the search.php .

My Vbulletin Version is 374
Reply With Quote
  #299  
Old 02-17-2009, 04:16 PM
theOZer's Avatar
theOZer theOZer is offline
 
Join Date: Mar 2007
Location: Colorado, USA
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

See page 8, Post #112. The change to search.php hasn't change, so, the info in this post still applies; this added code works in all versions of vB search.php from 368 thru 38x.
~theOZer
Reply With Quote
  #300  
Old 03-14-2009, 09:43 AM
6piston's Avatar
6piston 6piston is offline
 
Join Date: Apr 2005
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theOZer View Post
Hey 6piston,
Many issues come into play concerning performance and page displays in vB.
How many mods/hacks do you have running in addition to this TT mod. Don't forget their pull on your forum reserves.
This mod can't be DIV'd or JavaScripted or swanktified.
But, try adding Width and Height to your <img tag (see page 19, post #278).
Just the Width parameter works for IE but you need both Width and Height parameters for this to work in FireFox and other browsers, so use both parameters.
hi the ozer

thanks for the help.

well, the real problem is with the older or messed up old IE's that some of my users complains about. it works fine with standard or new browsers. even my Nokia phone loaded the page with no problems. Just thought there'd be a way to speed things up like some other classifieds sites.

are you saying that if i add the witdh and height tags, the page will load better?

I have a rather busy forums section which i use for classifieds. This has made an impact on the server loads right after i used the TT plugin. it's something i will bever remove though. It has improved the site experience so much\

I have since added another quad core server, so server load is back on track.

if anyone want to have a look at how i used the thread thumbnails, this is it
http://www.zerotohundred.com/newforu...d-performance/
Reply With Quote
  #301  
Old 03-19-2009, 05:10 PM
theOZer's Avatar
theOZer theOZer is offline
 
Join Date: Mar 2007
Location: Colorado, USA
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

6piston,
Concerning older versions of IE. Trying to cater your forum to work in older IE versions is honorable but… why? If someone has IE7 upgrade or IE8 upgrade (dropped today!) or, worse yet, IE6 upgrade "fear," smolly. Upgrade. Much to my amazement and joy was the discovery that the latest version of Mozilla’s FireFox seems to be THE browser to use when viewing a vB forum. So, put a ‘works best with…’ line hidden somewhere in your footer using a really really small font (visualize a cute smiling smilie here).
No. I apologize and after rereading see my suggestion as misleading about performance. But, have you tested using width & height? To actually reduce your thumbnails’ size (AdminCP > vBulletin Options > Message Attachment Options > Thumbnail Size) might improve display delay but its messy and not recommended by me. Always first test changes like this in your testvb.
My initial post here about using width and height was for someone who just wanted to tidy up, display smaller thumbnails in a list.
Nice web site and utilization of this TT mod. Remember, any hookname that “knows” a thread’s thread.firstpostid can be used to grab 1st post attachment info, too. For example, I found one in tags.php, hookname: tags_list_query_data (see pg 12, post 169). How you’ve shaped up your forum shows me you should be able to take this FYI tidbit and run with it. Good luck.
Regards, theOzer
P.S.
Curiously, IE8 was officially released as I (pre)typed my reply diatribe here. IE8 seems to "handle" using HighSlide in Image Resizer (which I use with NO image resizing, just HighSlide). Hmmm...
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:44 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12845 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete