PDA

View Full Version : Simple conditional but it's got me


Kerry-Anne
Sun 19th Dec '04, 7:52pm
I can't for the life of me figure out the conditional to say that
<if condition="forumid=x">then do y <else /> do z</if>

It's the bit where it recognises the forumid and acts accordingly. At the moment I have it doing 'y' in all forums and not just in the one where I want it to do that.

Cheers People :D

manguish
Sun 19th Dec '04, 8:43pm
I use the forumdisplay template to display my advertisers banners. You will/may want to use a different one though - but this should do the same no matter where its put.

<if condition="$forumid == XX">
yadda yadda
</if>

Replace XX with forum number.

Kerry-Anne
Sun 19th Dec '04, 8:56pm
I'm using it in the postbit template. Now it have reverted to the <else /> part of my if statement in all forums.

Zachery
Sun 19th Dec '04, 9:34pm
try

$thread[forumid]

Kerry-Anne
Sun 19th Dec '04, 9:37pm
$thread[forumid=x]?

Zachery
Sun 19th Dec '04, 9:39pm
No thats just a varible ka


<if condition="$thread[forumid] == XX">
yadda yadda
</if>

Kerry-Anne
Sun 19th Dec '04, 9:41pm
Thanks Zachery :D

It works now :D

I must be an idiot getting it so completely wrong :(

Zachery
Sun 19th Dec '04, 9:46pm
I did some really stupid things back when i was learing ;) No worries

Floris
Sun 19th Dec '04, 9:57pm
I don't think KA did something really stupid though. Don't feel shy asking KA :)

Kerry-Anne
Sun 19th Dec '04, 10:00pm
Thanks. Feeling better now.

Now where to release my little mod. vBT or vB.org?

Floris
Sun 19th Dec '04, 10:01pm
Template modifications are to be released on vBulletinTemplates.com