MyBB Community Forums

Full Version: Hooks and Addons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I have now found with great trouble how I like single things like. the author of the thread, the responses, and / or calls within the thread (Showthread).

<span> {$ thread ['username']} for who started the thread
<span> {$ thread ['replies']}, for how many answers within the thread
<span> {$ thread ['views']}, for how many calls within the thread.

I'm still missing:
in which category, e.g. news
- Date from the thread start, ie when it was opened e.g. 09/01/2018

Would be very grateful, thanks.

Do you mean in postbit or forum display? Because on forum display you could show when the thread was created and by who also time.

(05-21-2009, 01:33 PM)Tomm M Wrote: [ -> ]I've actually done something like this on my new website. I'm planning on making it into a plugin but for the mean time, I modified forumdisplay.php. Around line 799, you'll find this:

			$thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);

Add after this:

		$thread['created'] = my_date($mybb->settings['dateformat'], $thread['dateline']).", ".my_date($mybb->settings['timeformat'], $thread['dateline']);

Then, in the forumdisplay_thread template, find:

<div class="author smalltext">{$thread['profilelink']}</div>

...and replace it with:

<div class="author smalltext">By {$thread['profilelink']} &raquo; {$thread['created']}</div>

Feel free to modify. Works on 1.4.6 (which you should really think about upgrading too, or at least, performing the custom edits, to protect your board).

This does work on 1.8 I've tested it.