From a930e827048acf17d04a6af06c1616a72dee714a Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sun, 7 Dec 2008 16:45:24 -0500 Subject: Added support for a variable amount of tags Previously, the blogging engine only allowed for three tags per post, and it also stored each in seperate fields. Now, all tags are stored in one field and there can be more than three. The only functionality that has been removed because of this is that now, on archive pages, tags are not shown next to the current month's posts as they used to be, because the Four Island templating system does not yet support sub-blocks of sub-blocks. --- rss.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'rss.php') diff --git a/rss.php b/rss.php index b13aef2..8dc36b6 100755 --- a/rss.php +++ b/rss.php @@ -118,14 +118,12 @@ if (!isset($_GET['mode']) || ($_GET['mode'] == 'blog')) $getposts = "SELECT * FROM updates WHERE author = \"" . $_GET['author'] . "\" ORDER BY id DESC"; } else if ($_GET['blog'] == 'tag') { - $getposts = "SELECT * FROM updates WHERE tag1 = \"" . $_GET['tag'] . "\" OR tag2 = \"" . $_GET['tag'] . "\" OR tag3 = \"" . $_GET['tag'] . "\" ORDER BY id DESC"; + $getposts = "SELECT * FROM updates WHERE tags LIKE '%s:" . strlen($_GET['tag']) . ":\"" . $_GET['tag'] . "\"%' ORDER BY id DESC"; } else if (!isset($_GET['blog'])) { $getposts = "SELECT * FROM updates ORDER BY id DESC"; } $getposts2 = mysql_query($getposts); -// $si = $i; - while (($items[$i] = mysql_fetch_array($getposts2))) { $items[$i]['sortDate'] = strtotime($items[$i]['pubDate']); -- cgit 1.4.1