<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michaelbox &#187; identica</title>
	<atom:link href="http://michaelbox.net/tag/identica/feed/" rel="self" type="application/rss+xml" />
	<link>http://michaelbox.net</link>
	<description>A container of ideas, creativity, passions, and adventures</description>
	<lastBuildDate>Fri, 11 May 2012 20:19:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Just a simple twitter/identica shortcode</title>
		<link>http://michaelbox.net/2010/04/22/just-a-simple-twitter-shortcode/</link>
		<comments>http://michaelbox.net/2010/04/22/just-a-simple-twitter-shortcode/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 23:01:17 +0000</pubDate>
		<dc:creator>tw2113</dc:creator>
				<category><![CDATA[Freedom]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Passions]]></category>
		<category><![CDATA[identica]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://michaelbox.net/?p=154</guid>
		<description><![CDATA[  I realized that I will likely reference many twitter people in posts and I think it is common courtesy to link to their profile so that you can go check them out if you want. However, I also want to be lazy and not have to type out their full twitter url all the [...]]]></description>
			<content:encoded><![CDATA[<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Just a simple twitter/identica shortcode on Michaelbox',url: 'http://michaelbox.net/2010/04/22/just-a-simple-twitter-shortcode/',contentID: 'post-154',suggestTags: 'identica,shortcode,twitter,wordpress',providerName: 'Michaelbox',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear"> </div>
</div><p>I realized that I will likely reference many twitter people in posts and I think it is common courtesy to link to their profile so that you can go check them out if you want. However, I also want to be lazy and not have to type out their full twitter url all the time. Thus I decided that a shortcode would be nice and efficient.</p>

<p>With the following code,

<code>
&lt;?php
function twitter_shortcode( $atts, $content = null ) {
   return '&lt;a href="http://twitter.com/' . $content . '" title="' . $content . '\'s Twitter Profile"&gt;' . $content . '&lt;/a&gt;';
}
add_shortcode('twitter', 'twitter_shortcode');
?&gt;
</code>

I can wrap a username in [twitter] [/twitter] and have it output the full link, like this <a href="http://twitter.com/" title="'s Twitter profile"> (Twitter)</a></p>

<h3>Edit</h3>
I have since realized that this is perfectly capable of working with identi.ca as well. For wordpress users of Identi.ca, copy/paste the following code into your functions.php file. It will work the exact same way regarding wrapping the user ID

<code>
&lt;?php
function identica_shortcode( $atts, $content = null ) {
   return '&lt;a href="http://identi.ca/' . $content . '" title="' . $content . '\'s Identi.ca Profile"&gt;' . $content . '&lt;/a&gt;';
}
add_shortcode('identica', 'identica_shortcode');
?&gt;
</code>
<p>Like so: <a href="http://identi.ca/" title="'s Identica profile"> (Identica)</a></p>]]></content:encoded>
			<wfw:commentRss>http://michaelbox.net/2010/04/22/just-a-simple-twitter-shortcode/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

