• Resolved doniboy

    Not real familiar with WP yet, so alert me of any problems.
    Download
    wp_comment_leaders
    Tag
    <?php get_comment_leaders(); ?>
    Arguments Definition:

    1. A number that limits the amount of records that are to be shown. (default’s ‘5’)
    2. A string that excludes certain names from appearing in the list. Separate multiple names with a comma.
    3. A number: pads the visitor’s total comment count with zeros.
    4. A string to display before the record.
    5. A string to display after the record. (default is a line break ‘
      ‘)
    6. Example
      <?php get_comment_leaders( 10, "admin_name, spammer_name", 3, '

    7. ', '
    8. '); ?>

Viewing 15 replies - 16 through 30 (of 39 total)
  • Thread Starter Anonymous

    No not at the moment, I’m about to post an updated fixed version later on today.

    Kudos to doniboy (and everyone else who had a hand in it)! The hack works splendidly. It was easy to set up and get running. See it On my site. Woo-hoo!
    TG

    TG,
    The portion of the hack that display a link to a commentors last comment is not working correctly yet. I tried to come up with the correct SQL to fix this, but have been unsuccessful yet. doniboy is still working on it also. :-/

    Hrm…. I thought it was, but I see now that it doesn’t ?? that’s OK… if you need my help, just ask (I am a developer by trade and do a lot of SQL)…..
    TG

    ~TG
    If you can figure this out why it’s not giving the last comment. That would be Great. ??
    thanks in advance

    But….the max comment_post_ID may not be the post that was last commented on. ?? What if a commentor went back and commented on a post from a week ago. That will have the max comment_ID, but pulling the max comment_post_ID will post to the latest post they have commented on. Man, that sounds confusing!

    hmmmmm…. I see your point…. OK, I sit corrected…. I’ll take a further look at it when I get home (and don’t have thinkgs like work cluttering my brain)…..
    TG
    I bet the answer is so simple, that it’s rediculous….

    It usually is… :-/

    Thread Starter Anonymous

    Yes I concidered using MAX and have cam across the same problems. I’m going to have to take that part of the code out and only show the commentor’s name and number of comments into I figure out the best way to do this.. It’s giving me a hard time also.

    Thread Starter Anonymous

    Also another problem is how would we go about joining the comment table with the post table so that I can get the title of the last post that the commentor commented on. We’ll have the same problem with it pulling the earliest title field instead of the latest one. MAX won’t work on this because its a string and it’ll sort it in an alphabetical order.
    Any suggestions TechGnome?

    Yeah, I do have an idea…. unfortunatly it will need to wait until I get home, where I can run MyPHPAdmin properly to test the theory out. I think two selects Joined together somehow will be the answer.
    Alex – I didn’t think that MySQL 4 supported Inner Selects, but that was something 5.0 was going to support…. hrmm…. I don’t know…. ??
    I will look at it tonight and see what I can do….
    TG

    Wuuuup!
    Latest version of comment leaders hack can be found right here! It appears to work for me now, getting the proper post AND comment. I would appreciate it if I could get some “independant” confirmation on this.
    Unfortunatly, I could not get it to work with one SQL call, and broke it up into two calls.
    TG

    ~TG
    Good Job man… It works just fine. Way to Go. Check it out Here
    It’s under the Recent Tab ??
    Thanks again!

    Two cheers for the Gnome.

    Way to go TG!!

Viewing 15 replies - 16 through 30 (of 39 total)
  • The topic ‘Comment Leader Hack’ is closed to new replies.