1<?php
2/**
3 * DokuWiki Arctic Template
4 *
5 * This is the template you need to change for the overall look
6 * of DokuWiki.
7 *
8 * You should leave the doctype at the very top - It should
9 * always be the very first line of a document.
10 *
11 * @author Andreas Gohr <andi@splitbrain.org>
12 * @author Michael Klier <chi@chimeric.de>
13 * @author Laura Eun <laura.eun@live.de>
14 * @link   http://www.dokuwiki.org/template:arctictut
15 */
16
17// must be run from within DokuWiki
18if (!defined('DOKU_INC')) die();
19
20global $ACT;
21
22// include custom arctictut template functions
23require_once(dirname(__FILE__).'/tpl_functions.php');
24?>
25<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
26 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
27<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
28 lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction']?>">
29<head>
30  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
31  <title>
32    <?php tpl_pagetitle()?>
33    [<?php echo strip_tags($conf['title'])?>]
34  </title>
35
36  <?php tpl_metaheaders()?>
37  <!--get favicon location either out of the template images folder or data/media folder-->
38  <?php $favicon = tpl_getMediaFile(array(':wiki:favicon.ico', ':favicon.ico', 'images/favicon.ico'), false);?>
39  <link rel="shortcut icon" href="<?php echo $favicon;?>" />
40
41  <?php /*old includehook*/ @include(dirname(__FILE__).'/meta.html')?>
42
43</head>
44<body>
45<?php /*old includehook*/ @include(dirname(__FILE__).'/topheader.html')?>
46<div id="wrapper" class='<?php echo $ACT ?>'>
47  <div class="dokuwiki">
48
49    <?php html_msgarea()?>
50	<?php
51	// get logo either out of the template images folder or data/media folder
52    $logo = tpl_getMediaFile(array(':wiki:'.tpl_getConf('logoname'), ':'.tpl_getConf('logoname'), 'images/'.tpl_getConf('logoname')), false);
53	?>
54    <div class="stylehead">
55      <div class="headerinc" style="height:<?php tpl_getConf('logoheigth') ?>;">
56      <a href="<?php echo DOKU_URL ?>doku.php" accesskey="h" title="[[START]]" name="dokuwiki__top"><img src="<?php echo $logo?>" width="<?php echo tpl_getConf('logowidth') ?>" height="<?php echo tpl_getConf('logoheigth') ?>" border="0" /></a>
57	  <?php if ($conf['tagline']): ?>
58		<div class="tagline">
59		<?php echo $conf['tagline']; ?>
60		</div>
61	  <?php endif ?>
62      </div>
63
64      <?php if(tpl_getConf('trace')) {?>
65      <div class="breadcrumbs">
66        <?php ($conf['youarehere'] != 1) ? tpl_breadcrumbs() : tpl_youarehere();?>
67		<?php if (tpl_getConf('translation_bar') == 'breadcrumbs') { ?>
68		<div style="float:right;">
69		 <?php
70          $translation = &plugin_load('helper','translation');
71          if ($translation) echo $translation->showTranslations();
72         ?>
73		</div>
74		<?php
75		}
76		?>
77      </div>
78      <?php } ?>
79
80      <?php /*old includehook*/ @include(dirname(__FILE__).'/header.html')?>
81      </div>
82
83      <?php if(!$toolb) { ?>
84      <?php if(!tpl_getConf('hideactions') || tpl_getConf('hideactions') && isset($_SERVER['REMOTE_USER'])) { ?>
85      <div class="bar" id="bar__top">
86        <div class="bar-left">
87          <?php
88            if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) {
89                switch(tpl_getConf('wiki_actionlinks')) {
90                  case('buttons'):
91                    // check if new page button plugin is available
92                    if(!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
93                      $npd->html_new_page_button();
94                    }
95                    tpl_button('edit');
96					tpl_button('history');
97					if ((tpl_getConf('show_backlink') == 'top') || (tpl_getConf('show_backlink') == 'both')) {
98					tpl_button('backlink');
99					}
100                    break;
101                  case('links'):
102                    // check if new page button plugin is available
103                    if(!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
104                      $npd->html_new_page_button();
105                    }
106                    tpl_actionlink('edit');
107					tpl_actionlink('history');
108					if ((tpl_getConf('show_backlink') == 'top') || (tpl_getConf('show_backlink') == 'both')) {
109					tpl_actionlink('backlink');
110					}
111                    break;
112                }
113            }
114          ?>
115        </div>
116        <div class="bar-right">
117          <?php
118switch(tpl_getConf('wiki_actionlinks')) {
119              case('buttons'):
120                if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) {
121                  tpl_button('admin');
122                  tpl_button('revert');
123                  tpl_button('profile');
124                  tpl_button('recent');
125                  tpl_button('index');
126                  tpl_button('register');
127                  tpl_button('login');
128                  if(tpl_getConf('sidebar') == 'none') tpl_searchform();
129                } else {
130                  tpl_button('register');
131                  tpl_button('login');
132                }
133                break;
134              case('links'):
135                if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) {
136                  tpl_actionlink('admin');
137                  tpl_actionlink('revert');
138                  tpl_actionlink('profile');
139                  tpl_actionlink('recent');
140                  tpl_actionlink('index');
141                  tpl_actionlink('register');
142                  tpl_actionlink('login');
143                  if(tpl_getConf('sidebar') == 'none') tpl_searchform();
144                } else {
145                  tpl_actionlink('register');
146                  tpl_actionlink('login');
147                }
148                break;
149            }
150          ?>
151        </div>
152    </div>
153    <?php } ?>
154    <?php } ?>
155
156    <?php /*old includehook*/ @include(dirname(__FILE__).'/pageheader.html')?>
157
158    <?php flush()?>
159
160    <?php if(tpl_getConf('sidebar') == 'left') { ?>
161
162      <?php if(!arctic_tpl_sidebar_hide()) { ?>
163        <div class="left_sidebar">
164          <?php tpl_searchform() ?>
165          <?php arctic_tpl_sidebar('left') ?>
166        </div>
167        <div class="right_page">
168		<?php if (tpl_getConf('translation_bar') == 'top' || tpl_getConf('translation_bar') == 'top and bottom') { ?>
169          <?php
170          $translation = &plugin_load('helper','translation');
171          if ($translation) echo $translation->showTranslations();
172         ?>
173		<?php
174		}
175		?>
176          <?php ($notoc) ? tpl_content(false) : tpl_content() ?>
177		  <?php if (tpl_getConf('translation_bar') == 'bottom' || tpl_getConf('translation_bar') == 'top and bottom') { ?>
178          <?php
179          $translation = &plugin_load('helper','translation');
180          if ($translation) echo $translation->showTranslations();
181         ?>
182		<?php
183		}
184		?>
185        </div>
186      <?php } else { ?>
187        <div class="page">
188          <?php tpl_content()?>
189        </div>
190      <?php } ?>
191
192    <?php } elseif(tpl_getConf('sidebar') == 'right') { ?>
193
194      <?php if(!arctic_tpl_sidebar_hide()) { ?>
195		<div class="left_page">
196		<?php if (tpl_getConf('translation_bar') == 'top' || tpl_getConf('translation_bar') == 'top and bottom') { ?>
197          <?php
198          $translation = &plugin_load('helper','translation');
199          if ($translation) echo $translation->showTranslations();
200         ?>
201		<?php
202		}
203		?>
204          <?php ($notoc) ? tpl_content(false) : tpl_content() ?>
205		<?php if (tpl_getConf('translation_bar') == 'bottom' || tpl_getConf('translation_bar') == 'top and bottom') { ?>
206          <?php
207          $translation = &plugin_load('helper','translation');
208          if ($translation) echo $translation->showTranslations();
209         ?>
210		<?php
211		}
212		?>
213        </div>
214        <div class="right_sidebar">
215          <?php tpl_searchform() ?>
216          <?php arctic_tpl_sidebar('right') ?>
217        </div>
218      <?php } else { ?>
219        <div class="page">
220          <?php tpl_content() ?>
221        </div>
222      <?php }?>
223
224    <?php } elseif(tpl_getConf('sidebar') == 'both') { ?>
225
226      <?php if(!arctic_tpl_sidebar_hide()) { ?>
227        <div class="left_sidebar">
228          <?php if(tpl_getConf('search') == 'left') tpl_searchform() ?>
229          <?php arctic_tpl_sidebar('left') ?>
230        </div>
231		<div class="center_page">
232		<?php if (tpl_getConf('translation_bar') == 'top' || tpl_getConf('translation_bar') == 'top and bottom') { ?>
233        <?php
234          $translation = &plugin_load('helper','translation');
235          if ($translation) echo $translation->showTranslations();
236        ?>
237		<?php
238		}
239		?>
240          <?php ($notoc) ? tpl_content(false) : tpl_content() ?>
241		<?php if (tpl_getConf('translation_bar') == 'bottom' || tpl_getConf('translation_bar') == 'top and bottom') { ?>
242          <?php
243          $translation = &plugin_load('helper','translation');
244          if ($translation) echo $translation->showTranslations();
245        ?>
246		<?php
247		}
248		?>
249        </div>
250        <div class="right_sidebar">
251          <?php if(tpl_getConf('search') == 'right') tpl_searchform() ?>
252          <?php arctic_tpl_sidebar('right') ?>
253        </div>
254      <?php } else { ?>
255        <div class="page">
256          <?php tpl_content()?>
257        </div>
258      <?php }?>
259
260	<?php } elseif(tpl_getConf('sidebar') == 'none') { ?>
261	<?php if (tpl_getConf('translation_bar') == 'top' || tpl_getConf('translation_bar') == 'top and bottom') { ?>
262	<?php
263          $translation = &plugin_load('helper','translation');
264          if ($translation) echo $translation->showTranslations();
265        ?>
266		<?php
267		}
268		?>
269      <div class="page">
270        <?php tpl_content() ?>
271		<?php if (tpl_getConf('translation_bar') == 'bottom' || tpl_getConf('translation_bar') == 'top and bottom') { ?>
272		<?php
273          $translation = &plugin_load('helper','translation');
274          if ($translation) echo $translation->showTranslations();
275        ?>
276		<?php
277		}
278		?>
279      </div>
280    <?php } ?>
281
282      <div class="stylefoot">
283        <div class="meta">
284          <div class="user">
285          <?php tpl_userinfo()?>
286          </div>
287          <div class="doc">
288          <?php tpl_pageinfo()?>
289          </div>
290        </div>
291      </div>
292
293    <div class="clearer"></div>
294
295    <?php flush()?>
296
297    <?php if(!$toolb) { ?>
298    <?php if(!tpl_getConf('hideactions') || tpl_getConf('hideactions') && isset($_SERVER['REMOTE_USER'])) { ?>
299    <?php if(!tpl_getConf('closedwiki') || (tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER']))) { ?>
300    <div class="bar" id="bar__bottom">
301      <div class="bar-left">
302        <?php
303          switch(tpl_getConf('wiki_actionlinks')) {
304            case('buttons'):
305                tpl_button('edit');
306                tpl_button('history');
307				if ((tpl_getConf('show_backlink') == 'bottom') || (tpl_getConf('show_backlink') == 'both')) {
308				tpl_button('backlink');
309				}
310              break;
311            case('links'):
312                tpl_actionlink('edit');
313                tpl_actionlink('history');
314				if ((tpl_getConf('show_backlink') == 'bottom') || (tpl_getConf('show_backlink') == 'both')) {
315				tpl_actionlink('backlink');
316				}
317              break;
318          }
319        ?>
320      </div>
321      <div class="bar-right">
322        <?php
323          switch(tpl_getConf('wiki_actionlinks')) {
324            case('buttons'):
325		tpl_button('back');
326                tpl_button('media');
327                tpl_button('subscription');
328                tpl_button('top');
329              break;
330            case('links'):
331		tpl_actionlink('back');
332                tpl_actionlink('media');
333                tpl_actionlink('subscription');
334                tpl_actionlink('top');
335              break;
336          }
337        ?>
338      </div>
339    </div>
340    <div class="clearer"></div>
341    <?php } ?>
342    <?php } ?>
343    <?php } ?>
344
345    <?php /*old includehook*/ @include(dirname(__FILE__).'/footer.html')?>
346
347  </div>
348</div>
349
350<div class="no"><?php /* provide DokuWiki housekeeping, required in all templates */ tpl_indexerWebBug()?></div>
351</body>
352</html>
353