summary refs log tree commit diff stats
path: root/theme/layouts/4.5/headers.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 /theme/layouts/4.5/headers.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 'theme/layouts/4.5/headers.php')
-rw-r--r--theme/layouts/4.5/headers.php85
1 files changed, 85 insertions, 0 deletions
diff --git a/theme/layouts/4.5/headers.php b/theme/layouts/4.5/headers.php new file mode 100644 index 0000000..bb5a179 --- /dev/null +++ b/theme/layouts/4.5/headers.php
@@ -0,0 +1,85 @@
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 theme/css/headers.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?>
26/* Four Island Header CSS */
27<?php
28
29include_once('../includes/specialdates.php');
30
31if (sd_ifNoSpecialDay())
32{
33 $bgimgm = 'main';
34} elseif (sd_isSpecialDay('Four Island A'))
35{
36 $bgimgm = 'islandYearly';
37} elseif (sd_isSpecialDay('Mothers Day'))
38{
39 $bgimgm = 'mothers';
40} elseif (sd_isSpecialDay('Memorial Day'))
41{
42 $bgimgm = 'memorial';
43} elseif (sd_isSpecialDay('Hatkirbys B-Day'))
44{
45 $bgimgm = 'hatkirbybday';
46} else if (sd_isSpecialDay('CTNH'))
47{
48 $bgimgm = 'ctnh';
49} else {
50 $bgimgm = 'main';
51}
52
53if ($bgimgm == 'main')
54{
55 //Check for page-based headers
56?>
57/* Category-Based Headers */
58body.projects div#banner {
59 background-image: url("/theme/images/headers/projects.png");
60}
61body.wiki div#banner {
62 background-image: url("/theme/images/headers/kfm.png");
63}
64body.fourm div#banner {
65 background-image: url("/theme/images/headers/fourm.png");
66}
67body.misc div#banner {
68 background-image: url("/theme/images/headers/random.png");
69}
70body.webs div#banner {
71 background-image: url("/theme/images/headers/links.png");
72}
73body.quotes div#banner {
74 background-image: url("/theme/images/headers/quotes.png");
75}
76body.poll div#banner {
77 background-image: url("/theme/images/headers/potw.png");
78}
79/* AID-Based Headers */
80<?php
81}
82?>
83div#banner {
84 background-image: url("/theme/images/headers/<?php echo($bgimgm); ?>.png"); /*850x129*/
85}