MyBB Community Forums

Full Version: Link to parent forum inside of thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I want to add a link to the forum a thread is in in the showthread template. Can it be done?
IIRC xThreads has a variable for this. Read the doc file for it. If not, You can use Templates Conditionals too.
Great, thanks. Will look into it.

Checked xThreads documentation, found a way to call the forum's URL slug but not the name alone ...
{$forum_cache[$thread['fid']]['name']} ?
Whenever I try to put that into the template it says an error has occurred with a blank bullet point ..
Template security, maybe.

Have you tried {$forum['name']} - forum should be available. Did you setup that plugin code I gave you a short while ago?
I tried this Tomm - it looks like it needs {$foruminfo['name']} - which I cannot get to show. Your code did indeed give a security alert in the template Toungue

I looked through the xThreads docs and I see no specific reference to the name - urls yes. It is possible (though incredibly clunky) to hardcode the list of forums and use that in a list. It depends on how many forums brad has.

eg

<if $fid ==1 then> forum1 
 <elseif> $fid ==2 then> forum2 <else>what a list!!</if>
Ack! Curse the ever changing cache data, I'm going to eradicate that in 1.8. Dodgy

Well, I know $forum is available; if you have a plugin setup it's easy to get the URL. Although maybe get _forum should automatically return the URL too... Hmmm...
Sorry Tomm, which plugin code? I don't recall it.
Pages: 1 2