added conditions to check for pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Smoothie
    Senior Member
    • Oct 2001
    • 250

    added conditions to check for pages

    I'm using this code to display an ad on certain pages, but need a little help.
    Code:
    <if condition="in_array(THIS_SCRIPT, array('index', 'showthread'))">
    I would like to add a condition to show on forumdisplay and not in 2 specific forums. I tried adding forumdisplay to the above code but got an error.

    So, I would like to show on forumindex, forumdisplay, showthread, but not in 2 specific forums.

    Thanks in advance!
  • Lats
    Senior Member
    • Mar 2002
    • 3671

    #2
    This works for me...
    Code:
    <if condition="in_array(THIS_SCRIPT, array('index', 'showthread', 'forumdisplay'))">
    What error are you getting?
    Lats...

    Comment

    • Smoothie
      Senior Member
      • Oct 2001
      • 250

      #3
      Originally posted by Lats
      This works for me...
      Code:
      <if condition="in_array(THIS_SCRIPT, array('index', 'showthread', 'forumdisplay'))">
      What error are you getting?
      None now! I must have made a mistake when adding the code. Any idea on the condition to eliminate 2 forums from displaying ads?

      Comment

      • Lats
        Senior Member
        • Mar 2002
        • 3671

        #4
        Something like this should do you well...
        Code:
        <if condition="(in_array(THIS_SCRIPT, array('index', 'showthread', 'forumdisplay'))) AND (!in_array($thread[forumid],array(11,18,13)))">
        Lats...

        Comment

        • Smoothie
          Senior Member
          • Oct 2001
          • 250

          #5
          Originally posted by Lats
          Something like this should do you well...
          Code:
          <if condition="(in_array(THIS_SCRIPT, array('index', 'showthread', 'forumdisplay'))) AND (!in_array($thread[forumid],array(11,18,13)))">


          That didn't seem to work. It shows ads in those forums.

          Comment

          • Lats
            Senior Member
            • Mar 2002
            • 3671

            #6
            This works in FORUMDISPLAY...
            Code:
            <if condition="(in_array(THIS_SCRIPT, array('index', 'showthread', 'forumdisplay'))) AND (!in_array($foruminfo[forumid],array(2,3)))">
            Lats...

            Comment

            • Smoothie
              Senior Member
              • Oct 2001
              • 250

              #7
              Originally posted by Lats
              This works in FORUMDISPLAY...
              Code:
              <if condition="(in_array(THIS_SCRIPT, array('index', 'showthread', 'forumdisplay'))) AND (!in_array($foruminfo[forumid],array(2,3)))">
              Works like a champ!. Thanks for your help.

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...