MyBB Community Forums

Full Version: Adding forum name to Recent posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm currently setting up a mybb board for the first time (After using phpbb for years and years) and am stuck here and there.
Here's my project; http://exalted-swtor.com/forums/portal.php

I'm trying to add the name of the forum in the recent posts on my portal.

Does anybody know if there is a string available for this to use in my template? Smile Something like {$thread['forumname']} or {$forumname} perhaps?

The same goes for poster of the ot. We have {$lastposterlink} that will show the name of the poster of the last post, but I would like to implement the author of the original topic starter as well.

Anyhows, thanks for your time! Smile
you mean like this(click on home up top)Click?

(2011-10-04, 11:18 PM)The4G Wrote: [ -> ]you mean like this(click on home up top)Click?

No, yours is the standard latest threads, if I'm not mistaken.

What I am after is to show what forum the post is made in. Something like this, where you see I have added "Forum: General Discussions »"

First post By Username
Forum: General Discussions » Posted: Today 10:21 PM » Replies: 0 » Views: 2

Here is the template for portal_latestthreads_thread which holds the information where I work from. So basicly I was just wondering if I could add the forum information code easy, perhaps with a string, something like I have tried to add below by adding in {$thread['forumname']}. This doesn't work as the code for the forum is not forumname.
<tr>
<td class="{$altbg}">
<strong><a href="{$mybb->settings['bburl']}/{$thread['threadlink']}">{$thread['subject']}</a> in {$thread['forumname']}</strong>
<span class="smalltext"><br />
<a href="{$thread['lastpostlink']}">{$lang->latest_threads_lastpost}</a> {$lastposterlink}
» Posted: {$lastpostdate} {$lastposttime}
<strong>&raquo; </strong>{$lang->latest_threads_replies} {$thread['replies']} <strong>&raquo; </strong>{$lang->latest_threads_views} {$thread['views']}
</span>
</td>
</tr>


Thanks Smile


100 views and no solution yet, good stuff, means I'm not completely alone at not getting my head around this ^^

But alright, I'm one step closer..

{$thread['fid']} will post the forum id on my recent posts.

Now, how do I show the forum name of the fid in my template instead of the forum id?



Banging my head a few more hours solved the problem.

It turned out I had to edit the sql in order to pull the needed field.

My Latest threads are now showing which forum it is posted in. Heart

[Image: latest.jpg]