Announcement

Collapse
No announcement yet.

Conditional statemetn for index page

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

  • Conditional statemetn for index page

    I want to show a banner ad, but only if I am on my forum index page or looking at a list of threads within a forum. No other pages are to show this banner.

    What would be the conditional for that?

    Thanks,

    Jon

  • #2
    Something like:
    PHP Code:
    <if condition="THIS_SCRIPT == 'index' > stuff goes here </if> 
    while(true){
    if(
    $someone->needsHelp() && $i->canHelp()) $post->help();
    if(
    $i->findBug()) $post->bug();
    }

    Comment


    • #3
      So do I use the conditional code exactly as you said? I am not sure because you said, "Something like". Also, will that work for the forumdisplay.php page?

      Comment


      • #4
        It'll work for the forumdisplay.php page if you change the index in there to forumdisplay

        Comment


        • #5
          How can I do it so it caters to both index and forumdisplay?

          Comment


          • #6
            Code:
            <if condition="THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'forumdisplay'"> stuff goes here </if>  

            Comment


            • #7
              Thank you!

              Comment


              • #8
                hi dody I do not want to show that index forums and index vBadvanced cmps
                Thailand Vbulletin |Thailand country radio

                Comment


                • #9
                  Originally posted by maha191 View Post
                  hi dody I do not want to show that index forums and index vBadvanced cmps
                  vBAdvanced is a third party add-on, which is unsupported here, however:
                  Code:
                  <if condition="THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'adv_index'"> stuff goes here </if>
                  ought to do it.
                  MARK.B | vBULLETIN SUPPORT

                  TalkNewsUK - My vBulletin 5.5.4 Demo
                  AdminAmmo - My Cloud Demo

                  Comment

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