2018-03-17, 12:08 PM
Hello.
Just a help to figure out something, if possible
Now, in portal, there is a list of last threads (announcment) where you can see the title of the thread and it's first message.
How can I do tho keep that list, but showing last message instead of the first?
I think I should act here:
table "threads" has either firstpost AND lastpost to lastpost...
The problem is that lastpost is a 10 digit number that has (apparently) nothing to do with actual pid of last post.
In fact, if a change firstopost nothing even shows up.
I don't know if I'm missing something or it has been made on purpose.
Any hint to solve it?
Thank you.
Just a help to figure out something, if possible
Now, in portal, there is a list of last threads (announcment) where you can see the title of the thread and it's first message.
How can I do tho keep that list, but showing last message instead of the first?
I think I should act here:
$query = $db->query("
SELECT t.tid, t.fid, t.uid, t.lastpost, t.lastposteruid, t.lastposter, t.subject, t.replies, t.views, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
WHERE 1=1 {$excludeforums}{$tunviewwhere} AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
ORDER BY t.lastpost DESC
LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
table "threads" has either firstpost AND lastpost to lastpost...
The problem is that lastpost is a 10 digit number that has (apparently) nothing to do with actual pid of last post.
In fact, if a change firstopost nothing even shows up.
I don't know if I'm missing something or it has been made on purpose.
Any hint to solve it?
Thank you.