That worked - thanks @RoldanLT !Revert unread_posts_count.css
mysql> 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 (64, 103, 132, 139, 7, 2, 44, 57, 8, 89, 23, 21, 152, 27, 93, 112, 76, 90, 91, 113, 111, 117, 163, 171, 19, 67, 45, 118, 1, 14, 3, 22, 11, 78, 77, 79, 148, 25, 39, 81, 154, 94, 161, 115, 61, 108, 62, 86, 104, 87, 88, 105, 84, 59, 49, 123, 110, 178, 106, 124, 131, 136, 130, 120, 150, 160, 164, 167, 6, 52, 54, 53, 174, 51, 70, 133, 16, 12, 82, 135, 149, 46, 126, 175, 176, 162, 166, 168, 170, 173, 125, 147, 177, 155, 156, 157, 158, 159, 119))
-> 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 = 1)
-> LEFT JOIN xf_forum_read AS forum_read ON
-> (forum_read.node_id = thread.node_id AND forum_read.user_id = 1)
-> WHERE post.post_date > 1366167427
-> 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)
-> )
-> ;
+----------+
| COUNT(*) |
+----------+
| 72 |
+----------+
1 row in set (0.34 sec)
mysql> SELECT COUNT(*)
-> FROM xf_post AS post
-> LEFT JOIN xf_thread AS thread ON
-> (post.thread_id = thread.thread_id AND thread.node_id IN (64, 103, 132, 139, 7, 2, 44, 57, 8, 89, 23, 21, 152, 27, 93, 112, 76, 90, 91, 113, 111, 117, 163, 171, 19, 67, 45, 118, 1, 14, 3, 22, 11, 78, 77, 79, 148, 25, 39, 81, 154, 94, 161, 115, 61, 108, 62, 86, 104, 87, 88, 105, 84, 59, 49, 123, 110, 178, 106, 124, 131, 136, 130, 120, 150, 160, 164, 167, 6, 52, 54, 53, 174, 51, 70, 133, 16, 12, 82, 135, 149, 46, 126, 175, 176, 162, 166, 168, 170, 173, 125, 147, 177, 155, 156, 157, 158, 159, 119))
-> LEFT 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 = 1)
-> LEFT JOIN xf_forum_read AS forum_read ON
-> (forum_read.node_id = thread.node_id AND forum_read.user_id = 1)
-> WHERE post.post_date > 1366167427
-> 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)
-> );
+----------+
| COUNT(*) |
+----------+
| 72 |
+----------+
1 row in set (0.10 sec)
Don't bother. I'll release an update today.@MattW - where is this changed exactly?
This add on affects page loading for logged in members only, right?Don't bother. I'll release an update today.
So I did this and added it to my taigachat page, but it only added the unread post red alert box. I want that but also the new posts text/link. Can you help me add that as well?Anyone wanting to put this somewhere else might want to try pasting this at the desired location:
Code:<xen:include template="unread_posts_count" />
<ul class="secondaryContent blockLinksList">
<li><a href="{xen:link '{$taigachat.route}'}">{xen:phrase dark_full_view}</a></li>
<xen:if is="{$taigachat.popupenabled}">
<li><a href="{xen:link '{$taigachat.route}/popup'}" class="taigachat_popup_link" target="_blank">{xen:phrase dark_popup}</a></li>
</xen:if>
<li><a href="{xen:link 'find-new/posts'}" rel="nofollow">{xen:if $visitor.user_id, {xen:phrase new_posts}, {xen:phrase recent_posts}}</a></li>
<xen:include template="unread_posts_count" />
</ul>
<script type="text/javascript">
// <![CDATA[
$(document).ready(function(){
$(".taigachat_popup_link").click(function(e){
window.open(this.href, 'taigachat_popup_window', 'width=900,height=700,menubar=no,toolbar=no,location=no,status=no,resizable=yes,scrollbars=yes,personalbar=no,dialog=no');
e.preventDefault();
return false;
});
});
// ]]>
</script>
Got it, can you check my previous revised post for straightening out the unread post count centering?Just add the link next to it:
Code:<a href="http://address.to.whatever.com">Link to whatever</a><xen:include template="unread_posts_count" />
One of our Mods has the Unread Post Count showing as 5 but when he clicks on What's New? it tells him he has no unread threads. How does this happen?
I don't use Elastic Search but I am glad it's not just usI have had this happen as well. Do you use Elastic Search by chance?
I actually think it's related to moderated and soft deleted posts.
I've been meaning to check out the code. Something somewhere is including these in the count.
We use essential cookies to make this site work, and optional cookies to enhance your experience.