Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

CountUnreadComments is not counted properly

edited April 2012 in Vanilla 2.0 - 2.8

when I - by url where page "\p1" is set - open the multipage discussion with notification about some new comments

counter is reset by formula "$all_comments - $comments_on_page1".

How to modify it to count correctly?


  • Options

    maybe this will help you, if you look at the code.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    edited April 2012


    Thank you a lot, but the problem is in the "forgetness" of vanilla CountCommentWatch and CountUnreadComments algorithm.

    It forgets about already read comments after adding a new comment in other browser. It shows incremented by one counter . But forgets.

    I go by link to page one of discussion and have UNREAD COMMENTS in all other pages!

    then while i haven't add one more comment - algorithm remembers which comments are already read and which are not.


    Something is wrong in comment.model or in discussion.model

  • Options

    well, the solution is to comment the condition

    in file forum\applications\vanilla\models\class.commentmodel.php

             //if ($CountWatch > $TotalComments) {
                $CountWatch = $TotalComments;
                $NewComment = TRUE;

    this erases all news in any case - when you watch new comments or you watch the first page.

Sign In or Register to comment.