<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AEXT.NET MAGAZINE &#187; Wordpress Avatar</title>
	<atom:link href="http://aext.net/tag/wordpress-avatar/feed/" rel="self" type="application/rss+xml" />
	<link>http://aext.net</link>
	<description>How to Create a Website</description>
	<lastBuildDate>Wed, 30 May 2012 05:03:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>10 Useful Code Snippets And Plugins To Spice Up WordPress Avatar</title>
		<link>http://aext.net/2009/12/10-useful-code-snippets-and-plugins-to-spice-up-wordpress-avatar/</link>
		<comments>http://aext.net/2009/12/10-useful-code-snippets-and-plugins-to-spice-up-wordpress-avatar/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 06:30:49 +0000</pubDate>
		<dc:creator>Lief</dc:creator>
				<category><![CDATA[Roundup]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Theme Design]]></category>
		<category><![CDATA[Wordpress Avatar]]></category>
		<category><![CDATA[Wordpress Plugin]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://aext.net/?p=1767</guid>
		<description><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2009/12/10-useful-code-snippets-and-plugins-to-spice-up-wordpress-avatar/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2009/12/10-useful-code-snippets-and-plugins-to-spice-up-wordpress-avatar/" height="61" width="51" /></a></p>How well are you using avatar in your wordpress blog? Let see how people spice up avatar section in their wordpress. This entry provides us 10 most useful code snippets and wordpress plugin that help you control, customize your avatar in wordpress better. <a href="http://aext.net/2009/12/10-useful-code-snippets-and-plugins-to-spice-up-wordpress-avatar/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2009/12/10-useful-code-snippets-and-plugins-to-spice-up-wordpress-avatar/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2009/12/10-useful-code-snippets-and-plugins-to-spice-up-wordpress-avatar/" height="61" width="51" /></a></p><p>How well are you using avatar in your wordpress blog? Let see how people spice up avatar section in their wordpress. This entry provides us 10 most useful code snippets and wordpress plugins that help us control, customize our avatar in wordpress better.</p>
<p><span id="more-1767"></span></p>
<h3>Change the Default Gravatar in WordPress</h3>
<div class="bigimage"><a href="http://buildinternet.com/2009/02/how-to-change-the-default-gravatar-in-wordpress/"><img class="aligncenter size-full wp-image-1768" title="mystery-man-icon-intro" src="http://aext.net/wp-contents/uploads/2009/11/mystery-man-icon-intro.jpg" alt="mystery-man-icon-intro" width="500" height="166" /></a></div>
<pre class="php"><span style="color: #003369;">add_filter</span>( <span style="color: #eb7300;">'avatar_defaults'</span>, <span style="color: #eb7300;">'newgravatar'</span> );

<span style="color: #881350;">function</span> <span style="color: #003369;">newgravatar </span>(<span style="color: #825900;">$avatar_defaults</span>) {
    <span style="color: #825900;">$myavatar</span> = <span style="color: #003369;">get_bloginfo</span>(<span style="color: #eb7300;">'template_directory'</span>) . <span style="color: #eb7300;">'/images/buildinternet-gravatar.jpg'</span>;
    <span style="color: #825900;">$avatar_defaults</span>[<span style="color: #825900;">$myavatar</span>] = <span style="color: #eb7300;">"Build Internet"</span>;
    <span style="color: #881350;">return</span> <span style="color: #825900;">$avatar_defaults</span>;
}</pre>
<p>By default, if users don&#8217;t have gravatar with their email, wordpress gives you an option that can be change the default avatar in Setting&gt;Discussion. However, you can replace or add one more option that default avatar can be replace by your own image.<br />
<a class="more" href="http://buildinternet.com/2009/02/how-to-change-the-default-gravatar-in-wordpress/">Source: Build Internet</a></p>
<h3>Using Twitter avatars in comments without plug-ins</h3>
<p>First, grab the functions file <a href="http://www.smashingmagazine.com/2009/01/08/twitter-avatars-in-comments-wordpress-plugin/">here</a>.</p>
<p>Then, copy all the content of <em>twittar.php</em> and paste it to your functions.php file</p>
<p>Finally, copy and paste code line below to your comments.php file within the comment loop.</p>
<pre class="php"><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">twittar</span>(<span style="color: #eb7300;">'45'</span>, <span style="color: #eb7300;">'default.png'</span>, <span style="color: #eb7300;">'#e9e9e9'</span>, <span style="color: #eb7300;">'twitavatars'</span>, <span style="color: #0000ff;">1</span>, <span style="color: #eb7300;">'G'</span>); <span style="color: #dd0000;">?&gt;</span></pre>
<p><a class="more" href="http://www.wprecipes.com/ho-to-use-twitter-avatars-in-comments">Source: WP Recipes</a></p>
<h3>Automatically insert author bio on each post</h3>
<div class="bigimage"><a href="http://aext.net/2009/10/wordpress-hack-anything-can-be-added-anywhere-in-the-post-content/"><img class="aligncenter size-full wp-image-1774" title="Automatically insert author bio on each post" src="http://aext.net/wp-contents/uploads/2009/11/Automatically-insert-author-bio-on-each-post.jpg" alt="Automatically insert author bio on each post" width="500" height="219" /></a></div>
<p>Using WordPress hooks, it can be very easy to modify WordPress variables to fit your needs. In this recipe, Iâ€™m going to show you how to use hooks to automatically insert the author bio after each post.</p>
<p>Open your functions.php file and paste the following code. After insert these code, you can customize the css for the author bio box easily.</p>
<pre class="php"><span style="color: #881350;">function</span> <span style="color: #003369;">get_author_bio </span>(<span style="color: #825900;">$content</span>=<span style="color: #eb7300;">''</span>){<span style="color: #881350;"> </span><span style="color: #825900;"> </span>

    <span style="color: #881350;">if</span>(!<span style="color: #003369;">in_category</span>(<span style="color: #eb7300;">"Community News"</span>)) {

    <span style="color: #825900;">$post_author_name</span>=<span style="color: #003369;">get_the_author_meta</span>(<span style="color: #eb7300;">"display_name"</span>);
    <span style="color: #825900;">$post_author_description</span>=<span style="color: #003369;">get_the_author_meta</span>(<span style="color: #eb7300;">"description"</span>);      

    <span style="color: #825900;">$html</span>=<span style="color: #eb7300;">"&lt;div class='clearfix' id='about_author'&gt;\n"</span>;

    <span style="color: #825900;">$html</span>.=<span style="color: #eb7300;">"&lt;img width='80' height='80' class='avatar' src='http://www.gravatar.com/avatar.php?gravatar_id="</span>.<span style="color: #661aa9;">md5</span>(<span style="color: #003369;">get_the_author_email</span>()). <span style="color: #eb7300;">"&amp;default="</span>.<span style="color: #661aa9;">urlencode</span>(<span style="color: #825900;">$GLOBALS</span>[<span style="color: #eb7300;">'defaultgravatar'</span>]).<span style="color: #eb7300;">"&amp;size=80&amp;r=PG' alt='PG'/&gt;\n"</span>;

    <span style="color: #825900;">$html</span>.=<span style="color: #eb7300;">"&lt;div class='author_text'&gt;\n"</span>;
    <span style="color: #825900;">$html</span>.=<span style="color: #eb7300;">"&lt;h4&gt;Author: &lt;span&gt;"</span>.<span style="color: #825900;">$post_author_name</span>.<span style="color: #eb7300;">"&lt;/span&gt;&lt;/h4&gt;\n"</span>;

    <span style="color: #825900;">$html</span>.= <span style="color: #825900;">$post_author_description</span>.<span style="color: #eb7300;">"\n"</span>;
    <span style="color: #825900;">$html</span>.=<span style="color: #eb7300;">"&lt;/div&gt;\n"</span>;
    <span style="color: #825900;">$html</span>.=<span style="color: #eb7300;">"&lt;div class='clear'&gt;&lt;/div&gt;\n"</span>;

    <span style="color: #825900;">$html</span>.=<span style="color: #eb7300;">"&lt;/div&gt;"</span>;
    <span style="color: #825900;">$content</span> .= <span style="color: #825900;">$html</span>;

    }

    <span style="color: #881350;">return</span> <span style="color: #825900;">$content</span>;

}</pre>
<p><a class="more" href="http://aext.net/2009/10/wordpress-hack-anything-can-be-added-anywhere-in-the-post-content/">Source: AEXT.NET</a></p>
<h3>Checking for the Existence of a Gravatar</h3>
<p>If you request a Gravatar image and the email you request doesn&#8217;t have an account in the Gravatar system it returns a default image to you. In some cases this might not be what you want, instead, you might want to know whether you will get back a real gravatar or if it will just be the default. Sometime, you don&#8217;t want to display avatar element instead of default avatar if users don&#8217;t have gravatar exists in your email.</p>
<p>WordPress Codex shows you a trick that check the header response. Return false if code response is not match with 202. Thus, you can use the Boolean value to decide display or not.</p>
<pre class="php"><span style="color: #dd0000;">&lt;?php</span>

<span style="color: #881350;">function</span> <span style="color: #003369;">validate_gravatar</span>(<span style="color: #825900;">$email</span>) {
    <em><span style="color: #236e25;">// Craft a potential url and test its headers </span></em>    <span style="color: #825900;">$hash</span> = <span style="color: #661aa9;">md5</span>(<span style="color: #825900;">$email</span>);
    <span style="color: #825900;">$uri</span> = <span style="color: #eb7300;">'http://www.gravatar.com/avatar/'</span> . <span style="color: #825900;">$hash</span> . <span style="color: #eb7300;">'?d=404'</span>;
    <span style="color: #825900;">$headers</span> = <span style="color: #661aa9;">@get_headers</span>(<span style="color: #825900;">$uri</span>);
    <span style="color: #881350;">if</span>(!<span style="color: #661aa9;">preg_match</span>(<span style="color: #eb7300;">"|200|"</span>, <span style="color: #825900;">$headers</span>[<span style="color: #0000ff;">0</span>])) {
        <span style="color: #825900;">$has_valid_avatar</span> = <span style="color: #881350;">FALSE</span>;
    } <span style="color: #881350;">else</span> {
        <span style="color: #825900;">$has_valid_avatar</span> = <span style="color: #881350;">TRUE</span>;
    }
    <span style="color: #881350;">return</span> <span style="color: #825900;">$has_valid_avatar</span>;
}

<span style="color: #dd0000;">?&gt;</span></pre>
<p><a class="more" href="http://codex.wordpress.org/Using_Gravatars#Checking_for_the_Existence_of_a_Gravatar">Source: WordPress Codex</a></p>
<h3>User Avatar Photos in WordPress</h3>
<div class="bigimage"><a href="http://www.darcynorman.net/2008/09/02/user-avatar-photos-in-wordpress/"><img class="aligncenter size-full wp-image-1778" title="userphoto_wordpress_plugin" src="http://aext.net/wp-contents/uploads/2009/11/userphoto_wordpress_plugin.png" alt="userphoto_wordpress_plugin" width="500" height="200" /></a></div>
<p>WordPress has supported Gravatars for awhile, which is great, but in some cases, you want to display users avatar as their uploaded photos.</p>
<p>First, download and install <a href="http://wordpress.org/extend/plugins/user-photo/">User Photo plugin</a>, then use code below to display their photo:</p>
<pre class="php">    <span style="color: #881350;">if</span>(<span style="color: #661aa9;">function_exists</span>(<span style="color: #eb7300;">'userphoto_the_author_thumbnail'</span>)) {  

        <span style="color: #003369;">userphoto_the_author_thumbnail</span>();

    }</pre>
<p><a class="more" href="http://www.darcynorman.net/2008/09/02/user-avatar-photos-in-wordpress/">Source: D&#8217;Arcy Norman dot net</a></p>
<h3>Avatar Display for Logged In Users</h3>
<div class="bigimage"><img class="aligncenter size-full wp-image-1784" title="Avatar Display for Logged In Users" src="http://aext.net/wp-contents/uploads/2009/11/Avatar-Display-for-Logged-In-Users.jpg" alt="Avatar Display for Logged In Users" width="500" height="190" /></div>
<p>This simple code help to display the avatar of current logged user.</p>
<pre class="php"> <span style="color: #dd0000;">&lt;?php</span>
    <span style="color: #881350;">global</span> <span style="color: #825900;">$current_user</span>;

        <span style="color: #003369;">get_currentuserinfo</span>();

        <span style="color: #881350;">echo</span> <span style="color: #003369;">get_avatar</span>( <span style="color: #825900;">$current_user</span>-&gt;ID, <span style="color: #0000ff;">128</span> );
 <span style="color: #dd0000;">?&gt;</span></pre>
<h3>Add Local Avatar</h3>
<div class="bigimage"><a href="http://wordpress.org/extend/plugins/add-local-avatar/"><img class="aligncenter size-full wp-image-1781" title="screenshot-3" src="http://aext.net/wp-contents/uploads/2009/11/screenshot-3.jpg" alt="screenshot-3" width="500" height="152" /></a></div>
<p>Adds local (private) avatars for your users. Maybe your users don&#8217;t want a global avatar, aren&#8217;t IT savvy enough to set a Gravatar up, simply want a private avatar for your blog, or any other reason too&#8230;</p>
<p><a class="more" href="http://wordpress.org/extend/plugins/add-local-avatar/">Download: Add Local Avatar</a></p>
<h3>WP-Gravatar Plugin</h3>
<div class="bigimage"><a href="http://wordpress.org/extend/plugins/wp-gravatar/"><img class="aligncenter size-full wp-image-1787" title="screenshot-2" src="http://aext.net/wp-contents/uploads/2009/11/screenshot-2.png" alt="screenshot-2" width="500" height="164" /></a></div>
<p>This plugin lets you use Gravatar, MyBlogLog, OpenAvatar, Wavatar, Identicon, monsterID or Favico.ico files with your comments. But thats not all, this plugin provides you many features: gives you a Widget with your profile info and your gravatar, gives you the option to show an about the author box with posts shown on single page, let&#8217;s you show the Gravatar, OpenAvatar, Wavatar, Identicon, monsterID avatars in the Edit Comment section of your admin pages&#8230;<br />
<a class="more" href="http://wordpress.org/extend/plugins/wp-gravatar/">Download: WP-Gravatar</a></p>
<h3>WP-SnapAvatar</h3>
<div class="bigimage"><a href="http://wordpress.org/extend/plugins/wp-snapavatar/"><img class="aligncenter size-full wp-image-1790" title="screenshot-4" src="http://aext.net/wp-contents/uploads/2009/12/screenshot-4.jpg" alt="screenshot-4" width="500" height="180" /></a></div>
<p>When people comment in your blog but they don&#8217;t have avatar, such as gravatar&#8230; this plugin will allows us to take a snapshot of their website for the replacement.<br />
<a class="more" href="http://wordpress.org/extend/plugins/wp-snapavatar/">Download: WP-SnapAvatar</a></p>
<h3>jQuery Comment Preview</h3>
<div class="bigimage"><a href="http://wordpress.org/extend/plugins/jquery-comment-preview/"><img class="aligncenter size-full wp-image-1792" title="screenshot-1" src="http://aext.net/wp-contents/uploads/2009/12/screenshot-1.png" alt="screenshot-1" width="500" height="245" /></a></div>
<p>Live comment preview without page reboot. Works on jQuery.</p>
<p><a class="more" href="http://wordpress.org/extend/plugins/jquery-comment-preview/">Download: jQuery Comment Preview</a></p>
<div class="txtad-cont"></div>
]]></content:encoded>
			<wfw:commentRss>http://aext.net/2009/12/10-useful-code-snippets-and-plugins-to-spice-up-wordpress-avatar/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
	</channel>
</rss>

