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/7/layout.tpl | 234 +++++++++++++++++++++++++++++++++++++++++++++ theme/layouts/7/style.css | 183 +++++++++++++++++++++++++++++++++++ theme/layouts/7/style.php | 27 ++++++ 3 files changed, 444 insertions(+) create mode 100644 theme/layouts/7/layout.tpl create mode 100644 theme/layouts/7/style.css create mode 100755 theme/layouts/7/style.php (limited to 'theme/layouts/7') diff --git a/theme/layouts/7/layout.tpl b/theme/layouts/7/layout.tpl new file mode 100644 index 0000000..48eb1e6 --- /dev/null +++ b/theme/layouts/7/layout.tpl @@ -0,0 +1,234 @@ + + + + + <!--EXTRATITLE-->Four Island + + + + + + + + + + + + + +
+ + + +
+ + +
+ + +
+
+ +
+
+
+ +
+
+ + + + diff --git a/theme/layouts/7/style.css b/theme/layouts/7/style.css new file mode 100644 index 0000000..c16bdfa --- /dev/null +++ b/theme/layouts/7/style.css @@ -0,0 +1,183 @@ +/* Body */ + +body { + font-family: "Lucida Grande", "Arial", sans; + background-color: #111; +} + +div#header { + width: 100%; + height: 200px; + background-image: url(http://fourisland.com/theme/images/header-repeat.png); + background-repeat: repeat-x; +} + +div#banner { + width: 800px; + height: 200px; + margin: 0 auto; + background-image: url(http://fourisland.com/theme/images/header.png); + background-position: bottom right; +} + +div#header a { + width: 800px; + height: 200px; + text-indent: -5000px; + display: block; +} + +div#sidebar { + width: 21%; + float: left; +} + +div#content { + width: 69%; + float: right; + padding-left: 5%; + padding-right: 5%; + padding-top: 20px; +} + +div#content div.rounded { + padding: 10px; +} + +div#footer { + width: 100%; + padding-top: 20px; + padding-bottom: 20px; +} + +div#footer div.foot-module { + margin: 0 auto; + float: left; + width: 20%; + margin-left: 4%; + color: white; + font-size: 0.9em; +} + +div#footer a { + color: white; + border-bottom: 1px dotted white; +} + +div#footer div.foot-module ul { + list-style-type: square; +} + +div#footer p { + font-size: 0.5em; + color: white; + text-align: center; +} + +div#page-content { + background-color: #00ff00; /*#8B4513;*/ + padding-bottom: 10px; +} + +body#fourm div#actual-content { + font-size: 60%; +} + +ul#navbar { + text-align: center; + margin-top: 0; +} + +ul#navbar li { + display: inline; + font-family: Verdana, sans-serif; + font-size: 1.1em; +} + +ul#navbar li+li:before { + content: " - "; +} + +ul#navbar li img, ul#navbar li.active span { + display: none; +} + +ul#navbar li.active img { + display: inline; + background-color: white; + outline: white solid .5em; + margin: 0 .5em; +} + +/* Sidebar */ + +div#rightbar { + float: left; + width: 270px; /*210*/ +} + +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.hatnav { + list-style-type: none; + padding-left: 24px; + margin-top: 0 !important; + line-height: normal !important; + list-style-image: none !important; +} + +div#sidebar ul { + list-style-type: none; +} + +div#sidebar ul.hatnav li { + text-align: right; + border: 1px gray solid; + padding-top: 2px; + padding-bottom: 2px; + background-color: #111; + color: white; +} + +div#sidebar ul.hatnav li a { + display: block; + width: 95%; + color: white; +} + +div#sidebar li img { + border: 0; + height: 16px; + width: 16px; +} + +div#sidebar ul.hatnav li.active { + background-color:#00FF00; + border: none; +} + +div#sidebar ul.hatnav li:hover { + background-color:yellow; + border: none; +} + +div#sidebar ul li.active a, div#sidebar ul li a:hover { + color: black; +} + diff --git a/theme/layouts/7/style.php b/theme/layouts/7/style.php new file mode 100755 index 0000000..3c44d1e --- /dev/null +++ b/theme/layouts/7/style.php @@ -0,0 +1,27 @@ + -- cgit 1.4.1