<?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>Austin Matzko&#039;s Blog &#187; gravatars</title>
	<atom:link href="http://austinmatzko.com/tag/gravatars/feed/" rel="self" type="application/rss+xml" />
	<link>http://austinmatzko.com</link>
	<description>A blog about philosophy, Christianity, web development and whatever else I feel like writing about.</description>
	<lastBuildDate>Wed, 16 Mar 2011 17:14:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2-RC4-18391</generator>
		<item>
		<title>Filosofo&#8217;s WordPress Gravatar Plugin</title>
		<link>http://austinmatzko.com/2007/10/23/gravatar-plugin/</link>
		<comments>http://austinmatzko.com/2007/10/23/gravatar-plugin/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 16:50:24 +0000</pubDate>
		<dc:creator>filosofo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[gravatars]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://www.ilfilosofo.com/blog/2007/10/23/gravatar-plugin/</guid>
		<description><![CDATA[Automattic, the company behind WordPress, recently acquired Gravatar. In case you don&#8217;t know, gravatars&#8212;or &#8220;globally recognized avatars&#8221;&#8212;are images that you can associate with an email address, so a picture of your choice can appear alongside your comments on many others&#8217; blogs. Gravatar already provides a simple WordPress plugin, but it suffers from a common plugin [...]]]></description>
			<content:encoded><![CDATA[<p>Automattic, the company behind WordPress, <a href="http://blog.gravatar.com/2007/10/18/automattic-gravatar/">recently acquired Gravatar</a>.  In case you don&#8217;t know, <a href="http://site.gravatar.com/">gravatars</a>&#8212;or &#8220;globally recognized avatars&#8221;&#8212;are images that you can associate with an email address, so a picture of your choice can appear alongside your comments on many others&#8217; blogs.</p>
<p><a href="http://site.gravatar.com/site/implement#section_2_2">Gravatar already provides a simple WordPress plugin</a>,  but it suffers from a common plugin problem: if you add its &#8220;gravatar&#8221; function to your comments template, you either have to wrap it in a <code>function_exists</code> check, or you&#8217;ll get a fatal error when you deactivate the plugin.</p>
<p>My gravatar plugin lets you use WordPress&#8217;s action hook callback system, so it just disappears when the plugin is deactivated.</p>
<h3>How it works:</h3>
<ul>
<li>
<p>If you just want to display a commenter&#8217;s gravatar image, just add<br />
<div class="filosofo-highlight-light php" style="font-family: monospace;"><br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> do_action<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'gravatar'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp;</div>
<p> to the appropriate place in your WordPress comments.php template.  By default, it will generate a gravatar image.</p>
</li>
<li>
<p>But you can customize it as much as you want, by passing an array of arguments to the &#8216;gravatar&#8217; action hook.  On my blog I&#8217;ve done the following:</p>
<div class="filosofo-highlight-light php" style="font-family: monospace;"><br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> do_action<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'gravatar'</span><span style="color: #66cc66;">,</span> <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'div_class'</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'gravatar'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'return'</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'div'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'default'</span> <span style="color: #66cc66;">=&gt;</span> get_bloginfo<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'stylesheet_directory'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">'/images/default_gravatar.png'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'rating'</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'PG'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp;</div>
<p>That tells the plugin to wrap the gravatar image in a <code>div</code> with a class of &#8220;gravatar&#8221;, using a default gravatar image located in my theme&#8217;s images directory, and returning only PG-rated gravatars.</p>
<p>Here is a complete list of arguments you can pass to the gravatar hook:</p>
<ul>
<li><strong><code>alt</code></strong>: Text for the <code>alt</code> attribute of the gravatar image.</li>
<li><strong><code>border</code>, <code>b</code></strong>: An argument you can pass to the gravatar server, the &#8220;border&#8221; is a hex color to be generated around the gravatar image.</li>
<li><strong><code>comment_author_email</code></strong>: The email on which to base the gravatar.  By default, the plugin gets this from the comment&#8217;s author email.</li>
<li><strong><code>default</code>, <code>d</code></strong>: The default image to use if no gravatar is available.</li>
<li><strong><code>div_class</code></strong>: A class for the <code>div</code> element surrounding the gravatar, if you&#8217;ve set &#8220;return&#8221; to &#8220;div.&#8221;</li>
<li><strong><code>echo</code></strong>: Whether to echo the result (true by default).  If you wanted to assign the gravatar image URL to a variable named <code>$path</code>, you would do the following:<br />
<div class="filosofo-highlight-light php" style="font-family: monospace;"><br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #ff0000">$path</span> <span style="color: #66cc66;">=</span> apply_filters<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'gravatar'</span><span style="color: #66cc66;">,</span> <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'echo'</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'return'</span> <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp;</div>
</li>
<li><strong><code>gravatar_id</code>, <code>g</code></strong>: The gravatar id.  Usually this is generated from the commenter&#8217;s email, but if you want you can pass it directly.</li>
<li><strong><code>img_class</code></strong>: A class for the gravatar <code>img</code> element.</li>
<li><strong><code>rating</code>, <code>r</code></strong>: The rating of allowed gravatar images, as explained at the gravatar website.  Optinos are G, PG, R, and X.</li>
<li><strong><code>return</code></strong>: What to return.  By default, this is an image element (&#8220;img&#8221;).  You can also select &#8220;div&#8221; for a <code>div</code> element around an image, or just return the path to the image with &#8220;return&#8221; set to &#8220;&#8221;.</li>
<li><strong><code>pattern</code></strong>: Any string containing <code>%s</code>; the plugin will return that string, replacing <code>%s</code> with the gravatar image path.
<p> For example, setting &#8220;pattern&#8221; to <code><span><img src="%s" /></span></code> would return the gravatar image in a <code>span</code> element.</li>
<li><strong><code>size</code>, <code>s</code></strong>: The size of the gravatar image, in pixels.  Currently it can range between 1 and 80.</li>
</ul>
</li>
</ol>
<h3>Download</h3>
<h4>Filosofo Gravatar Plugin 1.5 | March 15, 2007</h4>
<div class="download-wrap">
<ul>
<li><a href="http://austinmatzko.com/downloads/plugins/filosofo-gravatars.zip" class="plugin-download-link">filosofo-gravatars.zip</a></li>
<li><a href="http://austinmatzko.com/downloads/plugins/filosofo-gravatars.tar.gz" class="plugin-download-link">filosofo-gravatars.tar.gz</a></li>
</ul>
</div>
<p>If you have problems, questions, or suggestions, please leave a comment below or open a ticket in my <a href="/forum/">support forum</a>.</p>
<p>
		<div class="plugin-ad"><p>See some of the other  <a 
		href="/blog/wordpress-plugins/">WordPress plugins I&rsquo;ve created</a>.
		<br />
		Like this plugin?  Is it worth a latte?</p><form class="paypal-link" action="https://www.paypal.com/cgi-bin/webscr" method="post">
		<input type="hidden" name="cmd" value="_s-xclick" />
		<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" style="border:0px" name="submit" alt="Make payments with PayPal - it&rsquo;s fast, free and secure!" />
		<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYC2GbIg5amTP7DbvFnVfC7gN7QaSqhFDveeghCSN0ZlDDWFPMpAf3Tknf+YRD5UGP+TVczxR7uWZclBBaNY+pYQ3OD2QqBpEtW9sY3yJC7EeOa6/rNxuqlWAk6ofyqv1tKkFgNecjm8Xh9qTI4lQQY/O8hK2SDjFN9gOPSoRWt8QzELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI08Op7aLrNaCAgZD4VzVchVR3gz3kotA3gGvRBjnAI063tRdF12h64RW/Lt4DB9+Km9DVF1zqYAih8UJeasXtSzfEzIBd55/++m8WdpWJ5Ut6onRd1q3j9wfYrYncazZe8MrkuggTTG3guwBcmAP9UkChFhLPERK0TV305Ap4cwf3RerrA/NTfronJuCjjlfQGb/XFOuf3m8jOqOgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wHhcNMDQwMjEzMTAxMzE1W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xpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNjAzMDgyMTA5MTJaMCMGCSqGSIb3DQEJBDEWBBRswHAxyGjpskpuVPNnydjRAQPHKjANBgkqhkiG9w0BAQEFAASBgFJs6xXIyiXEc12XakVlEePCwZXASVAV2skRWo/YHOz1ZHkpTOVhoh6XXxnE+UVVtBbbEOhviKQ1nYbA6FZCZfyIx6opjEz58R9NM3OZV0+YeI6xaC+Di59rcZtqOSleXTIUWSn35i2IOuNKmpfILqS2Izo4gcs3nBZ+9sNyT4Xy-----END PKCS7-----" />
		</form><a class="amazon-link" href="http://www.amazon.com/gp/registry/wishlist/3UDISU45QDVNG/ref=wl_web"><img src="http://g-ecx.images-amazon.com/images/G/01/gifts/registries/wishlist/v2/web/wl-btn-74-b._V46774601_.gif" width="74" alt="My Amazon.com Wish List" height="42" border="0" /></a><p>This month I have received <strong>$31.50</strong> in donations for the free plugins I offer here, which is about $0.01 per download.</p>
		</div></p>
]]></content:encoded>
			<wfw:commentRss>http://austinmatzko.com/2007/10/23/gravatar-plugin/feed/</wfw:commentRss>
		<slash:comments>68</slash:comments>
		</item>
	</channel>
</rss>
