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.php18
1 files changed, 9 insertions, 9 deletions
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'],