00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 class defaultTemplate extends aliroUserTemplateBase implements ifAliroTemplate {
00044
00045 protected $doctype = 'xhtml_10_trans';
00046
00047 protected $tname = '.';
00048
00049 protected $cssname = 'default.css';
00050
00051 public function __construct () {
00052
00053 $this->areas = array (
00054 array ('position' => 'main', 'min' => 519, 'max' => 519, 'style' => 1),
00055 array ('position' => 'topmenu', 'min' => 519, 'max' => 519, 'style' => 1),
00056 array ('position' => 'navigation', 'min' => 200, 'max' => 200, 'style' => 'Side'),
00057 array ('position' => 'searchbox', 'min' => 259, 'max' => 259, 'style' => 0),
00058 array ('position' => 'feature1', 'min' => 259, 'max' => 259, 'style' => 0),
00059 array ('position' => 'feature2', 'min' => 200, 'max' => 200, 'style' => 0),
00060 array ('position' => 'newsflash', 'min' => 200, 'max' => 200, 'style' => 'Side'),
00061 array ('position' => 'extra', 'min' => 200, 'max' => 200, 'style' => 'Side'),
00062 array ('position' => 'banner', 'min' => 468, 'max' => 468, 'style' => 0),
00063 array ('position' => 'debug', 'min' => 400, 'max' => 400, 'style' => 1)
00064 );
00065
00066 $this->colours = array (
00067 _ALIRO_ERROR_FATAL => 'fatalcolour',
00068 _ALIRO_ERROR_SEVERE => 'severecolour',
00069 _ALIRO_ERROR_WARN => 'warncolour',
00070 _ALIRO_ERROR_INFORM => 'informcolour'
00071 );
00072 parent::__construct();
00073 }
00074
00075
00076 public static function defaultModulePosition () {
00077 return 'extra';
00078 }
00079
00080
00081 public function mainScreenBox () {
00082 return $this->screenarea['main'];
00083 }
00084
00085
00086
00087
00088
00089 public function moduleStyle0 ($moduleclass_sfx, $title, $content) {
00090 $html = "<table cellpadding=\"0\" cellspacing=\"0\" class=\"moduletable$moduleclass_sfx\">";
00091 if ($title) $html .= '<tr><th valign="top">'.$title.'</th></tr>';
00092 $html .= '<tr><td>';
00093 $html .= $content;
00094 $html .= '</td></tr></table>';
00095 return $html;
00096 }
00097
00098 public function moduleStyle1 ($moduleclass_sfx, $title, $content) {
00099 return $content;
00100 }
00101
00102 public function moduleStyleSide ($moduleclass_sfx, $title, $content) {
00103 if ($title) return <<<WITH_TITLE
00104
00105 <li><h2>$title</h2>
00106 $content
00107 </li>
00108
00109 WITH_TITLE;
00110
00111 else return <<<NO_TITLE
00112
00113 <li>
00114 $content
00115 </li>
00116
00117 NO_TITLE;
00118
00119 }
00120
00121
00122 private function makeFeatures () {
00123 if ($this->screenarea['feature1']->countModules() >= 1 OR $this->screenarea['feature2']->countModules() >= 1 ) {
00124 $html = <<<FEATURES
00125
00126 <div id="content_top_wrapper">
00127 <!-- start content top 1. -->
00128 <div id="content_top1">
00129 {$this->screenarea['feature1']->getData()}
00130 </div>
00131 <!-- end content top 1 -->
00132 <!-- start content top 2. -->
00133 <div id="content_top2">
00134 {$this->screenarea['feature2']->getData()}
00135 </div>
00136 <!-- end content top 2 -->
00137 </div>
00138
00139 FEATURES;
00140 }
00141 else $html = '';
00142 return $html;
00143 }
00144
00145
00146 private function makeBanner () {
00147 if ($this->screenarea['banner']->countModules() >= 1) {
00148 $html = <<<BANNER
00149
00150 <!-- start banner. -->
00151 <div id="banner">
00152 {$this->screenarea['banner']->getData()}
00153 </div>
00154 <!-- end banner. -->
00155
00156 BANNER;
00157 }
00158 else $html = '';
00159 return $html;
00160 }
00161
00162 public function render () {
00163
00164 echo <<<PAGE_HTML
00165 {$this->header ()}
00166
00167 <body class="aliroDefault">
00168 <div id="headerwrapper">
00169 <div id="header">
00170 <div id="logo">
00171 <h1><a href="$this->live_site">$this->sitename</a></h1>
00172 <h2><a href="http://www.aliro.org">powered by Aliro</a></h2>
00173 </div>
00174 {$this->screenarea['topmenu']->getData()}
00175 </div>
00176 </div>
00177 <!-- end #headerwrapper -->
00178 <div id="page">
00179 <!-- start sidebar1 -->
00180 <div id="sidebar1" class="sidebar">
00181 <ul>
00182 <li id="search">
00183 {$this->screenarea['searchbox']->getData()}
00184 </li>
00185 {$this->screenarea['navigation']->getData()}
00186 </ul>
00187 </div>
00188 <!-- end sidebar1 -->
00189
00190 <!-- start content -->
00191 <div id="content">
00192 <div id="pathway">
00193 {$this->pathway->makePathway()}
00194 </div>
00195 {$this->errorMessage()}
00196 <div class="post">
00197 <!-- start features -->
00198 {$this->makeFeatures()}
00199 <!-- end features -->
00200 <div id="maincontent">
00201 {$this->mainBody()}
00202 {$this->makeBanner()}
00203 </div>
00204 </div>
00205 </div>
00206 <!-- end content -->
00207
00208 <!-- start sidebar2 -->
00209 <div id="sidebar2" class="sidebar">
00210 <ul>
00211 {$this->screenarea['newsflash']->getData()}
00212 {$this->screenarea['extra']->getData()}
00213 </ul>
00214 </div>
00215 <!-- end sidebar2 -->
00216
00217 <div style="clear: both;"> </div>
00218 </div>
00219 <!-- end page -->
00220 <div id="footer">
00221 <p class="legal">©2008 All Rights Reserved.</p>
00222 <p class="credit">Based on a design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a></p>
00223 {$this->version->footer()}
00224 </div>
00225 {$this->debugOutput()}
00226 </body>
00227 </html>
00228
00229 PAGE_HTML;
00230
00231 }
00232
00233 }