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 /includes | |
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 'includes')
-rwxr-xr-x | includes/functions.php | 4 | ||||
-rwxr-xr-x | includes/updatePending.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/includes/functions.php b/includes/functions.php index e7b7537..3e9382a 100755 --- a/includes/functions.php +++ b/includes/functions.php | |||
@@ -111,11 +111,11 @@ function generateSlug($title,$table) | |||
111 | return($title); | 111 | return($title); |
112 | } | 112 | } |
113 | 113 | ||
114 | function postBlogPost($title,$author,$tag1,$tag2,$tag3,$content) | 114 | function postBlogPost($title,$author,$tags,$content) |
115 | { | 115 | { |
116 | $slug = generateSlug($title,'updates'); | 116 | $slug = generateSlug($title,'updates'); |
117 | 117 | ||
118 | $inspost = "INSERT INTO updates (title,slug,author,tag1,tag2,tag3,text) VALUES (\"" . $title . "\",\"" . $slug . "\",\"" . $author . "\",\"" . $tag1 . "\",\"" . $tag2 . "\",\"" . $tag3 . "\",\"" . addslashes($content) . "\")"; | 118 | $inspost = "INSERT INTO updates (title,slug,author,tags,text) VALUES (\"" . $title . "\",\"" . $slug . "\",\"" . $author . "\",\"" . $tags . "\",\"" . addslashes($content) . "\")"; |
119 | $inspost2 = mysql_query($inspost); | 119 | $inspost2 = mysql_query($inspost); |
120 | 120 | ||
121 | $upconf = "UPDATE config SET value = \"" . date('md') . "\" WHERE name = \"lastUpdate\""; | 121 | $upconf = "UPDATE config SET value = \"" . date('md') . "\" WHERE name = \"lastUpdate\""; |
diff --git a/includes/updatePending.php b/includes/updatePending.php index 6e9ff06..79ab1c4 100755 --- a/includes/updatePending.php +++ b/includes/updatePending.php | |||
@@ -40,7 +40,7 @@ if ((!isset($disablePendingQueue)) && (date('j') != 'Sat')) | |||
40 | $getpost2 = mysql_query($getpost); | 40 | $getpost2 = mysql_query($getpost); |
41 | $getpost3 = mysql_fetch_array($getpost2); | 41 | $getpost3 = mysql_fetch_array($getpost2); |
42 | 42 | ||
43 | postBlogPost($getpost3['title'], $getpost3['author'], $getpost3['tag1'], $getpost3['tag2'], $getpost3['tag3'], $getpost3['text']); | 43 | postBlogPost($getpost3['title'], $getpost3['author'], $getpost3['tags'], $getpost3['text']); |
44 | 44 | ||
45 | $delpost = "DELETE FROM pending WHERE id = " . $getpost3['id']; | 45 | $delpost = "DELETE FROM pending WHERE id = " . $getpost3['id']; |
46 | $delpost2 = mysql_query($delpost); | 46 | $delpost2 = mysql_query($delpost); |