Hi,
I am currently trying to modify some of the features in vB which only takes effect based on the forum ID. I have:
# In: phpinclude_start
Code:
$article_forums = array(4,5);
And in the template(s) I have:
Example template, forumdisplay:
Code:
<if condition="in_array($forumid,$article_forums)">
stuff
<else />
other stuff
</if>
However this gives me the following error:
Quote:
The following error occurred when attempting to evaluate this template:
Warning: in_array(): Wrong datatype for second argument in /includes/adminfunctions_template.php(3096) : eval()'d code on line 4
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
|
The funny thing is, when I don't use a variable it works fine:
Code:
<if condition="in_array($forumid,array(4,5))">
stuff
<else />
other stuff
</if>
I am guessing this is because the variable is not being parsed?
Any help is appreciated.