vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Thread Thumbnail (https://vborg.vbsupport.ru/showthread.php?t=98651)

jasonmerchant 10-19-2005 11:58 PM

hmm... well I'm not really sure what is wrong, can you test this:

Code:

$thumbsforums = array(210);
$displaythumbs = false;
if (in_array($forumid, $thumbsforums)) {
        $displaythumbs = true;
        $hook_query_fields = "";
        $hook_query_joins = "";
        $hook_query_where = "";
}

If this test is successfull it should display "no thumbnail" images on all threads.

If it still failed then run this test:

Code:

$thumbsforums = array(210);
$displaythumbs = false;
if (in_array($forumid, $thumbsforums)) {
        $hook_query_fields .= ", attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid ";
        $hook_query_joins .= "LEFT JOIN " . TABLE_PREFIX . "attachment as attachment ON(attachment.postid = thread.firstpostid) ";
        $hook_query_where .= "GROUP BY thread.threadid ";
}

If this test is successfull it will display your threads normally without thumbnails.

Let me know what your results were.

jasonmerchant 10-20-2005 02:48 AM

Quote:

Originally Posted by Xplorer4x4
Is there a way that a user can choose to disable it as well? Say for dial up users?

I've updated the first post with the changes needed to do this under Add-ons. :)

trancetopia 10-20-2005 11:57 AM

Hi Jason, i've given those two scripts a try and here are the results:

The 1st script made little difference in the fact that it did not display any threads just like my initial problem.

The 2nd script did exactly as you said, it displayed all the threads without any thumbnail images.

Thanks for your help trying to work this out, it's really appreciated.

jasonmerchant 10-20-2005 08:04 PM

:D , then the answer is simple, one of your other hacks is using the variable $displaythumbs. This can be easily solved be changing the name to something more unique such as $tt_displaythumbs (tt for thread thumbnail). I've just updated the template and xml with "tt_" added to my variables.

trancetopia 10-20-2005 09:42 PM

Hey it's working now, kind of. Sorry to give you more bad news but only one of the thumbnails is now showing.

You can view the forum here:

http://www.littlewales.com/forumdisplay.php?f=210

jasonmerchant 10-20-2005 09:50 PM

you have an old template, that was fixed a while back when I moved the <if condition="$show['threadicon']"> inside the else statement

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>


Xplorer4x4 10-21-2005 03:23 AM

@Jason can you please provide the intructions in the zip file.

trancetopia 10-21-2005 07:04 AM

Quote:

Originally Posted by jasonmerchant
you have an old template, that was fixed a while back when I moved the <if condition="$show['threadicon']"> inside the else statement

Doh, it's working great now :). Thank you for your time with getting this to work for me. For the type of content on my forum, this will probably be one of the most visually useful plugins ever.

Cheers

jasonmerchant 10-22-2005 05:03 AM

Quote:

Originally Posted by Xplorer4x4
@Jason can you please provide the intructions in the zip file.

Done. :)

rookiyong 10-27-2005 08:59 AM

Hi, nice hack here. :)

Is there any options of displaying the Avatar of the thread started instead of using attachments?


All times are GMT. The time now is 09:07 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.01351 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
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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