PDA

View Full Version : If a thread is sticky... (solved)


rootnik
07-09-2007, 01:24 AM
Is there anyway to tell if a thread is sticky, from showthread.php, without any additional queries?

I have some adsense ads in my first and last postbit. I want to disable those ads if the thread is 'stuck'.

EDIT

I figured it out. I can't believe I didn't think of this before I posted...

Altered the showthread.php url in the threadbit template (if condition)...


<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]<if condition="$show['sticky']">&st=1</if>


Adsense condition in my postbit template...

<if condition="(($post[postcount]==1 and $issticky!=1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">


Added this plugin (hook: postbit_display_complete):


if ($_GET[st] ==1) {
$issticky = 1;
}