summary refs log tree commit diff stats
path: root/pages/blog.php
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-12-07 20:25:36 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-12-07 20:25:36 -0500
commit25a101d128ada4cac4e634b1c0fdd881551fd376 (patch)
tree16189519d01940f01c6a91c4786508c080aefc2f /pages/blog.php
parent9a4c37255351aadc223bb9609623888cb01d5fde (diff)
downloadfourisland-25a101d128ada4cac4e634b1c0fdd881551fd376.tar.gz
fourisland-25a101d128ada4cac4e634b1c0fdd881551fd376.tar.bz2
fourisland-25a101d128ada4cac4e634b1c0fdd881551fd376.zip
Redid multiple tag system
This new tag system has a seperate table for tags. This way, a tag cloud can be made much more easily than if using the previous system.

This changeset requires manual maintinence.
Diffstat (limited to 'pages/blog.php')
-rwxr-xr-xpages/blog.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/pages/blog.php b/pages/blog.php index 009326c..879aa0f 100755 --- a/pages/blog.php +++ b/pages/blog.php
@@ -74,7 +74,7 @@ if (isset($_GET['post']))
74 'RATING' => $getpost3['rating'], 74 'RATING' => $getpost3['rating'],
75 'TEXT' => parseBBCode($getpost3['text']))); 75 'TEXT' => parseBBCode($getpost3['text'])));
76 76
77 $tags = unserialize($getpost3['tags']); 77 $tags = getTags($getpost3['id']);
78 foreach ($tags as $tag) 78 foreach ($tags as $tag)
79 { 79 {
80 $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag)); 80 $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag));
@@ -135,7 +135,7 @@ if (isset($_GET['post']))
135 if (isset($_GET['author'])) 135 if (isset($_GET['author']))
136 { 136 {
137 $title = 'Author: ' . $_GET['author'] . ' - Blog Archive'; 137 $title = 'Author: ' . $_GET['author'] . ' - Blog Archive';
138 $getposts = "SELECT * FROM updates WHERE author = \"" . $_GET['author'] . "\" ORDER BY id DESC"; 138 $getposts = "SELECT * FROM updates AS u WHERE author = \"" . $_GET['author'] . "\" ORDER BY id DESC";
139 $getbio = "SELECT * FROM bio WHERE username = \"" . $_GET['author'] . "\""; 139 $getbio = "SELECT * FROM bio WHERE username = \"" . $_GET['author'] . "\"";
140 $getbio2 = mysql_query($getbio); 140 $getbio2 = mysql_query($getbio);
141 $getbio3 = mysql_fetch_array($getbio2); 141 $getbio3 = mysql_fetch_array($getbio2);
@@ -148,10 +148,10 @@ if (isset($_GET['post']))
148 } elseif (isset($_GET['tag'])) 148 } elseif (isset($_GET['tag']))
149 { 149 {
150 $title = 'Tag: ' . $_GET['tag'] . ' - Blog Archive'; 150 $title = 'Tag: ' . $_GET['tag'] . ' - Blog Archive';
151 $getposts = "SELECT * FROM updates WHERE tags LIKE '%s:" . strlen($_GET['tag']) . ":\"" . $_GET['tag'] . "\"%' ORDER BY id DESC"; 151 $getposts = "SELECT * FROM updates AS u, tags AS t WHERE u.id = t.post_id AND t.post_type = \"published\" AND t.tag = \"" . $_GET['tag'] . "\" ORDER BY u.id DESC";
152 } else { 152 } else {
153 $title = 'Blog Archive'; 153 $title = 'Blog Archive';
154 $getposts = "SELECT * FROM updates ORDER BY id DESC"; 154 $getposts = "SELECT * FROM updates AS u ORDER BY id DESC";
155 } 155 }
156 $getposts2 = mysql_query($getposts); 156 $getposts2 = mysql_query($getposts);
157 $i=0; 157 $i=0;