Hello,
I want to show in some foruns ids a thumbnail on threadbit. This is the code I'm being using that refers to this mod:
https://vborg.vbsupport.ru/showthread.php?t=158396
Threadbit template
HTML Code:
<!-- Imagem Thumbnail -->
<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.gif" alt="" border="0" />
</if>
<else />
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>
<!-- End of Imagem Thumbnail -->
Plug-in Code
PHP Code:
$tt_thumbsforums = array(57, 58, 59, 60, 61, 62, 63, 70);
$tt_displaythumbs = true;
if (in_array($forumid, $tt_thumbsforums)) {
$tt_displaythumbs = 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 ";
}
It should work, but the problem is that show the thumbnails in all foruns, and don't strict to the ones I put in the array.