Need condition to hide a code from forumid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EN1GMA
    Member
    • Nov 2008
    • 79
    • 4.2.X

    [Forum] Need condition to hide a code from forumid

    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...

    Can someone please help me? Thanks!

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

    Last edited by EN1GMA; Fri 22 Mar '13, 1:43am.
  • EN1GMA
    Member
    • Nov 2008
    • 79
    • 4.2.X

    #2
    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?

    Comment

    • Hartmut
      Senior Member
      • Nov 2007
      • 2870
      • 4.2.x

      #3
      PHP Code:
      <vb:if condition="$forum['forumid'] != 6"
      should be fine, the forumid is available in that template.
      No private support, only PM me when I ask for it. Support in the forums only.

      Comment

      • EN1GMA
        Member
        • Nov 2008
        • 79
        • 4.2.X

        #4
        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

        Comment

        Related Topics

        Collapse

        Working...