Unread Post Count

Unread Post Count 1.2.0

No permission to download
I've just checked my board.

It seems to be running slower than I'd expect, actually, but it seems to be dealing with a lot more rows of data.

But at the end of the day, everything has an overhead. You just have to balance what that overhead is, vs the functionality.

What I will say, however, is I do a similar thing with my Gallery unviewed media items. I've successfully created a decent caching mechanism for this which seems to work quite well.

Eventually, this add-on will do something similar. But I have so much on, I can't even begin to imagine when.
 
Sorry if this has been asked before, but is there a way to disabled the number of new unread posts notification on a per user basis?

I like the idea of this add-on, but I'm hesitant to install it only because I know some long-time members will dislike it. If each user could disable this in their profile settings that'd be ideal.
 
Just ran into some speed issues with this as well. Not sure if you can do much of anything to help it but here is the query. Almost 4 seconds to run it.

Code:
SELECT COUNT(*)
FROM xf_post AS post
INNER JOIN xf_thread AS thread ON
    (post.thread_id = thread.thread_id AND thread.node_id IN (3, 9, 13, 17, 43, 39, 2, 30, 18, 42, 45, 4, 33, 24, 32, 5, 7, 34, 41, 26, 10, 19, 20, 11))
INNER JOIN xf_forum AS forum ON
    (forum.node_id = thread.node_id AND forum.find_new = 1)
LEFT JOIN xf_thread_read AS thread_read ON
    (thread_read.thread_id = thread.thread_id AND thread_read.user_id = ?)
LEFT JOIN xf_forum_read AS forum_read ON
    (forum_read.node_id = thread.node_id AND forum_read.user_id = ?)
WHERE post.post_date > ?
AND post.message_state = 'visible'
AND post.post_date > GREATEST(
    IF (thread_read.thread_read_date IS NULL, 0, thread_read.thread_read_date),
    IF (forum_read.forum_read_date IS NULL, 0, forum_read.forum_read_date)
)
Params: 2819, 2819, 1388301277
Run Time: 3.932912
Select Type    Table    Type    Possible Keys    Key    Key Len    Ref    Rows    Extra
SIMPLE    forum    ALL    PRIMARY                   25    Using where
SIMPLE    thread    ref    PRIMARY,node_id_last_post_date,node_id_sticky_state_last_post    node_id_last_post_date    4    aspies_xen.forum.node_id    81    Using index
SIMPLE    thread_read    eq_ref    user_id_thread_id,thread_id    user_id_thread_id    8    const,aspies_xen.thread.thread_id    1    
SIMPLE    forum_read    eq_ref    user_id_node_id,node_id    user_id_node_id    8    const,aspies_xen.forum.node_id    1    
SIMPLE    post    ref    thread_id_post_date,thread_id_position,unread_post_count_post_date    thread_id_position    4    aspies_xen.thread.thread_id    6    Using where
 
Scratch that. I think this was a server configuration issue. This server had a stock my.cnf that was only allocating 16MB to innodb_buffer. Optimized it and now it loads fast.
 
Not sure how a caching system would really help. You'd sacrifice the whole point of the add-on, which is to give a real time update to users about their unread post count.
 
Not sure how a caching system would really help. You'd sacrifice the whole point of the add-on, which is to give a real time update to users about their unread post count.

The caching could be optional. Like it is now, the add-on cannot be used at large sites unfortunatelly.
 
  • Like
Reactions: rdn
is there any way to get it to refresh the post count when posts have been deleted as it's confusing my users when I delete a spam post and it's showing as one new post but displays nothing.
 
This actually isn't as easy as implementing it in an add on on a custom navigation tab. But how do you guys feel about the count appearing above the Forums tab? Like you might see in some other add ons?

The count will always be visible then.

That would be instead of it appearing on the new post link.
 
This actually isn't as easy as implementing it in an add on on a custom navigation tab. But how do you guys feel about the count appearing above the Forums tab? Like you might see in some other add ons?

The count will always be visible then.

That would be instead of it appearing on the new post link.
Actually that's not a bad idea. It would then be consistent with other alerts.
 
This actually isn't as easy as implementing it in an add on on a custom navigation tab. But how do you guys feel about the count appearing above the Forums tab? Like you might see in some other add ons?

The count will always be visible then.

That would be instead of it appearing on the new post link.

I think I could live with that.
 
Personally I think it's perfectly fine where it is now.
If it happened, it would be an option.

I have no ETA for this by the way, but will keep it in mind for the near future :)

Also, not sure it's even realistically possible.

For custom navigation tabs it's as easy as setting the "itemCount" value. For the Forums tab it will require a bit more work.
 
Top Bottom