Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct list of read entries when displaying a thread as a whole as not registered user #288

Open
auge8472 opened this issue Nov 20, 2017 · 4 comments

Comments

@auge8472
Copy link
Collaborator

auge8472 commented Nov 20, 2017

When opening a thread in whole-thread-view from the icon on the opening posting, actually only this opening posting get's marked as read. This is because the user followed a link to only this message and the software is not able to take notice of further read messages inside the thread view. In earlier versions (up to 2.3.7) the software simply marked all messages of the thread as read. But thats wrong as well as the actual behaviour.

My idea: A solution could be using JavaScript to trigger an event and add a new url with the fragment of the message in viewport to the browsers history with via pushState for all visitors and additionally sending a message to the server per Ajax for registered users. As a non-JS-fallback we could provide a link to mark the thread as read that actualises the list of read entries at least for registered users.

@auge8472 auge8472 added this to the 2.5 milestone Nov 20, 2017
@auge8472
Copy link
Collaborator Author

As an interim solution I'll restore the old behaviour, when all entries of a thread will be marked as read, if one opens the thread in nested or linear view.

@auge8472 auge8472 modified the milestones: 2.5, 2.4.7 Dec 15, 2017
@auge8472
Copy link
Collaborator Author

auge8472 commented Dec 27, 2017

I took a closer look into the code. I'm not sure, why the entries of a thread will not be marked as read. The array $new_read gets the IDs of the entries but the array is not in use anymore. Instead the ID itself is given over to the function save_read_status and that for every single entry inside the while-loop of the MySQL-result. Not a performance rocket, but it should work.

[edit] I tested it with a new thread in my forum. I wrote the four entries as the admin, logged in with a different user name in another browser and opened the whole thread in the nested view over the icon-link. After the reload of the main page, all four entries got marked as read (from the servers side with class="read"). So I want to state: It works as intended.[/edit]

I've no idea, why the entries get's not marked as read for the admin, who reported the issue in the project forum.

@auge8472
Copy link
Collaborator Author

auge8472 commented Jan 3, 2018

I've no idea, why the entries get's not marked as read for the admin, who reported the issue in the project forum.

The only problem I see is the fact that unregisterd users really see only the direct requested entry as read. I don't know if this is worth the effort to change the URL every time a new entry comes into the viewport (with JS) to only mark them as read in the browser history. I want to adjourn this issue to a later milestone.

@auge8472 auge8472 changed the title manage a correct list of read entries correct list of read entries when displaying a thread as a whole as not registered user Feb 19, 2018
@Franakimiles

This comment was marked as spam.

@auge8472 auge8472 removed this from the 2.5 milestone May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants