Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Mark All Read Redux
Mark All Read Redux
0
Comments
However, this still doesn't fix the issue with the "New Discussions" filter. The "New Discussions" filter alters the database call, while "Mark All Read Redux" alters discussion properties after the data has been dropped into the discussion object.
Also, if you want this extension to work with the "New Discussions" filter, you will need to add a hack into the "New Discussions" filter's default.php file around line 47:
function NewDiscussionsBuilder(&$D) // line 43 { $s = &$D->DelegateParameters['SqlBuilder']; /************** Begin "Mark All Read Redux" hack **************/ $DatabasePrefix = $D->Context->Configuration['DATABASE_TABLE_PREFIX']; $result = mysql_query("SELECT MarkAllRead FROM ".$DatabasePrefix."User WHERE UserID=".$D->Context->Session->UserID."", $D->Context->Database->Connection); $MarkAllReadRedux_UserData = mysql_result($result, 0); if ($MarkAllReadRedux_UserData) { $s->AddWhere('t', 'DateLastActive', '', $MarkAllReadRedux_UserData, '>'); } /************** End hack **************/ $s->AddWhere('t', 'CountComments', 'utw', 'CountComments', '>', 'and', '', 0, 1); $s->AddWhere('', '', 'utw', 'CountComments', '', 'or', 'ISNULL', 0, 0); $s->EndWhereGroup(); }
Are there any other extensions that won't work right with "Mark All Read Redux"?
Over at Kohana forums there seems to be a problem with Mark All Read Redux 1.2 along the same lines as bobthecow's. When reading a discussion with unread posts in, they are sometimes (about 50% of the time?) not marked as read. Going back to the discussion page shows the discussion still highlighted and showing > 0 "New" posts.
Here is some more info that may help:
- clicking "Mark All Read" always works. But when more unread posts start to appear, the problem reappears.
- we had the original Mark All Read extension installed and replaced it with Mark All Read Redux.
Tell me if that fixes the issues.
I'm not sure what to tell you, the extension works fine for me. You're using the latest version, 1.2d, right? What page and/or under what conditions are you getting that error on?
It shouldn't matter, but you can try moving the class definition from the end of file to the very beginning (outside of the guest clause).
$DatabasePrefix."User
with
$DatabaseTables['User']."
But i still can't get it to work. The line
$MarkAllReadRedux_UserData = strtotime(mysql_result($result, 0));
gives an "not a valid mysql-resource" error. Maybe because the user table was never altered. I have tried to disable and re-enable the extension. Any other ideas?
$DatabaseColumns['User']['MarkAllRead'] = 'MarkAllRead';?>
But that's going to mess up future extensions that try to add new stuff to the file. I fixed the issue in the version, but it won't help people who already have it installed. You'll need to change it manually.
It should read as follows, with the php end tag ("?>") on a line by itself at the very end:
$DatabaseColumns['User']['MarkAllRead'] = 'MarkAllRead'; ?>
Sorry about that.