MyBB Community Forums

Full Version: Add Thread Date and Time under Thread Title
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello Mybb.com,

My English is not the best but iam trying to explain what i want to do with mybb.

So i want to make this

Default Example(this is on all Mybb Installations) same as this Forum before you Join this Thread!

Threadtitel: [How To?] Add Thread Date and Time beside under Threadtitel
{Username}

I want this:
Threadtitel: [How To?] Add Thread Date and Time beside under Threadtitel
{Username} Thread Created On: Date, Time


Hope anyone could help to get this to work.

Regards
You have to edit the showthread template. Just wait, I'll find it out for you.

Sorry, I meant Threadlist.
Find the following:
<tr>
		<td class="tcat" colspan="3" width="66%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']} / <a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span></td>
		<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
		<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></span></td>
		{$ratingcol}
		<td class="tcat" align="right" width="20%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></span></td>
		{$inlinemodcol}
	</tr>
And then you'll have to insert the posttime stuff here.
All I found was
{$post['postdate']}, {$post['posttime']}
but I don't think this will work.
(2012-09-30, 01:12 PM)Cyberuben Wrote: [ -> ]You have to edit the showthread template. Just wait, I'll find it out for you.


Ok iam looking forward t othis i have try in livemode with Firebug but its not working becouse i destroy everytime this Part.

Hope you find a way to do it Wink

Edit:

Will try that now and will report if its working Wink

Thank you

Regards
Well, I know how to do it, all I have to find out is how to call the time, because $post['postdate'] only puts out the date of a POST, but you want the date of the FIRST POST. I can't seem to find how to do that.
i dont find the right part

in firebug its showing me this:

<div class="author smalltext">

That where i have to add your code you posted below but in my Threadlist is there nothing that is saying {Username or Id }

I have only this line in Threadlist

		
<td class="tcat" colspan="3" width="66%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']} / <a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}{$post['postdate']}{$post['posttime']}</a> {$orderarrow['starter']}</strong></span></td>

in code below i have add your
 {$post['postdate']}, {$post['posttime']} 

But its not changing anything :/
That's what I said. I have the wrong class variable (I think it's called that). Right now you're getting the postdate of a post, but you're not in a post, but in a thread. Just to say it like that.
ok that i understand now but iam in the wrong template thats what i try to find out.

I have to found first the right template i dont think its threadlist becouse how i say there is no code that is saying the {Username}

We are in this Template:Its the Overview of:
Thread / Authorxxx [desc] Replies Views Last Post

That is ontop the Sticky Threads on every Default Mybb Installation.

I have to find the Template where its called the Threadtitle and Username Wink

Hope anyone can join this conversation too Wink

my problem is i have a Example see yesterday on a Forum of a Guy here but i dont remember the SIte what it was.
I will check my Firefox History maybe iam lucky it was defently a Dark forum style.
(2012-09-30, 01:55 PM)Pumba Wrote: [ -> ]ok that i understand now but iam in the wrong template thats what i try to find out.

I have to found first the right template i dont think its threadlist becouse how i say there is no code that is saying the {Username}

We are in this Template:Its the Overview of:
Thread / Authorxxx [desc] Replies Views Last Post

That is ontop the Sticky Threads on every Default Mybb Installation.

I have to find the Template where its called the Threadtitle and Username Wink

Hope anyone can join this conversation too Wink

my problem is i have a Example see yesterday on a Forum of a Guy here but i dont remember the SIte what it was.
I will check my Firefox History maybe iam lucky it was defently a Dark forum style.

Threadtitle is {$thread['subject']} and username is {$thread['profilelink']}.

Quote:<tr>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">{$icon}</td>
<td class="{$bgcolor}{$thread_type_class}">
{$attachment_count}
<div>
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
<div class="author smalltext">{$thread['profilelink']} Here is where you have to put the posttime and date, but the ones I gave you earlier won't work, just type some text here</div>

</div>
</td>
<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
{$rating}
<td class="{$bgcolor}{$thread_type_class}" 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>
Quote:and username is {$thread['profilelink']}

Got it sorry iam new with mybb Blush

However got it your code works ok now i have only to find out how to call the Time & Date Function for this.

Weird that i nothing found for this becouse its standard Forum Software future on VB IPB or other CMS Systems.

I mean weird becouse no one asking this here before,or it could be iam blind Big Grin
Open your forumdisplay.php
search for

eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";"); 


add above

$threaddate = my_date($mybb->settings['dateformat'], $thread['dateline']);
        $threadtime = my_date($mybb->settings['timeformat'], $thread['dateline']);


Go into your Template "forumdisplay_thread", search for

{$thread['profilelink']} 

add above


Created on: {$threaddate} at {$threadtime} by

Should work.
Pages: 1 2 3