Announcement

Collapse
No announcement yet.

Display something in the footer IF displayed page IS NOT forumdisplay?

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

  • Display something in the footer IF displayed page IS NOT forumdisplay?

    I am trying to display a banner in the footer for all pages except a couple places (where this banner will be displayed in a seperate area)...

    Is there an easy way to do this with an if statement or something?

    Lets just say I am trying to do something like:

    Code:
    IF page/template IS NOT forumdisplay OR showthread
    
    THEN display: <img src="banner.gif>

  • #2
    Hmm... I suppose another way I could do it is make a "footer2" file.

    footer = with banner

    footer2 = same as above, without banner.


    Now I guess I just need to figure out how to do that

    Comment


    • #3
      You can use:

      Code:
      <if condition="THIS_SCRIPT !== 'forumdisplay'">
      
      Code to show if not on forumdisplay
      
      <else />
      
      Code to display if on forumdisplay
      
      </if>
      John

      Comment


      • #4
        Originally posted by TheMusicMan
        You can use:

        Code:
        <if condition="THIS_SCRIPT !== 'forumdisplay'">
        
        Code to show if not on forumdisplay
        
        <else />
        
        Code to display if on forumdisplay
        
        </if>

        What if there are more than just forumdisplay? How can I include an OR in there?

        like this?
        Code:
        <if condition="THIS_SCRIPT !== 'forumdisplay' OR 'somethingelse' OR 'anotherthing'">

        Comment


        • #5
          Not 100% sure on the syntax so a vB team member should confirm, but try this;

          <if condition="THIS_SCRIPT !== 'forumdisplay'"> OR "THIS_SCRIPT !== 'otherphpfile'">
          John

          Comment


          • #6
            bump; does themusicman's conditional work? it sure would be nice to know right now =-)

            Comment


            • #7
              No

              <if condition="THIS_SCRIPT != forumdisplay AND THIS_SCRIPT != showthread">
              This is not showthread, and its also not forumdisplay
              <else />
              It must be showthread or forumdisplay
              </if>

              Comment


              • #8
                Zach: How can boolean AND work here? surely there is only one .php page being shown at a time, and thus the condition can't return that the browser is on forumdisplay.php AND showthread.php at the same time???

                Not saying my syntax is correct here as I clearly state in my post #5, but just wondering about the logic and is why I suggested OR.

                Anyone care to enlighted us on this please as to how AND works and OR apparantly doesn't.... it has confuzzled the heck outa me..
                John

                Comment


                • #9
                  Since we are checking if a page is NOT somthing.

                  If the script is not forumdisplay and is also not showthread, then it is true, correct?
                  But if the script was forumdisplay, but not showthread, then the condition is false. The opisite is true.

                  When using != you have to use an AND to be able to use multiple conditions.

                  Comment

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