MyBB Community Forums

Full Version: change last post in the forumbit to last unread post?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Basically what I want to achieve is to change forumbit_depth2_forum_lastpost so that instead of this link:
<a href="{$lastpost_link}" title="{$full_lastpost_subject}"><strong>{$lastpost_subject}</strong></a>
it would display link to the latest unread post in last updated topic.
bump. Anyone?
You will need to open MYBB/inc/functions_forumlist.php and search:
$lastpost_link = get_thread_link($lastpost_data['lastposttid'], 0, "lastpost");

Replace "lastpost" with "unread" or wnat works for you.
(2012-07-29, 05:59 PM)Omar G. Wrote: [ -> ]You will need to open MYBB/inc/functions_forumlist.php and search:
$lastpost_link = get_thread_link($lastpost_data['lastposttid'], 0, "lastpost");

Replace "lastpost" with "unread" or wnat works for you.

Won't work, unfortunately. Surprisingly there's no variable defined for this in MyBB, which makes no sense.


People want to read all new posts since their last visit, not just the last shout.
because read threads are stored on a per user basis and only for a certain subset of threads. It is feasible to code it, but its not really performance friendly
(2012-08-29, 10:19 PM)pavemen Wrote: [ -> ]because read threads are stored on a per user basis and only for a certain subset of threads. It is feasible to code it, but its not really performance friendly

Yes, they are stored in the table "mybb_threadsread" which contains the fields "tid", "uid", and "dateline".

Well, it's the way most people like to read, I believe. It's like that in VB, XF and SMF.

It would be a matter of making

$lastpost_link = get_thread_link("something like "lastpost" > "dateline")

I just don't know how. Not a code expert, really.
Does anyone know how to code the above request? I need this feature on my forum too.
I think what you'd need to do is replace "lastpost" with "newpost".
Just to summarise how to solve this:

(2012-07-29, 05:59 PM)Omar G. Wrote: [ -> ]You will need to open MYBB/inc/functions_forumlist.php and search:
$lastpost_link = get_thread_link($lastpost_data['lastposttid'], 0, "lastpost");
Replace with:
$lastpost_link = get_thread_link($lastpost_data['lastposttid'], 0, "newpost");