Log in

View Full Version : forumid in_array


Jorrit787
12-27-2006, 08:30 PM
EDIT: Never mind, it does work :tired:


I have a piece of HTML I only want shown to Administrators (usergroup 6) in certain forums (forumids 5,6,7,9,15,16,17,18,24,25,27, and 30), so I use the following in my template:

<if condition="is_member_of($bbuserinfo, 6)">
<if condition="in_array($thread[forumid], array(5,6,7,9,15,16,17,18,24,25,27,30))">

--- HTML goes here ---

</if>
</if>The is_member_of check works, but the in_array doesn't... It doesn't show the code anywhere, even in the forums that I do want it to be shown in...

What am I doing wrong? :confused:

Adrian Schneider
12-27-2006, 08:32 PM
Try using $foruminfo['forumid'] instead of $thread[forumid]. Also, where are you using this?

Jorrit787
12-27-2006, 08:37 PM
Try using $foruminfo['forumid'] instead of $thread[forumid]. Also, where are you using this?Sorry, it does work - I must have been looking at the wrong page :surprised: I was trying to add some code to SHOWTHREAD.