<?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>Coffee on the Keyboard &#187; WordPress</title>
	<atom:link href="http://coffeeonthekeyboard.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://coffeeonthekeyboard.com</link>
	<description>by James Socol</description>
	<lastBuildDate>Fri, 20 Apr 2012 22:17:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/>		<item>
		<title>EzGz: WordPress GZip Plugin</title>
		<link>http://coffeeonthekeyboard.com/ezgz-wordpress-gzip-plugin-268/</link>
		<comments>http://coffeeonthekeyboard.com/ezgz-wordpress-gzip-plugin-268/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 03:52:28 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeeonthekeyboard.com/?p=268</guid>
		<description><![CDATA[By default, WordPress (at least in the current generation, 2.8) does not enable any kind of compression on its output. Some plugins, like WP Super Cache, add gzip compression, but that&#8217;s an awfully big plugin if all you want is compressed output. So I wrote EzGz this afternoon. It is, by far, the simplest plugin [...]]]></description>
			<content:encoded><![CDATA[<p>By default, WordPress (at least in the current generation, 2.8) does not enable any kind of compression on its output. Some plugins, like <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache</a>, add gzip compression, but that&#8217;s an awfully big plugin if all you want is compressed output.</p>
<p>So I wrote <a href="http://jamessocol.com/projects/ezgz.php">EzGz</a> this afternoon. It is, by far, the simplest plugin I&#8217;ve ever written. The actual source is probably two orders of magnitude smaller than the comments (plugin details and <a href="http://www.opensource.org/licenses/mit-license.php">the license</a>).</p>
<p>All EzGz does is enable the <a href="http://www.php.net/ob_gzhandler">built-in PHP gzip/deflate handler</a>. This does require output buffering, so it&#8217;s not right for everyone. Some themes or other plugins may already do this.</p>
<p>I&#8217;ve tried using the <var>zlib.output_compression</var> ini setting, but on my server, with zlib working otherwise correctly, the setting had no effect. So I stuck with the output buffering.</p>
<p>You can <a href="http://jamessocol.com/projects/files/ezgz.zip">download it</a>, or check it out of <a href="svn://jamessocol.com/ezgz/trunk">svn</a>, then turn it on and <a href="http://www.whatsmyip.org/http_compression/">see if it works</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeeonthekeyboard.com/ezgz-wordpress-gzip-plugin-268/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP: Better Search Widget 1.1</title>
		<link>http://coffeeonthekeyboard.com/wp-better-search-widget-1-1-232/</link>
		<comments>http://coffeeonthekeyboard.com/wp-better-search-widget-1-1-232/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 17:05:05 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeeonthekeyboard.com/?p=232</guid>
		<description><![CDATA[Better Search Widget 1.1 is a significant upgrade to Better Search Widget that adds new features and fixes an old bug with internationalization. Features (New features in bold.) Optional default value. Optional, custom widget title. Optional onfocus and onblur listeners. Optional, customizable focus and blur colors. Custom button value. Custom field size. The built-in search [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://coffeeonthekeyboard.com/wp-content/uploads/2009/07/better-search-widget.zip">Better Search Widget 1.1</a> is a significant upgrade to <a href="http://coffeeonthekeyboard.com/wp-plugin-better-search-widget-113/" title="Better Search Widget">Better Search Widget</a> that adds new features and fixes an old bug with internationalization.</p>
<h3>Features</h3>
<p>(New features in bold.)</p>
<ul>
<li><strong>Optional default value</strong>.</li>
<li><strong>Optional,</strong> custom widget title<strong>.</strong></li>
<li><strong>Optional onfocus and onblur listeners.</strong></li>
<li><strong>Optional, customizable focus and blur colors.</strong></li>
<li>Custom button value.</li>
<li>Custom field size.</li>
</ul>
<p>The built-in search widget has only one of these features, the optional, custom title.</p>
<h4>Onfocus and Onblur</h4>
<p>In order to use the blur and focus colors, you must enable the onfocus and onblur event listeners. In order to use the listeners, you must specify a default value (otherwise none of this makes sense). Here&#8217;s an example:</p>
<div style="border: 1px solid #333; margin: 0.5em auto; padding: 0.7em 0; width: 50%; text-align: center;">
<form>
<input style="color: #999; width: 80%;" type="text" value="Default" onfocus="this.style.color='#333';if('Default'==this.value)this.value='';" onblur="if(''==this.value){this.style.color='#999';this.value='Default'}" /></form>
</div>
<h3>Bug Fixes</h3>
<p>A pretty serious typo meant that none of the internationalization code worked correctly. This has been fixed, and en_US, en_GB, and fr_FR localizations are available. de_DE is coming. If you&#8217;d like to translate, there is a .pot file included in the languages directory.</p>
<h3>License</h3>
<p>Better Search Widget is released under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>. If you use it, or have suggestions for new features or bug fixes, let me know!</p>
<h3>Getting It</h3>
<p>You can download <a href="http://coffeeonthekeyboard.com/wp-content/uploads/2009/07/better-search-widget.zip">Better Search Widget 1.1</a> now in a Zip file. Or, to save yourself some trouble,  you can check it out of Subversion from</p>
<pre>svn co svn://jamessocol.com/better-search-widget/tags/1.1.0 ./better-search-widget</pre>
<p>(Run that in your <code>wp-content/plugins</code> directory.) Subversion will make it easiest to upgrade later.</p>
<h3>Roadmap</h3>
<p>Soon, though probably not today, I will be releasing Better Search Widget 2, which will take advantage of the new Widget API in WordPress 2.8. This will add support for multiple instances of the widget, but will require at least WordPress 2.8. You should upgrade, anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeeonthekeyboard.com/wp-better-search-widget-1-1-232/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Widget l10n</title>
		<link>http://coffeeonthekeyboard.com/widget-l10n-230/</link>
		<comments>http://coffeeonthekeyboard.com/widget-l10n-230/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 04:36:43 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeeonthekeyboard.com/?p=230</guid>
		<description><![CDATA[I spent some of today working on bringing a couple of WordPress widgets up-to-date (Better Search and Most Comments) only to discover there is a new widget API. I guess I haven&#8217;t been paying attention. I&#8217;ll probably start some 2.0 branches tomorrow to take advantage of the new API. I wish I didn&#8217;t know how [...]]]></description>
			<content:encoded><![CDATA[<p>I spent some of today working on bringing a couple of WordPress widgets up-to-date (<a href="http://jamessocol.com/projects/better-search-widget.php">Better Search</a> and <a href="http://jamessocol.com/projects/most-comments-widget.php">Most Comments</a>) only to discover there is a <a href="http://codex.wordpress.org/Widgets_API#Developing_Widgets_on_2.8.2B">new widget API</a>. I guess I haven&#8217;t been paying attention.</p>
<p>I&#8217;ll probably start some 2.0 branches tomorrow to take advantage of the new API. I wish I didn&#8217;t know how many people don&#8217;t keep their WordPress installations up to date, so I wouldn&#8217;t care about backwards compatibility.</p>
<p>At least both widgets got nice new, and functional, internationalization (i18n) code and new localization (l10n) files.</p>
<p>And BSW got a good feature update, incorporating some suggestions from <a href="http://mjml.de/">Marco Jung</a>, who is also, kindly, doing a German localization, and a few of my own. The built-in search widget has stepped up it&#8217;s game, and fixed the thing BSW was originally designed to fix (no widget title) so I have a higher bar to clear to justify the name &#8220;<em>Better</em> Search Widget.&#8221;</p>
<p>I&#8217;ll write up the new features tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeeonthekeyboard.com/widget-l10n-230/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP Plugin: Better Search Widget</title>
		<link>http://coffeeonthekeyboard.com/wp-plugin-better-search-widget-113/</link>
		<comments>http://coffeeonthekeyboard.com/wp-plugin-better-search-widget-113/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 18:30:23 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Back-end]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeeonthekeyboard.com/?p=113</guid>
		<description><![CDATA[Today I upgraded from WordPress 2.3.3 to 2.6.1. I&#8217;m such a late adopter sometimes. I had to go through and repeat a few hacks. For example, 2.3.x didn&#8217;t allow you to do get_sidebar($name), so I&#8217;d hacked the &#8220;get_sidebar()&#8221; function. And I replaced the still-broken Atom feed reading widget with James Wilson&#8217;s Google Reader Widget. Then [...]]]></description>
			<content:encoded><![CDATA[<p>Today I upgraded from WordPress 2.3.3 to 2.6.1. I&#8217;m such a late adopter sometimes.</p>
<p>I had to go through and repeat a few hacks. For example, 2.3.x didn&#8217;t allow you to do <code>get_sidebar($name)</code>, so I&#8217;d hacked the &#8220;get_sidebar()&#8221; function. And I replaced the still-broken Atom feed reading widget with James Wilson&#8217;s <a href="wordpress.org/extend/plugins/google-reader-widget/">Google Reader Widget</a>.</p>
<p>Then I finally got fed up with the default &#8220;Search&#8221; widget, which doesn&#8217;t look like the other widgets at all (no title), so I started hacking into that one. Then I realized &#8220;why hack, when I can extend?&#8221;</p>
<p>So, here it is, <a href="http://jamessocol.com/projects/better-search-widget.php">Better Search Widget</a>.</p>
<p>All it does is add a search widget with a customizable title, submit button, and field size. Quick-and-useful. You can see the results in the sidebar.</p>
<p>If you decide to use it, leave a comment and I&#8217;ll check out your blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeeonthekeyboard.com/wp-plugin-better-search-widget-113/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Skinning(/Leatherworking)</title>
		<link>http://coffeeonthekeyboard.com/skinningleatherworking-76/</link>
		<comments>http://coffeeonthekeyboard.com/skinningleatherworking-76/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 16:06:01 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[My Site]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeeonthekeyboard.com/skinningleatherworking-76/</guid>
		<description><![CDATA[I&#8217;m (finally) working on the new theme. It&#8217;s obviously a work-in-progress, so just appreciate the effort for now. I&#8217;m starting with the default WordPress theme by Michael Heilemann. I&#8217;m not going to lie: I really dislike this particular theme. The look, though bland, is fine. What bothers me is how disorganized and really horrid some [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m (finally) working on the new theme. It&#8217;s obviously a work-in-progress, so just appreciate the effort for now.</p>
<p>I&#8217;m starting with the default WordPress theme by Michael Heilemann.  I&#8217;m not going to lie: I really dislike this particular theme.<span id="more-76"></span></p>
<p>The look, though bland, is fine. What bothers me is how disorganized and really horrid some of the code is, in particular the CSS. The text is realigned several times (center, no left, no center! Ah, you said center! But I meant left. Well&#8230; very well, we are Church of&#8230; Sorry, off to see Izzard in a few weeks). Everything is done in pixels, except randomly things are in <em>em</em>s or percents. Many things are changed from defaults only to be changed back later.</p>
<p>In general, the idea of <em>cascading</em> seems to have been missed.</p>
<p>I wonder, how much of this is one person (Mr. Heilemann) and how much is hacks by committee. There is a definite feeling of &#8220;too many chefs&#8221; here.</p>
<p>And yet, here I am, using it anyway. As I work through my changes I&#8217;m doing a bit of Spring Cleaning, aptly enough in Spring, but it slows down the process.</p>
<p>Mad props to <a href="http://www.getfirebug.com/" title="Best Firefox Developer Addon EVAR!">Firebug</a>, and its brilliant style inspector which shows you not only computed styles, but the whole CSS ancestry of any element.</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeeonthekeyboard.com/skinningleatherworking-76/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin: Insert Ad Code</title>
		<link>http://coffeeonthekeyboard.com/wordpress-plugin-insert-ad-code-63/</link>
		<comments>http://coffeeonthekeyboard.com/wordpress-plugin-insert-ad-code-63/#comments</comments>
		<pubDate>Wed, 26 Dec 2007 05:21:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://coffeeonthekeyboard.com/wordpress-plugin-insert-ad-code-63/</guid>
		<description><![CDATA[I wanted a way to generate more revenue off my WordPress blog. A lot of sites use square ads embedded after the first couple of paragraphs of their articles, and I thought this would be perfect for my post pages, which don&#8217;t show the WordPress sidebar. But I couldn&#8217;t find a way to do it, [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted a way to generate more revenue off <a href="http://gameindependent.com/">my WordPress blog</a>. A lot of sites use square ads embedded after the first couple of paragraphs of their articles, and I thought this would be perfect for my post pages, which don&#8217;t show the WordPress sidebar. But I couldn&#8217;t find a way to do it, so I wrote <strong>Insert Ad Code</strong> to do it for me.</p>
<p><strong>Insert Ad Code</strong> is a pretty simple WP plugin: it inserts some HTML into your posts. It&#8217;s very easy to install and pretty easy to use.</p>
<p><strong>Installation</strong></p>
<p>To install <strong>Insert Ad Code</strong>, all you need to do is unzip or upload the <code>insert_ad_code</code> directory to your <code>wp-content/plugins</code> directory. Then activate it through the Plugins page of the site admin. That&#8217;s it, everything&#8217;s ready to go.</p>
<p><strong>Using Insert Ad Code</strong></p>
<p>Before you start using <strong>Insert Ad Code</strong>, you&#8217;ll need to have some kind of ad to display. I use the <a href="http://www.openads.org/">Openads Ad Server</a> on my site, but you could also use <a href="http://www.google.com/adsense/">Google AdSense</a> or any other add server.</p>
<p><strong>Important Note:</strong> <strong>Insert Ad Code</strong> does not rotate ads by itself. It inserts the same code every time its used. If you only have one advertiser at a time, this might be fine for you, otherwise, you&#8217;ll need to use some external program to rotate the ads.</p>
<p>For now, I&#8217;ll assume you&#8217;re using AdSense. Go get the AdSense code from Google. I recommend either a box ad (250&#215;250) or some kind of horizontal ad (banner or half-banner, depending on your theme), since these will get inserted directly into the post.</p>
<p>For example, your code might look something like this:</p>
<blockquote>
<pre><code>&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxx";
//Inserted into Articles
google_ad_slot = "xxxxxxxxxxxxxxx";
google_ad_width = 250;
google_ad_height = 250;
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;</code></pre>
</blockquote>
<p>Copy the code for your ad and visit your WordPress Options page. Go to the <strong>Insert Ad Code</strong> options. Paste the code into the text box at the bottom. Click <strong>Update Options »</strong>.</p>
<p><strong>Customizing Insert Ad Code</strong></p>
<p>Now you have a couple of choices here. The first option (<em>Enable Insert Ad Code</em>) will turn the plugin on or off (turning it off does not disable it in WordPress). This makes it easy to stop inserting ads if you need to.</p>
<p>The second (<em>Use &lt;!&#8211;more&#8211;&gt; or Custom Tag</em>) and third (<em>Custom Tag</em>) options let you decide where <strong>Insert Ad Code</strong> will put the ads. The default option is to insert the ads right by the <strong>&lt;!&#8211;more&#8211;&gt;</strong> tag. You could also use a custom tag (I&#8217;d still recommend using an HTML comment, just in case you turn off <strong>Insert Ad Code</strong> later).</p>
<p>I use the <strong>&lt;!&#8211;more&#8211;&gt;</strong> tag for four reasons.</p>
<ol>
<li>I don&#8217;t want to break up very short posts with ads.</li>
<li>I don&#8217;t want to go back and insert a new tag into all my old posts.</li>
<li>I want the ads to appear once, after a couple of paragraphs, just like the <strong>&lt;!&#8211;more&#8211;&gt;</strong> tag.</li>
<li>I want the tag to be easy to add via the WordPress editor.</li>
</ol>
<p>If you do feel like using a custom tag just change the settings, include that tag in your posts, and watch the magic happen.</p>
<p><strong>License</strong></p>
<p>This plugin is &#8220;show me&#8221;-ware. If you decide to use it, please let me know so I can see my handiwork in action! Other than that, it&#8217;s GPL.</p>
<p><strong>Download Insert Ad Code</strong></p>
<p>Now that I&#8217;ve been talking it up so much, you probably want to <a href="http://jamessocol.com/projects/files/insert_ad_code.zip">download the plugin</a>.</p>
<p><strong>Update!</strong> You can now check <strong>Insert Ad Code</strong> from SVN to get the latest build.<br />
<code>svn://jamessocol.com/insert_ad_code/trunk</code></p>
<p>You can check out the <code>tags</code> directory for specific versions.</p>
<p><strong>Feedback</strong></p>
<p>Please leave a comment or <a href="/contact/" onclick="return mail('me');">email me</a> if you use <strong>Insert Ad Code</strong>, or if you try to use it and hate it, or if it kills your dog. I&#8217;m not going to bring your dog back to life, but I&#8217;d love to hear your feedback.</p>
<p><strong>Update (Again)!</strong> If you&#8217;d like to help me translate Insert Ad Code, version 1.1.0 and above contain <code>.po</code> files. If you&#8217;re bilingual, translate it and send me the <code>.po</code> and <code>.mo</code> files, and I&#8217;ll include them (with credit, of course!)</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeeonthekeyboard.com/wordpress-plugin-insert-ad-code-63/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

