<?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>Dammit Jim! &#187; plug in</title>
	<atom:link href="http://scott.sherrillmix.com/blog/tag/plug-in/feed/" rel="self" type="application/rss+xml" />
	<link>http://scott.sherrillmix.com/blog</link>
	<description>I'm a biologist not a...</description>
	<lastBuildDate>Mon, 06 Feb 2012 05:19:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>WP_CodeShield</title>
		<link>http://scott.sherrillmix.com/blog/blogger/wp_codeshield/</link>
		<comments>http://scott.sherrillmix.com/blog/blogger/wp_codeshield/#comments</comments>
		<pubDate>Mon, 14 May 2007 13:31:06 +0000</pubDate>
		<dc:creator>ScottS-M</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Programmer]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[codeshield]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[htmlspecialchar]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plug in]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/programmer/wp_codeshield/</guid>
		<description><![CDATA[I&#8217;ve been burned a few times in WordPress when posting something like: This is how you make text italic: This is italic. when I actually wanted: This is how you make text italic: &#60;em&#62;This is italic.&#60;/em&#62; Of course it's not too hard to remember to encode the special characters but this is WordPress and things [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been burned a few times in WordPress when posting something like:</p>
<blockquote><p>This is how you make text italic: <code ><em>This is italic.</em></code ></p></blockquote>
<p>when I actually wanted:</p>
<blockquote><p>This is how you make text italic: <code>&lt;em&gt;This is italic.&lt;/em&gt;<!--formatted--></code></p></blockquote>
<p>Of course it's not too hard to remember to encode the special characters but this is WordPress and things are supposed to be easy. So I thought I would throw together a simple WordPress plugin to convert HTML special characters inside <code>&lt;code&gt;&lt;/code&gt;<!--formatted--></code> tags. That was a few months ago and I got the plugin most of the way done and then got distracted with other things. But after reading about <a href="http://wordlog.com/archives/2007/05/13/displaying-html-source-code-in-your-blog-posts/">another person having the same annoyance</a>, I decided I should finish the plugin.</p>

<p>So here is WP_CodeShield. It simply looks for <code>&lt;code&gt;&lt;/code&gt;<!--formatted--></code> tags in posts and comments and makes sure the contents are encoded properly. You just type the code you want inside <code>&lt;code&gt;&lt;/code&gt;<!--formatted--></code> tags and it should appear correctly. So you can type <code>&lt;code&gt;&lt;em&gt;This is italic.&lt;/em&gt;&lt;/code&gt;<!--formatted--></code> instead of <code>&lt;code&gt;&amp;lt;em&amp;gt;This is italic.&amp;lt;/em&amp;gt;&lt;/code&gt;<!--formatted--></code>.</p>
<p>If you have any questions, suggestions or requests, please leave them in the comments below. You can also test WP_CodeShield out in the comments if you are curious.</p>

<h3>Current Version:</h3> <p><a href="http://downloads.wordpress.org/plugin/wp-codeshield.zip">WP_CodeShield v0.4</a></p>

<h3>Installation instructions:</h3> <p>Unzip <code>wp_codeshield.zip</code>. Upload <code>wp_codeshield.php</code> to <code>wp-content/plugins/</code> and active in the Plugin Control Panel. That's it. Anything inside <code>&lt;code&gt;&lt;/code&gt;<!--formatted--></code> tags will now automatically be converted to proper HTML.</p>

<h3>Technical Details</h3>
<p>Most people should be OK just using WP_CodeShield naturally but for especially fancy users here are the more technical details:<br/> Nested code tags are ok (I've been using them in this post) but unequal numbers of <code>&lt;code&gt;<!--formatted--></code> and <code>&lt;/code&gt;<!--formatted--></code> will cause the plugin to leave the entire post or comment alone. WP_CodeShield will leave any string which already contains HTML special characters alone. For example <code>&amp;lt;em&amp;gt;<!--formatted--></code> will be left alone. This is in case you have previously hand entered the special characters or want to describe something more complex than the plugin can handle. To keep track of these special occurrences, WP_CodeShield adds a small invisible comment tag (<code>&lt;!--formatted--&gt;<!--formatted--></code>). WP_CodeShield only looks for <code>&lt;code&gt;&lt;/code&gt;<!--formatted--></code> tags. <code>&lt;code &gt;&lt;/code &gt;<!--formatted--></code> or <code>&lt;code class="fancy"&gt;&lt;/code&gt;<!--formatted--></code> will not be filtered. One small gotcha is that if a post contains <code>&lt;code class="fancy"&gt;&lt;/code&gt;<!--formatted--></code> no filtering will occur on that post (WP_CodeShield will think that the tags are unbalanced). You can get around this by making sure both the opening and closing tags do not match WP_CodeShield's target like <code>&lt;code class="fancy"&gt;&lt;/code &gt;<!--formatted--></code> (the extra space keeps WP_CodeShield from seeing the tags but are still valid HTML). </p> 


<h3>Change Log:</h3>
<ul>
<li><a href="/res/wp_codeshield_v0.4.zip">v0.4</a> 02-04-2008:
<ul>
<li>Changed filter to match updated wordpress <code>the_editor_content</code></li>
</ul>
</li>
<li><a href="/res/wp_codeshield_v0.3.zip">v0.3</a> 2-26-2007:
<ul>
<li>Properly converts when saving and unconverts when editing</li>
<li>Doesn't convert contents that are already encoded</li>
<li>Corrected wordpress hooks</li>
</ul>
</li>
<li>v0.2 2-26-2007:
<ul>
<li>Allows nested codes</li>
</ul>
</li>
<li>v0.1 2-13-2007:
<ul>
<li>A rough filter</li>
</ul>
</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://scott.sherrillmix.com/blog/blogger/wp_codeshield/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>WP_Identicon</title>
		<link>http://scott.sherrillmix.com/blog/blogger/wp_identicon/</link>
		<comments>http://scott.sherrillmix.com/blog/blogger/wp_identicon/#comments</comments>
		<pubDate>Tue, 06 Feb 2007 15:11:53 +0000</pubDate>
		<dc:creator>ScottS-M</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Programmer]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[avatar]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[commenter]]></category>
		<category><![CDATA[geometric]]></category>
		<category><![CDATA[identicon]]></category>
		<category><![CDATA[plug in]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/blogger/wp_identicon/</guid>
		<description><![CDATA[A couple weeks ago I made a WordPress plugin to generate unique monsters for each commenter. Don Park came up with the original idea for representing users with geometric shapes. Since I already had the framework in place I thought I&#8217;d make a WordPress plugin for the original geometric Identicons. If you want to visually [...]]]></description>
			<content:encoded><![CDATA[<img class="left" src="/res/images/identicon_example_1.png" alt="An example of WP_Identicon" /><img class="left" src="/res/images/identicon_example_2.png" alt="An example of WP_Identicon" /><p>A couple weeks ago I made a <a href="http://scott.sherrillmix.com/blog/blogger/wp_monsterid/">WordPress plugin to generate unique monsters</a> for each commenter. <a href="http://www.docuverse.com/blog/donpark/">Don Park</a> came up with the original idea for representing users with <a href='http://www.docuverse.com/blog/donpark/2007/01/18/visual-security-9-block-ip-identification'>geometric shapes</a>. Since I already had the framework in place I thought I&#8217;d make a WordPress plugin for the original geometric Identicons. If you want to visually represent users (but maybe you don’t like monsters so much?) then this plugin is for you.</p>

<p>So what is an Identicon? It&#8217;s a randomly generated assortment of shapes that is specific to a commenter&#8217;s email (or if you prefer IP address). Identicons allow visual representations of commenters without requiring any external sites or user interactions. With 40 possible shapes (about 70 with inversions) in 3 possible positions, around 8000 distinguishable colors and four different rotations for each part, there should be several billion possible shape combinations which, even with the <a href="http://scott.sherrillmix.com/blog/programmer/wp_monsterid-and-statistics/">increasing chance of overlap</a> with each additional user, should be quite enough for almost any blog.</p>
<img class="center" src="/res/images/identicon_shapes.png" alt="The shapes used to create Identicons" />

<h3>Features</h3>
<ul>
<li>Dynamically generated avatars for each commenter</li>
<li>Consistently themed geometric icons</li>
<li>Consistent on any blog</li>
<li>Gravatar support</li>
<li>Theme edits no longer necessary</li>
</ul>


<h3>Current Version:</h3> <p><a href="http://downloads.wordpress.org/plugin/wp-identicon.zip">WP_Identicon v1.02</a></p>

<h3>Installation instructions:</h3> <p>Unzip <code>wp_identicon.zip</code>. Upload wp_identicon.php <em>and</em> the <code>identicon</code> folder. Make sure the <code>identicon</code> folder is <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>. If your unzipping program creates a wp_identicon folder please only upload the contents (<code>wp_identicon.php</code> and the <code>identicon</code> folder). That should be it. Identicons should now appear next to your commenter&#8217;s names.</p> 
<p>You can adjust the background and foreground colors, the number of squares in and the size of the identicons in the Identicon Control Panel. You can also clear the Identicon image cache in the control panel.</p>

<h3>Configuration:</h3>
<dl>
<dt>Identicon Size in Pixels</dt><dd>How many pixels high and wide you want your Identicons. 35 by 35 seems like a decent compromise between compactness and clarity but they should remain mostly clear at any reasonable size.</dd>
<dt>Number of Squares</dt><dd>Number of shape blocks to build Identicon out of. Don Parks uses 3 by 3. I kind of like 4 by 4 myself. More than 4 starts to get a bit cluttered but can be interesting.</dd>
<dt>Background colors</dt><dd>The color of the background (empty part) of the Identicon. Personally I really like when the background matches the surroundings and the identicon appears to blend into it.  Setting this to 0,0,0 makes the background transparent (what I&#8217;m using here) but IE6 does not like transparency in PNG&#8217;s and just fills the background with grey. If you know the R,G,B values of your background then you could set them directly here or you can put in a range of colors (like 1-255,255,255 to get backgrounds ranging from blue to light blue to white).</dd>
<dt>Foreground colors</dt><dd>The color of the foreground (colored part) of the Identicon. If this is 1-255,1-255,1-255 you will get Identicons of all the possible R,G,B colors. If you want only a certain color you could set the R,G,B values here (like 255,0,0 for only red Identicons) or you can put in a range of colors (like 1-255,255,255 to get Identicons ranging from blue to light blue to white).</dd>
<dt>CSS Styling</dt><dd>This is <em>not</em> in the Options menu. You can edit the CSS styling by adjusting the <code>style.css</code> file of your current theme. Identicons can be selected by <code>img.identicon</code>. A good start might be to add <code>img.identicon{float:left; margin-right:3px;}</code> to the bottom of your <code>style.css</code>.</dd>
</dl>

<h3>For Advanced Users:</h3>
<p>You can add CSS for <code>img.identicon</code> in your theme&#8217;s <code>style.css</code>.  For even more control, you can disable the automatic placement in the Identicon Control Panel and add an identicon to any comment with <code>identicon_build($comment-&gt;comment_author_email, $comment-&gt;comment_author);<!--formatted--></code>. For example, find the <code>comments.php</code> of your current theme (it should be in the folder <code>wp-content/themes/[currentThemeName]/</code>). Open it up and look for something similar to <code>foreach ($comments as $comment)</code>. Inside this loop there should be code that displays the comment author&#8217;s name or metadata like <code>&lt;p class=&quot;comment-author&quot;&gt;<!--formatted--></code> or <code>&lt;p class=&quot;comment-metadata&quot;&gt;<!--formatted--></code>. Just before all this enter:<br/><code>&lt;?php if (function_exists(identicon_build)) echo identicon_build($comment-&gt;comment_author_email, $comment-&gt;comment_author); ?&gt;<!--formatted--></code></p>
<p>If you would prefer to base the Identicons on the commentor&#8217;s IP address instead of the commentor&#8217;s email just replace <code>$comment-&gt;comment_author_email<!--formatted--></code> in the above with <code>$comment-&gt;comment_author_IP<!--formatted--></code>.</p>
<p><a href="http://www.top150.cn/">icoguo</a> has kindly translated the install instructions to <a href="http://www.top150.cn/?p=68">Chinese</a> and <a href="http://tekapo.com/st/">Tai</a> has translated them to <a href="http://tekapo.com/st/2007/02/19/wp_identicon/">Japanese</a> <ins datetime="2008-01-09T13:24:03+00:00"><em>although these are a bit outdated since version 0.51.</em></ins></p>
<p><span class="highlight"><em>If any of this is unclear just let me know in the comments and I&#8217;ll do my best to guide you through it.</em></span></p>


<h3>Change Log:</h3>
<ul>
<li><a href="/res/wp_identicon_v1.02.zip">v1.02</a> 5-6-2008:
<ul>
<li>Fixed WP 2.5+ built-in avatars when <code>$id_or_email</code> not email</li>
</ul>
</li>
<li><a href="/res/wp_identicon_v1.01.zip">v1.01</a> 5-2-2008:
<ul>
<li>Fixed WP 2.5+ built-in avatars and gravatar support</li>
</ul>
</li>
<li><a href="/res/wp_identicon_v1.0.zip">v1.0</a> 5-1-2008:
<ul>
<li>Fixed automatically adding identicons to sidebar in single posts bug</li>
<li>Supports WP 2.5+ built-in avatars</li>
</ul>
</li>
<li><a href="/res/wp_identicon_v0.62.zip">v0.62</a> 2-14-2008:
<ul>
<li>Added Recent Comment (with Identicons) Widget</li>
<li>Deals with nested directories</li>
</ul>
</li>
<li><a href="/res/wp_identicon_v0.56.zip">v0.56</a> 1-27-2007:
<ul>
<li>Fixed manual identicon global problem (Thanks again to <a href="http://melnikov.net.ru/">Anton</a>)</li>
</ul>
</li>
<li><a href="/res/wp_identicon_v0.55.zip">v0.55</a> 1-27-2007:
<ul>
<li>Fixed gravatar option (Thanks <a href="http://melnikov.net.ru/">Anton</a>)</li>
</ul>
</li>
<li><a href="/res/wp_identicon_v0.51.zip">v0.51</a> 1-9-2007:
<ul>
<li>Added custom random number generator</li>
<li>Monsters now consistent across servers</li>
<li>Added greyscale option (nice for B&#038;W themes)</li>
<li>Added auto placement option</li>
<li>Added gravatar support</li>
<li>Obscured filenames</li>
<li>Clarified options page</li>
<li>Changed get_settings to get_option</li>
<li>Fixed bug in random number generator seed</li>
<li>Changed download link to WordPress Extends</li>
</ul>
</li>
<li><a href="/res/wp_identicon_v0.2.zip">v0.2</a> 2-6-2007:
<ul>
<li>Switched to heading/distance shape representation</li>
<li>Added a bunch of shapes</li>
<li>Added transparency</li>
<li>Added option to choose number of pieces in Identicon (I&#8217;m partial to 4&#215;4)</li>
<li>Added height and width attributes to img for accessibility</li>
</ul>
</li>
<li>v0.1 1-31-2007:
<ul>
<li>Implemented 9 block identicon as per Don Park&#8217;s idea but using the srand() setting method of <a href="http://www.splitbrain.org/blog/2007-01/20_monsterid_as_gravatar_fallback">MonsterID</a></li>
</ul>
</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://scott.sherrillmix.com/blog/blogger/wp_identicon/feed/</wfw:commentRss>
		<slash:comments>400</slash:comments>
		</item>
	</channel>
</rss>

