No announcement yet.

Variable to identify the home page

  • Filter
  • Time
  • Show
Clear All
new posts

  • [CMS] Variable to identify the home page

    I need some sort of variable similar to $GLOBALS[forumid] that will allow me to identify the home page of the site in my templates.

    I know that VB has never published a list of variables, however if someone there ever put together a short list of what is available to the $GLOBALS variable that would be a step in the right direction.

  • #2
    Forum Home page, CMS home page...?
    Vote for:

    - *Admin Settable Paid Subscription Reminder Timeframe*
    *PM - Add ability to reply to originator only*
    - Add Admin ability to auto-subscribe users to specific channel(s)
    - "Quick Route" Interface...


    • #3
      CMS home page. For that matter the forums home page would be nice too. The idea being that I want to be able to use the VBulletin Ad system to display a banner in the global below nav bar position, but not on the home page of the site. There is no option to exclude the home page, so I will just have to make it part of the code. I could do this in javascript I suppose, but I have bumped into this page awareness variable issue enough times now that I would love to get a server side code solution to the problem.


      • #4
        At the top of the php file is a line like this:
        PHP Code:
        This allows you to use this in a plugin:
        PHP Code:
        if (THIS_SCRIPT == 'vbcms') do something on content.php page only.... 
        or this in a template:
        HTML Code:
        <vb:if condition="THIS_SCRIPT == 'vbcms'">do something on content.php page only.... </vb:if>

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools &lt;- awesome site for html/css help


        • #5
          This is in a template, so the bottom code worked. Thank you, I never paid much attention to those script definition variables before, but now they make a lot of sense.


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