<?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>Cre8ive Commando &#187; implement gravatar</title>
	<atom:link href="http://www.cre8ivecommando.com/tag/implement-gravatar/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cre8ivecommando.com</link>
	<description>Explosive Creativity</description>
	<lastBuildDate>Sat, 04 Feb 2012 10:33:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Add Gravatar support to your blog comments</title>
		<link>http://www.cre8ivecommando.com/add-gravatar-support-to-your-blog-comments-1380/</link>
		<comments>http://www.cre8ivecommando.com/add-gravatar-support-to-your-blog-comments-1380/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 11:40:42 +0000</pubDate>
		<dc:creator>Adham Dannaway</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[add gravatar]]></category>
		<category><![CDATA[add gravatar support]]></category>
		<category><![CDATA[add gravatar to blog comments]]></category>
		<category><![CDATA[gravatar]]></category>
		<category><![CDATA[gravatar support]]></category>
		<category><![CDATA[implement gravatar]]></category>

		<guid isPermaLink="false">http://www.cre8ivecommando.com/?p=1380</guid>
		<description><![CDATA[A Gravatar is a Globally Recognised Avatar and it is quite simple to add Gravatar support to your blog comments. I will show you how to do it in a few simple steps using PHP. I&#8217;ll also list some tutorials on how to add Gravatar support to your blog in other ways by using JavaScript, [...]


Related posts:<ol><li><a href='http://www.cre8ivecommando.com/ie6-png-fix-transparent-png-image-support-for-ie6-174/' rel='bookmark' title='IE6 PNG fix &#8211; Transparent PNG image support for IE6'>IE6 PNG fix &#8211; Transparent PNG image support for IE6</a></li>
<li><a href='http://www.cre8ivecommando.com/how-to-create-clickable-links-in-sifr3-288/' rel='bookmark' title='How to create clickable links in sIFR3'>How to create clickable links in sIFR3</a></li>
<li><a href='http://www.cre8ivecommando.com/back-up-your-wordpress-blog-database-using-phpmyadmin-91/' rel='bookmark' title='Back up your wordpress database using phpMyAdmin'>Back up your wordpress database using phpMyAdmin</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A Gravatar is a Globally Recognised Avatar and it is quite simple to add Gravatar support to your blog comments. I will show you how to do it in a few simple steps using PHP. I&#8217;ll also list some tutorials on how to add Gravatar support to your blog in other ways by using JavaScript, .Net and Java.<span id="more-1380"></span></p>
<h2>Adding Gravatar support with PHP</h2>
<p>Let&#8217;s assume that you have a blog and you want to add Gravatars to the comments. Basically you will need 3 things to get started. The email of the person making the comment (This can be collected from your comment form), a default Gravatar image on your server in case some people don&#8217;t have a Gravatar and finally you need to define the size of the Gravatar image you want. Here is the code you need below.</p>
<pre class="brush: php;">

//The email of the person making the comment
$email = &quot;cornelius@blah.com&quot;;

//A default Gravatar image to use for people without Gravatars
$default = &quot;http://www.somewhere.com/default.jpg&quot;;

//Define the size of the Gravatar image
$size = 80;
</pre>
<p>Now you&#8217;re ready to display your Gravatar. To generate your Gravatar URL simply use the code below.</p>
<pre class="brush: php;">

$grav_url = &quot;http://www.gravatar.com/avatar.php?
gravatar_id=&quot;.md5( strtolower($email) ).
&quot;&amp;default=&quot;.urlencode($default).
&quot;&amp;size=&quot;.$size;
</pre>
<h3><img class="alignnone size-full wp-image-1403" title="add-gravatar-to-comments" src="http://www.cre8ivecommando.com/wp-content/uploads/2009/11/add-gravatar-to-comments.jpg" alt="add-gravatar-to-comments" width="520" height="170" /></h3>
<h3>Basic comments template</h3>
<p>Now let&#8217;s style it up a bit to look like the comment image above. Here is a basic template to style your comments with the Gravatar included on the left.</p>
<pre class="brush: xml;">

&lt;style&gt;
/* Styles for comments */

.comment{border:#CCC solid 1px; padding:20px;}
.comment img{float:left: padding:0px 20px 20px 0px;}
.comment .h4{font-size:18px;}
.comment p{padding:5px 0px;}
.comment .date{font-size:10px; font-style:italic;}

&lt;/style&gt;

&lt;div class=&quot;comment&quot;&gt;
    &lt;img src=&quot;&lt;?php echo $grav_url ?&gt;&quot; /&gt;
    &lt;h4&gt;Joe Blow&lt;/h4&gt;
    &lt;p class=&quot;date&quot;&gt;Date of comment goes here&lt;/p&gt;
    &lt;p&gt;The comment goes here&lt;/p&gt;
&lt;/div&gt;
</pre>
<h3>More ways to add Gravatar support to your blog comments</h3>
<ul>
<li><a rel="nofollow" href="http://codex.wordpress.org/Using_Gravatars" target="_blank">WordPress Gravatar Plugin</a></li>
<li><a rel="nofollow" href="http://drupal.org/project/gravatar" target="_blank">Drupal Module</a></li>
<li><a rel="nofollow" href="http://extensions.joomla.org/extensions/4059/details" target="_blank">Joomla Gravatar Support</a></li>
<li><a rel="nofollow" href="http://userscripts.org/scripts/review/29070" target="_blank">JavaScript Gravatar Implementation</a></li>
<li><a rel="nofollow" href="http://lifeofajackass.com/gravatarget/" target="_blank">.Net Gravatar Implementation</a></li>
<li><a rel="nofollow" href="http://en.gravatar.com/site/implement/java" target="_blank">Java Gravatar Implementation</a></li>
</ul>


<p>Related posts:</p><ol><li><a href='http://www.cre8ivecommando.com/ie6-png-fix-transparent-png-image-support-for-ie6-174/' rel='bookmark' title='IE6 PNG fix &#8211; Transparent PNG image support for IE6'>IE6 PNG fix &#8211; Transparent PNG image support for IE6</a></li>
<li><a href='http://www.cre8ivecommando.com/how-to-create-clickable-links-in-sifr3-288/' rel='bookmark' title='How to create clickable links in sIFR3'>How to create clickable links in sIFR3</a></li>
<li><a href='http://www.cre8ivecommando.com/back-up-your-wordpress-blog-database-using-phpmyadmin-91/' rel='bookmark' title='Back up your wordpress database using phpMyAdmin'>Back up your wordpress database using phpMyAdmin</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.cre8ivecommando.com/add-gravatar-support-to-your-blog-comments-1380/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

