The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Ok detecting it's showthread is easy
Code:
<if condition="THIS_SCRIPT == 'showthread'"> e.g. If a thread has more than 10 posts would it be something like this? Code:
<if condition="THIS_SCRIPT == 'showthread' AND $post['postcount']>10">do something</if> Code:
$post['postcount'] % $vboptions['maxposts'] == x" |
#2
|
||||
|
||||
![]() Code:
<if condition="THIS_SCRIPT == 'showthread' AND $thread['replycount'] > 10"> |
#3
|
|||
|
|||
![]()
Fantastic thanks D! What I'm doing is adding another banner to the side column if there's a few replies to a thread so it's actually the header template that'll be edited. Lots of white space there at the moment.
Cheers |
#4
|
||||
|
||||
![]()
You may actually have to use [s]$foruminfo[/s] $threadinfo instead in the header template.
|
#5
|
|||
|
|||
![]()
Yeah it doesn't seem to work here's what I have:
Code:
<if condition="$show['guest']"> <table width="$stylevar[outertablewidth]" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td width="140" valign="top" class="page" style="padding: $stylevar[cellpadding]px;"><if condition="THIS_SCRIPT == 'forumdisplay' AND $show['guest']"> <div align="center">AD HERE</div><br /> </if> <div align="center">AD HERE</div> <if condition="$show['guest'] AND THIS_SCRIPT == 'showthread' AND $thread['replycount'] > 5">this ad never shows</if> <td valign="top"> </if> <!-- content table --> I know I could be playing around with this but it's a live board and they'd go hysterical if I started playing around now. Cheers |
#6
|
||||
|
||||
![]()
Sorry, I actually meant $threadinfo instead of $thread.
![]() |
#7
|
|||
|
|||
![]()
You could've said $mumbojumbo for all the use it's doing me lol
--------------- Added [DATE]1233449174[/DATE] at [TIME]1233449174[/TIME] --------------- Ok after a lot of googling (your name came up a lot D!) and cross posting over at vb.com, it seems that unfortunately the "header template is parsed early in the page execution, before that information is available" Jake suggested coding something in php. Instead Im thinking of replacing the $header call in SHOWTHREAD with a custom template depending on how many posts on the page. Something like: Code:
<if condition="($post[postcount]-1) % $GLOBALS[perpage] == 0"> <if condition="($GLOBALS[totalposts] - $post[postcount]) > 5">$longheader <else />$header </if> </if> ![]() Actually I've decided just to add another banner regardless of how many replies so I'm not going to bother with any of the above. Thanks for the help - I learnt a bit anyway |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|