Last Post
Posted by Radii
|
Re: Last Post January 25, 2009 05:37PM |
Admin Registered: 22 years ago Posts: 8,532 |
Quote
Radii
Is there a plugin so that instead of showing the date of the last post in Index view, it'll show the latest post name, date, and poster?
Last Forum Post
Quote
Radii
Also, is there a plugin to view all unread posts?
No, there is not yet such mod. The Recent Messages module is the closest thing.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Last Post September 20, 2009 10:49PM |
Registered: 17 years ago Posts: 6 |
Maurice, I have users wanting an Unread Messages module too...something that displays all posts since they were last at the forum. I haven't pulled apart the Recent Messages module (we use that too) to see if I can modify it to do unread ones. I guess that means that every user needs to have a register of what posts they've seen? Possible - or too big and hairy?
|
Re: Last Post September 21, 2009 03:49AM |
Admin Registered: 22 years ago Posts: 8,532 |
Every (authenticated) user already has a register of what they have read. So that is not the hairy part. The hairy part is that there are currently only functions available to count how many new messages there are in a forum. There is not a function like phorum_db_get_unread_messages() to retrieve unread messages (likewise the phorum_db_get_recent_messages()). With such function in place, it would be rather trivial to extend the recent messages module with "unread messages" IMO. I do want such feature too, so one day, I will build it.
Patches that implement the phorum_db_get_unread_messages() in a performance-friendly way (there's the catch ;) are welcome.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Patches that implement the phorum_db_get_unread_messages() in a performance-friendly way (there's the catch ;) are welcome.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Last Post September 23, 2009 01:01PM |
Registered: 24 years ago Posts: 1,076 |
Quote
Maurice Makaay
Patches that implement the phorum_db_get_unread_messages() in a performance-friendly way (there's the catch ;) are welcome.
Isn't phorum_db_newflag_get_unread_count doing almost the same thing already?
instead of getting count just get message_id? Or am I forgetting something obvious...
[code="php"]
SELECT message_id
FROM {$PHORUM['message_table']} AS m
LEFT JOIN {$PHORUM['user_newflags_table']} AS n ON
m.message_id = n.message_id AND
m.forum_id = n.forum_id AND
n.user_id = {$PHORUM['user']['user_id']}
WHERE m.forum_id = {$forum_id} AND
m.message_id > $min_message_id AND
n.message_id IS NULL AND
m.status = ".PHORUM_STATUS_APPROVED
[/code]
to get messages from many forums at one go is another thing, but I just have to guess the performance impact...
---
-=[ Panu ]=-
Sorry, only registered users may post in this forum.