PDA

View Full Version : accessing forum array in SHOWTHREAD


Southernphuk
01-09-2012, 04:12 PM
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 (https://vborg.vbsupport.ru/showthread.php?t=229529). But I can't work out how to access the forum array for the parent forum.

I used something like this in the FORUMDISPLAY

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

How would I do something similar in SHOWTHREAD?

kh99
01-09-2012, 04:53 PM
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:

{vb:raw GLOBALS.foruminfo.description}

Southernphuk
01-09-2012, 06:00 PM
Ta muchly.. that worked a treat. in the end it ended up something like this


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