The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
accessing forum array in SHOWTHREAD
I'm wanting to put a title onto my thread display, telling the user which forum the thread is in and showing the forum icon added using Forum Icons. But I can't work out how to access the forum array for the parent forum.
I used something like this in the FORUMDISPLAY HTML Code:
<div id="pagetitle" class="pagetitle"> <img src="{vb:raw foruminfo.iconlocation}" alt="{vb:raw foruminfo.title}" style="float: left; margin-right: 4px;" /> <h1>{vb:rawphrase forum}: <span class="forumtitle">{vb:raw foruminfo.title}</span></h1> <vb:if condition="$foruminfo['description']"><p class="description">{vb:raw foruminfo.description}</p></vb:if> </div> |
#2
|
|||
|
|||
The problem is that foruminfo isn't registered to the SHOWTHREAD template like it is in the FORUMDISPLAY template. But it turns out it's a global in showthread.php, so you can use this:
Code:
{vb:raw GLOBALS.foruminfo.description} |
#3
|
||||
|
||||
Ta muchly.. that worked a treat. in the end it ended up something like this
HTML Code:
<div id="ThreadForum" class="pagetitle"> <vb:if condition="$GLOBALS['foruminfo']['iconlocation']"><img src="{vb:raw GLOBALS.foruminfo.iconlocation}" alt="{vb:raw GLOBALS.foruminfo.title}" style="float: left; margin-right: 4px;" /></vb:if> <h1><span class="forumtitle">{vb:rawphrase forum}: <a href="{vb:link forum, {vb:raw GLOBALS.forum}}">{vb:raw GLOBALS.foruminfo.title}</a></span></h1> <vb:if condition="$GLOBALS['foruminfo']['description']"><p class="description">{vb:raw GLOBALS.foruminfo.description}</p></vb:if> </div> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|