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)...
Code:
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]<if condition="$show['sticky']">&st=1</if>
Adsense condition in my postbit template...
Code:
<if condition="(($post[postcount]==1 and $issticky!=1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
Added this plugin (hook: postbit_display_complete):
Code:
if ($_GET[st] ==1) {
$issticky = 1;
}