The MU forums have moved to WordPress.org

Profile plugins and hooking into comment_author_link (6 posts)

  1. malandry
    Member
    Posted 16 years ago #

    Hi,

    I have developped a whole «community» plugin for Wordpress MU featuring member profiling, some statistics, up & down voting system like-digg but there's one little thing that annoy me and that I can't fix.

    I'm unable to hook into comment_author_link. I wish to provide a (dofollow) profile link to the registered author and a nofollow typical link to the anonymous commenter.

    An easy tricks would be to simply edit the template page and write a brand new function but that would not be compliant with every themes.

    Is there a more complex way to hook into it than
    add_action('comment_author_link', 'pa_author_link');

    or....

    Thanks

    -Matt

  2. malandry
    Member
    Posted 16 years ago #

    Oh well.... I guess typing it give me a clue where to look..

    add_action('get_comment_author_link', 'pa_author_link');
    function pa_author_link($content) {

    global $comment;

    if ($comment->user_id!=0) {
    $profile = get_authordata($comment->user_id);
    //print_r($profile);
    return "user_login."\">".$profile->display_name."";
    } else {
    return $content;
    }

    }

    Thanks anyway!

  3. honewatson
    Member
    Posted 16 years ago #

    Any chance of sharing your community plugin?

  4. malandry
    Member
    Posted 16 years ago #

    Yes!

    I will.. as soon as I'm done with it and I can package it.

    There's a LOT of custom coding mixed up with necessary well-known plugins so it's a bit messed up right now.

  5. honewatson
    Member
    Posted 16 years ago #

    Awesome! Looking forward to it.

  6. drmiketemp
    Member
    Posted 16 years ago #

    If you haven't discovered it yet:

    http://wpmudevorg.wordpress.com

    It's a collection site of wpmu plugins.

    Hope thi shelps,
    -drmike

About this Topic

  • Started 16 years ago by malandry
  • Latest reply from drmiketemp