vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Display Enhancements - Thread Thumbnail (https://vborg.vbsupport.ru/showthread.php?t=158396)

Trana 07-16-2008 03:59 AM

Pretty cool, does it do that in the normal search results as well?

Can you point me to the post describing how to install it that way? It seems like there are a lot of them.

iamthemoz 07-16-2008 02:16 PM

Thank you so much for this plugin. Works great! I was just wondering though, if there is a way to display images as a thumbnail for a thread that are not attachments, but are displayed in the 1st post of a thread?

theOZer 07-17-2008 05:56 PM

Trana,

In AdminCP > Plugins & Products > Plugin Manager
Edit the plugin 'Thread Thumbnail - Search'
Change $tt_displaythumbs to $tt_displaythumbs_search
Code:

$tt_displaythumbs_search = true;
        $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 AND (attachment.extension = 'jpg' OR attachment.extension = 'gif' OR attachment.extension = 'png')) ";
        $hook_query_where .= "GROUP BY thread.threadid ";

In threadbit template add an additonal IF statement like you added for the Tag Search changing the IF stmt to check for $tt_displaythumbs_search (versus the Tag Search checking for $tt_displaythumbs_tag).

This is the code I'm using. Yes, this is a monster IF statement. It works. It handles displaying thumbnails for Tag Searches, New Posts & regular Searches, Forums that have been added to the Thread Thumbnail plugin. I have also set up User Profile fields to allow the user to turn On/Off thread thumbnail display and have those checks also in the code.
Note: And, for poops-N-grins, I wrapped all the img code in href tags so you can click on thread thumbnails or the default thread icon to go to the thread.
Code:

<!-- OMAC Thread Thumbnails -->
<if condition="$show['threadicons']">
  <td class="alt2" align="center" valign="middle">
<!-- Tag Search -->
  <if condition="($tt_displaythumbs_tags) AND $bbuserinfo['field9'] <> 'Off'">
    <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 />
      <if condition="$show['threadicon']">
        <a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
        <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
        </a>
      <else />
        &nbsp;
      </if>
    </if>
  <else />
<!-- New Posts & regular Search -->
    <if condition="($tt_displaythumbs_search) AND ($bbuserinfo['field8'] <> 'Off' OR $show['guest'])">
      <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 />
        <if condition="$show['threadicon']">
          <a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
          <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
          </a>
        <else />
          &nbsp;
        </if>
      </if>
    <else />
<!-- Check for Thread Thumbnailed Forums -->
      <if condition="($tt_displaythumbs) AND ($bbuserinfo['field8'] <> 'Off' OR $show['guest'])">
        <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 />
          <a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
          <img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
          </a>
        </if>
      <else />
<!-- the original vB code -->
        <if condition="$show['threadicon']">
          <a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
            <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
          </a>
        <else />
          &nbsp;
        </if>
      </if>
    </if>
  </if>
  </td>
</if>
<!-- end of OMAC Thread Thumbnails -->

Chow, ~OZ

theOZer 07-17-2008 06:01 PM

iamthemoz,
Check a few posts here submitted by NeverBored.
Page 9, post #128
follow-up
Page 10, posts #144, #145.
Later, ~OZ

mrxclusive 07-28-2008 02:16 PM

this is to hard to install can someone help me

viper007 07-28-2008 05:05 PM

Quote:

Be sure to change the forum ids in the $thumbsforums array to the forum ids you want to enable thumbnails in.
where it is??

theOZer 07-28-2008 09:33 PM

AdminCP > Plugins & Products > Plugin Manager, then edit Thread Thumbnails, adding your forums that you want thread thumbnailed.
example, $tt_thumbsforums = array(4, 5, 17, 46, 50, 53);

viper007 07-29-2008 01:32 AM

i had installed everything told by u in the installation..but cant view the thumbnails...whatswrong??my website is www.sportivestudents.com and i want to put in telugu hiquality dvdrips

Trana 07-29-2008 05:45 AM

Quote:

Originally Posted by theOZer (Post 1577875)
iamthemoz,
Check a few posts here submitted by NeverBored.
Page 9, post #128
follow-up
Page 10, posts #144, #145.
Later, ~OZ

I don't think thats what he wanted.

What he was trying to was to display linked images as thumbnails too when there are no attachments in the thread. That would be killer.

Trana 07-29-2008 05:52 AM

I don't understand, where do I put this? In threadbit? If it is to display thumbnails in search results is it the same template?

Thanks.

Quote:

Originally Posted by theOZer (Post 1577872)
Trana,

In AdminCP > Plugins & Products > Plugin Manager
Edit the plugin 'Thread Thumbnail - Search'
Change $tt_displaythumbs to $tt_displaythumbs_search
Code:

$tt_displaythumbs_search = true;
        $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 AND (attachment.extension = 'jpg' OR attachment.extension = 'gif' OR attachment.extension = 'png')) ";
        $hook_query_where .= "GROUP BY thread.threadid ";

In threadbit template add an additonal IF statement like you added for the Tag Search changing the IF stmt to check for $tt_displaythumbs_search (versus the Tag Search checking for $tt_displaythumbs_tag).

This is the code I'm using. Yes, this is a monster IF statement. It works. It handles displaying thumbnails for Tag Searches, New Posts & regular Searches, Forums that have been added to the Thread Thumbnail plugin. I have also set up User Profile fields to allow the user to turn On/Off thread thumbnail display and have those checks also in the code.
Note: And, for poops-N-grins, I wrapped all the img code in href tags so you can click on thread thumbnails or the default thread icon to go to the thread.
Code:

<!-- OMAC Thread Thumbnails -->
<if condition="$show['threadicons']">
  <td class="alt2" align="center" valign="middle">
<!-- Tag Search -->
  <if condition="($tt_displaythumbs_tags) AND $bbuserinfo['field9'] <> 'Off'">
    <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 />
      <if condition="$show['threadicon']">
        <a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
        <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
        </a>
      <else />
        &nbsp;
      </if>
    </if>
  <else />
<!-- New Posts & regular Search -->
    <if condition="($tt_displaythumbs_search) AND ($bbuserinfo['field8'] <> 'Off' OR $show['guest'])">
      <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 />
        <if condition="$show['threadicon']">
          <a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
          <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
          </a>
        <else />
          &nbsp;
        </if>
      </if>
    <else />
<!-- Check for Thread Thumbnailed Forums -->
      <if condition="($tt_displaythumbs) AND ($bbuserinfo['field8'] <> 'Off' OR $show['guest'])">
        <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 />
          <a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
          <img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
          </a>
        </if>
      <else />
<!-- the original vB code -->
        <if condition="$show['threadicon']">
          <a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
            <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
          </a>
        <else />
          &nbsp;
        </if>
      </if>
    </if>
  </if>
  </td>
</if>
<!-- end of OMAC Thread Thumbnails -->

Chow, ~OZ



All times are GMT. The time now is 02:13 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.01397 seconds
  • Memory Usage 1,794KB
  • 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
  • (4)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
  • (2)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