summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xincludes/functions.php4
-rwxr-xr-xincludes/updatePending.php2
-rwxr-xr-xpages/admin.php64
-rwxr-xr-xpages/blog.php18
-rwxr-xr-xpages/welcome.php9
-rwxr-xr-xrss.php4
-rwxr-xr-xtheme/admin/editDraft.tpl4
-rwxr-xr-xtheme/admin/editPending.tpl4
-rwxr-xr-xtheme/admin/editPost.tpl4
-rwxr-xr-xtheme/admin/write.tpl4
-rwxr-xr-xtheme/archive.tpl6
-rwxr-xr-xtheme/post.tpl14
12 files changed, 66 insertions, 71 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
114function postBlogPost($title,$author,$tag1,$tag2,$tag3,$content) 114function 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);
diff --git a/pages/admin.php b/pages/admin.php index 8534d91..56542f9 100755 --- a/pages/admin.php +++ b/pages/admin.php
@@ -37,9 +37,11 @@ if (isLoggedIn())
37 { 37 {
38 $template = new FITemplate('admin/write'); 38 $template = new FITemplate('admin/write');
39 } else { 39 } else {
40 $tags = mysql_real_escape_string(serialize(explode(',', $_POST['tags'])));
41
40 if ($_POST['type'] == 'draft') 42 if ($_POST['type'] == 'draft')
41 { 43 {
42 $insdraft = "INSERT INTO drafts (title,author,text,tag1,tag2,tag3,slug) VALUES (\"" . addslashes($_POST['title']) . "\",\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\",\"" . $_POST['tag1'] . "\",\"" . $_POST['tag2'] . "\",\"" . $_POST['tag3'] . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; 44 $insdraft = "INSERT INTO drafts (title,author,text,tags,slug) VALUES (\"" . addslashes($_POST['title']) . "\",\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\",\"" . $tags . "\",\"" . generateSlug($_POST['title'],'updates') . "\")";
43 $insdraft2 = mysql_query($insdraft); 45 $insdraft2 = mysql_query($insdraft);
44 46
45 $getdraft = "SELECT * FROM drafts ORDER BY id DESC LIMIT 0,1"; 47 $getdraft = "SELECT * FROM drafts ORDER BY id DESC LIMIT 0,1";
@@ -50,7 +52,7 @@ if (isLoggedIn())
50 $template->add('ID', $getdraft3['id']); 52 $template->add('ID', $getdraft3['id']);
51 } else if ($_POST['type'] == 'instant') 53 } else if ($_POST['type'] == 'instant')
52 { 54 {
53 postBlogPost($_POST['title'], sess_get('uname'), $_POST['tag1'], $_POST['tag2'], $_POST['tag3'], $_POST['text']); 55 postBlogPost($_POST['title'], sess_get('uname'), $tags, $_POST['text']);
54 56
55 $getpost = "SELECT * FROM updates ORDER BY id DESC LIMIT 0,1"; 57 $getpost = "SELECT * FROM updates ORDER BY id DESC LIMIT 0,1";
56 $getpost2 = mysql_query($getpost); 58 $getpost2 = mysql_query($getpost);
@@ -86,7 +88,7 @@ if (isLoggedIn())
86 generateError(404); 88 generateError(404);
87 } 89 }
88 90
89 $inspending = "INSERT INTO pending (id,title,author,text,tag1,tag2,tag3,slug) VALUES (" . $id . ",\"" . addslashes($_POST['title']) . "\",\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\",\"" . $_POST['tag1'] . "\",\"" . $_POST['tag2'] . "\",\"" . $_POST['tag3'] . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; 91 $inspending = "INSERT INTO pending (id,title,author,text,tags,slug) VALUES (" . $id . ",\"" . addslashes($_POST['title']) . "\",\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\",\"" . $tags . "\",\"" . generateSlug($_POST['title'],'updates') . "\")";
90 $inspending2 = mysql_query($inspending); 92 $inspending2 = mysql_query($inspending);
91 93
92 $template = new FITemplate('admin/pendingSuccess'); 94 $template = new FITemplate('admin/pendingSuccess');
@@ -120,21 +122,21 @@ if (isLoggedIn())
120 $template = new FITemplate('admin/editDraft'); 122 $template = new FITemplate('admin/editDraft');
121 $template->add('ID', $_GET['id']); 123 $template->add('ID', $_GET['id']);
122 $template->add('TEXT', $getdraft3['text']); 124 $template->add('TEXT', $getdraft3['text']);
123 $template->add('TAG1', $getdraft3['tag1']); 125 $template->add('TAGS', implode(',', unserialize($getdraft3['tags'])));
124 $template->add('TAG2', $getdraft3['tag2']);
125 $template->add('TAG3', $getdraft3['tag3']);
126 $template->add('TITLE', $getdraft3['title']); 126 $template->add('TITLE', $getdraft3['title']);
127 } else { 127 } else {
128 $tags = mysql_real_escape_string(serialize(explode(',', $_POST['tags'])));
129
128 if ($_POST['type'] == 'draft') 130 if ($_POST['type'] == 'draft')
129 { 131 {
130 $setdraft = "UPDATE drafts SET title = \"" . addslashes($_POST['title']) . "\", text = \"" . addslashes($_POST['text']) . "\", tag1 = \"" . $_POST['tag1'] . "\", tag2 = \"" . $_POST['tag2'] . "\", tag3 = \"" . $_POST['tag3'] . "\" WHERE id = " . $_GET['id']; 132 $setdraft = "UPDATE drafts SET title = \"" . addslashes($_POST['title']) . "\", text = \"" . addslashes($_POST['text']) . "\", tags = \"" . $tags . "\" WHERE id = " . $_GET['id'];
131 $setdraft2 = mysql_query($setdraft); 133 $setdraft2 = mysql_query($setdraft);
132 134
133 $template = new FITemplate('admin/draftSuccess'); 135 $template = new FITemplate('admin/draftSuccess');
134 $template->add('ID', $_GET['id']); 136 $template->add('ID', $_GET['id']);
135 } else if ($_POST['type'] == 'instant') 137 } else if ($_POST['type'] == 'instant')
136 { 138 {
137 postBlogPost($_POST['title'], sess_get('uname'), $_POST['tag1'], $_POST['tag2'], $_POST['tag3'], $_POST['text']); 139 postBlogPost($_POST['title'], sess_get('uname'), $tags, $_POST['text']);
138 140
139 $deldraft = "DELETE FROM drafts WHERE id = " . $_GET['id']; 141 $deldraft = "DELETE FROM drafts WHERE id = " . $_GET['id'];
140 $deldraft2 = mysql_query($deldraft); 142 $deldraft2 = mysql_query($deldraft);
@@ -173,7 +175,7 @@ if (isLoggedIn())
173 generateError(404); 175 generateError(404);
174 } 176 }
175 177
176 $inspending = "INSERT INTO pending (id,title,author,text,tag1,tag2,tag3,slug) VALUES (" . $id . ",\"" . addslashes($_POST['title']) . "\",\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\",\"" . $_POST['tag1'] . "\",\"" . $_POST['tag2'] . "\",\"" . $_POST['tag3'] . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; 178 $inspending = "INSERT INTO pending (id,title,author,text,tags,slug) VALUES (" . $id . ",\"" . addslashes($_POST['title']) . "\",\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\",\"" . $tags . "\",\"" . generateSlug($_POST['title'],'updates') . "\")";
177 $inspending2 = mysql_query($inspending); 179 $inspending2 = mysql_query($inspending);
178 180
179 $deldraft = "DELETE FROM drafts WHERE id = " . $_GET['id']; 181 $deldraft = "DELETE FROM drafts WHERE id = " . $_GET['id'];
@@ -221,7 +223,7 @@ if (isLoggedIn())
221 { 223 {
222 $template = new FITemplate('post'); 224 $template = new FITemplate('post');
223 $template->adds_block('INTERNAL',array('exi'=>1)); 225 $template->adds_block('INTERNAL',array('exi'=>1));
224 $template->adds_block('POST', array( 'ID' => $getdraft3['id'], 226 $template->add_ref(0, 'POST', array( 'ID' => $getdraft3['id'],
225 'YEARID' => ((date('Y')-2006) % 4), 227 'YEARID' => ((date('Y')-2006) % 4),
226 'DATE' => date('F dS Y \a\\t g:i:s a'), 228 'DATE' => date('F dS Y \a\\t g:i:s a'),
227 'MONTH' => date('M'), 229 'MONTH' => date('M'),
@@ -229,11 +231,14 @@ if (isLoggedIn())
229 'CODED' => $getdraft3['slug'], 231 'CODED' => $getdraft3['slug'],
230 'TITLE' => $getdraft3['title'], 232 'TITLE' => $getdraft3['title'],
231 'AUTHOR' => $getdraft3['author'], 233 'AUTHOR' => $getdraft3['author'],
232 'TAG1' => $getdraft3['tag1'],
233 'TAG2' => $getdraft3['tag2'],
234 'TAG3' => $getdraft3['tag3'],
235 'RATING' => 0, 234 'RATING' => 0,
236 'TEXT' => parseBBCode($getdraft3['text']))); 235 'TEXT' => parseBBCode($getdraft3['text'])));
236
237 $tags = unserialize($getdraft3['tags']);
238 foreach ($tags as $tag)
239 {
240 $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag));
241 }
237 } else { 242 } else {
238 $template = new FITemplate('msg'); 243 $template = new FITemplate('msg');
239 $template->add('BACK', 'the previous page'); 244 $template->add('BACK', 'the previous page');
@@ -266,12 +271,12 @@ if (isLoggedIn())
266 $template = new FITemplate('admin/editPending'); 271 $template = new FITemplate('admin/editPending');
267 $template->add('ID', $_GET['id']); 272 $template->add('ID', $_GET['id']);
268 $template->add('TEXT', $getpending3['text']); 273 $template->add('TEXT', $getpending3['text']);
269 $template->add('TAG1', $getpending3['tag1']); 274 $template->add('TAGS', implode(',', unserialize($getdraft3['tags'])));
270 $template->add('TAG2', $getpending3['tag2']);
271 $template->add('TAG3', $getpending3['tag3']);
272 $template->add('TITLE', $getpending3['title']); 275 $template->add('TITLE', $getpending3['title']);
273 } else { 276 } else {
274 $setpending = "UPDATE pending SET title = \"" . addslashes($_POST['title']) . "\", text = \"" . addslashes($_POST['text']) . "\", tag1 = \"" . $_POST['tag1'] . "\", tag2 = \"" . $_POST['tag2'] . "\", tag3 = \"" . $_POST['tag3'] . "\" WHERE id = " . $_GET['id']; 277 $tags = mysql_real_escape_string(serialize(explode(',', $_POST['tags'])));
278
279 $setpending = "UPDATE pending SET title = \"" . addslashes($_POST['title']) . "\", text = \"" . addslashes($_POST['text']) . "\", tags = \"" . $tags . "\" WHERE id = " . $_GET['id'];
275 $setpending2 = mysql_query($setpending); 280 $setpending2 = mysql_query($setpending);
276 281
277 $template = new FITemplate('admin/pendingSuccess'); 282 $template = new FITemplate('admin/pendingSuccess');
@@ -315,7 +320,7 @@ if (isLoggedIn())
315 { 320 {
316 $template = new FITemplate('post'); 321 $template = new FITemplate('post');
317 $template->adds_block('INTERNAL',array('exi'=>1)); 322 $template->adds_block('INTERNAL',array('exi'=>1));
318 $template->adds_block('POST', array( 'ID' => $getpending3['id'], 323 $template->add_ref(0, 'POST', array( 'ID' => $getpending3['id'],
319 'YEARID' => ((date('Y')-2006) % 4), 324 'YEARID' => ((date('Y')-2006) % 4),
320 'DATE' => date('F dS Y \a\\t g:i:s a'), 325 'DATE' => date('F dS Y \a\\t g:i:s a'),
321 'MONTH' => date('M'), 326 'MONTH' => date('M'),
@@ -323,11 +328,14 @@ if (isLoggedIn())
323 'CODED' => $getpending3['slug'], 328 'CODED' => $getpending3['slug'],
324 'TITLE' => $getpending3['title'], 329 'TITLE' => $getpending3['title'],
325 'AUTHOR' => $getpending3['author'], 330 'AUTHOR' => $getpending3['author'],
326 'TAG1' => $getpending3['tag1'],
327 'TAG2' => $getpending3['tag2'],
328 'TAG3' => $getpending3['tag3'],
329 'RATING' => 0, 331 'RATING' => 0,
330 'TEXT' => parseBBCode($getpending3['text']))); 332 'TEXT' => parseBBCode($getpending3['text'])));
333
334 $tags = unserialize($getpending3['tags']);
335 foreach ($tags as $tag)
336 {
337 $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag));
338 }
331 } else { 339 } else {
332 $template = new FITemplate('msg'); 340 $template = new FITemplate('msg');
333 $template->add('BACK', 'the previous page'); 341 $template->add('BACK', 'the previous page');
@@ -376,10 +384,10 @@ if (isLoggedIn())
376 $delpending = "DELETE FROM pending WHERE id = " . $_GET['id'] . " OR id = " . $otherPending['id']; 384 $delpending = "DELETE FROM pending WHERE id = " . $_GET['id'] . " OR id = " . $otherPending['id'];
377 $delpending2 = mysql_query($delpending); 385 $delpending2 = mysql_query($delpending);
378 386
379 $inspending = "INSERT INTO pending (id, title, author, text, tag1, tag2, tag3, slug) VALUES (" . $_GET['id'] . ",\"" . $otherPending['title'] . "\",\"" . $otherPending['author'] . "\",\"" . $otherPending['text'] . "\",\"" . $otherPending['tag1'] . "\",\"" . $otherPending['tag2'] . "\",\"" . $otherPending['tag3'] . "\",\"" . $otherPending['slug'] . "\")"; 387 $inspending = "INSERT INTO pending (id, title, author, text, tags, slug) VALUES (" . $_GET['id'] . ",\"" . $otherPending['title'] . "\",\"" . $otherPending['author'] . "\",\"" . $otherPending['text'] . "\",\"" . $otherPending['tags'] . "\",\"" . $otherPending['slug'] . "\")";
380 $inspending2 = mysql_query($inspending); 388 $inspending2 = mysql_query($inspending);
381 389
382 $ins2pending = "INSERT INTO pending (id, title, author, text, tag1, tag2, tag3, slug) VALUES (" . $otherPending['id'] . ",\"" . $getpending3['title'] . "\",\"" . $getpending3['author'] . "\",\"" . $getpending3['text'] . "\",\"" . $getpending3['tag1'] . "\",\"" . $getpending3['tag2'] . "\",\"" . $getpending3['tag3'] . "\",\"" . $getpending3['slug'] . "\")"; 390 $ins2pending = "INSERT INTO pending (id, title, author, text, tags, slug) VALUES (" . $otherPending['id'] . ",\"" . $getpending3['title'] . "\",\"" . $getpending3['author'] . "\",\"" . $getpending3['text'] . "\",\"" . $getpending3['tags'] . "\",\"" . $getpending3['slug'] . "\")";
383 $ins2pending2 = mysql_query($ins2pending); 391 $ins2pending2 = mysql_query($ins2pending);
384 392
385 $template = new FITemplate('admin/managePending'); 393 $template = new FITemplate('admin/managePending');
@@ -428,12 +436,12 @@ if (isLoggedIn())
428 $template = new FITemplate('admin/editPost'); 436 $template = new FITemplate('admin/editPost');
429 $template->add('ID', $_GET['id']); 437 $template->add('ID', $_GET['id']);
430 $template->add('TEXT', $getpost3['text']); 438 $template->add('TEXT', $getpost3['text']);
431 $template->add('TAG1', $getpost3['tag1']); 439 $template->add('TAGS', implode(',', unserialize($getpost3['tags'])));
432 $template->add('TAG2', $getpost3['tag2']);
433 $template->add('TAG3', $getpost3['tag3']);
434 $template->add('TITLE', $getpost3['title']); 440 $template->add('TITLE', $getpost3['title']);
435 } else { 441 } else {
436 $setpost = "UPDATE updates SET title = \"" . addslashes($_POST['title']) . "\", text = \"" . addslashes($_POST['text']) . "\", tag1 = \"" . $_POST['tag1'] . "\", tag2 = \"" . $_POST['tag2'] . "\", tag3 = \"" . $_POST['tag3'] . "\" WHERE id = " . $_GET['id']; 442 $tags = mysql_real_escape_string(serialize(explode(',', $_POST['tags'])));
443
444 $setpost = "UPDATE updates SET title = \"" . addslashes($_POST['title']) . "\", text = \"" . addslashes($_POST['text']) . "\", tags = \"" . $tags . "\" WHERE id = " . $_GET['id'];
437 $setpost2 = mysql_query($setpost); 445 $setpost2 = mysql_query($setpost);
438 446
439 $template = new FITemplate('admin/postSuccess'); 447 $template = new FITemplate('admin/postSuccess');
diff --git a/pages/blog.php b/pages/blog.php index bb47755..c3f656b 100755 --- a/pages/blog.php +++ b/pages/blog.php
@@ -63,7 +63,7 @@ if (isset($_GET['post']))
63 'TITLE' => $getnext3['title'])); 63 'TITLE' => $getnext3['title']));
64 } 64 }
65 65
66 $template->adds_block('POST', array( 'ID' => $getpost3['id'], 66 $template->add_ref(0, 'POST', array( 'ID' => $getpost3['id'],
67 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), 67 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4),
68 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), 68 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])),
69 'MONTH' => date('M',strtotime($getpost3['pubDate'])), 69 'MONTH' => date('M',strtotime($getpost3['pubDate'])),
@@ -71,12 +71,15 @@ if (isset($_GET['post']))
71 'CODED' => $getpost3['slug'], 71 'CODED' => $getpost3['slug'],
72 'TITLE' => $getpost3['title'], 72 'TITLE' => $getpost3['title'],
73 'AUTHOR' => $getpost3['author'], 73 'AUTHOR' => $getpost3['author'],
74 'TAG1' => $getpost3['tag1'],
75 'TAG2' => $getpost3['tag2'],
76 'TAG3' => $getpost3['tag3'],
77 'RATING' => $getpost3['rating'], 74 'RATING' => $getpost3['rating'],
78 'TEXT' => parseBBCode($getpost3['text']))); 75 'TEXT' => parseBBCode($getpost3['text'])));
79 76
77 $tags = unserialize($getpost3['tags']);
78 foreach ($tags as $tag)
79 {
80 $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag));
81 }
82
80 $template->display(); 83 $template->display();
81 $page_id = 'updates-' . $getpost3['id']; 84 $page_id = 'updates-' . $getpost3['id'];
82 include('includes/comments.php'); 85 include('includes/comments.php');
@@ -123,7 +126,7 @@ if (isset($_GET['post']))
123 } elseif (isset($_GET['tag'])) 126 } elseif (isset($_GET['tag']))
124 { 127 {
125 $title = 'Tag: ' . $_GET['tag'] . ' - Blog Archive'; 128 $title = 'Tag: ' . $_GET['tag'] . ' - Blog Archive';
126 $getposts = "SELECT * FROM updates WHERE tag1 = \"" . $_GET['tag'] . "\" OR tag2 = \"" . $_GET['tag'] . "\" OR tag3 = \"" . $_GET['tag'] . "\" ORDER BY id DESC"; 129 $getposts = "SELECT * FROM updates WHERE tags LIKE '%s:" . strlen($_GET['tag']) . ":\"" . $_GET['tag'] . "\"%' ORDER BY id DESC";
127 } else { 130 } else {
128 $title = 'Blog Archive'; 131 $title = 'Blog Archive';
129 $getposts = "SELECT * FROM updates ORDER BY id DESC"; 132 $getposts = "SELECT * FROM updates ORDER BY id DESC";
@@ -181,10 +184,7 @@ if (isset($_GET['post']))
181 'DAY' => date('d',strtotime($getposts3[$i]['pubDate'])), 184 'DAY' => date('d',strtotime($getposts3[$i]['pubDate'])),
182 'AUTHOR' => $getposts3[$i]['author'], 185 'AUTHOR' => $getposts3[$i]['author'],
183 'PLURALCOMMENT' => (isset($plural) ? $plural : ''), 186 'PLURALCOMMENT' => (isset($plural) ? $plural : ''),
184 'COMMENTS' => $comText, 187 'COMMENTS' => $comText));
185 'TAG1' => $getposts3[$i]['tag1'],
186 'TAG2' => $getposts3[$i]['tag2'],
187 'TAG3' => $getposts3[$i]['tag3']));
188 } else { 188 } else {
189 $template->adds_ref_sub($curID, 'SMALL',array( 'DATE' => date('m-d-Y',strtotime($getposts3[$i]['pubDate'])), 189 $template->adds_ref_sub($curID, 'SMALL',array( 'DATE' => date('m-d-Y',strtotime($getposts3[$i]['pubDate'])),
190 'CODED' => $getposts3[$i]['slug'], 190 'CODED' => $getposts3[$i]['slug'],
diff --git a/pages/welcome.php b/pages/welcome.php index 24fd7ad..e267381 100755 --- a/pages/welcome.php +++ b/pages/welcome.php
@@ -65,14 +65,17 @@ while ($getpost3 = mysql_fetch_array($getpost2))
65 'CODED' => $getpost3['slug'], 65 'CODED' => $getpost3['slug'],
66 'TITLE' => $getpost3['title'], 66 'TITLE' => $getpost3['title'],
67 'AUTHOR' => $getpost3['author'], 67 'AUTHOR' => $getpost3['author'],
68 'TAG1' => $getpost3['tag1'],
69 'TAG2' => $getpost3['tag2'],
70 'TAG3' => $getpost3['tag3'],
71 'PLURALCOMMENT' => (isset($plural) ? $plural : ''), 68 'PLURALCOMMENT' => (isset($plural) ? $plural : ''),
72 'COMMENTS' => $comText, 69 'COMMENTS' => $comText,
73 'RATING' => $getpost3['rating'], 70 'RATING' => $getpost3['rating'],
74 'TEXT' => parseBBCode($getpost3['text']))); 71 'TEXT' => parseBBCode($getpost3['text'])));
75 72
73 $tags = unserialize($getpost3['tags']);
74 foreach ($tags as $tag)
75 {
76 $template->adds_ref_sub($curID, 'TAGS', array('TAG' => $tag));
77 }
78
76 $curID++; 79 $curID++;
77} 80}
78 81
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']);
diff --git a/theme/admin/editDraft.tpl b/theme/admin/editDraft.tpl index b3197c4..29c1fea 100755 --- a/theme/admin/editDraft.tpl +++ b/theme/admin/editDraft.tpl
@@ -3,9 +3,7 @@
3<FORM ACTION="/admin/editDraft.php?id=<!--ID-->&submit=" METHOD="POST"> 3<FORM ACTION="/admin/editDraft.php?id=<!--ID-->&submit=" METHOD="POST">
4 Draft Title: <INPUT TYPE="text" NAME="title" VALUE="<!--TITLE-->"><BR> 4 Draft Title: <INPUT TYPE="text" NAME="title" VALUE="<!--TITLE-->"><BR>
5 <TEXTAREA NAME="text" COLS="80" ROWS="20"><!--TEXT--></TEXTAREA><P> 5 <TEXTAREA NAME="text" COLS="80" ROWS="20"><!--TEXT--></TEXTAREA><P>
6 Tag 1: <INPUT TYPE="text" NAME="tag1" VALUE="<!--TAG1-->"><BR> 6 Tags (comma-seperated): <INPUT TYPE="text" NAME="tags" VALUE="<!--TAGS-->"><BR>
7 Tag 2: <INPUT TYPE="text" NAME="tag2" VALUE="<!--TAG2-->"> (Optional)<BR>
8 Tag 3: <INPUT TYPE="text" NAME="tag3" VALUE="<!--TAG3-->"> (Optional)<BR>
9 Post Type: <SELECT NAME="type" SIZE="4"> 7 Post Type: <SELECT NAME="type" SIZE="4">
10 <OPTION VALUE="draft" SELECTED>Draft</OPTION> 8 <OPTION VALUE="draft" SELECTED>Draft</OPTION>
11 <OPTION VALUE="normal">Normal (Article-style) Post</OPTION> 9 <OPTION VALUE="normal">Normal (Article-style) Post</OPTION>
diff --git a/theme/admin/editPending.tpl b/theme/admin/editPending.tpl index ccded76..355e156 100755 --- a/theme/admin/editPending.tpl +++ b/theme/admin/editPending.tpl
@@ -3,8 +3,6 @@
3<FORM ACTION="/admin/editPending.php?id=<!--ID-->&submit=" METHOD="POST"> 3<FORM ACTION="/admin/editPending.php?id=<!--ID-->&submit=" METHOD="POST">
4 Post Title: <INPUT TYPE="text" NAME="title" VALUE="<!--TITLE-->"><BR> 4 Post Title: <INPUT TYPE="text" NAME="title" VALUE="<!--TITLE-->"><BR>
5 <TEXTAREA NAME="text" COLS="80" ROWS="20"><!--TEXT--></TEXTAREA><P> 5 <TEXTAREA NAME="text" COLS="80" ROWS="20"><!--TEXT--></TEXTAREA><P>
6 Tag 1: <INPUT TYPE="text" NAME="tag1" VALUE="<!--TAG1-->"><BR> 6 Tags (comma-seperated): <INPUT TYPE="text" NAME="tags" VALUE="<!--TAGS-->"><BR>
7 Tag 2: <INPUT TYPE="text" NAME="tag2" VALUE="<!--TAG2-->"> (Optional)<BR>
8 Tag 3: <INPUT TYPE="text" NAME="tag3" VALUE="<!--TAG3-->"> (Optional)<BR>
9 <INPUT TYPE="submit" VALUE="Edit post"> 7 <INPUT TYPE="submit" VALUE="Edit post">
10</FORM> 8</FORM>
diff --git a/theme/admin/editPost.tpl b/theme/admin/editPost.tpl index 544fe5f..f7e44e3 100755 --- a/theme/admin/editPost.tpl +++ b/theme/admin/editPost.tpl
@@ -3,8 +3,6 @@
3<FORM ACTION="/admin/editPost.php?id=<!--ID-->&submit=" METHOD="POST"> 3<FORM ACTION="/admin/editPost.php?id=<!--ID-->&submit=" METHOD="POST">
4 Post Title: <INPUT TYPE="text" NAME="title" VALUE="<!--TITLE-->"><BR> 4 Post Title: <INPUT TYPE="text" NAME="title" VALUE="<!--TITLE-->"><BR>
5 <TEXTAREA NAME="text" COLS="80" ROWS="20"><!--TEXT--></TEXTAREA><P> 5 <TEXTAREA NAME="text" COLS="80" ROWS="20"><!--TEXT--></TEXTAREA><P>
6 Tag 1: <INPUT TYPE="text" NAME="tag1" VALUE="<!--TAG1-->"><BR> 6 Tags (comma-seperated): <INPUT TYPE="text" NAME="tags" VALUE="<!--TAGS-->"><BR>
7 Tag 2: <INPUT TYPE="text" NAME="tag2" VALUE="<!--TAG2-->"> (Optional)<BR>
8 Tag 3: <INPUT TYPE="text" NAME="tag3" VALUE="<!--TAG3-->"> (Optional)<BR>
9 <INPUT TYPE="submit" VALUE="Edit post"> 7 <INPUT TYPE="submit" VALUE="Edit post">
10</FORM> 8</FORM>
diff --git a/theme/admin/write.tpl b/theme/admin/write.tpl index 30e870c..0d8fb24 100755 --- a/theme/admin/write.tpl +++ b/theme/admin/write.tpl
@@ -3,9 +3,7 @@
3<FORM ACTION="/admin/writePost.php?submit=" METHOD="POST"> 3<FORM ACTION="/admin/writePost.php?submit=" METHOD="POST">
4 Post Title: <INPUT TYPE="text" NAME="title"><BR> 4 Post Title: <INPUT TYPE="text" NAME="title"><BR>
5 <TEXTAREA NAME="text" COLS="80" ROWS="20"></TEXTAREA><P> 5 <TEXTAREA NAME="text" COLS="80" ROWS="20"></TEXTAREA><P>
6 Tag 1: <INPUT TYPE="text" NAME="tag1" VALUE="update"><BR> 6 Tags (comma-seperated): <INPUT TYPE="text" NAME="tags" VALUE="update"><BR>
7 Tag 2: <INPUT TYPE="text" NAME="tag2"> (Optional)<BR>
8 Tag 3: <INPUT TYPE="text" NAME="tag3"> (Optional)<BR>
9 Post Type: <SELECT NAME="type" SIZE="4"> 7 Post Type: <SELECT NAME="type" SIZE="4">
10 <OPTION VALUE="draft">Draft</OPTION> 8 <OPTION VALUE="draft">Draft</OPTION>
11 <OPTION VALUE="normal" SELECTED>Normal (Article-style) Post</OPTION> 9 <OPTION VALUE="normal" SELECTED>Normal (Article-style) Post</OPTION>
diff --git a/theme/archive.tpl b/theme/archive.tpl index 7d85565..b06aad9 100755 --- a/theme/archive.tpl +++ b/theme/archive.tpl
@@ -20,12 +20,6 @@
20 <A HREF="/blog/author/<!--MONTH.BIG.AUTHOR-->.php"><!--MONTH.BIG.AUTHOR--></A> 20 <A HREF="/blog/author/<!--MONTH.BIG.AUTHOR-->.php"><!--MONTH.BIG.AUTHOR--></A>
21 </SPAN> 21 </SPAN>
22 22
23 <SPAN CLASS="post-tag-3 category">
24 <A CLASS="noVisit" HREF="/blog/tag/<!--MONTH.BIG.TAG1-->.php" REL="tag" TITLE="<!--MONTH.BIG.TAG1-->"><!--MONTH.BIG.TAG1--></A>
25 <A CLASS="noVisit" HREF="/blog/tag/<!--MONTH.BIG.TAG2-->.php" REL="tag" TITLE="<!--MONTH.BIG.TAG2-->"><!--MONTH.BIG.TAG2--></A>
26 <A CLASS="noVisit" HREF="/blog/tag/<!--MONTH.BIG.TAG3-->.php" REL="tag" TITLE="<!--MONTH.BIG.TAG3-->"><!--MONTH.BIG.TAG3--></A>
27 </SPAN>
28
29 <SPAN CLASS="post-comment<!--MONTH.BIG.PLURALCOMMENT-->"> 23 <SPAN CLASS="post-comment<!--MONTH.BIG.PLURALCOMMENT-->">
30 <A CLASS="noVisit" HREF="/blog/<!--MONTH.BIG.CODED-->/#comments"><!--MONTH.BIG.COMMENTS-->&nbsp;&#187;</A> 24 <A CLASS="noVisit" HREF="/blog/<!--MONTH.BIG.CODED-->/#comments"><!--MONTH.BIG.COMMENTS-->&nbsp;&#187;</A>
31 </SPAN> 25 </SPAN>
diff --git a/theme/post.tpl b/theme/post.tpl index 91bf4e9..3314d4e 100755 --- a/theme/post.tpl +++ b/theme/post.tpl
@@ -6,16 +6,16 @@
6<!--BEGIN POST--> 6<!--BEGIN POST-->
7<DIV CLASS="post vevent" ID="post-<!--POST.ID-->"> 7<DIV CLASS="post vevent" ID="post-<!--POST.ID-->">
8 <DIV CLASS="post-date-<!--POST.YEARID-->"> 8 <DIV CLASS="post-date-<!--POST.YEARID-->">
9 <ABBR CLASS="dtstart" TITLE="<!--POST.DATE-->"> 9 <ABBR CLASS="dtstart" TITLE="<!--POST.DATE-->">
10 <SPAN CLASS="post-month"><!--POST.MONTH--></SPAN> 10 <SPAN CLASS="post-month"><!--POST.MONTH--></SPAN>
11 <SPAN CLASS="post-day"><!--POST.DAY--></SPAN> 11 <SPAN CLASS="post-day"><!--POST.DAY--></SPAN>
12 </ABBR> 12 </ABBR>
13 </DIV> 13 </DIV>
14 14
15 <DIV CLASS="post-title"> 15 <DIV CLASS="post-title">
16 <H2> 16 <H2>
17 <!--BEGIN EXTERNAL--><A CLASS="url" HREF="/blog/<!--POST.CODED-->/" REL="bookmark" TITLE="Permalink for <!--POST.TITLE-->"><!--END EXTERNAL--> 17 <!--BEGIN EXTERNAL--><A CLASS="url" HREF="/blog/<!--POST.CODED-->/" REL="bookmark" TITLE="Permalink for <!--POST.TITLE-->"><!--END EXTERNAL-->
18 <SPAN CLASS="summary"><!--POST.TITLE--></SPAN> 18 <SPAN CLASS="summary"><!--POST.TITLE--></SPAN>
19 <!--BEGIN EXTERNAL--></A><!--END EXTERNAL--> 19 <!--BEGIN EXTERNAL--></A><!--END EXTERNAL-->
20 </H2> 20 </H2>
21 21
@@ -24,9 +24,9 @@
24 </SPAN> 24 </SPAN>
25 25
26 <SPAN CLASS="post-tag-3 category"> 26 <SPAN CLASS="post-tag-3 category">
27 <A CLASS="noVisit" HREF="/blog/tag/<!--POST.TAG1-->.php" REL="tag" TITLE="<!--POST.TAG1-->"><!--POST.TAG1--></A> 27 <!--BEGIN POST.TAGS-->
28 <A CLASS="noVisit" HREF="/blog/tag/<!--POST.TAG2-->.php" REL="tag" TITLE="<!--POST.TAG2-->"><!--POST.TAG2--></A> 28 <A CLASS="noVisit" HREF="/blog/tag/<!--POST.TAGS.TAG-->.php" REL="tag" TITLE="<!--POST.TAGS.TAG-->"><!--POST.TAGS.TAG--></A>
29 <A CLASS="noVisit" HREF="/blog/tag/<!--POST.TAG3-->.php" REL="tag" TITLE="<!--POST.TAG3-->"><!--POST.TAG3--></A> 29 <!--END POST.TAGS-->
30 </SPAN> 30 </SPAN>
31 31
32 <!--BEGIN EXTERNAL--> 32 <!--BEGIN EXTERNAL-->