Automatic jump to unread posts

Please post feature requests, modifications, error reports and suggestions to improve the forum
User avatar
Eric in Japan
Posts: 266
Joined: Wed Sep 23, 2015 4:21 pm
Has thanked: 224 times
Been thanked: 438 times

Automatic jump to unread posts

Post by Eric in Japan »

Right now, I have JSL's "Unread Posts" quicklink as one of my startup tabs in Chrome. That works great for seeing which post has been added to. But I was hoping that when I clicked on the topic it could automatically take me to the first unread post, as opposed to the first page first post of the topic. I know it is only one small step to click the "first unread post" button on the topic, but I really am that lazy....
"... so, the cucumbers said to the cabbage, `Lettuce Go.`"

User avatar
Zasso Nouka
Tech Support
Tech Support
Posts: 3100
Joined: Wed Sep 23, 2015 9:37 am
Location: Chiba Prefecture
Has thanked: 2393 times
Been thanked: 1825 times

Re: Automatic jump to unread posts

Post by Zasso Nouka »

I've had a look through the extensions database and currently there doesn't seem to be anything to fulfil that request but I check through it every now and then for promising modifications and should something crop up that will do that for you I'd be more than happy to give it a try.

There is a "View the lastest post" button beside the name of the submitter (of the last post) that might do something akin to what you request in that it will take you to the last post in any topic but it isn't exactly what you would like.

Anyway, I'll keep an eye out for any modifications that do this and let you know when we find something.

paradoxbox
Posts: 261
Joined: Wed Sep 30, 2015 11:52 pm
Has thanked: 106 times
Been thanked: 332 times

Re: Automatic jump to unread posts

Post by paradoxbox »

If you don't mind making a change that would affect all users, this is likely a very simple php hack.

I don't have much phpBB hacking experience but if you feel brave or have a test server to try it on, I would say the whole change can be done just by slightly modifying one line of code to direct users to the most recent SQL DB entry for a given thread when clicking the "unread posts" link.

Even simpler might just be to direct users to the last page of the thread rather than the first. That might only be a 1 or 2 character php edit.

User avatar
Zasso Nouka
Tech Support
Tech Support
Posts: 3100
Joined: Wed Sep 23, 2015 9:37 am
Location: Chiba Prefecture
Has thanked: 2393 times
Been thanked: 1825 times

Re: Automatic jump to unread posts

Post by Zasso Nouka »

We might be able to work something out, what did you have in mind ?

paradoxbox
Posts: 261
Joined: Wed Sep 30, 2015 11:52 pm
Has thanked: 106 times
Been thanked: 332 times

Re: Automatic jump to unread posts

Post by paradoxbox »

I will see if I can take a look at the phpbb code somewhere on the net and let you know if what I'm thinking is possible to do easily.

I will say that my method is probably totally frowned upon by all "real" phpbb developers / php coders / society in general & god himself :lol:

It would basically be a hardcoded change to one of the php strings in the file that controls where the user goes when they click on the "Unread Posts" so it just points to the last page instead of the first page. You could probably do it yourself even without knowing php if you search within the php files for the function that controls "unread posts". The necessary change will be pretty much self explanatory when you look at the code.

Modifying it so that it goes to the actual first unread post is a much more challenging issue that I wouldn't try tackling on any server except my own, it would involve reading cookies (Because each user's unread posts are different) and probably a few dozen lines of new php, beyond my ability at the moment.

User avatar
Zasso Nouka
Tech Support
Tech Support
Posts: 3100
Joined: Wed Sep 23, 2015 9:37 am
Location: Chiba Prefecture
Has thanked: 2393 times
Been thanked: 1825 times

Re: Automatic jump to unread posts

Post by Zasso Nouka »

paradoxbox wrote:You could probably do it yourself even without knowing php if you search within the php files for the function that controls "unread posts". The necessary change will be pretty much self explanatory when you look at the code.

Ha ha, easy for you to say :D, I still know my way around Cisco IOS fairly well but php is a complete and utter mystery to me :oops:

My one concern with changing the code in php core files is next time we patch or upgrade any changes would be lost or the change would be incompatible with how the new files are coded and might bork the forum. Extensions/Mods are the safe way to modify phpBB as they can be easily disabled if they break the site and have been extensively tested before being released.