summary refs log tree commit diff stats
path: root/includes/header.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 /includes/header.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 'includes/header.php')
-rwxr-xr-xincludes/header.php96
1 files changed, 0 insertions, 96 deletions
diff --git a/includes/header.php b/includes/header.php deleted file mode 100755 index 003e002..0000000 --- a/includes/header.php +++ /dev/null
@@ -1,96 +0,0 @@
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/header.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
25$headerTemp = new FITemplate('header');
26
27$headerTemp->add('CATEGORY',(isset($pageCategory)) ? $pageCategory : 'none');
28$headerTemp->add('AID',(isset($pageAID)) ? $pageAID : 'none');
29$headerTemp->add('EXTRATITLE',isset($title) ? ($title . ' - ') : '');
30$headerTemp->add(strtoupper($pageCategory) . 'ACTIVE', ' class="active"');
31
32if (($pageCategory != 'fourm') && ($pageCategory != 'wiki'))
33{
34 $headerTemp->add('REDIRPAGE',rawurlencode($_SERVER['REQUEST_URI']));
35 $headerTemp->add('LOGDATA',echoLogData());
36 $headerTemp->add('SID',getSessionID());
37 $headerTemp->adds_block('MEMBERS',array('exi' => 1));
38
39 if (isAdmin())
40 {
41 $headerTemp->adds_block('ADMIN',array('exi' => 1));
42 }
43}
44
45if (isset($hatNav) && is_array($hatNav))
46{
47 $headerTemp->adds_block('CREATE_HATNAV', array('exi'=>1));
48
49 foreach ($hatNav as $item)
50 {
51 $headerTemp->adds_block('HATNAV',array('TITLE' => $item['title'], 'URL' => $item['url'], 'ICON' => $item['icon']));
52 }
53}
54
55$headerTemp->add('POTW', getPollOfTheWeek());
56
57$gethits = "SELECT * FROM config WHERE name = \"hits\"";
58$gethits2 = mysql_query($gethits);
59$gethits3 = mysql_fetch_array($gethits2);
60$headerTemp->add('HITS', $gethits3['value']);
61
62$gethits = "SELECT * FROM config WHERE name = \"todayHits\"";
63$gethits2 = mysql_query($gethits);
64$gethits3 = mysql_fetch_array($gethits2);
65$headerTemp->add('TODAY', $gethits3['value']);
66
67$headerTemp->add('DATEFINDER', sd_dateFinder());
68
69if ($usingIE)
70{
71 $headerTemp->add('FLASH', 'It appears you are using Internet Explorer. Four Island is not likely to work properly in IE due to a <a href="http://www.webdevout.net/articles/beware-of-xhtml#ie">huge bug</a> in it. <a href="http://getfirefox.com/">There are better browsers out there, why not try one?</a>');
72}
73
74$getaffs = "SELECT * FROM links WHERE type = \"affiliates\" ORDER BY id ASC";
75$getaffs2 = mysql_query($getaffs);
76$i=0;
77while ($getaffs3 = mysql_fetch_array($getaffs2))
78{
79 $headerTemp->adds_block('AFFILIATES', array( 'COLOR' => getTagColor($i++),
80 'TITLE' => htmlentities($getaffs3['title']),
81 'URL' => $getaffs3['url']));
82}
83
84$getwebps = "SELECT * FROM links WHERE type = \"webprojs\" ORDER BY id ASC";
85$getwebps2 = mysql_query($getwebps);
86$i=0;
87while ($getwebps3 = mysql_fetch_array($getwebps2))
88{
89 $headerTemp->adds_block('WEBPROJS', array( 'COLOR' => getTagColor($i++),
90 'TITLE' => htmlentities($getwebps3['title']),
91 'URL' => $getwebps3['url']));
92}
93
94$headerTemp->display();
95
96?>