Subj : last_read and scan_ptr values To : Nightfox From : Digital Man Date : Sun Mar 29 2015 11:45 pm Re: last_read and scan_ptr values By: Nightfox to Digital Man on Fri Mar 27 2015 10:49 pm > Re: last_read and scan_ptr values > By: Digital Man to Nightfox on Thu Mar 26 2015 21:55:01 > > If a new message is posted in a sub-board and that's the only message in the > sub-board, it seems that scan_ptr and last_read would point to that message > (is that correct?). Posting a message does not modify either the user's scan_ptr or last_read values. Only reading messages modifies those values. > If the currently logged-in user reads that message, > then scan_ptr and last_read would remain unchanged since that's the only > message in the sub-board. No, if the user has never read messages on a sub-board, then their scan_ptr and last_read values would be 0 (no message). > During a newscan, how can a JavaScript script > determine whether the user has read that message (even if it wasn't written > to the user - so the MSG_READ attribute wouldn't be set)? The MSG_READ attribute should be set anytime a user reads a message addressed to them and the attribute is not already set. You don't need to check any pointers for that. You can see how Synchronet checks/sets the MSG_READ attribute by searching for MSG_READ in: http://cvs.synchro.net/cgi-bin/viewcvs.cgi/src/sbbs3/readmsgs.cpp digital man Synchronet "Real Fact" #65: Synchronet was conceived of and mostly developed in southern California. Norco, CA WX: 61.1øF, 81.0% humidity, 2 mph SSE wind, 0.00 inches rain/24hrs .