Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Thumbnail of Attachments on forum display Details »»
Thumbnail of Attachments on forum display
Version: 1.00, by Dechevious Dechevious is offline
Developer Last Online: Oct 2005 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-21-2004 Last Update: Never Installs: 72
 
No support by the author.

This hack has been requested a number of times, for multiple versions of vBulletin. For whatever reason, it was never done (at least publicly) until now. Heres to wishing each and everyone of you a Merry Christmas, and a prosperous, healthy, and safe, New Year!

What it does: This hack will display a thumbnail of the threads attachment on the forum display. Quite useful if you have forums designated for graphics/photos .. etc. Could also be tweaked to display the posters avatar instead of an attachment. Variable possibilities. (Screenshot attached for further review) and or see it in action at this forum in realtime. If the thread has multiple attachments, it will display the first. If no attachment, a 'no attachment' thumb will appear. Can be assigned for use in any forum you wish it to be active in.

Install time is minimal - Less than 5 minutes for the average joe. (Simplicity at it's Finest)
1 file to modify, and 1 template to modify, along with the upload of an image.

Known Issues: If the attachment is not an image, a thumbnail will not be shown. (IE: .zip or .rar)

If you install it, please click the 'Install' icon - Updates will be sent to those who do.

Supporters / CoAuthors

Show Your Support

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

Comments
  #12  
Old 12-23-2004, 05:14 AM
Sadie Frost's Avatar
Sadie Frost Sadie Frost is offline
 
Join Date: Dec 2001
Location: Pittsburgh
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm having a problem getting the thumbnails to display, and I'm not sure where to look to troubleshoot. The thumbnails display fine in the post, and I have set the forum id in the forumdisplay file. It's showing thumbnail not available for threads without attachments (I believe it's threads that have a threadicon).

I tried removing the last else bit, that shows the threadicon if there is no attachment. Also tried rebuilding thumbails.

Any suggestions?

http://buffy-boards.com/forumdisplay.php?f=19

Edit: I discovered the problem - it was that I needed to have a default icon enabled for the forum. I don't have any idea why that makes a difference...lol...but it does
Reply With Quote
  #13  
Old 12-23-2004, 05:57 AM
Dechevious Dechevious is offline
 
Join Date: Dec 2004
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sadie Frost
Edit: I discovered the problem - it was that I needed to have a default icon enabled for the forum. I don't have any idea why that makes a difference...lol...but it does
Yes - If a thumbnail does not exist (the thread has no attachment) it is set by default to retrieve an image titled 'nothumb.gif' from your images/misc DIR - I see on your forums your now using the 'clear.gif' (Not a bad choice!) Glad to see it working well for you.
Reply With Quote
  #14  
Old 12-23-2004, 06:07 AM
Sadie Frost's Avatar
Sadie Frost Sadie Frost is offline
 
Join Date: Dec 2001
Location: Pittsburgh
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this! I tried for the longest time to code it myself but lol, not a coder

I think maybe if you have no set default icon (via your admincp options), you just need to rearrange the conditional in the threadbit template in order to get it to work without having a threadicon specified. Like move that '<if condition="$show['threadicon']">' bit. But I haven't played around with that or anything so I don't know.

Edit:

Okay, yes, if you have no default post icon selected in your admincp, I used this code for the threadbit template and it works:

Code:
<!-- Start: idolpx and dechevious Thumbnail in Forum Display Hack - 20041220 -->
<if condition="$show['threadicons']">

<td class="alt2" align="center" valign="middle">	
<if condition="$displaythumbs">
			     <if condition="$thread['attachmentid']">
			     	<a HREF="attachment.php?attachmentid=$thread[attachmentid]">
			          	<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" border=0>
			        </a>
			     <else />
			        <img src="images/clear.gif" width=75 height=56 border="0"></if>
			 			<else /><if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /></if></td>
	</if>
</if>
<!-- End: Start: idolpx and dechevious Thumbnail in Forum Display Hack - 20041220 -->
Reply With Quote
  #15  
Old 12-23-2004, 06:14 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to check the attachment for its extension ?
Wondering how to get round the non image attachment situation.
Reply With Quote
  #16  
Old 12-23-2004, 07:12 AM
Lord Brar's Avatar
Lord Brar Lord Brar is offline
 
Join Date: Jul 2004
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh wow! something i've been dreaming for months... I'll install it once my host move is over :P
Reply With Quote
  #17  
Old 12-23-2004, 12:24 PM
Delphy Delphy is offline
 
Join Date: Dec 2004
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This looks good and I could certainly use it on my forums (http://www.modthesims2.com/)

One thing though I need clarifying: It's mentioned that it takes the first attachment.. what if the first attachment is not an image? Does it display no attachment available?

If so, then would there be a way of looping until it does get the first image available only in the first post on the thread? I'm guessing this would add another query though.

Regards,
Delphy
Reply With Quote
  #18  
Old 12-23-2004, 12:36 PM
Dechevious Dechevious is offline
 
Join Date: Dec 2004
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Delphy
This looks good and I could certainly use it on my forums (http://www.modthesims2.com/)

One thing though I need clarifying: It's mentioned that it takes the first attachment.. what if the first attachment is not an image? Does it display no attachment available?
If the attachment is not an image, it will display a red x box (at the moment) trying to find a work around for this. If it has no attachment, it will display a no attachment gif.
Reply With Quote
  #19  
Old 12-23-2004, 06:20 PM
Delphy Delphy is offline
 
Join Date: Dec 2004
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay thanks for the reply. I've had a few thoughts about how to achieve this with the minimum of queries, so I'll take a look at the hack
Reply With Quote
  #20  
Old 12-23-2004, 06:53 PM
MrNase MrNase is offline
 
Join Date: May 2003
Location: Germany
Posts: 670
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice, already had it running at http://www.pagodentreff.de/diskussio...splay.php?f=22 but I never released it because I thought nobody will ever use it

Mine chooses randomly from any picture which is attached to the first post.
Reply With Quote
  #21  
Old 12-23-2004, 07:14 PM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MrNase
Nice, already had it running at http://www.pagodentreff.de/diskussio...splay.php?f=22 but I never released it because I thought nobody will ever use it

Mine chooses randomly from any picture which is attached to the first post.
so what happens on your board m8 if your attachment is a rar - does it display a red X ?
Reply With Quote
Reply

Thread Tools

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 08:36 PM.


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.04626 seconds
  • Memory Usage 2,304KB
  • Queries Executed 26 (?)
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
  • (1)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
  • (3)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