Multitool.org Forum
+-

Hello Lurker! Remove this ad and much more by logging in.


Techy Q on "mark all as read"

scotland Offline Nikos

  • No Life Club
  • ******
    • Posts: 3,785
  • Why is it doing that?
Techy Q on "mark all as read"
on: January 29, 2013, 01:27:53 AM
This one is for one of the admins and/or other SMF geeks among us (:think:)...

Assume I load the "all unread posts" page, go through all/some of the threads by opening them in new tabs, and a bit later (depending on the number of said threads) I go back and press "mark all as read". What exactly does the latter do? More specifically, what if new posts have been made between the time I loaded the "all unread posts" page and the time I pressed on the "mark all as read" button? Are those posts marked read as well, or is the system smart enough to only mark as read threads updated before the time the "all unread posts" page was loaded?


hr Offline enki_ck

  • Global Moderator
  • *
  • Absolute Zombie Club
  • *
    • Posts: 20,935
  • I may get older but I refuse to grow up.
Re: Techy Q on "mark all as read"
Reply #1 on: January 29, 2013, 01:41:24 AM
If you mark all threads read, it will mark read the threads prior to the last load. If any new threads or posts have been made in between the load and mark forum read, they will appear as unread threads after you click "mark forum read". Also the "Show unread posts since last visit." doesn't show you ALL the unread threads. If you want to see all the unread threads, use this link:

http://forum.multitool.org/index.php?action=unread;all;start=0


scotland Offline Nikos

  • No Life Club
  • ******
    • Posts: 3,785
  • Why is it doing that?
Re: Techy Q on "mark all as read"
Reply #2 on: January 29, 2013, 02:15:56 AM
Cool, thanks Nikola. :tu: As a matter of fact I was referring to the last link in your post. What you mention is the reasonable/right thing to do; I just wanted to make sure that that is the case with our installment of SMF.


scotland Offline Nikos

  • No Life Club
  • ******
    • Posts: 3,785
  • Why is it doing that?
Re: Techy Q on "mark all as read"
Reply #3 on: January 29, 2013, 11:56:19 AM
Just did a quick test and I'm afraid there are strong indications what you said is not true; "mark all messages read" really seems to touch _all_ messages, irrespective of whether they were posted after your last page load... :-\

To reproduce:
* Load the forum index page (or unread posts page; it's all the same)
* Note what is the forum-wide "Latest Post" at the bottom of the page (Forum Stats box)
* Wait for some random amount of time (say 10-15')
* Press "Mark all messages as read" right above the Forum Stats box
* Press on the "View the most recent posts on the forum" link right below the "Latest Post" line
* Behold as several posts were made after the post on step 2 but are now marked as read.

This is a classic race condition type of problem and can be made even worse if the forum maintains a global timestamp for each user as opposed to a timestamp per loaded page; in the former case, if you follow the scenario in my OP, each new loaded page would reset the timestamp, so the final "mark all as read" click would use the time of your last loaded thread page instead of the time of loading the unread posts page or the forum index.

So the question remains: could one of our sysadms/techies verify that this is indeed the case? How hard would it be to do it The Right WayTM? I know of at least one other forum that implemented this lately but not having played around with SMF myself I couldn't say if it's just a plugin or if it requires further delving in the codebase.


hr Offline enki_ck

  • Global Moderator
  • *
  • Absolute Zombie Club
  • *
    • Posts: 20,935
  • I may get older but I refuse to grow up.
Re: Techy Q on "mark all as read"
Reply #4 on: January 29, 2013, 12:11:10 PM
Sorry if I misled you. :/ I just wrote how I felt the software behaved for me. I use the Mark selected topics read more often that this one so that could be why.

I'll leave you to Whoey to explain the technical stuff better.


us Offline Outback in Idaho

  • *
  • Absolutely No Life Club
  • *******
    • Posts: 5,429
  • Not all those who wander are lost.
Re: Techy Q on "mark all as read"
Reply #5 on: January 29, 2013, 12:13:37 PM
The way I have been doing it, since I too have your concerns, is to 1st: "Show new replies to your posts".
Next I use the "Show unread posts since last visit" and note the first few topics. Tab out on various pages of interest. Then click back on page 1 and tab out any newer posts.
To finalize the process I then use "Mark ALL messages as read."

It seems to work.

At one time the page went awry and I seen more replies to my posts in the show unread, but it seems to have settled down since then.
¬ Outback Idaho

Behind every mask there is a face, behind that a story.


scotland Offline Nikos

  • No Life Club
  • ******
    • Posts: 3,785
  • Why is it doing that?
Re: Techy Q on "mark all as read"
Reply #6 on: January 29, 2013, 12:35:36 PM
The way I have been doing it, since I too have your concerns, is to 1st: "Show new replies to your posts".
Next I use the "Show unread posts since last visit" and note the first few topics. Tab out on various pages of interest. Then click back on page 1 and tab out any newer posts.
To finalize the process I then use "Mark ALL messages as read."

It seems to work. (Image removed from quote.)

At one time the page went awry and I seen more replies to my posts in the show unread, but it seems to have settled down since then.

The way I do it is reloading the unread posts page right before hitting the "mark all messages as read" button, so as to minimize the race condition window. This results in an extra hit on the server every time -- instead of going "mark as read" => auto-reload of unread posts page, I now do reload unread posts page => mark as read => auto-reload of unread posts page -- and I'm pretty sure this extra hit puts more load on the server than what the Right Thing would incur. Anyway, this works for me, but maybe other less tech-aware users following a similar workflow as mine may be missing threads just because of this bug/feature.


ca Offline Syph007

  • Global Moderator
  • *
  • Absolutely No Life Club
  • *
    • Posts: 9,842
  • SAK Surgeon
Re: Techy Q on "mark all as read"
Reply #7 on: January 29, 2013, 03:10:02 PM
The way I have been doing it, since I too have your concerns, is to 1st: "Show new replies to your posts".
Next I use the "Show unread posts since last visit" and note the first few topics. Tab out on various pages of interest. Then click back on page 1 and tab out any newer posts.
To finalize the process I then use "Mark ALL messages as read."

It seems to work. (Image removed from quote.)

At one time the page went awry and I seen more replies to my posts in the show unread, but it seems to have settled down since then.

The way I do it is reloading the unread posts page right before hitting the "mark all messages as read" button, so as to minimize the race condition window. This results in an extra hit on the server every time -- instead of going "mark as read" => auto-reload of unread posts page, I now do reload unread posts page => mark as read => auto-reload of unread posts page -- and I'm pretty sure this extra hit puts more load on the server than what the Right Thing would incur. Anyway, this works for me, but maybe other less tech-aware users following a similar workflow as mine may be missing threads just because of this bug/feature.

Thats how I do it too when I noticed it was marking threads that werent in the list as read.  Not a big deal, but something to be aware of if you dont want to miss any MTO goodness. :D
PM me or email sakmodder [at] gmail . com if you are looking for custom SAK work.

Modding thread : Here
Website : WWW.SAKModder.com 
Facebook : SAKModder
Instagram : robertjlessard
Youtube : www.youtube.com/robertjlessard


 

Donations

Operational Funds

Help us keep the Unworkable working!
Donate with PayPal!
April Goal: $300.00
Due Date: Apr 30
Total Receipts: $155.65
PayPal Fees: $9.15
Net Balance: $146.50
Below Goal: $153.50
Site Currency: USD
49% 
April Donations

Community Links


Powered by EzPortal