Announcement

Collapse
No announcement yet.

Dictionary of variables accesible in forum templates

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

  • Lynne
    replied
    Variables need to be registered for use in templates now. The best way to find which variables are registered is to find where the template is rendered. So, do a search in your vbfiles for (no quotes) "create('templatename')" and you should find the lines. For example, if you search for "create('navbar')", you will find this line:
    PHP Code:
        $templater vB_Template::create('navbar'); 
    and directly below that is a listing of all the variables registered for use in that template:
    PHP Code:
        $templater->register('bbmenu'$vbulletin->options['bbmenu']);

        
    $templater->register('ad_location'$GLOBALS['ad_location']);
        
    $templater->register('foruminfo'$GLOBALS['foruminfo']);
        
    $templater->register('navbar_reloadurl'$GLOBALS['navbar_reloadurl']);
        
    $templater->register('navbits'$navbits);
        
    $templater->register('notices'$GLOBALS['notices']);
        
    $templater->register('notifications_menubits'$GLOBALS['notifications_menubits']);
        
    $templater->register('notifications_total'$GLOBALS['notifications_total']);
        
    $templater->register('pmbox'$GLOBALS['pmbox']);
        
    $templater->register('return_link'$GLOBALS['return_link']);
        
    $templater->register('template_hook'$GLOBALS['template_hook']); 

    Leave a comment:


  • SuperJuice
    replied
    Does anyone actually monitor this forum to provide help? there seem to be hundreds of posts on here that essentially go unanswered?

    Leave a comment:


  • downloadsUK
    replied
    man, a dictionary of variables available in all templates would solve so many problems. but hey. the vbulletin team just don't think about this at all it seems.

    Leave a comment:


  • Dictionary of variables accesible in forum templates

    Does anyone have a dictionary or documentation that describes the different variables that are available in the vBulletin templating system?

    It seems every page I see has either an old reference or conflicting information.

    I am especially interested with getting the forumid in the SHOWTHREAD template.

    I have used the following but can't get the desired result:

    $foruminfo[forumid]
    $forum[forumid]
    $foruminfo[parentid]
    $forumid

    I basically want the forum ID that the post is in.. if anyone can lead me to some solid documentation on the subject I would greatly appreciate it.

    This is the best list I have found so far and it's not even a vBulletin resource (but it's about 4 years old):
    http://forum.vbulletinsetup.com/f18/...list-2185.html

Related Topics

Collapse

Working...
X