From 893957c41481a0cd5eb624096337762ffa54ff28 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sun, 9 Aug 2009 09:14:58 -0400 Subject: Created layout 7 The following changes were also made in this revision: * All HTML was changed to XHTML and a !DOCTYPE was included to reflect this * Rewrote quotes tracking system to be much less complicated and actually working * Changed quotes rendering to look more like Chirpy than Rash * Fixed comment textarea bug * Rewrote a ton of CSS so it's not as bloated * Added a JavaScript confirmation when deleting a comment * AJAXified voting on the POTW * AJAXified voting and flagging quotes * AJAXified commenting * AJAXified voting on posts * Added DateFinder back after it was accidentally deleted in Layout 4.5 The following database changes must be performed as soon as possible: * Fix title of NO post (the < is missing the semicolon) * Restore post Frasty Tha Snaman from a backup * Reset "flag" field of all rows in "rash_quotes" to 0 * Remove the "vote" and "flag" columns of "rash_tracking" * Rename the "quote_id" column of "rash_tracking" to "vote" The following external code changes must also be performed as soon as possible: * Add the following line to the end of the // Four Island block in The Fourm's functions.php: require('/svr/www/hatkirby/fourisland/main/includes/specialdates.php'); --- pages/blog.php | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'pages/blog.php') diff --git a/pages/blog.php b/pages/blog.php index a03d3b1..c9781ee 100755 --- a/pages/blog.php +++ b/pages/blog.php @@ -27,7 +27,7 @@ if ((strpos($_SERVER['REQUEST_URI'],'index.php')) && (isset($_GET['post']))) header('Location: /blog/' . $_GET['post'] . '/'); } -$pageCategory = 'home'; +$pageCategory = 'blog'; $pageAID = 'archive'; if (isset($_GET['post'])) @@ -65,7 +65,7 @@ if (isset($_GET['post'])) $template->add_ref(0, 'POST', array( 'ID' => $getpost3['id'], 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), - 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), + 'DATE' => date('F jS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), 'MONTH' => date('M',strtotime($getpost3['pubDate'])), 'DAY' => date('d',strtotime($getpost3['pubDate'])), 'CODED' => $getpost3['slug'], @@ -80,6 +80,19 @@ if (isset($_GET['post'])) $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag)); } + $gettrack = "SELECT * FROM tracking WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; + $gettrack2 = mysql_query($gettrack); + $gettrack3 = mysql_fetch_array($gettrack2); + + $trackArr = explode(',',$gettrack3['rating']); + + if (($gettrack3['ip'] != $_SERVER['REMOTE_ADDR']) || (array_search($getpost3['id'],$trackArr) === FALSE)) + { + $template->adds_ref_sub(0, 'CANVOTE', array('exi'=>1)); + } else { + $template->adds_ref_sub(0, 'NOVOTE', array('exi'=>1)); + } + $template->display(); $getpings = "SELECT * FROM pingbacks WHERE post_id = " . $getpost3['id']; @@ -93,8 +106,8 @@ if (isset($_GET['post'])) } $template->adds_block('PINGBACK', array( 'TITLE' => $getpings3[$i]['title'], - 'URL' => $getpings3[$i]['url'], - 'DATE' => date('F d<\S\U\P>S Y', strtotime($getpings3[$i]['pubDate'])))); + 'URL' => htmlspecialchars($getpings3[$i]['url']), + 'DATE' => date('F jS Y', strtotime($getpings3[$i]['pubDate'])))); $i++; } @@ -124,7 +137,7 @@ if (isset($_GET['post'])) { $template->adds_block('BIO', array( 'TEXT' => $getbio3['text'], 'USERNAME' => $getbio3['username'], - 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getbio3['lastUpdated'])))); + 'DATE' => date('F jS Y \a\\t g:i:s a',strtotime($getbio3['lastUpdated'])))); } } elseif (isset($_GET['tag'])) { -- cgit 1.4.1