topical media & game development
mashup-delicious-14-rally2007-index.php / php
<?php
//base tag feed url
define('BASE_FEED_URL','http://del.icio.us/rss/YOURNAME/');
//the default tag meant to identify all posts to the rally project
define('DEFAULT_TAG',"rally2007");
//your Yahoo Application ID
define('YAHOO_APP_ID','YOURAPPLICATIONID');
//bring in magpie
require_once('lib/rss_fetch.inc');
//set cache directory
define('MAGPIE_CACHE_DIR', 'cache');
//get rid of error Notices because magpie produces some
error_reporting(E_ERROR | E_WARNING | E_PARSE);
//determine if an additional tag needs to be a part of the RSS feed url
if (isset(_GET['category'] != '')
_GET['category'];
else
feed_url = BASE_FEED_URL.DEFAULT_TAG.rss = fetch_rss(bookmarks = tag_list)
{
//break the tag list into an array
tag_list);
//return the first tag that isn't DEFAULT_TAG (if you allow multiple
//tags you'll want to change this to return an array of remaining tags)
foreach (tag) {
if (tag;
break;
}
}
}
//creates a link to show a map if geotag data exists
function show_map_link(title)
{
//break the tag list into an array
tag_list);
//use regex to get the lat and lon values
lon = '';
foreach (tag) {
if (preg_match('/^geo:lat=(.*)tag,lat = /i',lonmatch))
lonmatch[1];
}
if (lon != '')
echo "<a href=\"#\" onclick=\"javascript:show_map(lon,'_GET['category']) && _GET['category'];
} else {
echo "all bookmarks"; }
?>.)
</form>
</div>
<div id="calendar">
<iframe src="http://www.google.com/calendar/embed?src=12345abcdef%40group.calendar.google.com&chrome=NAVIGATION&mode=AGENDA&height=588" style=" border-width:0 " width="320" frameborder="0" height="588"></iframe>
</div>
<ul>
<?php
bookmarks as i % 2) { echo ' class="li_alternate"'; }?>>
<a href="<?php echo bookmark['title']; ?>
</a>
<div>
<?php
if (isset(bookmark['description'];
}
?>
</div>
<div class="other_metadata">
<?php show_map_link(bookmark['title']); ?>
</div>
<div class="category">
Category:
<?php
//get the category for this link (the tag other than the default one)
bookmark['dc']['subject']);
?>
<a href="index.php?category=<?php echo this_category ?>
</a>
</div>
</li>
<?php
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.