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
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.
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.
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.
If it happened, it would be an option.Personally I think it's perfectly fine where it is now.
@Chris D, is it possible to get your addon Unread Post Count compatible with Addon Ignore New Posts by @Waindigo? Both addons are working, but your Unread Post Count has my quoted issue.And I would like compatibility with famous Addon Unread Post Count. At the moment the count on Unread Post Count includes all forums, but it should not count the ignored forums by this addon.
We use essential cookies to make this site work, and optional cookies to enhance your experience.