Skip to content
WJunction - Webmaster Forum

Need condition to hide a code from forumid

Status
Not open for further replies.

Divvy

Experienced Member
806
2009
18
Hello guys,

Can someone please tell me how can I use a condition to hide a code in a specific forum id?

I have a custom code in postbit_legacy.

I already tried many codes but none is working:
Code:
<vb:if condition="$forum[forumid] != 6">

Code:
<vb:if condition="$thread[forumid] != 6">

etc...

If possible, I like to use this to work together with:
Code:
<vb:if condition="$post['isfirstshown']">

Can someone please help me? Thanks! :)

---------- Post added at 10:09 AM ---------- Previous post was at 09:56 AM ----------

Ok, I found a code that works:
Code:
<vb:if condition="$post['isfirstshown'] AND in_array($thread[forumid], array(6))">

This will show the code ONLY in a specific forum.

Is almost what I want, but I need to HIDE in a specific forum... any ideas?

---------- Post added at 10:14 AM ---------- Previous post was at 10:09 AM ----------

Fixed!

Just needed to place a ! before the in_array

Correct code:
Code:
<vb:if condition="$post['isfirstshown'] AND !in_array($thread[forumid], array(6))">

Thank you anyway guys :)
 
Status
Not open for further replies.

About the author

D
Experienced Member · Joined
806
Messages
18
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom