Announcement

Collapse
No announcement yet.

syntax for forum conditional?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • syntax for forum conditional?

    I wish to place an ad in a single forum only. In my forumdisplay template I put the following code:

    <if condition="THIS_SCRIPT == 'forumdisplay.php?f=4'">
    ad
    </if>

    It doesn't seem to work. Can someone help me out with the correct syntax if its even possible?
    Danny
    My Site ---->www.montrealracing.com

  • #2
    <if condition="THIS_SCRIPT == forumdisplay">
    <if condition="$forum[forumid] == 4">

    Comment


    • #3
      Thank you! I tried it and it is not working unfortunately. If I remove the if statement the ad appears. If i put it the ad is gone.
      Danny
      My Site ---->www.montrealracing.com

      Comment


      • #4
        Which one did you use? what exactly do you want.

        Comment


        • #5
          I used your code like this:

          <if condition="$forum[forumid] == 4">
          ad
          </if>


          I'm actually using this just to track the pageviews in this one forum. I use Openads to call the banner. Whats weird is that the views of the banner are going up only its not being displayed. I'm working to diagnose what is happening. I suspect yoru code is correct though. Do you know if forumdisplay is used somewhere else that might be generating these adviews?
          Last edited by DannyITR; Thu 28th Jun '07, 12:44pm.
          Danny
          My Site ---->www.montrealracing.com

          Comment


          • #6
            What template are you using this in? Forumdisplay?

            Try $foruminfo[forumid] or $GLOBALS[forumid]

            Comment


            • #7
              Nice. $foruminfo[forumid] did the trick. Thank you sir.
              Danny
              My Site ---->www.montrealracing.com

              Comment

              Loading...
              Working...
              X