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

      • Inspiring Sites of the Week No. 28

        Inspiring Sites of the Week is the weekly series where we feature the latest and hottest websites targeting the design world from around the globe.

      • Finding Blue Host Coupons

        Blue host is one of the most trusted web hosts in the world. With over two million customers a huge list of features, they can arguably be called the world’s best web host.

      • Digital Art and Landscapes of Binu Rojers

        Collection of landscapes and digital artworks from illustrator Binu Rojers

      • How to get started with SVG

        In the last few months, the buzz around SVG images has grown and grown. SVG has been around for years, but it’s only recently that it’s started to look like a real contender.The hype around SVG isn’t just some hipster trend, SVG completely solves issues that file formats like JPG completely fail to address.If you want to start using SVG, this article is for you. I’ll guide you through getting your SVG from Illustrator into HTML and then teach you to modify that image using CSS.

      • TUESDAY FONTS: Hipstelvetica, Glober and Ormont (free fonts)

        This time in TUESDAY FONTS we present to you another great three typographies: Hipstelvetica, Glober and Ormont and they are free fonts.


      SUBMIT LINK | MORE NEWS

    Recent Comments

      • Dani : Trimakasih Pak.. Izin unduh ya... more
      • Dani : Motif-motif batiknya bagus sekali Pak. Mksh sudah mempostin... more
      • Lora : I love these! Do you have a "Youtube" icon in this style?... more
      • Rio : Mas, sampean orang dermawan. Trims yo..... more
      • Mark Wilston : Great set of points you have highlighted here, I would like ... more

    Powered by:

    Content Distribution Network

    Twitter: ArtfanDesign