The MU forums have moved to

New thread - combine avatars and sitewide latest posts (1 post)

  1. podz
    Key Master
    Posted 16 years ago #

    Posted by: demonicume

    i'm using this plugin to display recent posts. i'm trying to modify it to display site avatars. looking at the plugin, it already has a function to display avatars
    'if ( function_exists('show_author_thumb') ) :
    $profilepic = show_author_thumb($thispost[0]->post_author , 32);
    echo $profilepic;

    i was able to display my default avatar by cobbling in stuff from the avatar plugin, specifically:

    'function author_image_tag($authorID, $tags = '', $display = true) {
    $path = author_image_path($authorID, false, 'absolute');
    $width = author_image_dimensions($path, 'width');
    //$height = author_image_dimensions($path, 'height');//again not needed
    $tag = '<img src="' . author_image_path($authorID, false, 'url') . '" width=' . $width . ' '. $tags . ' ' . ' id="authorpic" />';
    if ($display) { echo $tag; } else { return $tag; }

    any ideas on to make this pull the appropriate avatar? my end goal would be to display latest posts with avatars. any ideas would be appreciated.

    [The original thread had some code posted which detonated the forum. I couldn't repair it easily so thought a new one would be okay. The other thread remains so mdawaffe can check it out. - Mark]

About this Topic

  • Started 16 years ago by podz