How do I.. not show ads on one page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • onestopadam
    Member
    • Apr 2007
    • 36
    • 3.6.x

    How do I.. not show ads on one page

    Hi,

    How do I not show ads on one page of my forum? I know I need to use if condition but what would I use to specify the page? I'm being dumb as I'm sure I know the answer but can't for the life of me remember or work it out!

    Basically I don't want to show my google ads on one page but do on the rest.

    Thanks,

    Adam
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    #2
    <if condition="THIS_SCRIPT != 'showthread'">this will show this text on all pages, except showthread.php</if>

    Comment

    • onestopadam
      Member
      • Apr 2007
      • 36
      • 3.6.x

      #3
      Originally posted by Floris
      <if condition="THIS_SCRIPT != 'showthread'">this will show this text on all pages, except showthread.php</if>
      Of course. Feel very stupid now!

      Thanks!

      Comment

      • onestopadam
        Member
        • Apr 2007
        • 36
        • 3.6.x

        #4
        another question sorry, how to do this for more than one page? Can I just use OR?

        Comment

        • Floris
          Senior Member
          • Dec 2001
          • 37767

          #5
          <if condition="!in_array(THIS_SCRIPT, array(showthread,forumdisplay,search))">
          Last edited by Floris; Fri 26 Oct '07, 9:08am.

          Comment

          • Jose Amaral Rego
            Senior Member
            • Feb 2005
            • 11058
            • 1.1.x

            #6
            Try using this format, as for some reason it does not want to work if you were to add OR repeatily to some templates.
            Code:
            <if condition="!in_array(THIS_SCRIPT, array('showthread','usercp','payments','register','search','usercp','newreply','usercp','newthread','editpost','private','subscriptions','subscription','member','memberlist','faq','online','login','announcement','calendar','report'))">

            Comment

            • onestopadam
              Member
              • Apr 2007
              • 36
              • 3.6.x

              #7
              Thanks guys

              Comment

              Related Topics

              Collapse

              Working...