XF 2.0 Problems regarding hide content in multiple forums

Mian Shahid

Well-known member
Hi,

I am trying to use below code to hide some elements from multiple forum

PHP:
44. How do I hide content in multiple forums?
    
 
       Code:  

       <xf:if is="in_array($forum.node_id, [x,y,z])">
                  Hide content..
</xf:if>
including option to select forums as per board requirement.

My code looks like:

PHP:
<xf:if is="in_array($forum.node_id, [{$xf.options.itd_hideit01}])">

Now, the problem is, if i leave option box blank, content showing on all board but when i am putting any digit or even word or even symbol in option box, the target content hiding cross the board in all forum.

I try to fix it but nothing happened positive, can any one help me to figure it out?
 
Do some data validation on your input to ensure it is always stored as an array (empty or otherwise), or whatever data type you expect.
 
Back
Top Bottom