<?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>Christian Schneider &#187; Helper</title>
	<atom:link href="http://christian.is.blogorio.us/category/codeigniter/helper/feed/" rel="self" type="application/rss+xml" />
	<link>http://christian.is.blogorio.us</link>
	<description>Just another blogorio.us weblog</description>
	<lastBuildDate>Tue, 10 May 2011 08:04:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Image Map Area Helper</title>
		<link>http://christian.is.blogorio.us/2009/04/25/image-map-area-helper/</link>
		<comments>http://christian.is.blogorio.us/2009/04/25/image-map-area-helper/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 21:51:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Helper]]></category>

		<guid isPermaLink="false">http://christian.is.blogorio.us/?p=24</guid>
		<description><![CDATA[Today I need to have an area link within an imape map for a lot of links with in my CodeIgniter application. I can&#8217;t find a helper or function within the framework, so I wrote an area helper function:

&#60;?php
/**
* Image Map Area Link
*
* Creates an anchor based on the local URL.
*
* @access    public
* @param    string    [...]]]></description>
			<content:encoded><![CDATA[<p>Today I need to have an area link within an imape map for a lot of links with in my CodeIgniter application. I can&#8217;t find a helper or function within the framework, so I wrote an area helper function:</p>
<p><code><br />
&lt;?php<br />
/**<br />
* Image Map Area Link<br />
*<br />
* Creates an anchor based on the local URL.<br />
*<br />
* @access    public<br />
* @param    string    the URL<br />
* @param    string    the link title<br />
* @param    mixed    any attributes<br />
* @return    string<br />
*/<br />
if ( ! function_exists('area_anchor'))<br />
{<br />
function area_anchor( $uri = '', $title = '', $attributes = '')<br />
{<br />
$title = (string) $title;</p>
<p>if ( ! is_array($uri))<br />
{<br />
$site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri;<br />
}<br />
else<br />
{<br />
$site_url = site_url($uri);<br />
}</p>
<p>if ($title == '')<br />
{<br />
$title = $site_url;<br />
}</p>
<p>if ($attributes != '')<br />
{<br />
$attributes = _parse_attributes($attributes);<br />
}</p>
<p>return '&lt;area href="'.$site_url.'" title="'.$title.'"'.$attributes.'&gt;&lt;/area&gt;';<br />
}<br />
} //function</p>
<p>/* End of file area_helper.php */<br />
/* Location: ./application/helpers/area_helper.php */<br />
?&gt;<br />
</code></p>
<p>You can use it like this:<br />
<code>&lt;?php echo area_anchor( "/welcome", "Welcome", 'shape="poly" coords="153,78, 153,78, 154,78, 154,78, 154,78, 154,77, 155,77, 155,77, 155,77, 157,80, 158,81, 158,82, 158,83, 159,83, 160,84, 160,84, 161,84, 160,85, 160,86, 159,86, 159,86, 160,86, 160,86, 160,86, 160,87, 160,87, 159,87, 159,87, 156,86, 155,86, 155,85, 155,85, 155,85, 154,86, 154,86, 154,86, 154,87, 153,87, 153,86, 152,86, 152,86, 151,85, 150,85, 150,85, 150,86, 149,86, 149,86, 149,86, 149,86, 148,86, 148,86, 147,86, 147,86, 148,85, 148,85, 148,85, 148,85, 148,85, 148,84, 148,84, 148,84, 148,84, 149,83, 148,82, 148,82, 148,82, 148,80, 148,80, 149,80, 149,80, 149,80, 149,80, 149,80, 150,80, 150,80, 150,80, 150,80, 150,80, 149,79, 149,79, 149,79, 150,79, 152,79, 152,79, 152,79, 152,79, 153,79, 153,79, 153,78, 153,78, 153,78"'); ?&gt;</code></p>
<p>If you have any questions don&#8217;t hesitate to contact me.</p>
]]></content:encoded>
			<wfw:commentRss>http://christian.is.blogorio.us/2009/04/25/image-map-area-helper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

