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/style.css | 233 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 theme/layouts/4.5/style.css (limited to 'theme/layouts/4.5/style.css') 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; +} -- cgit 1.4.1