Mark all posts read, still shows 2 new posts that don't exist..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sross
    Senior Member
    • Mar 2004
    • 660

    [Forum] Mark all posts read, still shows 2 new posts that don't exist..

    Have a weird issue that may or may not be a core issue but thought someone could help me troubleshoot. I have a number that displays new posts in my header, in the past clicking "mark all read" would set this to "0". Lately it shows "2" even though there are not 2 new posts. The code for this was:

    Code:
    [COLOR=#0000BB]$newposts 
    Code:
    // Number of new posts START
    [COLOR=#007700]= [/COLOR][COLOR=#0000BB]$vbulletin[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]db[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]query_first[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"SELECT count(*) AS cnt FROM " [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#0000BB]TABLE_PREFIX [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]"post WHERE dateline > '" [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#0000BB]$vbulletin[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]userinfo[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]lastvisit[/COLOR][COLOR=#007700]] . [/COLOR][COLOR=#DD0000]"'"[/COLOR][COLOR=#007700]); [/COLOR] [COLOR=#FF8000]// Number of new posts END[/COLOR]
    [/COLOR]Any ideas why this above code would work differently? Thanks!
  • sross
    Senior Member
    • Mar 2004
    • 660

    #2
    ok i found one of the posts using phpmyadmin, it was list as post count of 0. Removing that got mark all as read down to 1 still showing, no idea how to find it though..

    Comment

    • Wayne Luke
      vBulletin Technical Support Lead
      • Aug 2000
      • 74129

      #3
      replace count(*) with postid. Should show the post ID. Find that post in the database.
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API

      Comment

      • sross
        Senior Member
        • Mar 2004
        • 660

        #4
        brilliant! cheers

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...