vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Thumbnail of Attachments on forum display (https://vborg.vbsupport.ru/showthread.php?t=73220)

Sadie Frost 12-23-2004 05:14 AM

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 :)

Dechevious 12-23-2004 05:57 AM

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.

Sadie Frost 12-23-2004 06:07 AM

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

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 -->


cinq 12-23-2004 06:14 AM

Is there a way to check the attachment for its extension ?
Wondering how to get round the non image attachment situation.

Lord Brar 12-23-2004 07:12 AM

oh wow! something i've been dreaming for months... I'll install it once my host move is over :P

Delphy 12-23-2004 12:24 PM

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

Dechevious 12-23-2004 12:36 PM

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.

Delphy 12-23-2004 06:20 PM

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 :)

MrNase 12-23-2004 06:53 PM

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.

lasto 12-23-2004 07:14 PM

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 ?


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

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.01253 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete