Support » Plugins and Hacks » Comment & Post Plugins

  • I’ve changed my previous hacks into plugins for use with 1.2.
    http://mtdewvirus.com/wp-hacks/
    Included are:

    • Comment Count
      Output the number of comments. Can be used to count total number of comments or the number of comments for a specific post when used "in the loop."
    • Comment Plugger
      Gives a list of that last people to comment on a post, with a link to their site if they provided one.
    • Comment Word Count
      Outputs the total number of words in all comments.
    • Most Commented
      Retrieves a list of the posts with the most comments.
    • Post Count
      Outputs the total number of posts.
    • Post Word Count
      Outputs the total number of words in all posts.
    • Recent Comments
      Retrieves a list of the most recent comments.
    • Recent Posts
      Returns a list of the most recent posts.
Viewing 15 replies - 16 through 30 (of 45 total)
  • I created another directory to try out the 1.2 candidate.
    This is it.
    I set all of the text colors in my style sheet to white except for the block-quotes, and they’re still in black. I suspect I just need to create a new category in the CSS, but I’m unsure what to call it. Just “post_excerpt”?

    You don’t have a color set for #menu or for body so it is using black by default. Just set a color on #menu.

    Ah. Got it.
    It’s always the simple stuff that throws you for a loop.
    Thanks again.

    The Recent Posts plugin now supports two styles for displaying the recent comments.

    hello, I made my way here from this thread and might use that plugin but what I’m really looking for is something that will list the most recent posts to have been commented on, does anyone know how I can do this?

    I meant to say the Recent Comments plugin… :-/

    I’ve installed the Recent Comments plugin, but it’s throwing a database error:

    [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LEFT JOIN tableposts ON .ID=.comment_post_ID AND post_status = ]
    SELECT ID, comment_ID, comment_content, comment_author, post_title FROM LEFT JOIN tableposts ON .ID=.comment_post_ID AND post_status = ‘publish’ AND post_password =” AND comment_approved = ‘1’ ORDER BY comment_ID DESC LIMIT 5

    Sorry, my SQL is somewhat rusty, and I don’t think I ever did get my head around LEFT JOIN. Anyone care to help?

    Aha! I think I’ve fixed it by blundering around. First, I tweaked the global line to:

    global $wpdb, $tablecomments, $tableposts;

    Then in the next line, add a $ before tablecomments LEFT JOIN. This seems to work for me.

    Yet another followup to my own post; in the distribution v1.11, comment_approved appears to be ignored in the SQL select, so comments in the moderation queue appear in the list (though the link goes to the entry, since the comment isn’t visible).
    I couldn’t unpick the SQL to fix this, so added a kludge; the start of my foreach loop now reads:

    foreach ($comments as $comment) {
    $comment_approved = ($comment->comment_approved);
    if (!$comment_approved) continue;
    $comment_author = stripslashes($comment->comment_author);

    That is, if comment_approved is 0, the current pass through the loop is jumped. This produces the expected result for me.

    WOW…I really messed that one up didn’t I! Sorry everyone. I’ve made some fixes and tested it out on a fresh 1.2 install. Everything should be working properly now.

    I hate to say this, MtDew, but there still seems to be a tiny goof in the SQL; my install throws an error unless I change LEFT JOIN tableposts to LEFT JOIN $tableposts. Then it works just fine; the AND -> WHERE substitution does exactly what it should. Dang, I should have spotted that. 🙂
    Big thanks for the plugin, I’d never have got near on my own!

    I thought I did change that….maybe I put the wrong vesion in the download file.
    Yup, I had it working on my test blog, but didn’t include that simple little character in download version. Everything should be fixed now….I hope!! Sorry again. 🙂

    Just made a small fix to the Recent Posts plugin. I wasn’t taking the time offset into account.
    http://mtdewvirus.com/wp-hacks/

    Forgive my ignorance, I am far from understanding PHP and new to WP. I have done as the instructions require but I am having one problem. Some of my post titles are long, and I would like to use the first 10 characters of the recent post title with the recent post plugin. Any suggestions on how to do this?
    Thanks
    Bernard

    Some of the code from the recent comments plugin could be used to accomplish this. Send me an email (there is a form at my site) and I’ll try to whip something up for you.

Viewing 15 replies - 16 through 30 (of 45 total)
  • You must be logged in to reply to this topic.