Display last poster name for threads on index page (General)

by sachin, Saturday, January 22, 2011, 19:37 (4846 days ago)

Hi all,
I modded index_table.inc.tpl to diplay date of last reply for each Thread displayed on index page rather than the default date of Thread posted by the author, and it worked fine.
Now I'm trying to modify some codes to display the name of last poster for each Thread but getting no clues. Please help.

Avatar

Display last poster name for threads on index page

by Auge ⌂, Monday, January 24, 2011, 01:41 (4845 days ago) @ sachin

Hello

I modded index_table.inc.tpl to diplay date of last reply for each Thread displayed on index page rather than the default date of Thread posted by the author, and it worked fine.
Now I'm trying to modify some codes to display the name of last poster for each Thread but getting no clues. Please help.

If I understand it right, you send a request for the last reply to a thread. This should be something with ... ORDER BY date LIMIT 1 or not? At this point you should be able to request the name of the poster too. please provide your database query here so we can see what you have done.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Display last poster name for threads on index page

by sachin, Monday, January 24, 2011, 09:51 (4844 days ago) @ Auge
edited by sachin, Monday, January 24, 2011, 10:00

Hi Auge,

To display date of last post I edited index_table.inc.tpl and replaced the following code on Line 24:

{$data.$thread.formated_time}

with this code:

{$data.$thread.last_reply|date_format:#time_format#}

Here, 'time_format' is the new time syntax entry, I added in the lang file.

I've also added a custom code which will compare current date and will display Today or Yesterday with the last post date.

At this point I wish to display the user name of last reply for each thread on index page. This is the common feature in SMF, PHPBB, VBulletin and many other professional forums.

Display last poster name for threads on index page

by Andy, Sunday, July 20, 2014, 08:37 (3571 days ago) @ sachin

Did you ever manage to do this?

Like yourself I've got the last reply date to display, but can't quite seem to get the poster name.

Any help is appreciated, thanks

RSS Feed of thread