The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Forum Info
I use $foruminfo[title] to get the title of each forum on each page, and then use that information for a custom ad solution. After testing it, though, I realized that when you drill-down into the thread level, it picks up the name of the thread; I'd rather it just keep the name of the overall forum.
For instance, if you have "National Football League" as a forum, and then several threads within that forum: "Chicago Bears", "NY Jets", etc. - I need a way to access the forum name "National Football League" on every page, even the lower-level thread pages. Does anyone know how to do this? |
#2
|
||||
|
||||
Use this:
Code:
$vbulletin->forumcache[$thread['forumid']]['title']; |
#3
|
||||
|
||||
Use {$vbulletin->forumcache[$thread[forumid]][title]} in templates.
|
#4
|
||||
|
||||
As far as I know, the $vbulletin object is not available in templates.
|
#5
|
||||
|
||||
It is available. Try putting {$vbulletin->userinfo[username]} in a template.
|
#6
|
||||
|
||||
I've tried it before, and never been able to get it to work. Can you give me an example of where it works?
|
#7
|
|||
|
|||
I'm able to get {$vbulletin->userinfo[username]} to return the username value, but when I try and use {$vbulletin->forumcache[$thread[forumid]][title]}, it returns nothing - it doesn't error, it just returns a null or blank value.
|
#8
|
||||
|
||||
I seem to recall that templates have some problem with multiple arrays - i.e. $var[x] will be okay, but $var[x][y] seems to fail, even though it exists. Although I thought that the use of braces fixed the problem ....
|
#9
|
||||
|
||||
What template did you try it in? I tried that in a few templates and nothing.
|
#10
|
||||
|
||||
it depends on the scope within which the template was called.
$vbulletin will only be available within a function if you global $vbulletin; first. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|