PDA

View Full Version : How To Disable Thumbnails In Specific Forums


Jake Bunce
Thu 15th Apr '04, 12:40am
Go to your:

Admin CP -> Styles & Templates -> Style Manager -> « » -> PHP Include Code Templates -> phpinclude_start

Add this code to that template:


// FORUMIDS FOR WHICH THUMBNAILS ARE DISABLED
// FULL-SIZED IMAGE WILL SHOW
$no_thumbs = array(1, 2, 3);


Where the numbers inside the parenthesis are the forumids of the forums for which you want to disable thumbnails. This is a comma separated list. Change the numbers appropriately.

Then go to your:

Admin CP -> Styles & Templates -> Style Manager -> « » -> Postbit Templates -> postbit_attachmentthumbnail

Add the code in red:


<if condition="!in_array($forum[forumid], $GLOBALS['no_thumbs'])">

<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]" target="_blank"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a>
&nbsp;<if condition="$show['br']"><br /><br /></if>

<else />

<img class="attach" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1" border="0" alt="" />&nbsp;

</if>


Now thumbnails will be disabled for the forumids specified in your phpinclude_start template. If you ever want to re-enable or disable thumbnails for a forum you need to edit your phpinclude_start template appropriately.