summary refs log tree commit diff stats
path: root/index.php
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-10-03 10:30:17 -0400
committerStarla Insigna <hatkirby@fourisland.com>2009-10-03 10:30:17 -0400
commitdc0fb9445e8a3ede8bc33d6779fadd89b7ea6893 (patch)
tree511b0f752889172163f3801cdbe311f0efc55540 /index.php
parent0e4089184a44719fbd1284acb047ab7547674412 (diff)
downloadfourisland-dc0fb9445e8a3ede8bc33d6779fadd89b7ea6893.tar.gz
fourisland-dc0fb9445e8a3ede8bc33d6779fadd89b7ea6893.tar.bz2
fourisland-dc0fb9445e8a3ede8bc33d6779fadd89b7ea6893.zip
Created Theme Switcher
Also rewrote the way layouts work. Now, each layout requires a "layout.tpl" file (which contains the header and footer for the layout) and a "style.php"
file (which contains and can include other files that contain the CSS for the layout). Each layout has it's own folder in theme/layouts and you can switch
between them using a combo box in the Hatbar.

Layouts 6.2 and 4.5 have been modified to work with new Layout 7 features such as AJAX, and they should be relatively free of bugs. Layout 3 has not yet
been transferred because since it is pre-The New Four Island, it will be very difficult to do so.

This changeset requires manual external code changes:

* The line below must be added above the functions.php include in The Fourm's funnctions.php
	require('/svr/www/hatkirby/fourisland/main/includes/session.php');
* The block of Four Island code in The Fourm's page_header() function should be replaced with:
	global $fi_pagetitle;
	$fi_pagetitle = $page_title;

	ob_start();
* The block of Four Island code in The Fourm's page_footer() function should be replaced with:
	global $fi_pagetitle;

	$content = ob_get_contents();
	ob_end_clean();

	$noRightbar = 1;
	$onFourm = 1;
	$pageCategory = 'fourm';

	if ($fi_pagetitle == 'Index page')
	{
		$title = 'The Fourm';
	} else if (strpos($fi_pagetitle, 'View topic') !== FALSE)
	{
		$title = str_replace('View topic - ', 'Topic: ', $fi_pagetitle) . ' - The Fourm';
	} else if (strpos($fi_pagetitle, 'View forum') !== FALSE)
	{
		$title = str_replace('View forum - ', 'Fourm: ', $fi_pagetitle) . ' - The Fourm';
	} else if (strpos($fi_pagetitle, 'Viewing profile') !== FALSE)
	{
		$title = str_replace('Viewing profile - ', 'Member: ', $fi_pagetitle) . ' - The Fourm';
	} else {
		$title = $fi_pagetitle . ' - The Fourm';
	}

	if ($_GET['view'] != 'print')
	{
		include('/svr/www/hatkirby/fourisland/main/includes/layout.php');
	} else {
		echo $content;
	}

Closes #117
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/index.php b/index.php index 77b4944..d110743 100755 --- a/index.php +++ b/index.php
@@ -25,7 +25,7 @@ if (preg_match('|MSIE ([0-9].[0-9]{1,2})|', $_SERVER['HTTP_USER_AGENT'], $matche
25 header('Content-type: text/html'); 25 header('Content-type: text/html');
26 $usingIE = true; 26 $usingIE = true;
27} else { 27} else {
28 header('Content-type: application/xhtml+xml'); 28// header('Content-type: application/xhtml+xml');
29} 29}
30 30
31header('X-Pingback: http://fourisland.com/xmlrpc.php'); 31header('X-Pingback: http://fourisland.com/xmlrpc.php');
@@ -40,7 +40,13 @@ include('includes/xmlrpc/xmlrpc.inc');
40include('includes/specialdates.php'); 40include('includes/specialdates.php');
41include('includes/functions.php'); 41include('includes/functions.php');
42include('includes/hits.php'); 42include('includes/hits.php');
43include('includes/updatePending.php'); 43include('includes/updatePending.php');
44
45if (strpos($_SERVER['REQUEST_URI'],'index.php'))
46{
47 header('Location: ' . getRewriteURL());
48 exit;
49}
44 50
45ob_start(); 51ob_start();
46 52
@@ -53,13 +59,9 @@ if (file_exists('pages/' . $pageName . '.php'))
53 generateError('404'); 59 generateError('404');
54} 60}
55 61
56$doc = ob_get_contents(); 62$content = ob_get_contents();
57ob_end_clean(); 63ob_end_clean();
58 64
59$doc = stripslashes($doc); 65include('includes/layout.php');
60
61include('includes/header.php');
62echo($doc);
63include('includes/footer.php');
64 66
65?> 67?>