MyBB Community Forums

Full Version: Thread created date below subject? MyBB 1.4.4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to add a simple "thread created" date under the thread tittle
[Image: 2n67k1e.jpg]

When a user makes a thread, it will always display the date the thread was created.

I am using the "Classic Author Column" plugin
[Image: 2zocjgo.jpg]
So as you can see above the user name is no longer under the thread tittle.

This is now perfect for adding the thread created date their.

Can someone help me?

Thanks Smile
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:

		else
		{
			$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).
Excellent Tom.. Thank you very much.

Yes, making this a plugin it worth it, i know a few other mybb board owners that also want this.

I will add this change tonight, Nice work!
Sorry Tom, i don't have all that code in my orumdisplay_thread template

Here is what i have
<tr>
	<td align="center" class="{$bgcolor}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
	<td align="center" class="{$bgcolor}" width="2%">{$icon}</td>
	<td class="{$bgcolor}">
		{$attachment_count}
		<div>
			<span>{$prefix} {$gotounread}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
			<!-- authornamewashere -->
		</div>
	</td>
	<td align="center" class="{$bgcolor}">{$thread['profilelink']}</td>   <td align="center" class="{$bgcolor}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
	<td align="center" class="{$bgcolor}">{$thread['views']}</td>
	{$rating}
	<td class="{$bgcolor}" style="white-space: nowrap; text-align: right;">
		<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
		<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
	</td>
{$modbit}
</tr>

Don't forget i have that "Classic Author Column" plugin installed, so i am betting it changed things.

Wondering if the forumdisplay.php was changed to?
Here is a pic of what my threads look like with the "Classic Author Column" plugin.
[Image: th_46671_6776767657568657_122_672lo.JPG]

Thanks, waiting for your input Smile
<div>
            <span>{$prefix} {$gotounread}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
            <!-- authornamewashere -->
        </div>

Replace with

<div>
            <span>{$prefix} {$gotounread}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
            <br /><span class="smalltext">{$thread['created']}</span>
            <!-- authornamewashere -->
        </div>
That did it.. thanks again!