How to Show Author Avatar in Submission List for fvCommunityNews

Filed Under: Articles, Plug-in, Tip and Tutor by fandy April 28, 2010, 10:51

avatar_fvcn

Last week, I thought, why not for my “CommunityNews” list I show the submiter/auhtor avatar. With this avatar more easy for user to recognize this link “who the author link” and separating each others.
So after the research for fvCommunityNews plug-in and testing,  this is what I get. But if you have better way, please share with us.

Open fvCommunityNews.php, find this code in line 903

	$newsPosts = '
    ' . "\n"; foreach ($posts as $post) { if (NULL == $post->Image) $image = $noImage; else $image = get_option('home') . '/wp-fvcn-images/' . stripslashes(apply_filters('comment_author_url', $post->Image)); $newsPosts .= $format . "\n"; $newsPosts = str_replace('%submission_author%', stripslashes(apply_filters('comment_author', $post->Name)), $newsPosts); $newsPosts = str_replace('%submission_author_email%', stripslashes(apply_filters('comment_author_email', $post->Email)), $newsPosts);

than insert this code after it in line 914

$newsPosts = str_replace('%submission_author_avatar%', get_avatar(stripslashes(apply_filters('comment_author_email', $post->Email)), 24), $newsPosts);

The number 24 is the size of avatar you want to show

Now at administration console, Submission-Setting, Insert the tags “%submission_author_avatar%” in Submission Template.
examples

  • %submission_author_avatar%

    %submission_title%

    %submission_description%
  • Written by fandy

    a web and graphic designer whose love art and design and like to share knowledge, resources and inspirations. English not my mother language so don't blame me, I just do the best to sharing, just give me suggestion to fix it. If love my work, you can support me and follow me on Twitter


    Share This :

    I PROUDLY PRESENT

    YOUR COMMENTS! I LOVE 'EM

    designfloat.com April 29, 2010,23:38

    How to Show Author Avatar in Submission List for fvCommunityNews « Artfans Design…

    On this post I want to share you how to show the avatar of news authors on community submission list with fvCommunityNews Plug-in…

    zabox.net April 29, 2010,23:45

    How to Show Author Avatar in Submission List for fvCommunityNews…

    On this post I want to share you how to show the avatar of news authors on community submission list with fvCommunityNews Plug-in…

    LEAVE A COMMENT

    AND MAKE ME HAPPY

    Your email address will not be published. Required fields are marked *

    Name*

    Email*

    Website

    Comment

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Community News

    Recent Comments

      • Shawn Rubel : Thanks guys, easy to follow tips that will come in handy for... more
      • Shawn Rubel : Derek, if you've got the time, it would be nice to see a ... more
      • Shawn Rubel : Great stuff, I'm always trying to follow these aspects whene... more
      • Dani : Trimakasih Pak.. Izin unduh ya... more
      • Dani : Motif-motif batiknya bagus sekali Pak. Mksh sudah mempostin... more

    Powered by:

    Content Distribution Network

    Twitter: ArtfanDesign