MyBB Community Forums

Full Version: "Go to first unread post" always seems to go to first post in thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
If there's no tracking information you can default to threadreadcut and jump to the first posting that is newer than threadreadcut. No need to change anything in the tracking tables for that.

The change would probably something like this:

In showthread.php, add

        if($cutoff && $lastread < $cutoff)
        {
                $lastread = $cutoff;
        }

before

$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND dateline > '{$lastread}'", $options);
This might be me being, like, totally thick - but what if I've never read a thread? Wouldn't I be jumped straight into the middle of it (for example)?
It jumps you straight to the point of interest, yes. For example an old thread that was bumped and then got 15 replies, it jumps you to the bumper posting and you can start reading the 15 replies from there.

Wether you've actually ever read a thread or not, matters not, since MyBB considers it read for you.

If you never read a thread, i.e. if you want to read a thread from the beginning, you shouldn't click the green arrow. You can click the thread title, which always takes you to the first post.
But we can't assume that you've read it without knowing that you've read it. It's one devil over the other. We just prefer to assume the first, versus your later.
Okay, fine, whatever.

@pierce,
I'm sincerely sorry for hijacking your thread, it seems like all I've been doing is talking to a brick wall

I wanted to test postgresql behaviour too but couldn't get it to work yet, I've never used that database before. I'll get back to it sooner or later...
(2009-07-01, 11:12 PM)Ryan Gordon Wrote: [ -> ]But we can't assume that you've read it without knowing that you've read it. It's one devil over the other. We just prefer to assume the first, versus your later.

yes
(2009-07-01, 03:05 AM)Ryan Gordon Wrote: [ -> ]Then please report the bugs on PostgreSQL. We can't fix them if no one reports them. I have run MyBB on PostgreSQL a lot, but I can't test all of the components in MyBB. There are just too many.

ok, how should I report these bugs? I thought posting here was the closest thing to a 'bug report' I could make?

the mods I tried that completely bombed in postgres w/ obvious mysql-isms, I reported in the feedback thing on the mods. I -think- I've posted something here for each problem I've run into my postgres.

this specific error on the 'view unread'' ggreen arrow I can only guess may be postgres related as its not generating any errors. "Move Threads" bombs with a SQL error in postgres (but Move (single) Thread doesnt), i've posted this elsewhere.
(2009-07-02, 07:44 PM)pierce Wrote: [ -> ]
(2009-07-01, 03:05 AM)Ryan Gordon Wrote: [ -> ]Then please report the bugs on PostgreSQL. We can't fix them if no one reports them. I have run MyBB on PostgreSQL a lot, but I can't test all of the components in MyBB. There are just too many.

ok, how should I report these bugs? I thought posting here was the closest thing to a 'bug report' I could make?

We can't read your mind though - You need to list all information pertinent to the bug (PostgreSQL Version #, MyBB Version #, reproduction instructions, verbatim error message(s), etc.) and you need to make each bug an individual bug report.
well, its postgres 8.3.7 on php 5.1.6 and apache httpd 2.2.3 (centos 5.3 + pgsql 8.3.7 from http://yum.pgsqlrpms.org/), and mybb 1.4.8 (started with .6). the mybb install is at http://squeals.kpig.com/ (its a chat board for a radio station's listeners). i'm using a slightly modified Slate Blue theme.

I could setup a separate 'clean' test instance on the same server if you like. that likely would help me with testing things anyways, and make it easier to create clean bug reports, and if I couldn't recreate the problems, then I'd be able to drill in on what I've hacked on the main forum...
I did a test install with PostgreSQL now, and can reproduce your problem. It indeed goes to the first post always no matter what. I haven't been able to find out why it does this yet - the data in the database itself looks correct, it creates the threadsread entries and everything the same way it would in MySQL. So there must be going something wrong with the query I guess.

With PostgreSQL I'm also seeing related issues such as a read thread getting marked as unread when a reply was made in a different thread of the same forum; and the forum itself showing up as unread when it was indeed read and would have shown up as read when doing the same steps in MySQL. And again, by just looking at how the reads entries are in the database, I don't see why it should happen, unless querying the data fails somehow.

I'll try to track this down when I have the time.
Pages: 1 2 3