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
Worked fine thank you very much Wink
Quote:search for

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

I would love to get this to work on our forum, but my forumdisplay.php does not have that line of code in it. ?

I am going to Home -> Template & Styles -> Templates -> Apart Twilight Template (which is what I named my template used) -> Forum Display Templates -> and then click on forumdisplay

Is this correct?
^ No. you have to modify system core file forumdisplay.php
So basically download the file via FTP and edit and reupload it that way?
^ yes. you can also use an editor like notepad++ which can directly open files from ftp and save them back.
I have dreamweaver, so that should work. Thank you for your help and I will try it again soon. Smile
I got it to work! Woo Hoo!

Next question: Do you know which Template files to edit by adding

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

to when a user clicks on View New Posts and View Today's Posts? I have it coming up correctly when you just click around the forum, but if you click on View New Posts and View Today's Posts, it does not show up.

Thanks, again, for your help!
^ search_results_threads_thread template (in search templates)
add after <div class="author smalltext">{$thread['profilelink']}</div>
I added it, but it does not work. Sad

<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread_link}{$highlight}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
<div class="author smalltext">{$thread['profilelink']}</div> Created on: {$threaddate} at {$threadtime}</div>

??? I get this on the forum: Created on: at
There are no dates or times. ???
^ open search.php file in a text editor (eg. notepad++) and find below code
eval("\$results .= \"".$templates->get("search_results_threads_thread")."\";");

add below code just before above code in a new line
$threaddate = my_date($mybb->settings['dateformat'], $thread['dateline']);
$threadtime = my_date($mybb->settings['timeformat'], $thread['dateline']);

now check with your modified code in the search_results_threads_thread template
Pages: 1 2 3