<?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>Marcus Povey &#187; objects</title>
	<atom:link href="http://www.marcus-povey.co.uk/tag/objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marcus-povey.co.uk</link>
	<description>Making the world a better place, one byte at a time...</description>
	<lastBuildDate>Mon, 06 Feb 2012 19:13:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<atom:link rel='hub' href='http://www.marcus-povey.co.uk/?pushpress=hub'/>
		<item>
		<title>Geocoding Elgg entities</title>
		<link>http://www.marcus-povey.co.uk/2009/08/28/geocoding-elgg-entities/</link>
		<comments>http://www.marcus-povey.co.uk/2009/08/28/geocoding-elgg-entities/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 14:23:24 +0000</pubDate>
		<dc:creator>Marcus Povey</dc:creator>
				<category><![CDATA[elgg]]></category>
		<category><![CDATA[#ue]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[georss]]></category>
		<category><![CDATA[objects]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.marcus-povey.co.uk/?p=280</guid>
		<description><![CDATA[Geotagging and GeoRSS support has been available in Elgg for a little while now, but like so many cool features of the platform, I haven&#8217;t really had the time to draw people&#8217;s attention to it. Although I am drawing your attention to it now, it should be noted that this is still somewhat under development! [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://georss.org/Main_Page"><img src="http://www.marcus-povey.co.uk/wp-content/georss_logo.png" alt="" align="right" /></a>Geotagging and <a href="http://georss.org/Main_Page">GeoRSS</a> support has been available in Elgg for a little while now, but like so many cool features of the platform, I haven&#8217;t really had the time to draw people&#8217;s attention to it.</p>
<p>Although I am drawing your attention to it now, it should be noted that this is still somewhat under development!</p>
<h2>Anatomy of a geocoder</h2>
<p>To begin geocoding your data you will need a geocoder. This is not something that Elgg comes installed with by default, <a href="http://community.elgg.org/pg/plugins/marcus/read/107702/google-maps-geocoder">although here&#8217;s one I coded earlier</a>.</p>
<p>This geocoder users the <a href="http://code.google.com/apis/maps/">Google maps API</a> to do the actual encoding, and provides two primary features.</p>
<ul>
<li>It handles the plugin hook &#8220;geocode&#8221;,&#8221;location&#8221;</li>
<li>It listens to all create events and attempts to tag it with the latitude and longitude &#8211; either from a -&gt;location metadata on the object itself, or from the user&#8217;s current -&gt;location &#8211; you could get more creative, this is a simple example.</li>
</ul>
<p>When you attempt to geocode a location you call the function <a href="http://reference.elgg.org/location_8php.html#3dfde0e2643efcff5feee626e098a368">elgg_geocode_location()</a>. This in turn triggers the above plugin hook and attempts to encode the data.</p>
<p>For efficiency once a location has been geocoded the result is cached. Future attempts to code the same location will return the result from the cache.</p>
<p>Once installed and configured, new content (wire posts etc) will be tagged with a latitude and longitude. Fill in your profile location field and try it out for yourself!</p>
<h2>Location based searches</h2>
<p>Once things are tagged with a location, you can start to use location as a starting point for searching by using some of the <a href="http://reference.elgg.org/location_8php-source.html">location aware search functions in location.php</a>.</p>
<p>This hasn&#8217;t currently been hooked up to the Elgg interface in any way, but that doesn&#8217;t stop you making use of it in your plugins.</p>
<h2>GeoRSS</h2>
<p>This is something you&#8217;ll be pleased to know that you get for free!</p>
<p>As you list your entities using the <a href="http://docs.elgg.org/wiki/Views#Listing_entities">Elgg listing tools</a> using the RSS view, if an entity has a position defined it will be included using standard geoRSS simple notation, i.e:</p>
<blockquote><p><code>&lt;georss:point&gt; 45.256 -71.92 &lt;/georss:point&gt;</code></p></blockquote>
<p>Happy coding!</p>
<div class="wsbuttons">
	<div class="shareblob facebook">
		<div class="fb-like" data-href="http://www.marcus-povey.co.uk/2009/08/28/geocoding-elgg-entities/" data-send="false" data-layout="box_count" data-width="60" data-show-faces="false" data-colorscheme="light"></div>
	</div>

	<div class="shareblob google">
		<div class="g-plusone" data-size="tall" data-href="http://www.marcus-povey.co.uk/2009/08/28/geocoding-elgg-entities/"></div>
	</div>

	<div class="shareblob twitter">
		<div class="twitter">
			<a href="https://twitter.com/share?url=http%3A%2F%2Fwww.marcus-povey.co.uk%2F2009%2F08%2F28%2Fgeocoding-elgg-entities%2F&count=vertical" class="twitter-share-button" data-lang="en">Tweet</a>
			<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
		</div>
	</div>

</div>
	]]></content:encoded>
			<wfw:commentRss>http://www.marcus-povey.co.uk/2009/08/28/geocoding-elgg-entities/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Elgg 1 object model</title>
		<link>http://www.marcus-povey.co.uk/2008/04/08/elgg-1-object-model/</link>
		<comments>http://www.marcus-povey.co.uk/2008/04/08/elgg-1-object-model/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 10:56:09 +0000</pubDate>
		<dc:creator>Marcus Povey</dc:creator>
				<category><![CDATA[elgg]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[#ue]]></category>
		<category><![CDATA[objects]]></category>

		<guid isPermaLink="false">http://www.marcus-povey.co.uk/2008/04/08/elgg-1-object-model/</guid>
		<description><![CDATA[Elgg 1 introduces some important changes under the hood, perhaps the most important of these has got to be the new object model. In a nutshell, Elgg 1&#8242;s object model is a simplification of what we&#8217;ve done with Elgg 0.x (from now on called Elgg classic), reducing things to their essential components. In Elgg 1 [...]]]></description>
			<content:encoded><![CDATA[<p>Elgg 1 introduces some important changes under the hood, perhaps the most important of these has got to be the new object model.</p>
<p>In a nutshell, Elgg 1&#8242;s object model is a simplification of what we&#8217;ve done with Elgg 0.x (from now on called Elgg classic), reducing things to their essential components.</p>
<p>In Elgg 1 you have at the highest level three things:</p>
<ul>
<li><strong>Entities</strong>: Things in the system; users, blog posts, etc&#8230;</li>
<li><strong>Metadata</strong>: Information about an Entity (called Extenders in Elgg 1).</li>
<li><strong>Relationships</strong>: Define how one object is related to another.</li>
</ul>
<p>Conceptually this is very clean but also very flexible. Because entities, relationships and metadata have a consistent interface we can do some very cute things.</p>
<p>One thing in particular &#8211; arbitrary mixed type feeds &#8211; which were pretty much impossible in Elgg classic now become very easy indeed.</p>
<p>Don&#8217;t know what I mean? Well, suppose you were looking for Blog posts tagged with &#8220;Firefly&#8221;, in Elgg classic you could have these listed out in a feed.</p>
<p>Fine.</p>
<p>But suppose you wanted to show videos or music tagged with &#8220;Firefly&#8221; on the same page? What if you want to write a plugin that displays flash games or store files on S3 and want them to show up in the same stream?</p>
<p>All very easy now. Cute eh?</p>
<p>The above is a rather simplistic example of what is possible. I have <a href="http://www.marcus-povey.co.uk/2008/03/27/import-and-export-in-elgg-10/">hinted</a> at some other applications a few posts back&#8230;</p>
<div class="wsbuttons">
	<div class="shareblob facebook">
		<div class="fb-like" data-href="http://www.marcus-povey.co.uk/2008/04/08/elgg-1-object-model/" data-send="false" data-layout="box_count" data-width="60" data-show-faces="false" data-colorscheme="light"></div>
	</div>

	<div class="shareblob google">
		<div class="g-plusone" data-size="tall" data-href="http://www.marcus-povey.co.uk/2008/04/08/elgg-1-object-model/"></div>
	</div>

	<div class="shareblob twitter">
		<div class="twitter">
			<a href="https://twitter.com/share?url=http%3A%2F%2Fwww.marcus-povey.co.uk%2F2008%2F04%2F08%2Felgg-1-object-model%2F&count=vertical" class="twitter-share-button" data-lang="en">Tweet</a>
			<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
		</div>
	</div>

</div>
	]]></content:encoded>
			<wfw:commentRss>http://www.marcus-povey.co.uk/2008/04/08/elgg-1-object-model/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

