This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
188 lines (168 loc) · 7.04 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<?php
/**
* @package Joomla.Site
* @subpackage Templates.ninesixtyj
* @copyright Copyright (C) 2011 Projekt Waterkant
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined( '_JEXEC' ) or die;
// build the full path to the template files
$templatePath = $this->baseurl.'/templates/'.$this->template; // template path
// get the site name
$config = JFactory::getConfig();
$siteName = $config->get('config.sitename');
// determine which positions we want to show
$showLeftPosition = $this->countModules('left');
$showRightPosition = $this->countModules('right');
$showTopPosition = $this->countModules('top');
$showTopmenuPosition = $this->countModules('topmenu');
$showUser1User2User3Positions = $this->countModules('user1 or user2 or user3');
$showUser1Position = $this->countModules('user1');
$showUser2Position = $this->countModules('user2');
$showUser3Position = $this->countModules('user3');
$showUser4User5User6Positions = $this->countModules('user4 or user5 or user6');
$showUser4Position = $this->countModules('user4');
$showUser5Position = $this->countModules('user5');
$showUser6Position = $this->countModules('user6');
$showFooterPosition = $this->countModules('footer');
// Set Container and Grid to grid-12 or grid-16
$GridContainer = 12;
// defaults
$leftPositionWidth = $rightPositionWidth = 0;
// calculate column widths of positions left, component and right
if ($showLeftPosition) {
// Set the Grid to show left Position if countModules = TRUE
$leftPositionWidth = 2;
}
if ($showRightPosition) {
// Set the Grid to show right Position if countModules = TRUE
$rightPositionWidth = 2;
}
$componentWidth = $GridContainer - $leftPositionWidth - $rightPositionWidth;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $templatePath; ?>/css/reset.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $templatePath; ?>/css/text.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $templatePath; ?>/css/960.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $templatePath; ?>/css/clearfix.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $templatePath; ?>/css/template_css.css" type="text/css" />
</head>
<body>
<div id="page-wrapper" class="page">
<!-- ***************** top *************** -->
<?php if ($showTopPosition) : ?>
<div id="top-wrapper">
<div class="top-wrapper-inner container-<?php echo $GridContainer; ?> region clearfix">
<jdoc:include type="modules" name="top" style="box" />
</div>
</div>
<?php endif; ?>
<!-- ***************** header *************** -->
<div id="header-wrapper">
<div class="header-wrapper-inner container-<?php echo $GridContainer; ?> region header clearfix">
<h1>
<?php echo $siteName; ?>
</h1>
</div>
</div>
<!-- ***************** topmenu *************** -->
<?php if ($showTopmenuPosition) : ?>
<div id="topmenu-wrapper">
<div class="topmenu-wrapper-inner container-<?php echo $GridContainer; ?> region clearfix">
<jdoc:include type="modules" name="topmenu" style="container" />
</div>
</div>
<?php endif; ?>
<!-- ***************** user 1,2,3 *************** -->
<?php if ($showUser1User2User3Positions) : ?>
<div id="usertop-wrapper">
<div class="usertop-wrapper-inner container-<?php echo $GridContainer; ?> region clearfix">
<div class="grid-4 user-1">
<?php if ($showUser1Position) : ?>
<jdoc:include type="modules" name="user1" style="box" />
<?php else : ?>
<?php endif; ?>
</div>
<div class="grid-4 user-2">
<?php if ($showUser2Position) : ?>
<jdoc:include type="modules" name="user2" style="box" />
<?php else : ?>
<?php endif; ?>
</div>
<div class="grid-4 user-3">
<?php if ($showUser3Position) : ?>
<jdoc:include type="modules" name="user3" style="box" />
<?php else : ?>
<?php endif; ?>
</div>
</div>
</div>
<?php endif; ?>
<!-- ***************** main *************** -->
<div id="main-wrapper">
<div class="main-wrapper-inner container-<?php echo $GridContainer; ?> region clearfix">
<!-- ***************** left *************** -->
<div class="grid-<?php echo $leftPositionWidth; ?> left">
<jdoc:include type="modules" name="left" style="sidebar" />
</div>
<!-- ***************** content *************** -->
<div class="grid-<?php echo $componentWidth; ?> content">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
<!-- ***************** right *************** -->
<?php if ($showRightPosition) : ?>
<div class="grid-<?php echo $rightPositionWidth; ?> right">
<jdoc:include type="modules" name="right" style="sidebar" />
</div>
<?php endif; ?>
</div>
</div>
<!-- ***************** user 4,5,6 *************** -->
<?php if ($showUser4User5User6Positions) : ?>
<div id="userbottom-wrapper">
<div class="userbottom-wrapper-inner container-<?php echo $GridContainer; ?> region clearfix">
<div class="grid-4 user-4">
<?php if ($showUser4Position) : ?>
<jdoc:include type="modules" name="user4" style="box" />
<?php else : ?>
<?php endif; ?>
</div>
<div class="grid-4 user-5">
<?php if ($showUser5Position) : ?>
<jdoc:include type="modules" name="user5" style="box" />
<?php else : ?>
<?php endif; ?>
</div>
<div class="grid-4 user-6">
<?php if ($showUser6Position) : ?>
<jdoc:include type="modules" name="user6" style="box" />
<?php else : ?>
<?php endif; ?>
</div>
</div>
</div>
<?php endif; ?>
<!-- ***************** footer *************** -->
<?php if ($showFooterPosition) : ?>
<div id="footer-wrapper">
<div class="footer-wrapper-inner container-<?php echo $GridContainer; ?> region clearfix">
<div class="grid-12 footer">
<jdoc:include type="modules" name="footer" style="box" />
</div>
</div>
</div>
<?php endif; ?>
</div>
</body>
</html>