THIS_SCRIPT outside of /forum/ directory.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mightykip
    New Member
    • Nov 2005
    • 2

    THIS_SCRIPT outside of /forum/ directory.

    <if condition="THIS_SCRIPT == 'index'">
    On forum index page
    </if>

    The above code works great... but what if I need to know when a user is currently located on the "/index.php" page instead of the "/forum/index.php " page? Or maybe even the "/gallery/index.php" page? Basically pages that are not part of vBulletin but may use vBulletin navigation templates.

    Also is it possible to print the output of THIS_SCRIPT to the browser? I tried $THIS_SCRIPT but that didn't seem to work.

    Thanks for your time!
  • mightykip
    New Member
    • Nov 2005
    • 2

    #2
    Solved!

    The trick was to add the following to /index.php:

    define('THIS_SCRIPT', 'whatever');


    and then in my template check if THIS_SCRIPT was 'whatever'!

    Comment

    • Colin F
      Senior Member
      • May 2004
      • 17689

      #3
      Exactly. THIS_SCRIPT does not tell you the scriptname being run, it is a constant defined at the top of most scripts.
      Best Regards
      Colin Frei

      Please don't contact me per PM.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎