Firefox PHP

mark read doesn't work

Posted by Lammi41 
mark read doesn't work
December 18, 2007 07:22AM
at least sometimes...
if i click on "mark thread read" the new-icon disappears until i reload the page. the same happens, when the message is opened. the message_id doesn't come up in the user_newflags-table. it seems, that the problem exists in all forums, there replying a message is generally forbidden, but it belongs not to all messages in those forums. ideas?
Re: mark read doesn't work
January 11, 2008 03:50AM
noone? :-(

ok, some additional information:

the newflags-table isn't updated when calling "Mark All Messages Read". {FORUMS->url_markread} is set to http://www2.myserver.com/phorum/list.php?97,markread.
if i call "Mark All Messages Read" the new-icons disappear, but the message ids doesn't come up in user_newflags. and, that's the weird thing, it will never come up in the table, no matter how often i'll open the post.
if i open a new post before i call "Mark All Messages Read" the id is written into user_newflags. this belongs to all messages in all forums.

is there another place there the read/unread information is stored? or is there anything special with that "Mark All Messages Read"-function?
Re: mark read doesn't work
January 11, 2008 04:13AM
There is no need for the message_ids to show up. When marking a forum read, only the newest message_id in the forum will be put in the table. All other message_ids for that forum are deleted. For checking what messages are new, Phorum always determines the lowest message_id for a forum. That one, we call "min_id". All messages that have a message_id below this min_id are considered read. If we would not do that and add an entry for every message that was ever read, the table would grow way too large.

So if you can find the message_id of the last posted message in the forum in user_newflags, then everything should work like expected.

I really think that your problem lies outside Phorum. The fact that you see the newsflags disappear, means that Phorum updated its data correctly. When going back to the URL without "markread" in it, you might get cached data somehow. This might be a browser issue (Opera is well known for its way too agressive default caching settings), a proxy issue if your browser uses one (or if your provider forces the use of a proxy of theirs) or some issue where the webserver tells your browser that pages should be cached for a certain amount of time. Look into those directions.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: mark read doesn't work
January 11, 2008 04:22AM
Quote
mmakaay
There is no need for the message_ids to show up. When marking a forum read, only the newest message_id in the forum will be put in the table. All other message_ids for that forum are deleted. For checking what messages are new, Phorum always determines the lowest message_id for a forum. That one, we call "min_id". All messages that have a message_id below this min_id are considered read. If we would not do that and add an entry for every message that was ever read, the table would grow way too large.

ah ok, now i know what's wrong... thanks!
Re: mark read doesn't work
January 11, 2008 05:16AM
Can you tell us what was wrong for you exactly, so we have more knowledge next time that somebody reports the same problem? Any info might help.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: mark read doesn't work
January 11, 2008 07:23AM
oh nothing that belongs to phorum. i have to display the unread messages on a non-phorum page, think of some kind of preview that might be shown anythere. to do so, i've stored the ids of the unread messages in an array, but because of the name "min_id" i thought, this represents the oldest read message and kicked out all younger messages, but your intention was vice versa.
so i displayed the old, read messages again and again :-(

"my" forum is not really on high traffic, sometimes there are no new messages for weeks. because of that i didn't realize that all new messages weren't displayed as unread in my little preview (there were no new messages).
Sorry, only registered users may post in this forum.

Click here to login