Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthortimfire
    • CommentTimeDec 14th 2007 edited
     # 1
    Allows users to mark all discussions as "read".

    This add-on is a complete rewrite of Andreas Hutstein's extension "Mark All Read", and was inspired by an idea of Wallphone's. Unlike the old "MarkAllRead", this extension records a timestamp in the User table, and then fools Vanilla into thinking the discussion has been read by adjusting the relevant properties for any discussion older than the timestamp.

    ===============
    Version History
    ===============

    Version 1.3
    - Fixed configuration issue with "conf/database.php" file.

    Version 1.2d
    - Corrected placement of the MarkAllReadRedux class.

    Version 1.2c
    - Corrected the "if" condition limiting the function of the extension to the index and search pages.

    Version 1.2b
    - Fixed issue with how Vanilla updated the UserDiscussionWatch table by limiting the function of the extension to the index and search pages.

    Version 1.2
    - Added re-calculation of LastViewCountComments based on MarkAllRead data

    Version 1.1
    - Eliminated the need for an altered theme file by modifying discussion properties directly.
    - Cleaned up the code slightly.

    Version 1.0
    - Initial Release
    • CommentAuthortimfire
    • CommentTimeDec 14th 2007
     # 2
    I'm not sure if there's a better way than using the modified theme file, but it works. The change with this extension is cosmetic, it doesn't add or change any database entries (other than the user's MarkAllRead timestamp) or change the discussion data. As such, any extension that reads the discussion status or other relevant data---most notably the "New Discussions" filter---will still pick up old discussions as "unread".
  1.  # 3
    Uploaded version 1.1 of Mark All Read Redux.
    • CommentAuthortimfire
    • CommentTimeDec 15th 2007
     # 4
    I realized how to change the extension so that it does NOT require an altered "discussion" theme file. The extension now changes discussion properties directly, rather than simply modifying the discussion display.

    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.
  2.  # 5
    Uploaded version 1.2 of Mark All Read Redux.
    • CommentAuthortimfire
    • CommentTimeDec 17th 2007 edited
     # 6
    I'm sorry to keep updating so quickly, but I realized the extension wasn't re-calculating the LastViewCountComments according to the User's MarkAllRead record.

    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"?
    •  
      CommentAuthorbobthecow
    • CommentTimeFeb 14th 2008 edited
     # 7
    on my forum it seems that, after using the "mark all read" link, using it again is the only way for a discussion to register as read...
    • CommentAuthortimfire
    • CommentTimeFeb 14th 2008
     # 8
    bobthecowon my forum it seems that, after using the "mark all read" link, using it again is the only way for a discussion to register as read...

    Hmm, that didn't happen when I was testing it. Has anyone else experienced this? Let me double check that it isn't something in my code...
    • CommentAuthoredam
    • CommentTimeFeb 29th 2008
     # 9
    Hi there,

    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.
  3.  # 10
    Uploaded version 1.2b of Mark All Read Redux.
  4.  # 11
    Uploaded version 1.2c of Mark All Read Redux.
    • CommentAuthortimfire
    • CommentTimeMar 10th 2008
     # 12
    OK, I had some trouble figuring out what was the problem, but I think (*fingers crossed*) I fixed it. I think the problem was that changing the Discussion status and whatnot messed with how Vanilla updated the UserDiscussionWatch table. So I limited the function of the extension to the index and search pages.

    Tell me if that fixes the issues.
  5.  # 13
    Uploaded version 1.2d of Mark All Read Redux.
    • CommentAuthortimfire
    • CommentTimeMar 10th 2008
     # 14
    Crap, I really should test my extension before uploading it...
    •  
      CommentAuthordkodr
    • CommentTimeMar 24th 2008 edited
     # 15
    A fatal, non-recoverable error has occurred
    Technical information (for support personel):

    Error Message
    The "MarkAllReadRedux" class referenced by "MarkAllReadRedux" does not appear to exist.
    Affected Elements
    ObjectFactory.NewObject();

    For additional support documentation, visit the Lussumo Documentation website at: lussumo.com/docs
    • CommentAuthortimfire
    • CommentTimeMar 26th 2008
     # 16
    lipa,

    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).
  6.  # 17
    This extension does not work with wordpress integration. I found out that the user table is hard coded into the extension, which may be the cause. I replaced all instances of
    $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?
    •  
      CommentAuthordkodr
    • CommentTimeMay 5th 2008
     # 18
    Moving the class to the very top helped. Now it's working properly. Thank you!
  7.  # 19
    Uploaded version 1.3 of Mark All Read Redux.
    • CommentAuthortimfire
    • CommentTimeMay 16th 2008
     # 20
    I identified a problem with the way the extension configured the "conf/database.php" file. If you open that file up, the last line probably looks like this:

    $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.
    • CommentAuthorSCHIZO
    • CommentTimeMay 17th 2008 edited
     # 21
    Error Message
    The "MarkAllReadRedux" class referenced by "MarkAllReadRedux" does not appear to exist.
    Affected Elements
    ObjectFactory.NewObject();

    ------------------
    All lastes versions. One topic in category and is already readed. I see this error after click "Mark All as read" (/extension.php?PostBackAction=MarkAllReadRedux&r=1) from topics page and Reset status from profile page (/extension.php?PostBackAction=Reset_MarkAllReadRedux&r=2).
    •  
      CommentAuthorrayk
    • CommentTimeMay 28th 2008
     # 22
    Can some one help me mod this so that instead of having a panel link, there is a link on right hand side to "Discussion Overview" text? Image below with what I want to do :)

    • CommentAuthormr_pat
    • CommentTimeJun 2nd 2008
     # 23
    Hello, I get the error
    Notice: strtotime(): Called with empty time parameter in /home/content/s/i/m/simian420/html/forum/extensions/MarkAllReadRedux/default.php on line 73

    Any one have a fix for that?

    Thanks
    •  
      CommentAuthordkodr
    • CommentTimeJul 6th 2008
     # 24
    I've got the same problem. Any solution?
    • CommentAuthormr_pat
    • CommentTimeJul 7th 2008
     # 25
    I never got one.....
    • CommentAuthorSnaX
    • CommentTimeAug 19th 2008
     # 26
    my users are getting this error...

    Notice: strtotime(): Called with empty time parameter in /home/content/s/n/a/snaxsnax/html/board/extensions/MarkAllReadRedux/default.php on line 73

    it goes away when they click "mark all read", but I'd prefer it not be there at all...any ideas?
Add your comments
    Username Password
  • Format comments as