The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
if condition problem
Ok, i want to show some information in forum x y z and in the other forums i want to hide it.
Which conditions you think i should use? By the way i'm editing the template forumhome_forumbit_level1_post. I'm want that forum 9,10,11 will show hey and the other forums will show nothing By the way it is all an examples. |
#2
|
||||
|
||||
If you look at the template, you'll see the variables used in it and one of them is $forum[forumid]. So, use that in your condition:
HTML Code:
<if condition="in_array($forum['forumid'], array(x, y, z))"> stuff only for forums x, y, and z </if> |
#3
|
|||
|
|||
Its not working.
I'm trying to do this <if condition="in_array($forum['forumid'], array(9, 132, 95, 72, 13, 288, 113, 124, 11, 12, 100, 62, 16, 421, 14, 10))"> My costume code. </if> and it is not change, i still staying the same as the main code |
#4
|
||||
|
||||
You ONLY put the forum IDs of the forums you WANT it to show in.
|
#5
|
|||
|
|||
This is what i did, i put the id of the categories i want to show it there.
Maybi i need another condition to hide some COSTUME TEMPLATE in this forums |
#6
|
||||
|
||||
So your saying your custom code is still showing everywhere on the forum?
|
#7
|
|||
|
|||
My costume code isn't showing any where, But i think i need another code that make the opposite of this code.
I want to hide some information in a few forums that i choose |
#8
|
||||
|
||||
Did you test the code first to make sure it was showing at all, by itself?
|
#9
|
|||
|
|||
of course, i tried to replace it with the original code and it worked good.
but the problem was that i want to show it only in categories and not in the all forums. And the code Lynne gave me above doesn't work |
#10
|
||||
|
||||
You can try the opposite:
HTML Code:
<if condition="!in_array($forum['forumid'], array(x, y, z))"> stuff only if NOT in forums x, y, and z </if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|