Go Back   vb.org Archive > vBulletin Modifications > vBulletin 5.x Modifications > vBulletin 5.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
image thumbnails for the list of attachments Details »»
image thumbnails for the list of attachments
Version: 1.00, by Zachery Zachery is offline
Developer Last Online: May 2017 Show Printable Version Email this Page

Category: Mini Mods - Version: 5.1.x Rating:
Released: 07-23-2014 Last Update: Never Installs: 6
Template Edits
 
No support by the author.

This is pretty straight forward, it will bring back your attachment thumbnails in the attachment list display.

Find the bbcode_attachment_list template, and replace the code in there, with the following code

HTML Code:
<vb:if condition="!empty($attachments)">
	<div class="b-post-attachments" style="max-width: 60%;">
		{vb:rawphrase attached_files}
		<ul>
		<vb:each from="attachments" value="attachment">
			<vb:if condition="!empty($attachment['filename'])">
				{vb:set displayName, {vb:raw attachment.filename}}
			<vb:elseif condition="!empty($attachment['caption'])" />
				{vb:set displayName, {vb:raw attachment.caption}}
			<vb:else />
				{vb:set displayName, {vb:raw attachment.nodeid}}
			</vb:if>
			<vb:if condition="in_array($attachment[extension], array(jpeg, jpg, png, gif, jpe))">
				<li class="b-post-attachments__item"  style="display:inline-flex; padding:3px;">
					<a href="{vb:raw attachurl}{vb:raw attachment.nodeid}">
					<img 
					class="thumbnail-photo" 
					src="{vb:raw baseurl}/filedata/fetch?id={vb:raw attachment.nodeid}&amp;type=thumb" 
					title="" 
					alt="" 
					/>
					</a>
				</li>
			</vb:if>
		</vb:each>
		<vb:each from="attachments" value="attachment">
			<vb:if condition="!empty($attachment['filename'])">
				{vb:set displayName, {vb:raw attachment.filename}}
			<vb:elseif condition="!empty($attachment['caption'])" />
				{vb:set displayName, {vb:raw attachment.caption}}
			<vb:else />
				{vb:set displayName, {vb:raw attachment.nodeid}}
			</vb:if>
			<vb:if condition="!in_array($attachment[extension], array(jpeg, jpg, png, gif, jpe))">
				<li class="b-post-attachments__item">
					<a href="{vb:raw attachurl}{vb:raw attachment.nodeid}">
					<span class="b-icon b-icon__doc--gray"></span>
					<span class="h-wordwrap">{vb:raw displayName}</span>
					<vb:if condition="$attachment['counter'] == 1">
						{vb:set phrase, 1_view}
					<vb:else />
						{vb:set phrase, x_views}
					</vb:if>
					<span>({vb:raw attachment.filesize}, {vb:phrase {vb:raw phrase}, {vb:raw attachment.counter}}) </span>
					</a>
				</li>
			</vb:if>
		</vb:each>
		
		</ul>
	</div>
</vb:if>
If you'd like to see this issue fixed properly, please make sure to voice your opinion here: http://tracker.vbulletin.com/browse/VBV-11653

Screenshots

File Type: jpg 2014-07-24_17h43_33.jpg (59.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
DragonByte Tech, tbworld

Comments
  #2  
Old 12-03-2014, 06:31 PM
PiotrGT PiotrGT is offline
 
Join Date: Nov 2014
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have applied this mod and it did make a lot of my attachments show up as images but there are many that did not show up - it seems that there is an issue with rebuilding all of the images... how can this be fixed? I went to edit posts and these images simply didnt regenerate... How can I do a force regenerate?

example:
http://granturismo.pl/vb5/forum/%C5%...ixel2525/page5
Reply With Quote
  #3  
Old 12-03-2014, 07:10 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are new(er) images working as thumbnails?
Reply With Quote
  #4  
Old 12-04-2014, 06:35 AM
PiotrGT PiotrGT is offline
 
Join Date: Nov 2014
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's a random issue - here are the newer ones and some did not even convert from an attacthment link:
http://granturismo.pl/vb5/forum/%C5%...a-bullet/page2
or
http://granturismo.pl/vb5/forum/%C5%...a-bullet/page3

However it does seem like there are more older images suffering from this problem but then its not always like that - its very random....

I did a CHMOD 777 to all directories and images.
Reply With Quote
  #5  
Old 12-04-2014, 08:29 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can go into the AdminCP and try to run the rebuild thumbnails function.
Reply With Quote
  #6  
Old 12-05-2014, 06:18 AM
PiotrGT PiotrGT is offline
 
Join Date: Nov 2014
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, I did that many time and it did not resolve the issue. There has to be another way.
Reply With Quote
  #7  
Old 12-19-2014, 03:17 PM
jdj jdj is offline
 
Join Date: Sep 2009
Location: Hertfordshire, UK
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this mod be used to show thumbnail previews in the blog list? Or is it doing something else?
Reply With Quote
  #8  
Old 07-26-2018, 04:36 PM
keyla31's Avatar
keyla31 keyla31 is offline
 
Join Date: Feb 2009
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i know its old but i tried it 5.4.2 did not work.
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 06:21 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.05158 seconds
  • Memory Usage 2,299KB
  • Queries Executed 24 (?)
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_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (2)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete