From 224f9ee5014ae5c5399188afd8d38e3b620e2856 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Thu, 26 Nov 2009 14:21:20 -0500 Subject: Added Fouripedia compatibility Made many strutural changes to Four Island allowing for the reinclusion of Fouripedia. --- includes/comments.php | 2 +- includes/common.php | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ includes/functions.php | 7 +++++- includes/layout.php | 26 ++++++++++----------- includes/session.php | 2 +- 5 files changed, 81 insertions(+), 17 deletions(-) create mode 100644 includes/common.php (limited to 'includes') diff --git a/includes/comments.php b/includes/comments.php index 0f48444..78353c1 100755 --- a/includes/comments.php +++ b/includes/comments.php @@ -72,7 +72,7 @@ while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) 'USERNAME' => (($website != '') ? '' . $username . '' : $username), 'DATE' => date("F jS Y \a\\t g:i:s a",strtotime($getcomments3[$i]['posttime'])), 'ID' => $getcomments3[$i]['id'], - 'TEXT' => parseText($getcomments3[$i]['comment']))); + 'TEXT' => parseText(stripslashes($getcomments3[$i]['comment'])))); if (isLoggedIn()) { diff --git a/includes/common.php b/includes/common.php new file mode 100644 index 0000000..e4321d9 --- /dev/null +++ b/includes/common.php @@ -0,0 +1,61 @@ + diff --git a/includes/functions.php b/includes/functions.php index bc839df..dc5a549 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -390,7 +390,12 @@ function getRewriteURL() { if (!isset($_GET['area'])) { - return '/'; + if (strpos($_SERVER['PHP_SELF'], 'wiki') !== false) + { + return $_SERVER['PHP_SELF']; + } else { + return '/'; + } } else { if ($_GET['area'] == 'blog') { diff --git a/includes/layout.php b/includes/layout.php index ffe1aa6..b11c56f 100644 --- a/includes/layout.php +++ b/includes/layout.php @@ -28,19 +28,17 @@ $template->add('CATEGORY',(isset($pageCategory)) ? $pageCategory : 'none'); $template->add('AID',(isset($pageAID)) ? $pageAID : 'none'); $template->add('EXTRATITLE',isset($title) ? ($title . ' - ') : ''); $template->add(strtoupper($pageCategory) . 'ACTIVE', ' class="active"'); +$template->add('EXTRASIDEBAR', isset($extraSidebar) ? $extraSidebar : ''); -if (($pageCategory != 'fourm') && ($pageCategory != 'wiki')) -{ - $template->add('REDIRPAGE',rawurlencode($_SERVER['REQUEST_URI'])); - $template->add('LOGDATA',echoLogData()); - $template->add('LOWERLOGDATA','log' . strtolower(echoLogData())); - $template->add('SID',getSessionID()); - $template->adds_block('MEMBERS',array('exi' => 1)); +$template->add('REDIRPAGE',rawurlencode($_SERVER['REQUEST_URI'])); +$template->add('LOGDATA',echoLogData()); +$template->add('LOWERLOGDATA','log' . strtolower(echoLogData())); +$template->add('SID',getSessionID()); +$template->adds_block('MEMBERS',array('exi' => 1)); - if (isAdmin()) - { - $template->adds_block('ADMIN',array('exi' => 1)); - } +if (isAdmin()) +{ + $template->adds_block('ADMIN',array('exi' => 1)); } if (isset($hatNav) && is_array($hatNav)) @@ -274,11 +272,11 @@ foreach ($counts as $tag => $count) if (!isset($noRightbar)) { $template->adds_block('RIGHTBAR', array('exi'=>1)); -} - +} + $template->add('ME', getRewriteURL()); -$template->add('CONTENT', stripslashes($content)); +$template->add('CONTENT', $content); $template->display(); diff --git a/includes/session.php b/includes/session.php index 94c919a..2e0824a 100755 --- a/includes/session.php +++ b/includes/session.php @@ -22,7 +22,7 @@ if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} require('headerproc.php'); -session_start(); +@session_start(); function getSessionID() { -- cgit 1.4.1