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

<channel>
	<title>bioneural.net &#187; php</title>
	<atom:link href="http://www.bioneural.net/tag/php/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>
	<lastBuildDate>Sat, 13 Mar 2010 15:49:45 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<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>Share Twitter locations using Google Maps</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F03%2F15%2Fshare-twitter-locations-using-google-maps%2F&amp;seed_title=Share+Twitter+locations+using+Google+Maps</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F03%2F15%2Fshare-twitter-locations-using-google-maps%2F&amp;seed_title=Share+Twitter+locations+using+Google+Maps#comments</comments>
		<pubDate>Sun, 15 Mar 2009 13:44:25 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=1469</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. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> With my tweets integrated into WordPress the next challenge was to integrate my Twitter location with my custom Google Map. This recipe uses a WordPress theme functions.php file and the excellent Geo Mashup plug-in for WordPress. One advantage of this method is that you don't need to add custom location tags to each tweet (as you do for example here using Pipes). This method simply reads the location as set in your Twitter profile until you change it (and tweet again).


The code given here tested on Geo Mashup 1.1.3 and WordPress 2.7.1.

Setting your location in Twitter

You can manually update the text of your Twitter profile location on the web via Settings &#62; Account &#62; Location, but an easier way to do this is via a location-aware client such as Tweetie or Twitterrific for iPhone, either of which can optionally update your profile location in conjunction with a tweet:



Alternatively if you want to update your location without tweeting use a client such as Sparrow for iPhone (which will simultaneously update Fire Eagle to the same location):



Note, however, that the following code extracts your location from the Twitter user timeline so you do need to tweet before this method will reflect your new location.

You should be aware of the potential privacy issues around real-time location sharing via services such as Twitter, Yahoo!'s Fire Eagle, and Google's Latitude. Best to keep your location approximate if you publish it at all.

A function to get your location from Twitter

Create the following function in the functions.php ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F03%2F15%2Fshare-twitter-locations-using-google-maps%2F&amp;seed_title=Share+Twitter+locations+using+Google+Maps/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Latest tweets using SimplePie</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F03%2F09%2Flatest-tweets-using-simplepie%2F&amp;seed_title=Latest+tweets+using+SimplePie</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F03%2F09%2Flatest-tweets-using-simplepie%2F&amp;seed_title=Latest+tweets+using+SimplePie#comments</comments>
		<pubDate>Mon, 09 Mar 2009 01:17:14 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[simplepie]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=1457</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. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> It's taken me a while to warm to Twitter. I created the Quicklinks category on my blog for sharing things that didn't warrant a full post, but even that's too much effort sometimes&#8212;especially if it's just sharing a link. You might argue that's what bookmarking services like Digg and Delicious are for, but even then it's a multistep process. I've only recently become aware of just how well suited the Twitter API is to sharing links or updating your status message to multiple services with minimal effort. This post shares some PHP code to integrate your tweets within your WordPress blog, and code to simplify getting your WordPress posts into other people's tweets.


The interconnectedness of tweeting

A few examples:


	I use the Twitter updater plug-in to notify Twitter of new posts on my WordPress blog.
	Darkslide on my iPhone can post a Flickr image link via the iPhone Twitterrific app. 
	Most of my links are discovered in my preferred RSS reader NetNewsWire, which can send these to desktop Twitterrific (News menu).
	The Twitter app for Facebook will update your Facebook status using your tweets.
	Twitter offer an RSS feed which can be used in conjunction with the SimplePie PHP library to bring tweets to your WordPress blog.


This last example is the focus of this post. I will assume that you have already downloaded and correctly installed SimplePie for WordPress from here.

A SimplePie template for Twitter

Create a text file called tweets.tmpl containing the following:



	{IF_ERROR_BEGIN}{ERROR_MESSAGE}{IF_ERROR_END}
		{ITEM_LOOP_BEGIN}
		{ITEM_DATE_UTC}{ITEM_DESCRIPTION}#
		{ITEM_LOOP_END}



Upload this file to the following directory on your server:

/wp-content/plugins/simplepie-plugin-for-wordpress/templates/

Now for a little ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F03%2F09%2Flatest-tweets-using-simplepie%2F&amp;seed_title=Latest+tweets+using+SimplePie/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>CDFinder update will please geotaggers</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F01%2F05%2Fcdfinder-update-will-please-geotaggers%2F&amp;seed_title=CDFinder+update+will+please+geotaggers</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F01%2F05%2Fcdfinder-update-will-please-geotaggers%2F&amp;seed_title=CDFinder+update+will+please+geotaggers#comments</comments>
		<pubDate>Mon, 05 Jan 2009 18:30:22 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=1356</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. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> I previously reviewed CDFinder, an asset manager that specialises in metadata, and looked at its potential role in the Mac geotagging workflow. The freshly-squeezed version 5.5 brings a few bug fixes, general enhancements, and of particular personal interest improved support for GPS-related functions. This post considers finding geotagged images, integration with other mapping services, integration with other geo-aware applications (via contextual menu modules), copying GPS locations, displaying KMZ files on your Google Map mash-up, and finding nearby images via your website.


Finding geotagged images

One option is to use the new GeoFinder. Click your way around the map, acquire a position from Google Earth, choose from a pre-set location or add a custom location to discover images within a custom radius of your starting point:



Alternatively right-click any geotagged image (automatically badged with the Geotag Icon) for access to other images in your catalogue based on common IPTC header information or EXIF data:



Integration with other mapping services

CDFinder allows you to view the location of the current image using Google Earth or a good number of online mapping services (Flickr, Panoramio, MapQuest, Google Maps, SmugMug, WikiMapia, Woophy, OpenStreetMap, Geody, and Yahoo! Maps). You can also upload directly to Locr (account required):



Integration with other geo-aware applications

A number of Mac applications include contextual menu modules that let you access functionality by right-clicking an image in the Finder, for example. In the following screen capture the GPS-Info CMM and GraphicConverter modules are loaded:



In terms of workflow you might add Automator actions or batch-process geotagged images using GraphicConverter ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2009%2F01%2F05%2Fcdfinder-update-will-please-geotaggers%2F&amp;seed_title=CDFinder+update+will+please+geotaggers/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Geo Mashup implementation guide</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F09%2F21%2Fgeo-mashup-implementation-guide%2F&amp;seed_title=Geo+Mashup+implementation+guide</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F09%2F21%2Fgeo-mashup-implementation-guide%2F&amp;seed_title=Geo+Mashup+implementation+guide#comments</comments>
		<pubDate>Sun, 21 Sep 2008 23:06:46 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[routebuddy]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=1322</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. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> Geo Mashup is one of my favourite WordPress plug-ins (and no, that's not just because it adopted the Geotag Icon). It neatly integrates geographically-relevant blog posts with a custom Google Map displayed within your own site. The Maps API in turn allows those willing to dirty their hands with a little JavaScript the option to pull in geotagged content from external sources, including photos (e.g. from Flickr, Panoramio, Picasa Web Albums), content from other blogs (via GeoRSS feeds), and placemarks from Google Earth (uploaded KML/ KMZ files, even with network links). What follows is an implementation guide, sharing some usage tips and the code used on bioneural.net.


The code given here applies to Geo Mashup 1.1.1 and WordPress 2.6.2.

Geo Mashup 1.2 was released on 19.03.09. Some of the code here may require modification.

Installing the plugin

Download Geo Mashup here, expand the ZIP archive and upload the geo-mashup directory to /wp-content/plugins/ on your web server.

Log in to WordPress as Administrator and activate Geo Mashup from the Plugins tab. Once active there will be a new Geo Mashup tab under Settings, and you'll need to visit this to enter your Google Maps API key (if you don't yet have one, click the Get yours here link). Don't worry about the other options at this stage.



Creating a map page

The tag reference gives you the choice of two types of tag to use with Geo Mashup. Shortcode tags are added to posts or pages on a case-by-case basis. Template tags on the other hand involve adding ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F09%2F21%2Fgeo-mashup-implementation-guide%2F&amp;seed_title=Geo+Mashup+implementation+guide/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Gearing up for SSL to WordPress with Safari</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F09%2F17%2Fgearing-up-for-ssl-to-wordpress-with-safari%2F&amp;seed_title=Gearing+up+for+SSL+to+WordPress+with+Safari</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F09%2F17%2Fgearing-up-for-ssl-to-wordpress-with-safari%2F&amp;seed_title=Gearing+up+for+SSL+to+WordPress+with+Safari#comments</comments>
		<pubDate>Wed, 17 Sep 2008 10:19:01 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=1294</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. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> A friend brought an impending WordPress security exploit to my attention, in the form of a CookieMonster. Your data might be at risk if you administer your blog from a public Internet connection (e.g. WiFi in a caf&#233;). Securing your authentication cookies with Secure Sockets Layer (SSL) provides a defensive countermeasure for your admin loggins, and WordPress.com users now have a checkbox to "Always use HTTPS when visiting administration pages". That checkbox is absent in self-hosted WordPress 2.6.2, but here's how to enable HTTPS and accelerate your admin sessions using Google Gears via Safari.


Lock up all your cookies with a secret key

You may have already defined a SECRET_KEY to secure the cookies that store information about your visitors, a feature introduced in WordPress 2.5. If you didn't do this visit key generator 1.0 and copy the output into your wp-config.php file after the opening PHP tag, so it looks something like this (don't use this one):


 ]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F09%2F17%2Fgearing-up-for-ssl-to-wordpress-with-safari%2F&amp;seed_title=Gearing+up+for+SSL+to+WordPress+with+Safari/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Publicizing WordPress post revisions</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F08%2F04%2Fpublicizing-wordpress-post-revisions%2F&amp;seed_title=Publicizing+WordPress+post+revisions</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F08%2F04%2Fpublicizing-wordpress-post-revisions%2F&amp;seed_title=Publicizing+WordPress+post+revisions#comments</comments>
		<pubDate>Mon, 04 Aug 2008 09:26:22 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=1199</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. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> WordPress 2.6 introduced post revisions, a form of version control that allows you to review or revert to previous editions of a post or page on your WordPress blog. The value of this feature has generated some debate, largely because it's "on by default" with no easy toggle to disable it. The thing is notification of post revisions is private, within the admin interface. So how do you make the date of last editing public?


One of my pet hates is undated web content; if there's no date I'll often move on without reading the page content. Sometimes you can glean the date of first publication from a post permalink, as in this example (day and name, in Settings &#62; Permalinks):


http://www.bioneural.net/2008/08/02/first-track-logger-for-iphone-released/


There are two problems with relying on this method alone:


	Did you first publish on August 2 or February 8? There are different ways of interpreting dates;
	It's only the date of first publication, not the date the post was last revised.


Clarifying the date of publication

One option is to time stamp the publication date in your theme (as many WordPress themes do), which introduces a little more flexibility to deal with the first issue by specifying the name of the month to combat ambiguity:



A simple code snippet for this would be:


Published by  on 


Consult the Codex for options that allow you to customize the display of date and time formats in your theme.

Showing "last modified" dates

I've searched the Codex and the Forums for a means of getting the date of the last ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F08%2F04%2Fpublicizing-wordpress-post-revisions%2F&amp;seed_title=Publicizing+WordPress+post+revisions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<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. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> When I last looked at customizing feeds in WordPress, it was all to do with being able to offer a summary and full text feed simultaneously&#8212;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 functions.php file (which may already exist as part of your current theme).


Just as WordPress provides a number of hooks for adding or removing actions in your theme header (see here), 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.

As a perpetual PHP beginner I feel obliged to warn you that use of the following code is at your own risk.

If there are any PHP/ WordPress experts reading this who can improve on my code please make yourself known ;-)

Removing WP version info

Somewhere, a while back, I read a tip about not including the WordPress version you are running in your template header&#8212;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 K2 theme just delete the following line from header.php:


 From bioneural.net:Mac-based web developers...]]&gt;
		...
		http://creativecommons.org/licenses/by-nc-sa/2.5/
		


Rendered in a feed reader humans will see this:



The Creative Commons icon is hopefully recognisable and links to the correct license; the link to bioneural.net ...]]></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>
		<slash:comments>11</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Web developer widgets</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F11%2Fweb-developer-widgets%2F&amp;seed_title=Web+developer+widgets</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F04%2F11%2Fweb-developer-widgets%2F&amp;seed_title=Web+developer+widgets#comments</comments>
		<pubDate>Fri, 11 Apr 2008 21:42:29 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Quicklinks]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/?p=917</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. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> Mac-based web developers may yet find a use for Dashboard. SeeSS is a CSS property reference detailing inheritance, CSS compliance, Safari support, possible and default values, examples, plus an informative description [screenshot]. PHP Function Reference provides offline access to the PHP manual, a cheat sheet, and an interactive date formatter [screenshot].

 ]]></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%2F11%2Fweb-developer-widgets%2F&amp;seed_title=Web+developer+widgets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>bioneural.net site preference panel revisited</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F22%2Fbioneuralnet-site-preference-panel-revisited%2F&amp;seed_title=bioneural.net+site+preference+panel+revisited</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F22%2Fbioneuralnet-site-preference-panel-revisited%2F&amp;seed_title=bioneural.net+site+preference+panel+revisited#comments</comments>
		<pubDate>Tue, 22 Jan 2008 20:06:51 +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[php]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/01/22/bioneuralnet-site-preference-panel-revisited/</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. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> The first version of my site preference panel for WordPress needed lots of JavaScript for the toggle (Proto.aculo.us), more JavaScript to switch styles, and still more JavaScript to change text size. Version 2 still uses JavaScript for the toggle effect&#8212;but no additional load&#8212;since jQuery is already utilised by K2. The rest is accomplished using server-side PHP, and the revised 3-column panel layout makes use of more recent CSS know-how. I've tried to modularize the preferences panel as much as possible, but some simple template editing is still required (at 4 points). It is optimised for K2 (tested using RC3 and RC4) and although I haven't tested it with other themes (that's your job!) I don't see why it couldn't be used (*Some tweaking may be required. Batteries not included.)


Get the files

Let's get it done, then come back to the how and why if you're interested. Download the files to create your own preference panel as siteprefs.zip, available here. Expand the archive and upload the folder "siteprefs" into your K2 main directory:

/wp-content/themes/k2/siteprefs/

At this point you may also want to download and activate the Theme Switcher plugin if you plan on allowing your audience to change the WordPress theme they see on a per-user basis (storing their preference in a cookie). Support for the plugin is built into the preference panel (see features, below).

It's yours to play with and customise; all I ask is that you retain the little "i" icon with it's link back to these instructions. Feedback and suggestions for ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F22%2Fbioneuralnet-site-preference-panel-revisited%2F&amp;seed_title=bioneural.net+site+preference+panel+revisited/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Stop WordPress character replacements</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F18%2Fput-a-stop-to-wordpress-character-replacements%2F&amp;seed_title=Stop+WordPress+character+replacements</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F18%2Fput-a-stop-to-wordpress-character-replacements%2F&amp;seed_title=Stop+WordPress+character+replacements#comments</comments>
		<pubDate>Fri, 18 Jan 2008 17:08:06 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
				<category><![CDATA[Quicklinks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/01/18/put-a-stop-to-wordpress-character-replacements/</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. Please see bioneural.net for additional terms of use."><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="[CC]" /></a> From <a href="http://www.bioneural.net/" title="Please visit for full content">http://www.bioneural.net</a> doi:tSglPpAB7a8nfM : </p> Is WordPress altering your punctuation behind your back e.g. converting typewriter quotes (") to smart quotes (&#8220; &#38; &#8221;)? It's down to the on-by-default wptexturize function. You can disable this by adding the following to your theme's functions.php file: remove_filter('the_content', 'wptexturize'); (for posts) and remove_filter('comment_text', 'wptexturize'); (for comments). Or, use a plugin. ]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F18%2Fput-a-stop-to-wordpress-character-replacements%2F&amp;seed_title=Stop+WordPress+character+replacements/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
	</channel>
</rss>
