<?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:georss="http://www.georss.org/georss" 
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>bioneural.net &#187; Internet</title>
	<atom:link href="http://www.bioneural.net/tag/internet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bioneural.net</link>
	<description>bioneural.net is for stuff worth sharing: commentary by Bruce McKenzie. Major topics covered are gadgets, informatics, Internet, Mac, mobile, musings, New Zealand, photography, Project Koru, quicklinks, rant, rave, travel and Windows</description>
	<pubDate>Thu, 08 May 2008 19:36:56 +0000</pubDate>
	
	<language>en</language>
	<image>
		<title>bioneural.net</title>
		<url>http://www.bioneural.net/images/kiwi-yellow-64px.png</url>
		<link>http://www.bioneural.net</link>
		<width>64</width>
		<height>64</height>
		<description>bioneural.net</description>
	</image>
		<item>
		<title>Customizing WordPress feed content</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F13%2Fcustomizing-wordpress-feed-content%2F&amp;seed_title=Customizing+WordPress+feed+content</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F13%2Fcustomizing-wordpress-feed-content%2F&amp;seed_title=Customizing+WordPress+feed+content#comments</comments>
		<pubDate>Sun, 13 Apr 2008 20:38:12 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[howto]]></category>

		<category><![CDATA[microformats]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[rss]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[webdev]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=920</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">bioneural.net</a>:</p><p>When I last <a href="http://www.bioneural.net/2006/07/20/customizing-feeds-in-wordpress-2x/">looked</a> at customizing feeds in WordPress, it was all to do with being able to offer a summary and full text feed simultaneously&mdash;making use of WordPress' flexible feed URL syntax and a .htaccess file. In this post I look at modifying the actual contents of the feed using a <a href="http://codex.wordpress.org/Theme_Development#Functions_File" rel="external">functions.php</a> file (which may already exist as part of your current theme).<br />
<span id="more-920"></span></p>
<p>Just as WordPress provides a number of hooks for adding or removing actions in your theme header (see <a href="http://www.bioneural.net/2008/01/12/spring-clean-your-wordpress-head/">here</a>), so to do the core files that generate your feeds. Editing the core files is however discouraged (it makes upgrading a pain), and although you can build your own replacement feed templates an easy alternative is adding a few lines to your theme's functions.php file.</p>
<p class="alert">As a perpetual PHP beginner I feel obliged to warn you that use of the following code is at your own risk.</p>
<p>If there are any PHP/ WordPress experts reading this who can improve on my code please make yourself known ;-)</p>
<h4>Removing WP version info</h4>
<p>Somewhere, a while back, I read a tip about not including the WordPress version you are running in your template header&mdash;potentially allowing hackers to identify you as a target if you haven't kept up-to-date. It's easy to remove if present. For example, in the <a href="http://getk2.com/" rel="external">K2</a> theme just delete the following line from header.php:</p>
<pre><code>&lt;meta name="generator" content="WordPress &lt;?php bloginfo('version'); ?&gt;" /&gt;</code></pre>
<p>I recently released that version information was still being sent out in my feed. The feed XML contained a line like this:</p>
<pre><code>&lt;generator&gt;http://wordpress.org/?v=2.x&lt;/generator&gt;</code></pre>
<p>Thanks to Peter Westwood's helpful <a href="http://blog.ftwr.co.uk/archives/2007/10/06/improving-the-wordpress-generator/" rel="external">post</a> I used my theme's functions.php file to remove this with the following code:</p>
<pre><code>//Remove WP version info
function hide_wp_vers() { return ''; }
add_filter('the_generator','hide_wp_vers');</code></pre>
<p>So wherever <code>the_generator</code> function is called (such as in the feed templates in /wp-includes) it gets replaced with... nothing. Job done.</p>
<h4>Adding a feed image</h4>
<p>A feed image (e.g. your site logo or avatar) is an <a href="http://www.rssboard.org/rss-specification#ltimagegtSubelementOfLtchannelgt" rel="external">optional</a> part of the RSS 2.0 spec and shows up in some feed readers along with the feed description. There are plenty of tutorials (search Google) that tell you how to add a feed image by editing core template files, and there are plugins that will add one for you. I had previously edited my core RSS 2.0 template, and lost the changes during upgrades more than once. To avoid this in future here's what's now in my functions.php file:</p>
<pre><code>//Add a feed image
function feed_image() { echo "&lt;image&gt;\n\t\t&lt;title&gt;bioneural.net&lt;/title&gt;\n\t\t&lt;url&gt;http://www.bioneural.net/images/kiwi-yellow-64px.png&lt;/url&gt;\n\t\t&lt;link&gt;http://www.bioneural.net&lt;/link&gt;\n\t\t&lt;width&gt;64&lt;/width&gt;\n\t\t&lt;height&gt;64&lt;/height&gt;\n\t\t&lt;description&gt;bioneural.net&lt;/description&gt;\n\t&lt;/image&gt;\n"; }
add_action('rss2_head', 'feed_image');</code></pre>
<p>Having created my <code>feed_image</code> function I use <code>add_action</code> (<a href="http://codex.wordpress.org/Function_Reference/add_action" rel="external">Codex</a>) to insert my function via the <code>rss2_head</code> hook (<a href="http://codex.wordpress.org/Plugin_API/Action_Reference#Feed_Actions" rel="external">Codex</a>).</p>
<p>Note that <code>\n</code> means new line, <code>\t</code> means tab, and <code>\r</code> (not shown) carriage return: these are just for the sake of formatting. They have no function other than making the feed XML&mdash;which you will likely never see&mdash;look more organized:</p>
<pre><code>&lt;image&gt;
	&lt;title&gt;bioneural.net&lt;/title&gt;
	&lt;url&gt;http://www.bioneural.net/images/kiwi-yellow-64px.png&lt;/url&gt;
	&lt;link&gt;http://www.bioneural.net&lt;/link&gt;
	&lt;width&gt;64&lt;/width&gt;
	&lt;height&gt;64&lt;/height&gt;
	&lt;description&gt;bioneural.net&lt;/description&gt;
&lt;/image&gt;</code>
</pre>
<p>Here's how the above renders when viewed in <a href="http://www.bloglines.com" rel="external">Bloglines</a>:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/04/bloglines.jpg" width="295" height="89" alt="bloglines.jpg" /></p>
<p class="info"><em>Tip</em>: If you want to add a feed image but don't want to do it via a plugin or functions.php, you can use <em>Feed Image Burner</em> from <a href="http://www.feedburner.com" rel="external">FeedBurner</a>.</p>
<h4>Adding a content license</h4>
<p>I've noticed a rise in my content appearing on <a href="http://en.wikipedia.org/wiki/Spam_blog" rel="external">splogs</a>, usually in the form "[Some random name] wrote an interesting post today: here is an excerpt". This violates the <a href="http://creativecommons.org/" rel="external">Creative Commons</a> licensing of my content, which <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="external">requires</a> correct attribution. In a similar vein I've noticed some of my images turning up on "all rights reserved" sites with no attribution. While some folk are no doubt just ignorant, the sploggers are simply morons who don't give a damn. I can't do much about the latter (although I'm giving <a href="http://redalt.com/Resources/Plugins/AntiLeech" rel="external">AntiLeech</a> a spin) but it did get me wondering what I can do to improve the visibility of my licensing terms for the benefit of those "unaware".</p>
<p>The Creative Commons Wiki <a href="http://wiki.creativecommons.org/Syndication" rel="external">links</a> to an RSS 2.0 module for annotating feeds. While this may be machine-parsable I've yet to come across a feed reader that actually picks up on it. As well as incorporating this extension I wanted to add a human-readable annotation to each feed item. This one took a bit of figuring out:</p>
<pre><code>//Add CC license to namespace, item, inline img link within description
function add_license_ns() { echo "\n\t" . 'xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"' . "\n"; }
add_action('rss2_ns', 'add_license_ns');
function add_license_item() { echo "\t" . '&lt;creativeCommons:license&gt;http://creativecommons.org/licenses/by-nc-sa/2.5/&lt;/creativeCommons:license&gt;' . "\n"; }
add_action('rss2_item', 'add_license_item');
function add_license_img($join) {
	$join = _e('&lt;p&gt;&lt;a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"&gt;&lt;img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /&gt;&lt;/a&gt; From &lt;a href="http://www.bioneural.net/about/terms/"&gt;bioneural.net&lt;/a&gt;:&lt;/p&gt;') . the_content();
	return $join;
}
add_filter('the_excerpt_rss','add_license_img');</code></pre>
<p>The first function writes the required namespace declaration; <code>add_action</code> then adds this via the <code>rss2_ns</code> hook (<a href="http://codex.wordpress.org/Plugin_API/Action_Reference#Feed_Actions" rel="external">Codex</a>). The next function/ action pair writes the module to each feed item using rss2_item (<a href="http://codex.wordpress.org/Plugin_API/Action_Reference#Feed_Actions" rel="external">Codex</a>). The third part is the human-readable bit: writing the image, text, and links and concatenating these with <code>the_content()</code> (<a href="http://codex.wordpress.org/Template_Tags/the_content" rel="external">Codex</a>) to replace <code>the_excerpt_rss()</code> (<a href="http://codex.wordpress.org/Template_Tags/the_excerpt_rss" rel="external">Codex</a>). Note also the use of the <a href="http://microformats.org/wiki/rel-license" rel="external">rel-license</a> microformat.</p>
<p class="info">For this to work you must set your <em>Reading Settings</em> in WordPress to <em>Summary</em>, even though we will be displaying the full text (replacing <code>the_excerpt_rss()</code> with <code>the_content()</code>).</p>
<p>The XML will look like this (edited for clarity):</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;rss version="2.0"
	...
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
&gt;

&lt;channel&gt;
	...
		&lt;item&gt;
		&lt;title&gt;Web developer widgets&lt;/title&gt;
		...
		&lt;description&gt;&lt;![CDATA[&lt;p&gt;&lt;a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"&gt;&lt;img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /&gt;&lt;/a&gt; From &lt;a href="http://www.bioneural.net/about/terms/"&gt;bioneural.net&lt;/a&gt;:&lt;/p&gt;&lt;p&gt;Mac-based web developers...&lt;/p&gt;]]&gt;&lt;/description&gt;
		...
		&lt;creativeCommons:license&gt;http://creativecommons.org/licenses/by-nc-sa/2.5/&lt;/creativeCommons:license&gt;
		&lt;/item&gt;</code></pre>
<p>Rendered in a feed reader humans will see this:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/04/reader.jpg" width="295" height="143" alt="reader.jpg" /></p>
<p>The Creative Commons icon is hopefully recognisable and links to the correct license; the link to bioneural.net links to <a href="http://www.bioneural.net/about/terms/">additional</a> terms of use.</p>
<p class="info"><em>Tip</em>: If you prefer not to have full text feeds containing HTML tags, you could use <code>the_content_rss('', '', '', 250)</code> (<a href="http://codex.wordpress.org/Template_Tags/the_content_rss" rel="external">Codex</a>) in place of <code>the_content()</code> to produce a 250 word text-only teaser.</p>
<h4>Expanding the feed description</h4>
<p>The text of the feed description is ordinarily the same text that appears as the tagline for your blog (set in <em>General Settings</em>). You might want to keep it short in your blog header, but perhaps send a more informative version out with your feed. </p>
<p>In K2 at least the description is only used in the head:</p>
<pre><code>&lt;meta name="description" content="&lt;?php bloginfo('description'); ?&gt;" /&gt;</code></pre>
<p>and header:</p>
<pre><code>&lt;p class="description"&gt;&lt;?php bloginfo('description'); ?&gt;&lt;/p&gt;</code></pre>
<p>One solution is therefore to replace the PHP call with short fixed text descriptions (e.g. "stuff worth sharing") in your theme template (header.php) and make the description/ tagline in WP <em>General Settings</em> longer, so it gets into your feed e.g.:</p>
<pre><code>&lt;description&gt;bioneural.net is for stuff worth sharing: commentary by Bruce McKenzie. Major topics covered are gadgets, informatics, Internet, Mac, mobile, musings, New Zealand, photography, Project Koru, quicklinks, rant, rave, travel and Windows&lt;/description&gt;</code></pre>
<p>I was unable to successfully utilize <code>rss2_head</code> (<a href="http://codex.wordpress.org/Plugin_API/Action_Reference#Feed_Actions" rel="external">Codex</a>) in a way that avoided duplicate descriptions.</p>
<p class="info"><em>Tip</em>: Another way to add a more detailed description to your feed only is to use <em>Title/Description Burner</em> from <a href="http://www.feedburner.com" rel="external">FeedBurner</a>.</p>
<h4>Adding a category image</h4>
<p>I previously used the now neglected <a href="http://coffee2code.com/archives/2004/06/27/plugin-category-images/" rel="external">Category Image(s)</a> plugin to send out a category icon with each feed item, replicating their use on my blog to readily identify Mac-related posts, etc. All I needed to do was replace the default item description with this:</p>
<pre><code>&lt;description&gt;&lt;![CDATA[&lt;?php c2c_the_category_image(); ?&gt;&lt;br /&gt;&lt;br /&gt;&lt;?php the_excerpt_rss() ?&gt;]]&gt;&lt;/description&gt;</code></pre>
<p>Sadly such a trick doesn't work with the <a href="http://wordpress.org/extend/plugins/category-icons/" rel="external">Category Icons</a> plugin I am now using, but I've been in touch with the plugin author and submitted this as a feature request.</p>
<img src="http://www.bioneural.net/ff309e51/26673f11/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F13%2Fcustomizing-wordpress-feed-content%2F&amp;seed_title=Customizing+WordPress+feed+content/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>RDF v microformats v meta headers</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F05%2Frdf-v-microformats-v-meta-headers%2F&amp;seed_title=RDF+v+microformats+v+meta+headers</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F05%2Frdf-v-microformats-v-meta-headers%2F&amp;seed_title=RDF+v+microformats+v+meta+headers#comments</comments>
		<pubDate>Sat, 05 Apr 2008 18:24:49 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Quicklinks]]></category>

		<category><![CDATA[Internet]]></category>

		<category><![CDATA[metadata]]></category>

		<category><![CDATA[microformats]]></category>

		<category><![CDATA[webdev]]></category>

		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=895</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">bioneural.net</a>:</p><p>I've had a hard time "getting" <a href="http://www.w3.org/RDF/" rel="external">RDF</a> (e.g. how it <a href="http://www.w3.org/DesignIssues/RDF-XML.html" rel="external">differs</a> from XML), but this <a href="http://www.readwriteweb.com/archives/semantic_web_patterns.php" rel="external">article</a> helps give it context. The semantic web is being built simultaneously from the bottom up and top down. Typifying the bottom-up approach, RDF content is machine-readable at the outset; powerful but complex (with several <a href="http://www.semanticfocus.com/blog/entry/title/microformats-vs-rdf-how-microformats-relate-to-the-semantic-web/" rel="external">advantages</a> over microformats), RDF is all about inter-operability. Top-down approaches introduce "<a href="http://www.semanticfocus.com/blog/entry/title/moving-towards-the-semantic-web-grassroots-vs-ivory-towers/" rel="external">metadata sprinkling</a>" to existing content, simple but limiting by comparison e.g. <a href="http://microformats.org/" rel="external">microformats</a> (using CSS class attributes as in <a href="http://www.bioneural.net/2007/08/17/implementing-the-hcard-microformat/">hCard</a>), or <a href="http://en.wikipedia.org/wiki/Meta_element" rel="external">meta elements</a> (meta tags such as those for <a href="http://www.bioneural.net/2008/03/09/mapping-fun-with-georss-and-geo-discovery/">geo-discovery</a>). Both approaches are <a href="http://www.readwriteweb.com/archives/semantic_web_patterns.php" rel="external">valid</a>, but RDF is hard whereas microformats help "the rest of us" contribute to the semantic web. There may be a <a href="http://evan.prodromou.name/RDFa_vs_microformats" rel="external">collision</a> ahead, however, between microformats and <a href="http://www.w3.org/TR/xhtml-rdfa-primer/" rel="external">RDFa</a> (sprinklings of RDF embedded in existing XHTML).</p>
<img src="http://www.bioneural.net/ff309e51/26673f11/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F05%2Frdf-v-microformats-v-meta-headers%2F&amp;seed_title=RDF+v+microformats+v+meta+headers/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Pages and searching in WordPress 2.5</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F04%2Fpages-and-searching-in-wordpress-25%2F&amp;seed_title=Pages+and+searching+in+WordPress+2.5</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F04%2Fpages-and-searching-in-wordpress-25%2F&amp;seed_title=Pages+and+searching+in+WordPress+2.5#comments</comments>
		<pubDate>Fri, 04 Apr 2008 17:07:34 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[icons]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=894</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">bioneural.net</a>:</p><p>WordPress 2.5 lets you search across pages (non-blog entries) as well as posts. This is undoubtedly a good thing, but if your pages are liable to turn up in site searches you might want to make a couple of changes to stop page content from swamping your results screen and improve appearances if you use category icons.<br />
<span id="more-894"></span></p>
<p>In WordPress search results post content is displayed up to the &lt;!--more--&gt; <a href="http://codex.wordpress.org/Customizing_the_Read_More" rel="external">tag</a>:</p>
<blockquote><p>
The rest of the post continues, but when viewed on the non-single/non-permalink web page such as archives, categories, front page, and searches, the post is shown as an excerpt to the more point.
</p></blockquote>
<p>Pages don't usually have a more tag, because there is no excerpt or "teaser" destined for use in a feed. Thus when a page appears in a search results it will display in its entirety.</p>
<p>Furthermore, because I'm using the <a href="http://wordpress.org/extend/plugins/category-icons/" rel="external">Category Icons</a> plugin, post titles will display alongside the category icon for ease of identification. Since pages don't usually have a category, they will show indented with no icon.</p>
<p>Here is a search for "architect", showing an iconless page result occupying the screen:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/04/before.jpg" width="450" height="534" alt="before.jpg" /></p>
<p>With the addition of &lt;!--more--&gt; to the top of each page, and the use of an icon for Uncategorized content (assuming all posts are categorised) we get this:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/04/after.jpg" width="450" height="534" alt="after.jpg" /></p>
<p>Much more usable and informative.</p>
<img src="http://www.bioneural.net/ff309e51/26673f11/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F04%2Fpages-and-searching-in-wordpress-25%2F&amp;seed_title=Pages+and+searching+in+WordPress+2.5/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>I don't want any Safari!</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F25%2Fi-dont-want-any-safari%2F&amp;seed_title=I+don%27t+want+any+Safari%21</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F25%2Fi-dont-want-any-safari%2F&amp;seed_title=I+don%27t+want+any+Safari%21#comments</comments>
		<pubDate>Tue, 25 Mar 2008 08:50:05 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Quicklinks]]></category>

		<category><![CDATA[apple]]></category>

		<category><![CDATA[Internet]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[malware]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/03/25/i-dont-want-any-safari/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">bioneural.net</a>:</p><p>Installation of software you didn't actively choose to install is malware. I'm referring to Apple's recent decision to force <a href="http://www.apple.com/safari/" rel="external">Safari</a> 3.1 on hapless Windows users via Software Update. How can you "update" a product that isn't installed? <a href="http://home.triad.rr.com/spamchef/spamskit.html" rel="external">Wife</a>: <em>Have you got anything without</em> Safari? This is bad form Apple. At least <em>Ars</em> <a href="http://arstechnica.com/news.ars/post/20080324-safari-3-1-on-windows-a-true-competitor-arrives.html" rel="external">consider</a> this browser a much-improved and stable "true competitor".</p>
<img src="http://www.bioneural.net/ff309e51/26673f11/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F25%2Fi-dont-want-any-safari%2F&amp;seed_title=I+don%27t+want+any+Safari%21/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Microsoft Silverlight takes on Flash</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F13%2Fmicrosoft-silverlight-takes-on-flash%2F&amp;seed_title=Microsoft+Silverlight+takes+on+Flash</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F13%2Fmicrosoft-silverlight-takes-on-flash%2F&amp;seed_title=Microsoft+Silverlight+takes+on+Flash#comments</comments>
		<pubDate>Thu, 13 Mar 2008 09:41:16 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Quicklinks]]></category>

		<category><![CDATA[Internet]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/03/13/microsoft-silverlight-takes-on-flash/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">bioneural.net</a>:</p><p>Microsoft <a href="http://www.microsoft.com/silverlight/" rel="external">Silverlight</a> is a proprietary cross-browser, almost cross-platform (not <a href="http://en.wikipedia.org/wiki/Moonlight_%28runtime%29" rel="external">yet</a> Linux), and cross-device (WM6 &amp; Symbian only) plug-in vaguely tasked with "delivering the next generation of <a href="http://en.wikipedia.org/wiki/.NET_Framework" rel="external">.NET</a> based media experiences and rich interactive applications for the Web." The developer tools (Windows or Mac) output interactive text, bitmap images, vector graphics, animations, and video (<a href="http://en.wikipedia.org/wiki/Windows_Media_Video" rel="external">WMV</a>)/ audio (<a href="http://en.wikipedia.org/wiki/Windows_Media_Audio" rel="external">WMA</a> and <a href="http://en.wikipedia.org/wiki/MP3" rel="external">MP3</a>) playback, in competition primarily with <a href="http://en.wikipedia.org/wiki/Adobe_Flash" rel="external">Flash</a>. The plug-in is free (v2 is currently in <a href="http://www.microsoft.com/silverlight/resources/installationFiles.aspx?v=2.0" rel="external">beta</a>) &amp; curiously you can <a href="http://silverlight.net/learn/learnvideo.aspx?video=209" rel="external">download</a> the <em>Getting started</em> video in QuickTime for iPod! More <a href="http://en.wikipedia.org/wiki/Microsoft_Silverlight" rel="external">here</a>.</p>
<img src="http://www.bioneural.net/ff309e51/26673f11/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F13%2Fmicrosoft-silverlight-takes-on-flash%2F&amp;seed_title=Microsoft+Silverlight+takes+on+Flash/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>iCab now sports the Geotag Icon</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F11%2Ficab-now-sports-the-geotag-icon%2F&amp;seed_title=iCab+now+sports+the+Geotag+Icon</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F11%2Ficab-now-sports-the-geotag-icon%2F&amp;seed_title=iCab+now+sports+the+Geotag+Icon#comments</comments>
		<pubDate>Tue, 11 Mar 2008 21:29:58 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Quicklinks]]></category>

		<category><![CDATA[geotagging]]></category>

		<category><![CDATA[icons]]></category>

		<category><![CDATA[Internet]]></category>

		<category><![CDATA[metadata]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/03/11/icab-now-sports-the-geotag-icon/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">bioneural.net</a>:</p><p><a href="http://www.icab.de/" rel="external">iCab</a>&mdash;the Internet taxi for your Mac&mdash;now sports the <a href="http://www.geotagicons.com" rel="external">Geotag Icon.</a> Alexander Clauss' latest beta (4.0.1b39) enables the status bar Geotag Icon when metadata tags are detected in the page being viewed, generating a pop-up that will plot the geotagged location using Google Maps. iCab has a number of other noteworthy features, including full compatibility with the WYSIWYG editor in WordPress (unlike Safari or Firefox as of this writing). David has some screen captures on his <a href="http://david-hall.net/2008/03/11/icab-geotagicon/" rel="external">site</a>.</p>
<img src="http://www.bioneural.net/ff309e51/26673f11/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F11%2Ficab-now-sports-the-geotag-icon%2F&amp;seed_title=iCab+now+sports+the+Geotag+Icon/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Mapping fun with GeoRSS and geo-discovery</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F09%2Fmapping-fun-with-georss-and-geo-discovery%2F&amp;seed_title=Mapping+fun+with+GeoRSS+and+geo-discovery</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F09%2Fmapping-fun-with-georss-and-geo-discovery%2F&amp;seed_title=Mapping+fun+with+GeoRSS+and+geo-discovery#comments</comments>
		<pubDate>Sun, 09 Mar 2008 00:26:26 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[flickr]]></category>

		<category><![CDATA[geotagging]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[metadata]]></category>

		<category><![CDATA[Photography]]></category>

		<category><![CDATA[rss]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/03/09/mapping-fun-with-georss-and-geo-discovery/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">bioneural.net</a>:</p><p>Continuing the recent geo-fixation trend evident on this site, this article shares the results of a slightly deeper delve into GeoRSS and looks at a great browser add-on that offers auto-discovery of geotagged content in webpages and in some feeds.<br />
<span id="more-854"></span></p>
<h4>What is GeoRSS?</h4>
<p>Wikipedia <a href="http://en.wikipedia.org/wiki/GeoRSS" rel="external">describes</a> <a href="http://www.georss.org/" rel="external">GeoRSS</a> as "an emerging standard for encoding location as part of an RSS feed." It also encodes location in Atom feeds, and rather than the singular "standard" there are actually two variations (<a href="http://www.georss.org/simple" rel="external">GeoRSS-Simple</a> and the more advanced <a href="http://www.georss.org/gml" rel="external">GeoRSS-GML</a>). A third encoding, W3C <a href="http://www.w3.org/2003/01/geo/" rel="external">Basic Geo</a>, is depreciated but still in use (e.g. by Flickr; see below).</p>
<p>I happen to use the <a href="http://code.google.com/p/wordpress-geo-mashup/" rel="external">Geo Mashup</a> plugin for <a href="http://www.wordpress.org" rel="external">WordPress</a> to geotag articles on this site. As well as adding appropriate metadata tags into the head of location-specific posts, the plugin automatically adds GeoRSS-Simple encoding to my feeds. The GeoRSS-Simple feeds are identified with this <a href="http://en.wikipedia.org/wiki/XML_namespace" rel="external">namespace</a> declaration in the header:</p>
<pre><code>xmlns:georss="http://www.georss.org/georss"</code></pre>
<p>Each item in the feed will be marked-up with a coordinate pair separated by a whitespace and enclosed in a point tag. For example:</p>
<pre><code>&lt;georss:point&gt;50.185676 8.464943&lt;/georss:point&gt;</code></pre>
<p>And that's it. So what can you do with it?</p>
<h4>GeoRSS in your blog feed</h4>
<p>In WordPress you can create a feed for any category or any tag just by putting /feed/ at the end of the URL. This is ideal if you have a dedicated category or tag for geotagged content. In my case I had geotagged content spanning several categories, so I decided to go back and add the tag "geotag" to all my geotagged articles across all categories. This was actually pretty easy because all such articles could be readily identified by the <a href="http://www.geotagicons.com" rel="external">Geotag Icon</a> overlay on the category image&mdash;another great reason for you to start using it :-)</p>
<p>This done, I could now offer a dedicated feed for all geotagged content on the basis of the new tag:</p>
<p class="geotag">http://www.bioneural.net/tag/geotag/feed/</p>
<p>At this point you can be forgiven for thinking "So how is this different from an ordinary feed?" Well, <a href="http://maps.google.com/" rel="external">Google Maps</a> can <a href="http://googlemapsapi.blogspot.com/2007/03/kml-and-georss-support-added-to-google.html" rel="external">handle</a> GeoRSS in much the same way as it handles KML files: it can extract the geo-location data and plot your feed items on a map. All you need to do is splice together the URL for Google Maps with the URL of your GeoRSS-enriched feed, like this:</p>
<p class="geotag">http://maps.google.com/maps?q=http://www.bioneural.net/tag/geotag/feed/</p>
<p>As a result, Google Maps will plot the most recent feed items on a map, and clicking on a marker will display an excerpt from that item:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/03/gmaps.jpg" width="450" height="333" alt="gmaps.jpg" /></p>
<p>You don't need to register for a Google Maps API key. You don't need to know what an API is. You don't need to copy or edit any code for adding a map to your own site.</p>
<h4>Geo-discovery in your feed reader</h4>
<p>As mentioned, Geo Mashup (in common with other geotagging plugins) adds metadata tags into the head of location-specific posts. They look like this (two formats):</p>
<pre><code>&lt;meta name="ICBM" content="50.185676, 8.464943" /&gt;
&lt;meta name="geo.position" content="50.185676;8.464943" /&gt;</code></pre>
<p>Some feed readers and browser extensions can auto-detect these tags when a post containing them is displayed. Recently I've been trying out <a href="http://minimap.spatialviews.com/" rel="external">Minimap Sidebar</a> with <a href="http://www.mozilla.com/en-US/firefox/" rel="external">Firefox</a> which causes a small map icon "light up" when such metadata are detected. For example, <a href="http://www.bioneural.net/2008/01/29/a-winter-walk-in-the-taunus/">here</a> is a geotagged post you can test it with:</p>
<p class="geotag">http://www.bioneural.net/2008/01/29/a-winter-walk-in-the-taunus/</p>
<p>In this instance geo-discovery detects the same location data twice, since Minimap recognises both of the above metadata formats (it also scans the page for text geotags e.g. geo:lat=, geo:lng=):</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/03/geodiscovery.jpg" width="450" height="85" alt="geodiscovery.jpg" /></p>
<p>But the real magic is in Minimap's integration with Google Maps. Minmap lets you plot the encoded location side-by-side with the content that it relates to (especially helpful to geography dropouts if the author hasn't yet created their own <a href="http://www.bioneural.net/map">map</a>). Just drag-and-drop the URL from the browser's address bar into the well below the map in the Minimap Sidebar and the location will be plotted. Right-clicking the post title in the well gives you access to a wealth of options and actions too numerous to list:</p>
<p><span class="zoom">Click thumbnail to enlarge image</span><br /><a href="http://www.bioneural.net/images/enlarge/minimap-large.jpg" rel="ibox" title="Minimap Sidebar at work in Firefox"><img src="http://www.bioneural.net/wp-content/uploads/2008/03/minimap-thumb.jpg" width="200" height="203" alt="minimap-thumb.jpg" /></a><br /><span class="caption">Minimap Sidebar at work in Firefox</span></p>
<p class="info">Tony, the developer of <a href="http://minimap.spatialviews.com/" rel="external">Minimap Sidebar</a> for <a href="http://www.mozilla.com/en-US/firefox/" rel="external">Firefox</a> and <a href="http://flock.spatialviews.com/" rel="external">geoFlock</a> for <a href="http://www.flock.com/" rel="external">Flock</a>, has <a href="http://spatialviews.com/2008/03/08/geotag-icon/" rel="external">announced</a> his intention to use the <a href="http://www.geotagicons.com" rel="external">Geotag Icon</a> as a replacement for his current geo-discovery icon. And, according to Nick, we can also look <a href="http://publicenergy.co.uk/geotagging-and-feeddemon.html" rel="external">forward</a> to seeing it in the next build of <a href="http://www.newsgator.com/Individuals/FeedDemon/Default.aspx" rel="external">FeedDemon</a>, a fine feed reader for Windows.</p>
<h4>GeoRSS in your Flickr feed</h4>
<p>Flickr offers what Dan Catt has termed a <a href="http://geobloggers.com/archives/2007/08/10/for-i-am-lord-and-master-of-all-subtlety-flickr-geoinrss-kml/" rel="external">geoFeed</a> (for reasons unclear). If you look at the feed source (the easiest way is to enter it into the W3C <a href="http://validator.w3.org/feed/" rel="external">Feed Validator</a>) you can see that there are two namespace declarations in the header (the depreciated W3C Basic Geo and GeoRSS-Simple):</p>
<pre><code>xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:georss="http://www.georss.org/georss"</code></pre>
<p>Each item in the feed is marked-up twice, as dictated by each encoding. For example:</p>
<pre><code>&lt;georss:point&gt;-41.296122 174.793167&lt;/georss:point&gt;
&lt;geo:Point&gt;
	&lt;geo:lat&gt;-41.296122&lt;/geo:lat&gt;
	&lt;geo:long&gt;174.793167&lt;/geo:long&gt;
&lt;/geo:Point&gt;</code></pre>
<p><a href="http://api.flickr.com/services/feeds/geo/?id=31017329@N00&amp;lang=en-us&amp;format=rss_200" rel="external">Here</a> is an example of a flickr geoFeed URL:</p>
<p class="geotag">http://api.flickr.com/services/feeds/geo/?id=31017329@N00&amp;lang=en-us&amp;format=rss_200</p>
<p>If you drag-and-drop this feed URL on Minimap it will generate a map just like it did above for geotagged posts. But it won't do that for my dedicated GeoRSS <a href="http://www.bioneural.net/tag/geotag/feed/" rel="external">feed</a> even though it shares the same GeoRSS-Simple encoding. Is it because of the W3C Basic Geo in Flickr's feed? No.</p>
<p>So how does this work then? Tony wrote Minimap to scan the dropped URL for the presence of .rss, =rss, .georss, or =georss and&mdash;if these strings are found&mdash;to send the data via the Google Maps API <a href="http://code.google.com/apis/maps/documentation/reference.html#GGeoXml" rel="external">GGeoXml</a> function to represent the parsed data on a map (i.e. it doesn't parse the feed to discover the encoding). One glance at the Flickr geoFeed URL and you have your answer.</p>
<h4>Revisiting GeoRSS in WordPress feeds</h4>
<p>We've thus explained why my dedicated GeoRSS <a href="http://www.bioneural.net/tag/geotag/feed/" rel="external">feed</a> doesn't get auto-discovered. However, WordPress feed <a href="http://codex.wordpress.org/WordPress_Feeds" rel="external">syntax</a> is pretty flexible, so all I needed to do is modify mine slightly:</p>
<p class="geotag">http://www.bioneural.net/tag/geotag/feed/rss2/</p>
<p class="geotag">http://www.bioneural.net/tag/geotag/?feed=rss2</p>
<p>The GeoRSS data is now detected by Minimap Sidebar when either feed URL is dropped on the well, and both remain <a href="http://validator.w3.org/feed/" rel="external">valid</a> feeds.</p>
<p>Ideally Minimap would detect GeoRSS by parsing feeds looking for <code>&lt;georss:point&gt;</code>. However, as Tony explained to me this would have a significant resource overhead that would impair the user experience, being rather more involved that just checking the head for a standard feed link syntax and triggering display of the well-known orange Feed Icon. </p>
<p>Tony also points out that, while drag-and-drop failed to auto-discover my original GeoRSS feed (the URL ending /feed/), I could get it recognized manually via the <em>Add KML/ GeoRSS URL</em> <a href="http://minimap.spatialviews.com/index.php?option=com_content&#038;view=article&#038;id=59&#038;Itemid=86" rel="external">option</a> in Minimap Sidebar.</p>
<img src="http://www.bioneural.net/ff309e51/26673f11/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F03%2F09%2Fmapping-fun-with-georss-and-geo-discovery%2F&amp;seed_title=Mapping+fun+with+GeoRSS+and+geo-discovery/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>A web standard icon for geotagging</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F21%2Fa-web-standard-icon-for-geotagging%2F&amp;seed_title=A+web+standard+icon+for+geotagging</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F21%2Fa-web-standard-icon-for-geotagging%2F&amp;seed_title=A+web+standard+icon+for+geotagging#comments</comments>
		<pubDate>Thu, 21 Feb 2008 13:35:39 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[flickr]]></category>

		<category><![CDATA[geotagging]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[gps]]></category>

		<category><![CDATA[icons]]></category>

		<category><![CDATA[metadata]]></category>

		<category><![CDATA[microformats]]></category>

		<category><![CDATA[omnigraffle]]></category>

		<category><![CDATA[opml]]></category>

		<category><![CDATA[rss]]></category>

		<category><![CDATA[Travel]]></category>

		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/02/21/a-web-standard-icon-for-geotagging/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">bioneural.net</a>:</p><p><a href="http://en.wikipedia.org/wiki/Geotagging" rel="external">Geotagging</a> (or <a href="http://en.wikipedia.org/wiki/Geocoding" rel="external">geocoding</a> if you prefer) is the act of associating your content (blog posts, photos, feeds, etc.) with a geographic location (e.g. via latitude and longitude co-ordinates). Thus tagged authors can "mash" their content together with the likes of <a href="http://maps.google.com/" rel="external">Google Maps</a>, or the <a href="http://www.flickr.com/map/" rel="external">Flickr Map</a> if photography is your thing. However, co-ordinates are typically encoded within <a href="http://en.wikipedia.org/wiki/ICBM_address" rel="external">metadata</a> (or <a href="http://microformats.org/wiki/geo" rel="external">microformat</a>) tags making them visible to machines but <a href="http://www.bioneural.net/wp-content/uploads/2008/02/flickr-geotag.jpg" rel="ibox">hidden</a> from people. We have de facto web standard icons to help identify <a href="http://www.feedicons.com/" rel="external">feeds</a>, <a href="http://www.opmlicons.com/" rel="external">OPML</a>, and <a href="http://www.openshareicons.com/" rel="external">sharing</a>&mdash;so why not for geotagged content?<br />
<span id="more-842"></span></p>
<p class="alert"><strong>Update 29.02.08</strong>: Thanks to everyone who gave feedback or otherwise contributed to the process of taking this proposal forward. Comments are now closed and further feedback should now be directed to <a href="http://www.geotagicons.com">geotagicons.com</a>, where you can now download the new community-designed geotag icon.</p>
<h4>The goods</h4>
<p>I propose a web standard Geotag Icon, to be used freely by any geotagger or geotagging service. Here is what it looks like at 128px:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/geotag-128px.jpg" width="128" height="128" alt="geotag-128px.jpg" /></p>
<p>At 32px:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/geotag-32px.jpg" width="32" height="32" alt="geotag-32px.jpg" /></p>
<p>And at 16px:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/geotag-16px.jpg" width="16" height="16" alt="geotag-16px.jpg" /></p>
<p class="info"><strong>Important</strong>: <em>These images are not final; this is a proposal</em>. Please do not <a href="http://en.wikipedia.org/wiki/Inline_linking" rel="external">hotlink</a> to these images. You can download them individually by right-clicking the one you want, or as part of the draft Geotag Icon Development Kit <a href="http://www.bioneural.net/extra/">here</a>.</p>
<h4>Family line-up</h4>
<p>The family resemblance is obvious:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/set.jpg" width="450" height="103" alt="set.jpg" /></p>
<p class="info">Why not complete the set? Grab the <a href="http://www.feedicons.com/" rel="external">Feed</a> icon, the <a href="http://www.opmlicons.com/" rel="external">OPML</a> icon, and the <a href="http://www.openshareicons.com/" rel="external">Open Share</a> icon.</p>
<p><em>Update 27.03.08</em>: The <a href="http://www.openshareicons.com/" rel="external">Open Share Icon Project</a> offers a free, open, community-driven alternative to the trademarked and brand-linked <a href="http://sharethis.com/" rel="external">ShareThis.com</a> icon.</p>
<h4>Icon specification</h4>
<ul>
<li>It should be similar in style to existing de facto web standard icons (hereafter known as "the Three");</li>
<li>It should be distinctive in colour from the Three;</li>
<li>The colour should in some way represent it's purpose (although this is not a feature of the Three);</li>
<li>It has to be recognizable at 16px yet not look dull at larger sizes;</li>
<li>It should be format-agnostic (it doesn't matter what geotagging method is used);</li>
<li>It should not be closely aligned with iconography from an existing service (e.g. people shouldn't say "Ah, that's the default Google Maps marker!"). That is, it should be service-agnostic.</li>
</ul>
<h4>Inspirations</h4>
<p>Words or objects you might associate with geotagging abound. For example, map, compass, navigation, co-ordinates, gridlines, waypoints, pins, markers, X marks the spot, GPS satellites, etc. A Google Image search turns up some rather beautiful yet overly detailed (for our purposes) icon examples, such as <a href="http://www.caffeinatedcocoa.com/magrathea/index.html" rel="external">Magrathea</a>, <a href="http://www.geoxtract.com/" rel="external">geoXtract</a>, <a href="http://www.routebuddy.com/routebuddy/index.html" rel="external">RouteBuddy</a>, and <a href="http://www.houdah.com/houdahGeo/index.html" rel="external">HoudahGeo</a>. Some are less delicate (e.g. the button used by the <a href="http://microformats.org/wiki/geo" rel="external">geo</a> microformat or the <a href="http://www.geocaching.com/" rel="external">Geocaching.com</a> logo) but closer to the simplicity we are looking for.</p>
<p>The visual essence of geotagging is marking a point with a pointed object (physical or virtual). In the days before the Internet when I dreamed of travelling the world I had a National Geographic world map on my wall into which I placed pins or tacks to indicate places I'd like to visit. I dug around in my wife's stationery draw and found a few examples:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/3pins.jpg" width="141" height="115" alt="3pins.jpg" /></p>
<p>I think we can all relate to the middle one; it's user-friendly, iconic, and best of all it doesn't get stuck into your heel as easily as the drawing pin when scattered on the floor!</p>
<h4>Anatomy of an icon</h4>
<p>It might not be an obvious choice, but lacking <a href="http://www.adobe.com/products/illustrator/" rel="external">Illustrator</a> or the skills to use it, I often use <a href="http://www.omnigroup.com/applications/omnigraffle/" rel="external">OmniGraffle</a> as a drawing tool. The interface is world-class and it can export to a number of formats, including PDF, giving me the option to supply a vector version. Here is the recipe I used if you want to bake your own version, or try out a variation of your own design:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/anatomy.jpg" width="378" height="129" alt="anatomy.jpg" /></p>
<p>The tack itself is white (with no stroke) to match the central elements of the Three (and it so happens that my model pin was white!). As you increase size, greater detail becomes visible. Crucially the detail degrades gracefully at smaller sizes (16px and 32px shown magnified):</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/detail.jpg" width="343" height="257" alt="detail.jpg" /></p>
<p>Brown is an oft maligned colour although&mdash;as <a href="http://david-hall.net" rel="external">David</a> observed&mdash;a tinge of bronze prevents it looking too "dirty". Brown of course is the colour of earth&mdash;unless you live in Australia's <a href="http://www.bioneural.net/map/?lat=-23.700358&amp;lng=133.880889">Red Centre</a>. If you do hail from the Land of Oz don't panic, as the devkit allows you to change the tone (e.g. a red dust effect!) in Photoshop. See the included readme.pdf for details.</p>
<h4>Usage examples</h4>
<p>It's up to you how you use it, but bear in mind it's not intended as a marker replacement (markers with points are generally more appropriate for that). The idea is to add a visual identifier to your content (blog post, photo, etc.) indicating associated geodata. The image doesn't have to link anywhere, but hyperlinks should be used if it makes sense to do so.</p>
<p>For example, I'm using the <a href="http://code.google.com/p/wordpress-geo-mashup/" rel="external">Geo Mashup</a> plugin for <a href="http://www.wordpress.org" rel="external">WordPress</a> and display it in several locations. It appears as an overlay on category images (itself a <a href="http://www.coffee2code.com/wp-plugins/" rel="external">plugin</a>) that have associated geodata, so you know at a glance that the post pertains to a particular location:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/cat-image.jpg" width="341" height="193" alt="cat-image.jpg" /></p>
<p>Clicking on the icon transports you to that location on my Google Map (see my <a href="http://www.bioneural.net/category/travel/">Travel</a> category for live examples). The relevant template code is:</p>
<pre><code>&lt;div class="catimage"&gt;
	&lt;?php c2c_the_category_image(); ?&gt;
	&lt;?php $coordinates = GeoMashup::post_coordinates(); if ($coordinates) { echo '&lt;span class="geotag-overlay"&gt;'; GeoMashup::show_on_map_link('&lt;img src="../geotag-16px.png" alt="geotag" /&gt;'); echo '&lt;/span&gt;'; } ?&gt;
&lt;/div&gt;</code></pre>
<p>The class <code>.geotag-overlay</code> is styled in CSS with:</p>
<pre><code>.geotag-overlay { width: 16px; height: 16px; position: absolute; margin-top: 16px; margin-left: -16px; }</code></pre>
<p>The Geotag Icon also appears in the actions box at the foot of an entry, adjacent to the coded co-ordinates and direct link to the location on my Google <a href="http://www.bioneural.net/map/">Map</a>:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/footer.jpg" width="375" height="146" alt="footer.jpg" /></p>
<p>The relevant template code is:</p>
<pre><code>&lt;?php $coordinates = GeoMashup::post_coordinates(); if ($coordinates) { echo '&lt;span class="geotag"&gt;Geotagged at lat ' . $coordinates['lat'] . ', lng ' . $coordinates['lng'] . ' ('; GeoMashup::show_on_map_link('View'); echo ' on map)&lt;/span&gt;'; } ?&gt;</code></pre>
<p>The CSS for such inline use is:</p>
<pre><code>.geotag { padding: 2px 0 2px 20px; background: url('geotag-16px.png') left center no-repeat; }</code></pre>
<p>Finally, it appears in the info window when you click on a map marker next to the post title:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/info-window.jpg" width="257" height="305" alt="info-window.jpg" /></p>
<p>This is done is CSS only, like so (<code>.locationinfo</code> is a styling hook provided by the Geo Mashup plugin):</p>
<pre><code>.locationinfo h2 { font-size: 1.2em; font-weight: bold; background: url('geotag-16px.png') left center no-repeat; text-align: left; padding: 2px 0 2px 20px !important; }</code></pre>
<h4>Credits</h4>
<p>Thanks to <a href="http://david-hall.net" rel="external">David</a> for getting me <a href="http://david-hall.net/map-inspecting" rel="external">interested</a> in geotagging again, and for early feedback on the proposed icon. <a href="http://mattbrett.com" rel="external">Matt Brett</a>, <a href="http://www.krossi.com/" rel="external">Ken Rossi</a>, and <a href="http://alexking.org/" rel="external">Alex King</a> are responsible for promoting the Three.</p>
<h4>Your opinion counts</h4>
<p>I am not opposed to change, colour or otherwise, if that is what folk ask for. My interest is in helping the semantic web become more visible to people, and the proposal is here to stimulate discussion and hopefully arrive at some form of consensus (to the extent that is possible on the Internet!).</p>
<p class="info">If you have an opinion, please share it <a href="http://www.bioneural.net/2008/02/21/a-web-standard-icon-for-geotagging/#comments">here</a> or participate in the <a href="http://www.flickr.com/groups/flickrideas/discuss/72157603958525666/" rel="external">discussion</a> on Flickr.</p>
<img src="http://www.bioneural.net/ff309e51/26673f11/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F21%2Fa-web-standard-icon-for-geotagging%2F&amp;seed_title=A+web+standard+icon+for+geotagging/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>How to safely inject CSS3 using jQuery</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F14%2Fhow-to-safely-inject-css3-using-jquery%2F&amp;seed_title=How+to+safely+inject+CSS3+using+jQuery</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F14%2Fhow-to-safely-inject-css3-using-jquery%2F&amp;seed_title=How+to+safely+inject+CSS3+using+jQuery#comments</comments>
		<pubDate>Thu, 14 Feb 2008 14:14:56 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[howto]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/02/14/how-to-safely-inject-css3-using-jquery/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">bioneural.net</a>:</p><p>So you fancy using some of that &uuml;ber-cool draft CSS3 that <a href="http://webkit.org/" rel="external">WebKit</a> browsers can handle, such as text shadows, drop shadows, opacity and rounded corners? But at the same time you want to present only valid CSS to the W3C CSS <a href="http://jigsaw.w3.org/css-validator/" rel="external">Validator</a>? It's a dilemma, but it is possible to have your cake and eat it too&mdash;albeit by hiding CSS in JavaScript and thus cheating the Validator. However, there is even a precedent for doing so.<br />
<span id="more-829"></span></p>
<p>During the course of researching my review of the <a href="http://www.bioneural.net/2008/02/06/the-best-way-to-do-corners-and-gradients/">various</a> <a href="http://www.bioneural.net/2008/02/13/corners-gradients-and-shadows-with-jquery/">ways</a> to make rounded corners, drop shadows, and gradients I learned more about <a href="http://www.w3.org/TR/css3-roadmap/" rel="external">CSS3</a> and the <a href="http://jquery.com/" rel="external">jQuery</a> JavaScript library. They just needed introducing to one another.</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/effects.jpg" width="450" height="376" alt="effects.jpg"/><br /><span class="caption">Text shadows, drop shadows, and round corners in Safari 3</span></p>
<h4>A historical precedent</h4>
<p>The concept of tricking the Validator to pass CSS that is incorrectly implemented or proprietary and not part of the W3C spec is not new. Many web developers have found it necessary to employ various hacks in their CSS to accommodate differences in the way browsers interpret the rules. Others have used proprietary code to overcome limitations or quirks in the way some browsers handle certain content. For example, the following in your document head could be used to fix IE6's lack of handling for transparent PNGs and mis-handling of the box model, floats, overflow, <a href="http://www.bioneural.net/2008/02/01/ie6-italics-and-overflow-issues/">italics</a>, etc.:</p>
<pre><code>&lt;!--[if lte IE 6]&gt;
	&lt;style type="text/css"&gt;
	#pnglogo {filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',src='../logo-trans.png'); padding-top: 57px; }
	&lt;/style&gt;
	&lt;link rel="stylesheet" type="text/css" media="screen" href="../ie6-patches.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<p>It's a hack: there's no other term for it. In the above example we're using proprietary conditional comments and filters to fix proprietary cock-ups. Seems fair, doesn't it?</p>
<p>So, if we can hack our way to supporting inferior or out-dated browsers, why should we not also employ hacks to support leading-edge browsers like Safari 3 that are already capable of rendering much of that draft CSS3 goodness? </p>
<h4>Using jQuery's CSS injector</h4>
<p>There are probably multiple JavaScripts that let you load CSS via the <a href="http://www.w3.org/DOM/" rel="external">DOM</a>, but since I'm using jQuery anyway that's how I've chosen to do it. If you don't have jQuery installed go <a href="http://docs.jquery.com/Downloading_jQuery" rel="external">get</a> it and load it in your document head e.g.:</p>
<pre><code>&lt;script type="text/javascript" src="../jquery-1.2.3.pack.js"&gt;&lt;/script&gt;</code></pre>
<p>Below this we create a <code>$(document).ready()</code> <a href="http://docs.jquery.com/Events/ready#fn" rel="external">function</a> so that the contents load via the DOM and hopefully before the page content is displayed. Inside this function our "content" consists of a series of CSS <a href="http://docs.jquery.com/Selectors" rel="external">selectors</a> (inside the first bracket) paired with the CSS properties we wish to inject (name and value, comma-separated) joined via <a href="http://docs.jquery.com/CSS/css#namevalue" rel="external">.css</a>. Example:</p>
<pre><code>&lt;!-- Have jQuery inject WebKit CSS via DOM on selected elements --&gt;
&lt;script type="text/javascript"&gt;
	$(document).ready(function(){
	$("h1").css("text-shadow","black 0.2em 0.3em 0.2em");
	$(".description").css("text-shadow","black 0.2em 0.3em 0.2em");
	$("#page").css("-webkit-box-shadow","#333 0px 5px 10px");
	$("#footer").css("-webkit-box-shadow","#333 0px 5px 10px");
	$(".container").css("-webkit-box-shadow","#333 0px 5px 10px");
	$(".container").css("-webkit-border-radius","10px");
});
&lt;/script&gt;</code></pre>
<p>If you had a div with the class "container koru", for <a href="http://www.bioneural.net/category/project-koru/">example</a>, Safari 3 will blend the above box-shadow and border-radius styling (as inline CSS3) with any additional CSS2.1 styling for .container or .koru present in your stylesheet. You can see what's going on using that browser's <a href="http://webkit.org/blog/122/webkit-3-10-new-things/" rel="external">Web Inspector</a>:</p>
<p><img src='http://www.bioneural.net/wp-content/uploads/2008/02/s3-inspector.jpg' alt='web-inspector' /></p>
<p class="info"><em>Note</em>: A -webkit- or -moz- prefix on CSS properties is used respectively by the Safari and Mozilla/Firefox browsers to indicate tentative support for as yet non-ratified web standards. Thus <code>-webkit-border-radius: 10px;</code> and <code>-moz-border-radius: 10px;</code> are both potentially differing implementations of "<a href="http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-border-radius" rel="external">border-radius</a>".</p>
<p>OK, so the "how" is easy. Now the "Should you?"</p>
<h4>The positives</h4>
<p class="for">Effects are rendered without requiring images.</p>
<p class="for">Effects are rendered without requiring add-on JavaScript effects libraries.</p>
<p class="for">Effects are rendered without increasing page size or load time.</p>
<p class="for">Effects are rendered that may be impossible with some JavaScript or image-based techniques (e.g. anti-aliasing, liquid layout support).</p>
<p class="for">Effects can be targeted at specific web browser engines.</p>
<p class="for">No changes to semantic mark-up are required.</p>
<p class="for">Your stylesheets remain W3C-valid (if they were before!).</p>
<p class="for">Browsers simply ignore CSS properties they don't understand, so degradation is graceful.</p>
<p class="for">If JavaScript is disabled browsers will still load your stylesheets, so degradation is graceful.</p>
<p class="for">It is compatible with template-based websites in not requiring page-specific effects scripts to be inserted into mark-up.</p>
<p class="for">When the -webkit- or -moz- prefix gives way to the real deal of W3C-ratified CSS3 we can simply remove the script and move the content to our stylesheet without having to re-design effects elements or edit any mark-up.</p>
<p class="for">If you don't start using CSS3 now you might have retired before it becomes W3C-ratified.</p>
<h4>The negatives</h4>
<p class="against">Turning off your stylesheet does not disable styling loaded via the DOM.</p>
<p class="against">Effects can be targeted at specific web browser engines (like browser-targeting, a double-edged sword that undermines the uniformity of the "web experience").</p>
<p class="against">It could be construed as cheating. It is.</p>
<p>What are your views, if you have any, on the merits or otherwise of this technique?</p>
<img src="http://www.bioneural.net/ff309e51/26673f11/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F14%2Fhow-to-safely-inject-css3-using-jquery%2F&amp;seed_title=How+to+safely+inject+CSS3+using+jQuery/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Corners, gradients and shadows with jQuery</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F13%2Fcorners-gradients-and-shadows-with-jquery%2F&amp;seed_title=Corners%2C+gradients+and+shadows+with+jQuery</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F13%2Fcorners-gradients-and-shadows-with-jquery%2F&amp;seed_title=Corners%2C+gradients+and+shadows+with+jQuery#comments</comments>
		<pubDate>Wed, 13 Feb 2008 15:36:40 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[webdev]]></category>

		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/02/13/corners-gradients-and-shadows-with-jquery/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">bioneural.net</a>:</p><p>Previously we <a href="http://www.bioneural.net/2008/01/06/from-protoaculous-to-jquery/">looked</a> at moving to jQuery, and then at the best way to do corners and gradients using a variety of <a href="http://www.bioneural.net/2008/02/06/the-best-way-to-do-corners-and-gradients/">techniques</a> (Part 1). In this follow-on article (Part 2) I want to share how jQuery can be extended for similar cornering, gradient, and drop shadow visual effects. Although my JavaScript ability is not much beyond "cut and paste" the idea here is to share how easy it is to create these effects for other folk possessed by similar (in)ability.<br />
<span id="more-826"></span></p>
<h4>Situation recap</h4>
<p>In <a href="http://www.bioneural.net/2008/02/06/the-best-way-to-do-corners-and-gradients/">Part 1</a> we explored various ways to make rounded corners, comprising one or more of JavaScript, CSS, Flash, and SVG. Ditto for drop shadows. Implementing a gradient was restricted to the use of background (or inline) images, or to SVG. There are a few more tricks we might try for gradients:</p>
<ul>
<li>We could load a transparent PNG as a CSS background and vary the fill colour on the container to allow for a multitude of colour-graduated boxes without further image editing (see this ALA <a href="http://www.alistapart.com/articles/supereasyblendys" rel="external">article</a>);</li>
<li>Unfortunately the CSS 3 draft as of this writing doesn't include background gradients, but you might be able to fake it using <a href="http://www.css3.info/preview/colored-border/" rel="external">border-color</a>;</li>
<li>We could use JavaScript effects libraries.</li>
</ul>
<p>It turns out we can use JavaScript to create our corners and drop shadows too. There's also a <a href="http://blue-anvil.com/archives/anti-aliased-rounded-corners-with-jquery" rel="external">plugin</a> for using <a href="http://www.curvycorners.net/" rel="external">curvyCorners</a> with jQuery that more than halves the standalone curvyCorners code size.</p>
<h4>Extending jQuery</h4>
<p>While there are some basic <a href="http://docs.jquery.com/Effects" rel="external">effects</a> (hide, toggle, slide, etc.) and manipulation options in the jQuery core API, jQuery <a href="http://ui.jquery.com/" rel="external">UI</a> is a bolt-on library of interactive controls that deal with mouse interaction (e.g. resizing, dragging) and other "user interface" extensions. As of this writing the jQuery documentation is incomplete and the developers in the process of transitioning visual effects formerly included in jQuery UI to a new sister library called jQuery <a href="http://ui.jquery.com/enchant/" rel="external">Enchant</a>. The controls (also referred to as core interaction plugins, UI widgets, or components) are themselves are almost invariably dependent on other jQuery extensions&mdash;needing at least the <a href="http://jquery.com/plugins/project/dimensions" rel="external">Dimensions</a> plugin.</p>
<p>So jQuery needs to get its act together in respect of naming conventions, but perhaps this is more indicative of active development rather than lack of direction? I guess jQuery UI/ Enchant are to jQuery as <a href="http://script.aculo.us/" rel="external">script.aculo.us</a> is to <a href="http://prototypejs.org/" rel="external">Prototype</a>. In a nutshell we're saying that with some jQuery code that in turn requires a bit more extra code in order to work, in addition to the code that is "jQuery" itself&mdash;we can create visual elements like drop shadows! jQuery is thus readily extendible; to use these extra bits of code you just need to load the relevant add-on script in your document head, after having loaded jQuery itself. A picture may help:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/jquery.jpg" width="383" height="326" alt="jquery.jpg" /></p>
<h4>Test cases</h4>
<p>I've used the same basic test box from Part 1, so our core document structure looks like this:</p>
<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;title&gt;jQuery test cases&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
&lt;script type="text/javascript" src="jquery-1.2.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.dimensions.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.corner.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.gradient.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="fx.shadow.js"&gt;&lt;/script&gt;
&lt;style type="text/css"&gt;
	...
&lt;/style&gt;
&lt;script type="text/javascript"&gt;
// &lt;![CDATA[
	$(document).ready(function() {
	...
	});
// ]]&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class="className"&gt;
	&lt;h4&gt;Lorem ipsum&lt;/h4&gt;
	&lt;p&gt;Lorem ipsum dolor...&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
<p>With all the necessary libraries loaded we can start adding effects to our div by calling them within <code>$(document).ready()</code> (in place of ... above).</p>
<p class="download">Download the test files <a href="http://www.bioneural.net/docs/jquery-tests.zip">here</a> (.zip archive, 27KB).</p>
<p class="link">Here is the <a href="http://www.bioneural.net/wp-content/uploads/2008/02/jquery-tests/jquery-test.html">live</a> link.</p>
<h4>Case 1: Round corners</h4>
<p>If you wanted to use fancy images to produce round corners yet avoid extra mark-up, you could use <a href="http://15daysofjquery.com/wrap-it-up-pretty-corners/13/" rel="external">this</a> technique. Alternatively use no images at all via the jQuery corner plugin, available <a href="http://jqueryjs.googlecode.com/svn/trunk/plugins/corner/jquery.corner.js" rel="external">here</a>. The plugin supports a variety of corner types and borders as you can see in the <a href="http://malsup.com/jquery/corner/" rel="external">demos</a>. The following call will add cornering with a radius of 20px to a div with the class .cornered:</p>
<pre><code>$('div.cornered').corner("20px");</code></pre>
<p>This will have the following effect on our test box:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/rounded.jpg" width="265" height="346" alt="rounded.jpg" /></p>
<h4>Case 2: Gradients</h4>
<p>The Element gradient plugin, available <a href="http://plugins.jquery.com/project/elementgradient" rel="external">here</a>, will fill an element (e.g. div) with a linear gradient of specified direction (horizontal or vertical only) and opacity. It requires the <a href="http://plugins.jquery.com/project/dimensions/" rel="external">Dimensions</a> plugin. The following call will add a vertical gradient from black to white with 40% opacity to a div with the class .gradient:</p>
<pre><code>$('div.gradient').gradient({ topcolor: '#000000', bottomcolor: '#ffffff', horizontal: false, opacity: 40 });
</code></pre>
<p>This will have the following effect on our test box:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/gradient.jpg" width="262" height="344" alt="gradient.jpg" /></p>
<p>Note that you can't shorten the hex-code (it must be #ffffff not #fff for white, for example).</p>
<p class="info"><em>Tip</em>: If you leave the gradient as black to white with some opacity you can create colour gradients much more easily but changing only the background colour of the container. This is a jQuery version of the ALA super-easy blendy backgrounds <a href="http://www.alistapart.com/articles/supereasyblendys" rel="external">trick</a>.</p>
<h4>Case 3: Borders</h4>
<p>Back to the jQuery corner plugin; it can also do borders using nested elements i.e. one rounded box inside another. So our mark-up could be edited thus:</p>
<pre><code>&lt;div class="xtra"&gt;
&lt;div class="border"&gt;
	&lt;h4&gt;Lorem ipsum&lt;/h4&gt;
	&lt;p&gt;Lorem ipsum dolor...&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</code></pre>
<p>But we don't want to edit our mark-up do we? We don't have to.</p>
<p class="info"><em>Tip</em>: We can make use of <a href="http://docs.jquery.com/Manipulation/wrap#html" rel="external">.wrap()</a> to inject the extra container into our mark-up on-the-fly with JavaScript.</p>
<p>The following calls will add a wrapper div with the class .xtra to our box, then proceed to round our inner box (.border) with a radius of 15px, before padding .xtra with 5px of "border" (whitened with CSS on .xtra) and rounding with a 20px radius:</p>
<pre><code>$('div.border').wrap("&lt;div class='xtra'&gt;&lt;/div&gt;");
$('div.border').corner("15px").parent().css('padding', '5px').corner("20px");</code></pre>
<p>This will have the following effect on our test box:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/border.jpg" width="274" height="356" alt="border.jpg" /></p>
<h4>Case 4: Drop shadows</h4>
<p>In researching this article I came across three ways to create drop shadows using jQuery:</p>
<ul>
<li><a href="http://edgarverle.com/shadow/default.cfm" rel="external">Shadow</a> is an extension that uses tables with multiple rows subject to CSS styling including varying opacity to create a drop shadow illusion;</li>
<li>A <a href="http://15daysofjquery.com/wrap-it-up-lazy-mans-html-generation-with-jquery/10/" rel="external">method</a> that uses images and "onion skin" CSS added via <a href="http://docs.jquery.com/Manipulation/wrap#html" rel="external">.wrap()</a> to add a drop shadow;</li>
<li>UI/Shadow.</li>
</ul>
<p><a href="http://docs.jquery.com/UI/Shadow" rel="external">UI/Shadow</a>, available to download <a href="http://dev.jquery.com/view/trunk/fx/fx.shadow.js" rel="external">here</a>, is being folded into the yet-to-be-released jQuery Enchant library. It wraps your element in nested divs and uses opacity to create the shadow effect. It also requires the <a href="http://plugins.jquery.com/project/dimensions/" rel="external">Dimensions</a> plugin. The following call will add a drop shadow to a div with the class . dropshadow:</p>
<pre><code>$('div.dropshadow').shadow({ color: "#444", offset: 5, opacity: 0.2 });</code></pre>
<p>This will have the following effect on our test box:</p>
<p><img src="http://www.bioneural.net/wp-content/uploads/2008/02/dropshadow.jpg" width="269" height="350" alt="dropshadow.jpg" /></p>
<h4>Combining effects and liquid layouts</h4>
<p>As you can see while the effects in cases 1&ndash;4 work well enough on their own, they sadly don't play together very well (<a href="http://www.bioneural.net/wp-content/uploads/2008/02/jquery-tests/jquery-test.html">see</a> Case 5). Whether this is a limitation in one or more of the plugins, or in my scripting know-how I'm not sure.</p>
<p>It is possible to create a rounded box with a border that adjusts to change in text size or window width, but using an image to render the gradient (<a href="http://www.bioneural.net/wp-content/uploads/2008/02/jquery-tests/jquery-test.html">see</a> Case 6). Because the Dimensions plugin employs absolute positioning, effects that use it (gradients, drop shadows) will "detach" from their elements if you try resizing your browser window or changing text size (see the effect on cases 2, 4, and 5).</p>
<h4>The final score</h4>
<p>To be fair I guess we should use the same scoring system to evaluate jQuery against the other methods we explored in <a href="http://www.bioneural.net/2008/02/06/the-best-way-to-do-corners-and-gradients/">Part 1</a>.</p>
<p><strong>Scoresheet:</strong></p>
<p class="for"><em>Photo background</em>: Supported.</p>
<p class="for"><em>Gradient background</em>: Supported (as image or scripted).</p>
<p class="for"><em>Four rounded corners</em>: Yes.</p>
<p class="for"><em>Border</em>: Yes (without extra mark-up).</p>
<p class="for"><em>Drop shadow</em>: Yes (without images).</p>
<p class="for"><em>Minimal mark-up</em>: Extra containers in mark-up can be avoided with <code>.wrap()</code>.</p>
<p class="against"><em>Static mark-up</em>: Mark-up edited to insert box-specific script.</p>
<p class="for"><em>W3C validity</em>: Yes.</p>
<p class="against"><em>Anti-aliasing</em>: No.</p>
<p class="against"><em>Small footprint</em>: 29KB for jQuery plus 19KB for add-on libraries (background images additional). Of course if you're already using jQuery you need only consider the additional size of any add-ons (e.g. shadows for 6KB).</p>
<p class="for"><em>Graceful degradation</em>: Renders as per the master if JavaScript disabled but liquid layouts may cause problems if width is set on containers added with <code>.wrap()</code>.</p>
<p class="for"><em>Liquidity</em>: Yes, with the proviso that you avoid Dimensions-reliant effects.</p>
<p>Score: 9/12 (probably less, because of problems combining effects)</p>
<p>Not enough to de-throne CSS 3 which <a href="http://www.bioneural.net/2008/02/06/the-best-way-to-do-corners-and-gradients/">scored</a> 11/12, or 12/12 if it were a standard. But CSS 3 isn't here yet and won't be widely supported by all major browsers for some time. jQuery is here, however, and JavaScript is widely supported. </p>
<p>Upon reflection there's something to be said for the elegant simplicity and refined geometry of straight lines and sharp corners. This is how the Dwarves would choose to build websites, leaving curves and soft edges to the Elves. So the ultimate question, really, is do you relate more to Gimli or Legolas? Your answer to that, Middle-earthlings, will decide the direction you should take ;-)</p>
<img src="http://www.bioneural.net/ff309e51/26673f11/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F13%2Fcorners-gradients-and-shadows-with-jquery%2F&amp;seed_title=Corners%2C+gradients+and+shadows+with+jQuery/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 2.820 seconds -->
