WordPress.org

Ready to get started?Download WordPress

Forums

Recent Comments (7 posts)

  1. sremington
    Member
    Posted 8 years ago #

    OK I installed the Recent Comments plugin and I like it a lot.

    Here is the code I put in my sidebar:

    <? if ( function_exists('mdv_recent_comments') ) { ?>
    <li><?php _e('Recent Comments'); ?>
    <ul><?php mdv_recent_comments(10, 7, '', '
    ', true, 0)?>
    <? } ?></ul>
    </li>

    `
    Does anybody know how to change the code so that it will only display the last 5 comments AND to have the name of the poster be the link to the comment??

    Thanks

  2. sremington
    Member
    Posted 8 years ago #

    OK let me help then. I got this from the readme file but I still am not sure where and how to configure it:

    The parameters:
    $no_comments - sets the number of recent comments to display
    $comment_lenth - the number of words to display as a comment excerpt
    $before - text to be displayed before the link to the recent comment
    $after - text to be displayed after the link to the recent comment
    $show_pass_post - whether or not to display comments from password protected posts
    $comment_style - sets the style of comment to be used
    1 = "CommenterName on PostTitle" with CommenterName being a link to the comment
    0 = "CommenterName: WordsOfComment" with WordsOfComment being a link to the comment

  3. sremington
    Member
    Posted 8 years ago #

    Thanks!

  4. moshu
    Member
    Posted 8 years ago #

    Basic math: you have 6 (six) lines starting with
    $something... - as the readme says, they are parameters.

    In the code, in the parameters section (X, Y, Z,...) you also have six (6) positions/numbers delimited by the commas.

    First parameter = first number
    Second parameter = second number...

    (now it's time to say thank you :)

  5. sremington
    Member
    Posted 8 years ago #

    Thanks... :)

    Quick question though.. I changed the '0' at the end to a '1' like it said but the link appears on the name and not on the posts title. The link takes them to their home page if they provide it. I was hoping to it would do as it said and provide a link not on the username but on the post title taking them straight to that post.

    I have seen this done in a ton of other blogs..

    Any ideas?

  6. apsey
    Member
    Posted 8 years ago #

    UPDATE: I fixed it by reverting back to the previous Nick Momrik version 1.15. Works great with WP 2.0.Hooray!

    ---------Original Post-------------

    Same situation here. When using the '1' it's broken in WP 2.0 but it worked swell in WP 1.5. with version 1.15 of the plug-in. Now using Nick's 1.18.

    I prefer the '1' setting so help untangling this would be much appreciated.

    Additional info: If the Comment author does not have an associated URL, there's no link at all.

    TIA

  7. theshaft
    Member
    Posted 8 years ago #

    I've written a small plugin to display recent comments for my own needs. Don't know if it would suit yours, but you can try it: Simple Recent Comments

    You can take a look at my sidebar to see what it looks like.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags