diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2008-12-07 16:45:24 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2008-12-07 16:45:24 -0500 |
commit | a930e827048acf17d04a6af06c1616a72dee714a (patch) | |
tree | da626bd9bdee9c21210ab8f48fca8f686785a022 /rss.php | |
parent | 62d716cb332877662b3c6abf2206efb755a93a7f (diff) | |
download | fourisland-a930e827048acf17d04a6af06c1616a72dee714a.tar.gz fourisland-a930e827048acf17d04a6af06c1616a72dee714a.tar.bz2 fourisland-a930e827048acf17d04a6af06c1616a72dee714a.zip |
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.
Diffstat (limited to 'rss.php')
-rwxr-xr-x | rss.php | 4 |
1 files changed, 1 insertions, 3 deletions
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')) | |||
118 | $getposts = "SELECT * FROM updates WHERE author = \"" . $_GET['author'] . "\" ORDER BY id DESC"; | 118 | $getposts = "SELECT * FROM updates WHERE author = \"" . $_GET['author'] . "\" ORDER BY id DESC"; |
119 | } else if ($_GET['blog'] == 'tag') | 119 | } else if ($_GET['blog'] == 'tag') |
120 | { | 120 | { |
121 | $getposts = "SELECT * FROM updates WHERE tag1 = \"" . $_GET['tag'] . "\" OR tag2 = \"" . $_GET['tag'] . "\" OR tag3 = \"" . $_GET['tag'] . "\" ORDER BY id DESC"; | 121 | $getposts = "SELECT * FROM updates WHERE tags LIKE '%s:" . strlen($_GET['tag']) . ":\"" . $_GET['tag'] . "\"%' ORDER BY id DESC"; |
122 | } else if (!isset($_GET['blog'])) { | 122 | } else if (!isset($_GET['blog'])) { |
123 | $getposts = "SELECT * FROM updates ORDER BY id DESC"; | 123 | $getposts = "SELECT * FROM updates ORDER BY id DESC"; |
124 | } | 124 | } |
125 | $getposts2 = mysql_query($getposts); | 125 | $getposts2 = mysql_query($getposts); |
126 | 126 | ||
127 | // $si = $i; | ||
128 | |||
129 | while (($items[$i] = mysql_fetch_array($getposts2))) | 127 | while (($items[$i] = mysql_fetch_array($getposts2))) |
130 | { | 128 | { |
131 | $items[$i]['sortDate'] = strtotime($items[$i]['pubDate']); | 129 | $items[$i]['sortDate'] = strtotime($items[$i]['pubDate']); |