• I recently was having a problem with the comment plugger plug-in when I upgraded wordpress, I had always been able to post the previous entries commenters in my most recent entry. For some strange reason when I updated my comment plugger plugin as well I was no longer able to do that…. I found old version of it that I was using, and installed it back again.

    I had been told by someone on this board that it was not possible to show your previous comments plugged on a recent entry. (show monday’s commenters on tuesday’s entry)

    I did not write this plug-in, full credit goes to the origional author. I do not even recall where I got it from, though I do find pretty much all of my plug-ins here at the board or on various known websites. I just wanted to share this with everyone. If I am wrong and everyone knew about this, then forgive me.

    <?php

    /*
    1. Include the code below in the index file.

    2. Use one of these functions to display commenters:
    <?php comment_plugger(0); ?> - show commenters from current post
    <?php comment_plugger(1); ?> - show commenters from last post
    */

    function comment_plugger($show = 0, $limit = 0, $sep = ', ', $none = ' none') {
    global $wpdb, $tablecomments, $id;
    $cid = ($show) ? ($id - 1) : $id;
    $request = "SELECT DISTINCT comment_author_url, comment_author FROM $tablecomments";
    $request .= " WHERE comment_post_ID='$cid' AND comment_author <> '' AND comment_author_url <> ''";
    $request .= ' ORDER BY comment_author ASC';
    $request .= ($limit > 0) ? "LIMIT $limit" : '';
    $commenters = $wpdb->get_results($request);
    if ($commenters) {
    $output = '';
    foreach ($commenters as $commenter) {
    if (!empty($commenter->comment_author_url)) {
    $output[] = 'comment_author_url.'" title="'.$commenter->comment_author.'" target="new">'.$commenter->comment_author.'';
    }
    }
    }
    if (is_array($output)) {
    echo implode($sep, $output);
    } else {
    echo $none;
    }
    }

    ?>

Viewing 8 replies - 1 through 8 (of 8 total)
  • I always wanted to show “monday’s commenters on tuesday’s post” too, but when I tried using this, I couldn’t make it work. Now, I’m a bit php-thick, so I’ll ask a couple of questions.

    1) Add the code on index.php. Which one? the main one of the WP folder OR the one on your theme?

    2) If it’s the index.php of your theme folder, where should we add the code?

    Cheers! ??

    Thread Starter submo6

    (@submo6)

    Just create a new notepad page, insert the whole code in there, from < to > making sure there is no extra space, or empty lines at the beginning or at the end, name the file – comment-plugger.php and upload it into your plug-in’s folder and activate it.

    Put either,

    <?php comment_plugger(0); ?> – show commenters from current post
    <?php comment_plugger(1); ?> – show commenters from last post

    into your theme index file, having it where you want it to be located.

    This should work, any other questions you can always post again and I’ll check back.

    It just won’t show on my plug-in’s folder, so I can’t activate it. I’m seriously thinking I’m jinxed! ??
    Thanks for the comment on my blog.

    Thread Starter submo6

    (@submo6)

    I forgot to alter the plug into show up, I realized I had the same problem …. add the following to the code at the very beginning right after the <? then save. It should show up now.

    /*
    Plugin Name: Comment Plugger
    Plugin URI: https://www.sugar-devil.com
    Description: plugs automaticly the people who commented on the previous posts
    Author: ????
    Author URI: ?????
    Version: ????

    <?php comment_plugger(0); ?> – show commenters from current post
    <?php comment_plugger(1); ?> – show commenters from last post

    */

    I am going to put the code available for download on my website, in a tutorial section. I am still looking for the author of this script, if you know wrote this then please let me know!

    Can’t make it work. There seems to be some syntax problem (that’s what my php editor says, but it doesn’t fix it, so it might just be an extra/non-existant space?).

    The comment plugger I’ve always stumbled across is the one from https://mtdewvirus.com/code/.

    CORRECTION…. Through the Codegrrl.com Forums I found a link to a site that shows the original code!!! https://deep-within.dk.

    AND I made it work. *proud proud*

    Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/sandra/public_html/wordpress/wp-content/plugins/commenter-plugger.php on line 23

    :\

    Does anybody know how I could exclude myself from being included in the comment plugger? If I’m signed in and I reply to a comment, I don’t want my own name and site URL to be linked with the rest of the commenters.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘comment plugger’ is closed to new replies.