The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 23, 2019, 10:41:47 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Unread posts not showing up again...  (Read 3732 times)
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« on: November 28, 2007, 02:22:52 PM »

I've had a lot of problems with new boards and posts not showing up in Show Unread (;all;start=0). I've posted a few times @ the SMF boards but have not really gotten any valid feedback.

I did find one post, though, where someone else was having very similar issues as me. I think that unless you have a really mission critical board that is relatively low volume, you wouldn't notice this.

The fix, is to patch the Subs-Post.php file. At approximately line 1607 in 1.1.1 or 1622 in 1.4.1, you'll find this query:

         db_query("
            UPDATE {$db_prefix}log_topics
            SET ID_MSG = $msgOptions[id] + 1
            WHERE ID_MEMBER = $ID_MEMBER
               AND ID_TOPIC = $topicOptions[id]
            LIMIT 1", __FILE__, __LINE__);


The problem is the "$msgOptions[id] + 1" - eliminate the "+ 1" in both this query and the one right after it:

         db_query("
            REPLACE INTO {$db_prefix}log_topics
               (ID_TOPIC, ID_MEMBER, ID_MSG)
            VALUES ($topicOptions[id], $ID_MEMBER, $msgOptions[id] + 1)", __FILE__, __LINE__);


and I think you'll be happy with the results.

Love some feedback, because even this post @ the SMF boards was unresponded to by anyone at all.

/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
arms
Expert
****
Offline Offline

Posts: 235



View Profile
« Reply #1 on: November 29, 2007, 12:14:59 PM »

i'm seeing unread posts when using the  "show all unread" but it seems i'm missing them in "unread since last visit".
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #2 on: November 29, 2007, 12:36:26 PM »

Those two feature behave completely differently in the forum. Once you've visited, whether you've seen them or not, posts that were there when you first came because they're not "new since your last visit" - they're still in all unread because you haven't seen them, but not new since your last visit. It's confusing and I've considered just eliminating that option and going strictly with All Unread...
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!