source: branches/1.0/content/themes/bars/index.php @ 981

Revision 981, 5.3 KB checked in by nick_ramsay, 3 years ago (diff)

[Branch] Fix for moving widgets into other widget blocks and switched RSS icon from left to right of RSS Show widget header.

Line 
1<?php
2/**
3 * name: Bars
4 * description: Flexible two or three column theme
5 * version: 0.1
6 * author: Nick Ramsay
7 * authorurl: http://hotarucms.org/member.php?1-Nick
8 *
9 * PHP version 5
10 *
11 * LICENSE: Hotaru CMS is free software: you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation, either version 3 of
14 * the License, or (at your option) any later version.
15 *
16 * Hotaru CMS is distributed in the hope that it will be useful, but WITHOUT
17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 * FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with Hotaru CMS. If not, see http://www.gnu.org/licenses/.
22 *
23 * @category  Content Management System
24 * @package   HotaruCMS
25 * @author    Nick Ramsay <admin@hotarucms.org>
26 * @copyright Copyright (c) 2009, Hotaru CMS
27 * @license   http://www.gnu.org/copyleft/gpl.html GNU General Public License
28 * @link      http://www.hotarucms.org/
29 */
30
31// get settings:
32$bars = $h->getThemeSettings();
33
34// get language
35$h->includeThemeLanguage();
36
37
38
39// set widths and widget block numbers
40if ($bars['left'] && $bars['right']) {
41    $bar_width = 6; $content_width = 11;            // BOTH BARS: total 24 (6x2 + 12)
42    $left = 1; $right = 2;
43} elseif (!$bars['left'] && !$bars['right']) {
44    $h->sidebars = false;
45    $content_width = 24;      // NO BARS: total 24
46    $left = 0; $right = 0;
47} else {
48    $bar_width = 8; $content_width = 15;            // ONE BAR: total 24 (8 + 16)
49    $left = 1; $right = 1;
50}
51
52// plugin hook
53$result = $h->pluginHook('theme_index_top');
54if (!$result) {
55?>
56        <!-- HEADER-->
57        <?php
58            // plugin hook
59            $result = $h->pluginHook('theme_index_header');
60            if (!$result) {
61                $h->displayTemplate('header');
62            }
63        ?>
64    <div class="container">
65        <div id="main" class="span-24 last">
66            <?php if (!$h->sidebars) { ?>
67                    <div id="content" class="span-24 last">
68            <?php } elseif ($h->sidebars && $bars['left']) { ?>
69                    <div id="left_sidebar" class="span-<?php echo $bar_width; ?> last">
70                            <!-- SIDEBAR -->
71                            <?php
72                                // plugin hook
73                                $result = $h->pluginHook('theme_index_sidebar');
74                                if (!$result) { ?>
75                                    <div id="sidebar">
76                                        <?php $h->pluginHook('widget_block', '', array($left)); ?>
77                                    </div>
78                            <?php } ?>
79                    </div>
80                    <div id="content" class="span-<?php echo $content_width; ?> append-1">
81            <?php } else {?>
82                    <div id="content" class="span-<?php echo $content_width; ?> append-1">
83            <?php } ?>
84
85                            <!-- BREADCRUMBS -->
86                            <div id='breadcrumbs' class="span-<?php echo $content_width; ?> last">
87                                <?php echo $h->breadcrumbs(); ?>
88                            </div>
89                           
90                            <!-- USER TABS -->
91                            <?php
92                                // plugin hook
93                                $result = $h->pluginHook('theme_index_post_breadcrumbs');
94                            ?>
95                           
96                            <!-- FILTER TABS -->
97                            <?php
98                                // plugin hook
99                                $result = $h->pluginHook('theme_index_pre_main');
100                            ?>
101                           
102                            <!-- MAIN -->
103                            <?php     
104                                // plugin hook
105                            $result = $h->pluginHook('theme_index_main');
106                            if (!$result) {
107                                $h->displayTemplate($h->pageName);
108                            }
109                            ?>
110                    </div> <!-- close "content" -->
111            <?php if ($h->sidebars && $bars['right']) { ?>
112                    <div id="right_sidebar" class="span-<?php echo $bar_width; ?> last">
113                            <!-- SIDEBAR -->
114                            <?php
115                                // plugin hook
116                                $result = $h->pluginHook('theme_index_sidebar_2');
117                                if (!$result) { ?>
118                                    <div id="sidebar">
119                                        <?php $h->pluginHook('widget_block', '', array($right)); ?>
120                                    </div>
121                            <?php } ?>
122                    </div>
123            <?php } ?>
124        </div> <!-- close "main" -->
125    </div> <!-- close "container" -->
126        <!-- FOOTER -->
127        <?php
128            // plugin hook
129            $result = $h->pluginHook('theme_index_footer');
130            if (!$result) {
131                $h->displayTemplate('footer');
132            }
133        ?>
134<?php    } ?>
Note: See TracBrowser for help on using the repository browser.