From dc0fb9445e8a3ede8bc33d6779fadd89b7ea6893 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sat, 3 Oct 2009 10:30:17 -0400 Subject: 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 --- theme/layouts/4.5/day.css | 4 + theme/layouts/4.5/headers.php | 85 ++++++++++++ theme/layouts/4.5/holiday.php | 112 ++++++++++++++++ theme/layouts/4.5/layout.tpl | 272 +++++++++++++++++++++++++++++++++++++++ theme/layouts/4.5/navigation.css | 173 +++++++++++++++++++++++++ theme/layouts/4.5/night.css | 4 + theme/layouts/4.5/style.css | 233 +++++++++++++++++++++++++++++++++ theme/layouts/4.5/style.php | 38 ++++++ 8 files changed, 921 insertions(+) create mode 100644 theme/layouts/4.5/day.css create mode 100644 theme/layouts/4.5/headers.php create mode 100644 theme/layouts/4.5/holiday.php create mode 100644 theme/layouts/4.5/layout.tpl create mode 100644 theme/layouts/4.5/navigation.css create mode 100644 theme/layouts/4.5/night.css create mode 100644 theme/layouts/4.5/style.css create mode 100755 theme/layouts/4.5/style.php (limited to 'theme/layouts/4.5') diff --git a/theme/layouts/4.5/day.css b/theme/layouts/4.5/day.css new file mode 100644 index 0000000..16fc9a6 --- /dev/null +++ b/theme/layouts/4.5/day.css @@ -0,0 +1,4 @@ +body { + background-color: aqua; + background-image: url(/theme/images/backgrounds/island6.PNG); +} 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 @@ + +/* Four Island Header CSS */ + +/* Category-Based Headers */ +body.projects div#banner { + background-image: url("/theme/images/headers/projects.png"); +} +body.wiki div#banner { + background-image: url("/theme/images/headers/kfm.png"); +} +body.fourm div#banner { + background-image: url("/theme/images/headers/fourm.png"); +} +body.misc div#banner { + background-image: url("/theme/images/headers/random.png"); +} +body.webs div#banner { + background-image: url("/theme/images/headers/links.png"); +} +body.quotes div#banner { + background-image: url("/theme/images/headers/quotes.png"); +} +body.poll div#banner { + background-image: url("/theme/images/headers/potw.png"); +} +/* AID-Based Headers */ + +div#banner { + background-image: url("/theme/images/headers/.png"); /*850x129*/ +} diff --git a/theme/layouts/4.5/holiday.php b/theme/layouts/4.5/holiday.php new file mode 100644 index 0000000..65c1826 --- /dev/null +++ b/theme/layouts/4.5/holiday.php @@ -0,0 +1,112 @@ + + +body { + background-image: url(/theme/images/backgrounds/.PNG) !important; +} diff --git a/theme/layouts/4.5/layout.tpl b/theme/layouts/4.5/layout.tpl new file mode 100644 index 0000000..0ce0e5b --- /dev/null +++ b/theme/layouts/4.5/layout.tpl @@ -0,0 +1,272 @@ + + + <!--EXTRATITLE-->Four Island + + + + + + + + + + + + + + + > +
+ You can get notifications on new Four Island posts either via + RSS + or + Email +
+ +
+ + + + +
+ +
+
+ +
+ + +
+ + + Hatkirby on Four Island + +

+ + +

+ +

+ + +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ + Hatkirby on Four Island + + + + +
+ + +
+ + +
+ +
+ + +
+ + diff --git a/theme/layouts/4.5/navigation.css b/theme/layouts/4.5/navigation.css new file mode 100644 index 0000000..4d3156b --- /dev/null +++ b/theme/layouts/4.5/navigation.css @@ -0,0 +1,173 @@ +/* Four Island NavBar CSS */ + +ul#bannernav { + list-style: none; + clear: both; + margin: 0px; +} + +div#banner-nav { + height: 30px; + clear: both; + margin: 1px 30px 0 30px; + background: url("/theme/images/bg_navbar.gif") repeat-x 0 0; +} + +ul#bannernav li { + float: left; + margin: 0; + padding: 0; + padding-right: 6px; +} + +ul#bannernav li a { + text-decoration: none; + display: block; + width: 100; + height: 30; +} + +ul#bannernav li a span { + visibility: hidden; +} + +ul#bannernav li img { + display: none; +} + +ul#bannernav li#bannernav-home a { + background-image: url("/theme/images/Home.gif"); +} + +body.home ul#bannernav li#bannernav-home a, +ul#bannernav li#bannernav-home a:hover { + background-image: url("/theme/images/Home_ro.gif"); +} + +ul#bannernav li#bannernav-projects a { + background-image: url("/theme/images/Projects.gif"); +} + +body.projects ul#bannernav li#bannernav-projects a, +ul#bannernav li#bannernav-projects a:hover { + background-image: url("/theme/images/Projects_ro.gif"); +} + +ul#bannernav li#bannernav-wiki a { + background-image: url("/theme/images/Wiki.gif"); +} + +body.wiki ul#bannernav li#bannernav-wiki a, +ul#bannernav li#bannernav-wiki a:hover { + background-image: url("/theme/images/Wiki_ro.gif"); +} + +ul#bannernav li#bannernav-fourm a { + background-image: url("/theme/images/Fourm.gif"); +} + +body.fourm ul#bannernav li#bannernav-fourm a, +ul#bannernav li#bannernav-fourm a:hover { + background-image: url("/theme/images/Fourm_ro.gif"); +} + +ul#bannernav li#bannernav-misc a { + background-image: url("/theme/images/Random.gif"); +} + +body.misc ul#bannernav li#bannernav-misc a, +ul#bannernav li#bannernav-misc a:hover { + background-image: url("/theme/images/Random_ro.gif"); +} + +ul#bannernav li#bannernav-webs a { + background-image: url("/theme/images/Links.gif"); +} + +body.webs ul#bannernav li#bannernav-webs a, +ul#bannernav li#bannernav-webs a:hover { + background-image: url("/theme/images/Links_ro.gif"); +} + +ul#bannernav li#bannernav-poll a { + background-image: url("/theme/images/Poll.gif"); +} + +body.poll ul#bannernav li#bannernav-poll a, +ul#bannernav li#bannernav-poll a:hover { + background-image: url("/theme/images/Poll_ro.gif"); +} + +ul#bannernav li#bannernav-quotes a { + background-image: url("/theme/images/Quotes.gif"); +} + +body.quotes ul#bannernav li#bannernav-quotes a, +ul#bannernav li#bannernav-quotes a:hover { + background-image: url("/theme/images/Quotes_ro.gif"); +} + +ul#bannernav li#bannernav-login a { + background-image: url("/theme/images/Login.gif"); +} + +body.login ul#bannernav li#bannernav-login a, +ul#bannernav li#bannernav-login a:hover { + background-image: url("/theme/images/Login_ro.gif"); +} + +ul#bannernav li#bannernav-logout a { + background-image: url("/theme/images/Logout.gif"); +} + +ul#bannernav li#bannernav-logout a:hover { + background-image: url("/theme/images/Logout_ro.gif"); +} + +ul#bannernav li#bannernav-panel a { + background-image: url("/theme/images/Panel.gif"); +} + +body.panel ul#bannernav li#bannernav-panel a, +ul#bannernav li#bannernav-panel a:hover { + background-image: url("/theme/images/Panel_ro.gif"); +} + +ul#bannernav li#bannernav-search { + display: block; + float: right; + width: 165px; + height: 30px; + margin: 0px; + background: url("/theme/images/bg_search.gif") 0 0 no-repeat; +} + +ul#bannernav li#bannernav-search fieldset { + border: none; + padding-top: 6px; + border-width:0pt; + font-family:Verdana,Helvetica,Arial,sans-serif; + font-size:1.1em; +} + +ul#bannernav li#bannernav-search input { + width: 125px; + height: 19px !important; + margin-left: 13px; + border: none !important; + background-color: transparent; + cursor:pointer; + font-family:Verdana,Helvetica,Arial,sans-serif; + font-weight:normal; + padding:0pt 3px; + vertical-align:middle; + line-height:1.3em; + color:#536482; + margin-top: -20px; +} + +body.fourm ul#bannernav li#bannernav-search input { + margin-top: 0px; + font-size: 1.1em !important; + margin-left: 28px; +} diff --git a/theme/layouts/4.5/night.css b/theme/layouts/4.5/night.css new file mode 100644 index 0000000..e97ac71 --- /dev/null +++ b/theme/layouts/4.5/night.css @@ -0,0 +1,4 @@ +body { + background-color: black; + background-image: url(/theme/images/backgrounds/island6night.PNG); +} diff --git a/theme/layouts/4.5/style.css b/theme/layouts/4.5/style.css new file mode 100644 index 0000000..b8afbbb --- /dev/null +++ b/theme/layouts/4.5/style.css @@ -0,0 +1,233 @@ +body { + background-repeat: repeat-x; + background-attachment: fixed; + background-position: bottom left; + font-family: Arial, FreeSans; + margin: 0px; + padding: 0px 0px 30px !important; +} + +body.fourm { + font-family: Verdana, Helvetica, Arial, sans-serif; +} + +body.fourm div#content { + width: 100%; + float: none; +} + +body.fourm div#wrap, +body.poll div#wrap, +body.quotes div#wrap, +body.admin div#wrap { + background-image: url(/theme/images/bg_body.gif); + background-repeat: repeat-y; +} + +div#banner, div#fi-banner { + background-repeat: no-repeat; + width: 850px; + height: 129px; + float: left; + margin-top: 21px; +} + +#page-header { + background: url("/theme/images/bg_header.gif") repeat-x 0 0; + height: 150px; + clear: both; +} + +div#banner { + background-image: url("/theme/images/fourisland_header.png"); +} + +body div#banner h1, body div#fi-banner h1 { + margin: 0; +} + +body div#banner h1 a, body div#fi-banner h1 a { + display: block; + width: 850px; + height: 129px; + text-indent: -5000px; + text-decoration: none; + margin: 0; +} + +div#banner h1, div#fi-banner h1 { + margin: 0; + font-size: 3.0em; + font-weight: normal; +} + +div#bannernav { + text-align: center; +} + +span.side-left, span.side-right { + display: block; + width: 20px; + height: 150px; + background: url("/theme/images/sides_top.gif") no-repeat; +} + +span.side-left { + float: left; + margin-right: 10px; +} + +span.side-right { + background-position: 100% 0; + float: right; +} + +/* Sidebar */ + +div#rightbar { + float: right; + width: 250px; /*210*/ + padding: 0 10; +} + +div.sidebar { + width: 250px; /*250*/ /*240*/ /*210*/ + padding: 0 10px; + margin-bottom: 5px; +} + +div.sidebar h3 { + font-family: Verdana, Helvetica, Arial, sans-serif; + margin: 5px 0 0 0; + font-weight: bold; + color: #333333; +} + +div.sidebar p { + font-size: 0.8em; + margin: 3px 0; +} + +div.sidebar ul { + list-style-type: none; + padding: 0; + margin: 0; + line-height: normal !important; + list-style-image: none !important; +} + +div#sidebar ul li { + margin-top: 4px; +} + +div#sidebar ul li a { + display: block; + width: 230px; +} + +div#sidebar li img { + border: 0; + height: 16px; + width: 16px; +} + +/* Layout */ + +#wrap { + background: #FFFFFF url("/theme/images/bg_body.gif") repeat-y 0 0; + width: 910px; + margin: 10px auto; + text-align: left; + padding: 0; + margin-top: 25px; +} + +#page-body { + margin: 10px 55px 0 30px; + clear: both; + position: relative; +} + +body.fourm #page-body { + margin-left: 25; + margin-right: 10; + width: 95%; + font-size: 62.5%; +} + +#phpBB3-page-body { + margin: 4px 0 !important; + clear: both; +} + +/* Content */ + +div#content { + float: left; + width: 555px; /*465*/ /*555*/ +} + + +div#content h2 { + color: #59770e; + margin: 0px 0px 2px; + border-bottom: 1px dotted #CCCCCC; + letter-spacing: -1px; + font: normal 140%/100% "Trebuchet MS", Tahoma, Arial; + padding-bottom: 3px; +} + +/* Random Divs/Spans */ + + +div#footer { + clear: both; + padding-bottom: 1em; + padding-top: .5em; + margin-top: .5em; + text-align: center; + font-size: .68em; + width: 100%; + border-top: 1px black solid; + border-bottom: 4px gray solid; +} + +div#footer ul.rows li { + display: list-item; +} + +div#footer ul { + padding: 0; + margin: 0; + list-style-type: none; +} + +div#footer ul li { + display: inline; + margin-right: 1em; +} + +div#footer ul li img { + width: 20px; + height: 20px; + vertical-align: top; +} + +div#flash { + position: fixed; + top: 0; + left: 0; + width: 100%; + background-color: #FBEC5D; + height: 20px; + z-index: 99; + padding-top: 5px; + text-align: center; + display: block; + padding-bottom: 0; + border-bottom: none; +} + +* > html div#flash { + position: absolute; +} diff --git a/theme/layouts/4.5/style.php b/theme/layouts/4.5/style.php new file mode 100755 index 0000000..fa50dc4 --- /dev/null +++ b/theme/layouts/4.5/style.php @@ -0,0 +1,38 @@ += 20) || (date('G') <= 6)) || isset($_GET['night']) && !isset($_GET['day'])) +{ + include('layouts/4.5/night.css'); +} else { + include('layouts/4.5/day.css'); +} + +include('layouts/4.5/headers.php'); +include('layouts/4.5/navigation.css'); +include('layouts/4.5/holiday.php'); + +?> -- cgit 1.4.1