How can I tell what page im on? Template Related

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • etones
    Senior Member
    • Sep 2000
    • 666

    How can I tell what page im on? Template Related

    Hi all, whats the easiest way to know where in my forum I am? This sounds confusing so let me explain.

    Im creating a new navbar template because im encorporting a hack (for completeless, lets say this is the arcade hack over at vbulletin.org).

    If im anywhere in the forums, i'd like to show a different navbar than if I was in the arcade system.

    <if condition="$whereiam='forum'">
    ... forum nav bar
    <else />
    ... arcade nav bar
    </if>

    That sort of thing.

    Is there in built measure ready for use? Or do I need to go through all my scripts and add a new variable that tells me im in a forum/arcade/other hack page?

    Cheers
    Taz
    http://www.e-tones.co.uk - The best site on the net for mobile phones.
  • Zachery
    Former vBulletin Support
    • Jul 2002
    • 59097

    #2
    The THIS_SCRIPT function should work well

    almost every php file in vBulletin has this varbile its found right at the top

    <if condition="THIS_SCRIPT == index"> show stuff for the forumhome page </if>

    Comment

    • etones
      Senior Member
      • Sep 2000
      • 666

      #3
      Originally posted by Zachery
      The THIS_SCRIPT function should work well

      almost every php file in vBulletin has this varbile its found right at the top

      <if condition="THIS_SCRIPT == index"> show stuff for the forumhome page </if>
      Hi, thanks for the reply.
      I know of the THIS_SCRIPT function, however its not exactly what I need...


      Id have to make a conditional for EVERY page, which is horrible..

      <if condition="THIS_SCRIPT == index OR THIS_SCRIPT == forumhome OR THIS_SCRIPT==..."> etc etc

      I was looking for a more generic method..

      <if condition="THIS_AREA==forum">

      etc,

      Thanks
      Taz
      http://www.e-tones.co.uk - The best site on the net for mobile phones.

      Comment

      • Zachery
        Former vBulletin Support
        • Jul 2002
        • 59097

        #4
        Youd need to make somthing to do that. sorry.

        Comment

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