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
  #342  
Old 02-01-2010, 11:39 PM
bobster65's Avatar
bobster65 bobster65 is offline
 
Join Date: Mar 2006
Location: Montana
Posts: 1,169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theOZer View Post
As of vB4 Beta 5 the thread thumbnail 'issue' still applies; there is no vB4 option anywhere to display on the forumdisplay.php thread listing the thread thumbnail next to the thread, nor in searches and/or tag searches. This truly befuddles me; why has this never been addressed; am I the only art forum out there with posted art attachments?

Well, anyhow, past the griping?

Things have really changed in vB4 and this mod, at first glance, will NOT be readily interfacable into the new scheme of things that vB has mixed up. Gone, gone are the $dataquery, $items and stuff like that, the Hooks I believe is what they are/were called.
So?
At this point I can not see a way to incorporate this mod?s approach into the vB4 templates and php.
Has anyone else had a gem of wisdom here as to how to proceed, once again, in finding a way in vB4 to display thread thumbnails of forum thread listings, search and tag search listings? Please let us know.
Ciao, theOZer
well, its easy to get the thumbnail to display, it just looks like crap lol I am messing around with the CSS now so as to have minimum impact on the default CSS for forumdisplay but gah!

not sure how much you've done, but it only requires a couple simple changes to the plugin and adding some code to the threadbit template..
Reply With Quote
  #343  
Old 02-02-2010, 03:50 PM
theOZer's Avatar
theOZer theOZer is offline
 
Join Date: Mar 2007
Location: Colorado, USA
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bobster65,
That's great news. Could you share what you've learned with the rest of us? The 'a couple simple changes,' the 'and adding some code code to threadbit.' Sounds good and I would love to know how you did it.
~OZ
Reply With Quote
  #344  
Old 02-03-2010, 03:38 AM
conheomap conheomap is offline
 
Join Date: Feb 2009
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does it work with vbAdvanced CMPS?
Reply With Quote
  #345  
Old 02-03-2010, 12:47 PM
bobster65's Avatar
bobster65 bobster65 is offline
 
Join Date: Mar 2006
Location: Montana
Posts: 1,169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theOZer View Post
bobster65,
That's great news. Could you share what you've learned with the rest of us? The 'a couple simple changes,' the 'and adding some code code to threadbit.' Sounds good and I would love to know how you did it.
~OZ
Did the Author give you permission to take this over or port it to vb4? If not, I can't just post a vb4 version of this without his consent. If he did, then let me know.
Reply With Quote
  #346  
Old 02-03-2010, 04:21 PM
theOZer's Avatar
theOZer theOZer is offline
 
Join Date: Mar 2007
Location: Colorado, USA
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx for you help; what part of Jason Merchant does not support this mod AND HASN'T SINCE HE RELEASED IT and everyone else who uses it has tried to pick up the slack isn't kosher with you?
I did NOT know there was some code of ethics here?
And, stop quoting; any one following this thread can look up at the post above the current post to 'get the drift.'
Ciao, Dennis "theOZer" Osborne
Reply With Quote
  #347  
Old 02-03-2010, 06:21 PM
bobster65's Avatar
bobster65 bobster65 is offline
 
Join Date: Mar 2006
Location: Montana
Posts: 1,169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theOZer View Post
Thx for you help; what part of Jason Merchant does not support this mod AND HASN'T SINCE HE RELEASED IT and everyone else who uses it has tried to pick up the slack isn't kosher with you?
I did NOT know there was some code of ethics here?
And, stop quoting; any one following this thread can look up at the post above the current post to 'get the drift.'
Ciao, Dennis "theOZer" Osborne
Whoa dude.. whats with the attitude towards someone that is wanting and trying to help? I asked you a very simple question on if the original author had given you permission to take over his work. I looked at the Mod Post and didn't see a remark that he gave you permission to take it over and I wasn't going to sift through all the pages to see if he did. He also didn't mark it with REUSABLE CODE (meaning that anyone could borrow his code and release it). Marking a Modification as Un Supported does not mean that anyone can just take it over.

I am MORE than willing to create a new Mod for vb4, hell, I was going to just give YOU the code so that you could post it as a new mod and support it, but wow with the attitude. NOT the response I thought I'd get, but then again, it doesn't surprise me here anymore.
Reply With Quote
  #348  
Old 02-04-2010, 04:01 PM
theOZer's Avatar
theOZer theOZer is offline
 
Join Date: Mar 2007
Location: Colorado, USA
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry.
I apologize.
I'll figure it out on my own. And, if I succeeed, I'll share my success with every one that has been following this mod and using this mod and needing the thumbnails to show in their forums.
And, I tried to contact this Jason Merchant. He did not respond. I tried to contact vB.org on how I could help or take over supporting this mod but, also here, I got no response.
So...whatever.
~OZ
Reply With Quote
  #349  
Old 02-04-2010, 04:22 PM
Arkham's Avatar
Arkham Arkham is offline
 
Join Date: Nov 2001
Location: Toronto, Ontario
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hope everyone can shake hands and continue with this project. theOZer has made substantial contributions to the functionality and longevity of this mod. (Thank you, sir.)

I dropped Jason Merchant an email via his site, in case that helps. Hopefully something will come of it.

I'm still shocked that this functionality isn't available in vB4 by default. It is absolutely required. (For everything from threads to articles to blogs...)
Reply With Quote
  #350  
Old 02-09-2010, 06:40 PM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a coder friend of mine who wrote a custom code that did this for my VB3.- forum. I'll engage him to see if he can't figure out how to pull it off with VB4. If he does I'll post the addon here for everyone.

And geez.. play nice kids - it's just a Web site.
Reply With Quote
  #351  
Old 02-10-2010, 05:23 AM
PascalR's Avatar
PascalR PascalR is offline
 
Join Date: Oct 2009
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey this is a great mod, I love it!
I was wondering , is there a way use the latest attached image to the thread as a thumbnail, instead of the first one?
We are doing work in progress threads on my forum and usually the last attached image is more representative of the work done.

Cheers

P.
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 10:29 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.20279 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
  • (3)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