THIS_SCRIPT outside of /forum/ directory.

  • 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

    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


    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'!


    • Colin F
      Senior Member
      • May 2004
      • 17689

      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.


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