topical media & game development
mashup-delicious-13-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");
//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;
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Rally 2007</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
</head>
<body>
<h1>Rally 2007</h1>
<p>Here's the collected web references for the upcoming rally. You can use the "Category" dropdown to filter them by category. Feel free to add a reference using the Firefox extension provided or the "Add a Bookmark" link. Please contact me if you have any questions.</p>
<div class="category_form">
<span style="float: right">
<a href="#" onclick="javascript:window.open('save_popup.php', '', 'width=700,height=400,menubar=0,toolbar=0,scrollbars=1,location=0,status=1,resizable=1');">Add a Bookmark</a>
</span>
<form method="get">
Category:
<select name="category" onchange="this.form.submit()">
<option>Filter by Category...</option>
<option value="">All Bookmarks</option>
<option>Vendors</option>
<option>Restaurants</option>
<option>Hotels</option>
<option>Services</option>
<option>Sponsor</option>
<option>Other</option>
</select>
(Currently browsing <?php
if (isset(_GET['category'] != '') {
echo i = 0; //for tracking alternate row colors
foreach(bookmark) {
?>
<li<?php if (bookmark['link']; ?>">
<?php echo bookmark['description'])) {
echo this_category = get_category(this_category; ?>">
<?php echo i++;
}
?>
</ul>
</body>
</html>
(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.