summary refs log tree commit diff stats
path: root/pages/blog.php
diff options
context:
space:
mode:
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;