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/welcome.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'pages/welcome.php') diff --git a/pages/welcome.php b/pages/welcome.php index e224c8e..26f9938 100755 --- a/pages/welcome.php +++ b/pages/welcome.php @@ -22,13 +22,24 @@ if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} require('headerproc.php'); -$pageCategory = 'home'; +$pageCategory = 'blog'; + +$hatNav = array( array( 'title' => 'Archive', + 'url' => 'http://fourisland.com/blog/', + 'icon' => '16-file-archive')); + $template = new FITemplate('post'); $template->adds_block('EXTERNAL',array('exi'=>1)); $curID = 0; +$gettrack = "SELECT * FROM tracking WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; +$gettrack2 = mysql_query($gettrack); +$gettrack3 = mysql_fetch_array($gettrack2); + +$trackArr = explode(',',$gettrack3['rating']); + $getpost = "SELECT * FROM updates ORDER BY id DESC LIMIT 0,4"; $getpost2 = mysql_query($getpost); while ($getpost3 = mysql_fetch_array($getpost2)) @@ -59,7 +70,7 @@ while ($getpost3 = mysql_fetch_array($getpost2)) $template->add_ref($curID, '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'], @@ -76,6 +87,13 @@ while ($getpost3 = mysql_fetch_array($getpost2)) $template->adds_ref_sub($curID, 'TAGS', array('TAG' => $tag)); } + if (($gettrack3['ip'] != $_SERVER['REMOTE_ADDR']) || (array_search($getpost3['id'],$trackArr) === FALSE)) + { + $template->adds_ref_sub($curID, 'CANVOTE', array('exi'=>1)); + } else { + $template->adds_ref_sub($curID, 'NOVOTE', array('exi'=>1)); + } + $curID++; } -- cgit 1.4.1