PDA

View Full Version : Hide specific forums sub forums


Elyk
Sun 18th May '08, 4:50pm
We have a couple of forums that we do not want to have sub-forums showing on the main page but still have the sub-forums show in the rest of the forums.

I searched and found this - http://www.vbulletin.com/forum/showpost.php?p=1371079&postcount=10 and using this it hides one sub-forum perfectly but if the forum contains two or three forums what needs to be added to the conditional to hide them all?

<if condition="$forum[forumid]!=389"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a></if>

This works for forum 389 but we need that one plus 390 and 391 and 392 also.

Andy Huang
Sun 18th May '08, 5:11pm
<if condition="!in_array($forum[forumid], array(389, 390, 391, 392, xxx, yyy, zzz))">
...
</if>


I think that'll do what you want.

Elyk
Sun 18th May '08, 5:33pm
Thanks Andy,

It sort of works, removes the sub-forum name but leaves the commas showing and "sub-forums" also.

This is what I tried using your example:

<if condition="!in_array($forum[forumid], array(389, 390, 391, 392, 393))"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a></if>

26383