summary refs log tree commit diff stats
path: root/includes
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-11-26 14:21:20 -0500
committerStarla Insigna <hatkirby@fourisland.com>2009-11-26 14:21:20 -0500
commit224f9ee5014ae5c5399188afd8d38e3b620e2856 (patch)
tree6432f783d495626e962835009b6d2f4fd53e42cd /includes
parent34d358ba240bd19491f0f97faf04513318bee6c0 (diff)
downloadfourisland-224f9ee5014ae5c5399188afd8d38e3b620e2856.tar.gz
fourisland-224f9ee5014ae5c5399188afd8d38e3b620e2856.tar.bz2
fourisland-224f9ee5014ae5c5399188afd8d38e3b620e2856.zip
Added Fouripedia compatibility
Made many strutural changes to Four Island allowing for the reinclusion of Fouripedia.
Diffstat (limited to 'includes')
-rwxr-xr-xincludes/comments.php2
-rw-r--r--includes/common.php61
-rwxr-xr-xincludes/functions.php7
-rw-r--r--includes/layout.php26
-rwxr-xr-xincludes/session.php2
5 files changed, 81 insertions, 17 deletions
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))
72 'USERNAME' => (($website != '') ? '<a href="' . $website . '">' . $username . '</a>' : $username), 72 'USERNAME' => (($website != '') ? '<a href="' . $website . '">' . $username . '</a>' : $username),
73 'DATE' => date("F jS Y \a\\t g:i:s a",strtotime($getcomments3[$i]['posttime'])), 73 'DATE' => date("F jS Y \a\\t g:i:s a",strtotime($getcomments3[$i]['posttime'])),
74 'ID' => $getcomments3[$i]['id'], 74 'ID' => $getcomments3[$i]['id'],
75 'TEXT' => parseText($getcomments3[$i]['comment']))); 75 'TEXT' => parseText(stripslashes($getcomments3[$i]['comment']))));
76 76
77 if (isLoggedIn()) 77 if (isLoggedIn())
78 { 78 {
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 @@
1<?php
2/*
3 444444444
4 4::::::::4
5 4:::::::::4
6 4::::44::::4
7 4::::4 4::::4 Four Island
8 4::::4 4::::4
9 4::::4 4::::4 Written and maintained by Starla Insigna
104::::444444::::444
114::::::::::::::::4 includes/common.php
124444444444:::::444
13 4::::4 Please do not use, reproduce or steal the
14 4::::4 contents of this file without explicit
15 4::::4 permission from Hatkirby.
16 44::::::44
17 4::::::::4
18 4444444444
19*/
20
21if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);}
22
23require('headerproc.php');
24
25include('includes/template.php');
26include('includes/session.php');
27include('includes/maintenance.php');
28include('includes/parsers.php');
29include('includes/xmlrpc/xmlrpc.inc');
30include('includes/specialdates.php');
31include('includes/functions.php');
32include('includes/hits.php');
33include('includes/updatePending.php');
34
35if (isset($_GET['layout']))
36{
37 if (!file_exists('theme/layouts/' . basename($_GET['layout'])))
38 {
39 $_GET['layout'] = '7';
40 }
41
42 setcookie('layout', $_GET['layout'], time()+60*60*24*30, '/', '.fourisland.com');
43
44 unset($_GET['layout']);
45
46 header('Location: ' . getRewriteURL());
47 exit;
48}
49
50if (preg_match('|MSIE ([0-9].[0-9]{1,2})|', $_SERVER['HTTP_USER_AGENT'], $matched))
51{
52 $usingIE = true;
53} else {
54 if (getLayout() == '7')
55 {
56 header('Content-type: application/xhtml+xml');
57 $xhtml = true;
58 }
59}
60
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()
390{ 390{
391 if (!isset($_GET['area'])) 391 if (!isset($_GET['area']))
392 { 392 {
393 return '/'; 393 if (strpos($_SERVER['PHP_SELF'], 'wiki') !== false)
394 {
395 return $_SERVER['PHP_SELF'];
396 } else {
397 return '/';
398 }
394 } else { 399 } else {
395 if ($_GET['area'] == 'blog') 400 if ($_GET['area'] == 'blog')
396 { 401 {
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');
28$template->add('AID',(isset($pageAID)) ? $pageAID : 'none'); 28$template->add('AID',(isset($pageAID)) ? $pageAID : 'none');
29$template->add('EXTRATITLE',isset($title) ? ($title . ' - ') : ''); 29$template->add('EXTRATITLE',isset($title) ? ($title . ' - ') : '');
30$template->add(strtoupper($pageCategory) . 'ACTIVE', ' class="active"'); 30$template->add(strtoupper($pageCategory) . 'ACTIVE', ' class="active"');
31$template->add('EXTRASIDEBAR', isset($extraSidebar) ? $extraSidebar : '');
31 32
32if (($pageCategory != 'fourm') && ($pageCategory != 'wiki')) 33$template->add('REDIRPAGE',rawurlencode($_SERVER['REQUEST_URI']));
33{ 34$template->add('LOGDATA',echoLogData());
34 $template->add('REDIRPAGE',rawurlencode($_SERVER['REQUEST_URI'])); 35$template->add('LOWERLOGDATA','log' . strtolower(echoLogData()));
35 $template->add('LOGDATA',echoLogData()); 36$template->add('SID',getSessionID());
36 $template->add('LOWERLOGDATA','log' . strtolower(echoLogData())); 37$template->adds_block('MEMBERS',array('exi' => 1));
37 $template->add('SID',getSessionID());
38 $template->adds_block('MEMBERS',array('exi' => 1));
39 38
40 if (isAdmin()) 39if (isAdmin())
41 { 40{
42 $template->adds_block('ADMIN',array('exi' => 1)); 41 $template->adds_block('ADMIN',array('exi' => 1));
43 }
44} 42}
45 43
46if (isset($hatNav) && is_array($hatNav)) 44if (isset($hatNav) && is_array($hatNav))
@@ -274,11 +272,11 @@ foreach ($counts as $tag => $count)
274if (!isset($noRightbar)) 272if (!isset($noRightbar))
275{ 273{
276 $template->adds_block('RIGHTBAR', array('exi'=>1)); 274 $template->adds_block('RIGHTBAR', array('exi'=>1));
277} 275}
278 276
279$template->add('ME', getRewriteURL()); 277$template->add('ME', getRewriteURL());
280 278
281$template->add('CONTENT', stripslashes($content)); 279$template->add('CONTENT', $content);
282 280
283$template->display(); 281$template->display();
284 282
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);}
22 22
23require('headerproc.php'); 23require('headerproc.php');
24 24
25session_start(); 25@session_start();
26 26
27function getSessionID() 27function getSessionID()
28{ 28{