From e7e54aa96806d55204812f9e6ca5fa06e2943fa2 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sat, 28 Nov 2009 13:47:25 -0500 Subject: Organized blog module Previously, welcome.php was always loaded if no module was specified. Because of this, the index page blog section was there, while the rest of the blog code (plus archive code) was in blog.php. Now, the all of the blog is in blog.php and all of the archive is in archive.php. --- pages/welcome.php | 105 ------------------------------------------------------ 1 file changed, 105 deletions(-) delete mode 100755 pages/welcome.php (limited to 'pages/welcome.php') diff --git a/pages/welcome.php b/pages/welcome.php deleted file mode 100755 index 819420b..0000000 --- a/pages/welcome.php +++ /dev/null @@ -1,105 +0,0 @@ - 'Archive', - 'url' => 'http://fourisland.com/blog/', - 'icon' => '16-file-archive')); - - -$template = new FITemplate('post'); -$template->adds_block('EXTERNAL',array('exi'=>1)); -$template->add('IFXAMP', $xhtml ? '&' : '&'); -$template->add('IFXLT', $xhtml ? '<' : '<'); -$template->add('IFXGT', $xhtml ? '>' : '>'); - -$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)) -{ - updatePop($getpost3['id'],'home_views'); - - $page_id = 'updates-' . $getpost3['id']; - $getcomments = "SELECT * FROM comments WHERE page_id = \"" . $page_id . "\" ORDER BY posttime"; - $getcomments2 = mysql_query($getcomments); - $total_post=0; - while ($getcomments3[$total_post] = mysql_fetch_array($getcomments2)) - { - $total_post++; - } - if ($total_post >= 2) - { - $plural = 's'; - } - if ($total_post == 0) - { - $comText = 'No Comments'; - } elseif ($total_post == 1) - { - $comText = '1 Comment'; - } else { - $comText = $total_post . ' Comments'; - } - - $template->add_ref($curID, 'POST', array( 'ID' => $getpost3['id'], - 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), - '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'], - 'TITLE' => htmlentities(stripslashes($getpost3['title'])), - 'AUTHOR' => $getpost3['author'], - 'PLURALCOMMENT' => (isset($plural) ? $plural : ''), - 'COMMENTS' => $comText, - 'RATING' => $getpost3['rating'], - 'TEXT' => parseText(stripslashes($getpost3['text'])))); - - $tags = getTags($getpost3['id']); - foreach ($tags as $tag) - { - $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++; -} - -$template->display(); - -?> -- cgit 1.4.1