Support » Plugins » “Welcome commenter, this post have a new comment”

  • Hello guys,

    I’ve been trying to find some snippet to add to my loop, next to comment_popup, so a returning commenter finds a little message saying that the post got new comments since his last reply…

    I found this plugin :

    , but it works overall with posts (“There Are New Posts!”), and is too much for what I need, and trying to read its code is excessive to my knowdledge.

    I found later this nice code :

    <?php if(isset($_COOKIE['comment_author_'.COOKIEHASH])) {
    $lastCommenter = $_COOKIE['comment_author_'.COOKIEHASH];
    echo "Hello again ". $lastCommenter ."!";
    } else {
    echo "Welcome to our site!";
    } ?>

    , which checks for the cookie stored by the user when that one lets a comment, then prints one thing or the other if the user is identified.

    So I would go rather to something similar, but adding some Boolean Operator like :

    if this user is cookied, AND there’s a new comment since his last visit, print a message

    Thanks for any input here guys.

  • The topic ‘“Welcome commenter, this post have a new comment”’ is closed to new replies.