Esempio n. 1
0
function tpl_translation($conf)
{
    if (file_exists(dirname(__FILE__) . '/lang/' . $conf . '/settings.php')) {
        return $conf;
    }
    return tpl_getConf('btl_language');
}
Esempio n. 2
0
function tpl_sidebar_content()
{
    global $ID, $REV, $ACT, $conf;
    // save globals
    $saveID = $ID;
    $saveREV = $REV;
    $saveACT = $ACT;
    // discover file to be displayed in navigation sidebar
    $fileSidebar = '';
    if (tpl_getConf('page')) {
        $fileSidebar = getSidebarFN(getNS($ID), tpl_getConf('page'));
    }
    // determine what to display
    if ($fileSidebar) {
        $ID = $fileSidebar;
        $REV = '';
        $ACT = 'show';
        #    print p_wiki_xhtml($fileSidebar,'',false);
        tpl_content();
    } else {
        #    global $IDX;
        #    html_index($IDX);
        #    $ID = getNS($ID);
        $REV = '';
        $ACT = 'index';
        tpl_content();
    }
    // restore globals
    $ID = $saveID;
    $REV = $saveREV;
    $ACT = $saveACT;
}
Esempio n. 3
0
/**
 * Wrapper around custom template actions
 *
 * @author Anika Henke <*****@*****.**>
 */
function _tpl_action($type, $link = 0, $wrapper = 0)
{
    switch ($type) {
        case 'userpage':
            if (tpl_getConf('userPage')) {
                _tpl_userpage(tpl_getConf('userPage'), tpl_getLang('userpage'), $link, $wrapper);
            }
            break;
    }
}
Esempio n. 4
0
/**
 * Wrapper around custom template actions
 *
 * @author Anika Henke <*****@*****.**>
 */
function _tpl_action($type, $link = 0, $wrapper = 0)
{
    switch ($type) {
        case 'discussion':
            if (tpl_getConf('discussionPage')) {
                _tpl_discussion(tpl_getConf('discussionPage'), tpl_getLang('discussion'), tpl_getLang('back_to_article'), $link, $wrapper);
            }
            break;
        case 'userpage':
            if (tpl_getConf('userPage')) {
                _tpl_userpage(tpl_getConf('userPage'), tpl_getLang('userpage'), $link, $wrapper);
            }
            break;
    }
}
/**
 * Prints the navigation
 *
 * @author Michael Klier <*****@*****.**>
 */
function tpl_navigation()
{
    global $ID;
    global $conf;
    $navpage = tpl_getConf('navigation_page');
    print '<div class="navigation">' . DOKU_LF;
    if (!page_exists($navpage)) {
        if (@file_exists(DOKU_TPLINC . 'lang/' . $conf['lang'] . '/nonavigation.txt')) {
            $out = p_render('xhtml', p_get_instructions(io_readFile(DOKU_TPLINC . 'lang/' . $conf['lang'] . '/nonavigation.txt')), $info);
        } else {
            $out = p_render('xhtml', p_get_instructions(io_readFile(DOKU_TPLINC . 'lang/en/nonavigation.txt')), $info);
        }
        $link = '<a href="' . wl($navpage) . '" class="wikilink2">' . $navpage . '</a>' . DOKU_LF;
        print str_replace('LINK', $link, $out);
    } else {
        print p_wiki_xhtml($navpage);
    }
    print '</div>';
}
function tpl_sidebar()
{
    global $ID, $REV, $conf;
    // save globals
    $saveID = $ID;
    $saveREV = $REV;
    // discover file to be displayed in navigation sidebar
    $fileSidebar = '';
    $sidebar_name = tpl_getConf('btl_sidebar_name');
    if (isset($sidebar_name)) {
        $fileSidebar = getSidebarFN(getNS($ID), $sidebar_name);
    }
    // determine what to display
    if ($fileSidebar) {
        $ID = $fileSidebar;
        $REV = '';
        $sidebar = p_wiki_xhtml($ID, $REV, false);
        $lines = explode("\n", $sidebar);
        $open_ul = 0;
        for ($i = 0; $i < count($lines); $i++) {
            if (trim($lines[$i]) == '<ul>') {
                $open_ul = $open_ul + 1;
                if ($open_ul == 1) {
                    $lines[$i] = '<ul class="primary">' . "\n";
                }
            } else {
                if (strpos($lines[$i], '</ul>') != false) {
                    $open_ul = $open_ul - 1;
                }
            }
        }
        print implode($lines);
    } else {
        global $IDX;
        html_index($IDX);
    }
    // restore globals
    $ID = $saveID;
    $REV = $saveREV;
}
function tpl_sidebar_content()
{
    global $ID, $REV, $conf;
    // save globals
    $saveID = $ID;
    $saveREV = $REV;
    // discover file to be displayed in navigation sidebar
    $fileSidebar = '';
    if (tpl_getConf('page')) {
        $fileSidebar = getSidebarFN(getNS($ID), tpl_getConf('page'));
    }
    // determine what to display
    if ($fileSidebar) {
        $ID = $fileSidebar;
        $REV = '';
        print p_wiki_xhtml($ID, $REV, false);
    } else {
        global $IDX;
        html_index($IDX);
    }
    // restore globals
    $ID = $saveID;
    $REV = $saveREV;
}
<?php

if (strpos(tpl_getConf('elements'), 'header_landing_area') !== false) {
    include 'tpl_site_header_landing.php';
}
?>

<!-- ********** HEADER ********** -->
<header id="dokuwiki__top">

    <?php 
include 'tpl_site_header_topbar.php';
?>

    <?php 
include 'tpl_site_header_nav.php';
?>

</header><!-- /#dokuwiki__header -->


    <div id="mixture__content" class="pad">
<?php 
html_msgarea();
?>
            <!--<div class="clearer"></div>-->
        <nav class="tools">
            <!-- USER TOOLS -->
            <?php 
if ($conf['useacl'] && $showTools) {
    ?>
Esempio n. 9
0
//RSS recent changes button
$_vector_btns["rss"]["img"] = DOKU_TPL . "static/img/button-rss.png";
$_vector_btns["rss"]["href"] = DOKU_BASE . "feed.php";
$_vector_btns["rss"]["width"] = 80;
$_vector_btns["rss"]["height"] = 15;
$_vector_btns["rss"]["title"] = $lang["vector_recentchanges"];
$_vector_btns["rss"]["nofollow"] = true;
//donation button
if (tpl_getConf("vector_donate")) {
    $_vector_btns["donate"]["img"] = DOKU_TPL . "static/img/button-donate.gif";
    $_vector_btns["donate"]["href"] = DOKU_BASE . "feed.php";
    if (tpl_getConf("vector_donate_default")) {
        $_vector_btns["donate"]["href"] = "http://andreas-haerter.com/donate/vector/paypal";
        //default url
    } else {
        $_vector_btns["donate"]["href"] = tpl_getConf("vector_donate_url");
        //custom url
    }
    $_vector_btns["donate"]["width"] = 80;
    $_vector_btns["donate"]["height"] = 15;
    $_vector_btns["donate"]["title"] = $lang["vector_donate"];
    $_vector_btns["donate"]["nofollow"] = true;
}
//"vector for DokuWiki" button
//Note: You are NOT allowed to remove this button. Please respect this!
$_vector_btns["vecfdw"]["img"] = DOKU_TPL . "static/img/button-vector.png";
$_vector_btns["vecfdw"]["href"] = "http://andreas-haerter.com/projects/dokuwiki-template-vector";
$_vector_btns["vecfdw"]["width"] = 80;
$_vector_btns["vecfdw"]["height"] = 15;
$_vector_btns["vecfdw"]["title"] = $lang["vector_mdtemplatefordw"];
$_vector_btns["vecfdw"]["nofollow"] = false;
Esempio n. 10
0
tpl_action('recent', 1, 'li');
tpl_action('media', 1, 'li');
tpl_action('index', 1, 'li');
?>
            </ul>
        </div>

    </div>
    
    <!-- TOPBAR - @20cones-template@ -->
    <div class="topbar">
      <?php 
if (tpl_getConf("20cones_htmltopbar")) {
    tpl_includeFile('topbar.html');
} else {
    tpl_include_page(tpl_getConf("20cones_pagetopbar"), 1, 1);
}
?>
    </div>

    <!-- BREADCRUMBS -->
    <?php 
if ($conf['breadcrumbs'] || $conf['youarehere']) {
    ?>
        <div class="breadcrumbs">
            <?php 
    if ($conf['youarehere']) {
        ?>
                <div class="youarehere"><?php 
        tpl_youarehere();
        ?>
Esempio n. 11
0
/**
 * Renders the Index
 *
 */
function p_index_xhtml($ns)
{
    require_once DOKU_INC . 'inc/search.php';
    global $conf;
    global $ID;
    $dir = $conf['datadir'];
    $tpl = $conf['template'];
    $start = isset($conf['start']) ? $conf['start'] : 'start';
    $ns = getNS($ns);
    $data = array();
    search($data, $conf['datadir'], 'search_index', array('ns' => $ns));
    $i = 0;
    $cleanindexlist = array();
    if (tpl_getConf('cleanindexlist')) {
        $cleanindexlist = explode(',', tpl_getConf('cleanindexlist'));
        $i = 0;
        foreach ($cleanindexlist as $tmpitem) {
            $cleanindexlist[$i] = trim($tmpitem);
            $i++;
        }
    }
    $i = 0;
    foreach ($data as $item) {
        if (tpl_getConf('cleanindex')) {
            if (count($cleanindexlist)) {
                if (strpos($item['id'], ':')) {
                    list($tmpitem) = explode(':', $item['id']);
                } else {
                    $tmpitem = $item['id'];
                }
                if (in_array($tmpitem, $cleanindexlist)) {
                    unset($data[$i]);
                }
            }
        }
        if ($item['id'] == 'sidebar' or $item['id'] == $start or preg_match('/:' . $start . '$/', $item['id']) or !empty($conf['hidepages']) and preg_match('/' . $conf['hidepages'] . '$/', $item['id']) or $item['id'] == $conf['tpl']['dokukit']['extlinks']) {
            unset($data[$i]);
        }
        $i++;
    }
    # echo index with empty items removed
    echo html_buildlist($data, 'idx', '_html_list_index', 'html_li_index');
}
Esempio n. 12
0
{
    switch ($type) {
        case 'register':
            // deprecated
            _tpl_register($link, $wrapper);
            break;
    }
}
/* fallbacks for things missing in older DokuWiki versions
********************************************************************/
/* if newer settings exist in the core, use them, otherwise fall back to template settings */
if (!isset($conf['tagline'])) {
    $conf['tagline'] = tpl_getConf('tagline');
}
if (!isset($conf['sidebar'])) {
    $conf['sidebar'] = tpl_getConf('sidebarID');
}
/* these $lang strings are now in the core */
if (!isset($lang['user_tools'])) {
    $lang['user_tools'] = tpl_getLang('user_tools');
}
if (!isset($lang['site_tools'])) {
    $lang['site_tools'] = tpl_getLang('site_tools');
}
if (!isset($lang['page_tools'])) {
    $lang['page_tools'] = tpl_getLang('page_tools');
}
if (!isset($lang['skip_to_content'])) {
    $lang['skip_to_content'] = tpl_getLang('skip_to_content');
}
/**
    echo _mixture_glyph("close", "close");
    ?>
</label>
                                <ul>
                                    <?php 
    _mixture_adminDropdown();
    ?>
                                </ul>
                            </div>
                        </div>
                    </div>
                </li>
            <?php 
}
?>
            <li>
                <?php 
_mixture_searchform(true, tpl_getConf('autoComplete'));
?>
            </li>
        </ul>
    </div><!-- #mixture__tools -->

    <?php 
if ($conf['breadcrumbs'] or $conf['youarehere']) {
    include 'tpl_site_header_nav_breadcrumbs.php';
}
?>

</nav>
Esempio n. 14
0
     <?php 
         switch (tpl_getConf('wiki_actionlinks')) {
             case 'buttons':
                 tpl_button('edit');
                 tpl_button('history');
                 break;
             case 'links':
                 tpl_actionlink('edit');
                 tpl_actionlink('history');
                 break;
         }
         ?>
   </div>
   <div class="bar-right">
     <?php 
         switch (tpl_getConf('wiki_actionlinks')) {
             case 'buttons':
                 tpl_button('backlink');
                 tpl_button('subscription');
                 tpl_button('top');
                 break;
             case 'links':
                 tpl_actionlink('backlink');
                 tpl_actionlink('subscription');
                 tpl_actionlink('top');
                 break;
         }
         ?>
   </div>
 </div>
 <div class="clearer"></div>
/**
 * STICKY OR NOT
 */
function _mixture_stickme($element)
{
    if ($element != null and strpos(tpl_getConf('stickies'), $element) !== false) {
        return " stickme";
    }
}
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>
    <?php 
echo hsc($lang['mediaselect']);
?>
    [<?php 
echo strip_tags($conf['title']);
?>
]
  </title>
  <?php 
tpl_metaheaders();
?>
  <link rel="shortcut icon" href="<?php 
echo tpl_getConf('lab_favicon');
?>
" type="image/x-icon" />
</head>

<body>
<div id="media__manager" class="dokuwiki">
    <div id="media__left">
        <?php 
html_msgarea();
?>
        <h1><?php 
echo hsc($lang['mediaselect']);
?>
</h1>
   year = &quot;<?php 
echo gmdate("Y", $rev);
?>
&quot;,
   url = &quot;\url{<?php 
echo str_replace(",", "{,}", hsc($permurl));
?>
}&quot;,
   note = &quot;[Online; accessed <?php 
echo gmdate("j-F-Y");
?>
]&quot;


   author = &quot;<?php 
echo tpl_getConf("monobook_cite_author");
?>
&quot;,
   title = &quot;<?php 
tpl_pagetitle();
?>
 --- <?php 
echo hsc($conf["title"]);
?>
&quot;,
   year = &quot;<?php 
echo gmdate("Y", $rev);
?>
&quot;,
   url = &quot;\url{<?php 
echo hsc($permurl);
/**
 * Simple wrapper for tpl_getConf
 *
 * @author  Giuseppe Di Terlizzi <*****@*****.**>
 *
 * @param   string  $key
 * @param   mixed   $default value
 * @return  mixed
 */
function bootstrap3_conf($key, $default = false)
{
    global $ACT, $INFO, $ID, $conf;
    $value = tpl_getConf($key, $default);
    switch ($key) {
        case 'showTools':
        case 'showSearchForm':
        case 'showPageTools':
            return $value !== 'never' && ($value == 'always' || !empty($_SERVER['REMOTE_USER']));
        case 'showIndividualTool':
        case 'hideInThemeSwitcher':
        case 'tableStyle':
            return explode(',', $value);
        case 'showAdminMenu':
            return $value && $INFO['isadmin'];
        case 'hideLoginLink':
        case 'showLoginOnFooter':
            return $value && !$_SERVER['REMOTE_USER'];
        case 'showSidebar':
            if (bootstrap3_conf('showLandingPage')) {
                return false;
            }
            return page_findnearest($conf['sidebar']) && $ACT == 'show';
        case 'showRightSidebar':
            return page_findnearest(tpl_getConf('rightSidebar')) && $ACT == 'show';
        case 'landingPages':
            return sprintf('/%s/', $value);
        case 'showLandingPage':
            return $value && (bool) preg_match_all(bootstrap3_conf('landingPages'), $ID);
        case 'pageOnPanel':
            if (bootstrap3_conf('showLandingPage')) {
                return false;
            }
            return $value;
        case 'showThemeSwitcher':
            return $value && bootstrap3_conf('bootstrapTheme') == 'bootswatch';
    }
    //$type = bootstrap3_conf_metadata($key);
    //if ($type[0] == 'regex') {
    //  return sprintf('/%s/', $value);
    //}
    return $value;
}
?>
        <?php 
tpl_sidebar('left');
?>
      </div>
      <div id="page">
        <?php 
html_msgarea();
?>
        <?php 
$notoc ? tpl_content(false) : tpl_content();
?>
      </div>
      <div id="right_sidebar">
        <?php 
if (tpl_getConf('search') == 'right') {
    ?>
          <div class="sidebar_box search_sidebar">
            <?php 
    tpl_searchform();
    ?>
          </div>
        <?php 
}
?>
        <?php 
tpl_sidebar('right');
?>
      </div>
    </div>
Esempio n. 20
0
   year = &quot;<?php 
echo gmdate("Y", $rev);
?>
&quot;,
   url = &quot;\url{<?php 
echo str_replace(",", "{,}", hsc($permurl));
?>
}&quot;,
   note = &quot;[Online; accessed <?php 
echo gmdate("j-F-Y");
?>
]&quot;


   author = &quot;<?php 
echo tpl_getConf("vector_cite_author");
?>
&quot;,
   title = &quot;<?php 
tpl_pagetitle();
?>
 --- <?php 
echo hsc($conf["title"]);
?>
&quot;,
   year = &quot;<?php 
echo gmdate("Y", $rev);
?>
&quot;,
   url = &quot;\url{<?php 
echo hsc($permurl);
Esempio n. 21
0
      width:<?php 
echo tpl_getConf('width');
?>
;
      padding-left:2.5em;
      padding-right:2.5em;
  }
  .h6e-post-content {
      font-size:<?php 
echo tpl_getConf('font-size');
?>
;
  }
  .h6e-entry-title, .h6e-entry-title a, .h6e-entry-title a:visited, .do-page h1, .content-page h2 {
      color:<?php 
echo tpl_getConf('title-color');
?>
;
  }
  </style>
</head>

<body class="h6e-layout">
<div id="media__manager" class="dokuwiki h6e-main-content">

    <div id="media__left">

        <?php 
html_msgarea();
?>
Esempio n. 22
0
/* the optional second parameter of tpl_action() switches between a link and a button,
   e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */
tpl_action('top', 1, 'li');
?>
                        </ul>
                    </li>
                </ul>

                <?php 
_tpl_searchform();
?>
            </div>
        </div></div>

        <div class="container<?php 
if ((int) tpl_getConf('full_width') === 1) {
    echo "-fluid";
}
?>
 not-header">
            <div class="notifications hidden-print">
                <?php 
html_msgarea();
?>
            </div>

            <a href="#dokuwiki__content" class="sr-only hidden-print"><?php 
echo $lang['skip_to_content'];
?>
</a>
            <a href="#dokuwiki__aside" class="skip-to-sidebar hidden-print visible-xs btn-block btn btn-info"><?php 
/**
 * searches for namespace sidebars
 *
 * @author Michael Klier <*****@*****.**>
 */
function _getNsSb($id)
{
    $pname = tpl_getConf('pagename');
    $ns_sb = '';
    $path = explode(':', $id);
    $found = false;
    while (count($path) > 0) {
        $ns_sb = implode(':', $path) . ':' . $pname;
        if (@page_exists($ns_sb)) {
            return $ns_sb;
        }
        array_pop($path);
    }
    // nothing found
    return false;
}
/**
 * Calculate automatically the grid size for main container
 *
 * @author  Giuseppe Di Terlizzi <*****@*****.**>
 *
 * @return  string
 */
function _tpl_get_container_grid()
{
    global $ACT;
    global $conf;
    $grids = array();
    $result = '';
    $showRightSidebar = page_findnearest(tpl_getConf('rightSidebar')) && $ACT == 'show';
    $showLeftSidebar = page_findnearest($conf['sidebar']) && $ACT == 'show';
    $fluidContainer = tpl_getConf('fluidContainer');
    if (!$showLeftSidebar) {
        return 'container' . ($fluidContainer ? '-fluid' : '');
    }
    foreach (split(' ', tpl_getConf('leftSidebarGrid')) as $grid) {
        list($col, $media, $size) = split('-', $grid);
        $grids[$media]['left'] = (int) $size;
    }
    foreach (split(' ', tpl_getConf('rightSidebarGrid')) as $grid) {
        list($col, $media, $size) = split('-', $grid);
        $grids[$media]['right'] = (int) $size;
    }
    foreach ($grids as $media => $item) {
        $left = $item['left'];
        $right = $item['right'];
        $result .= sprintf('col-%s-%s ', $media, 12 - $left - ($showRightSidebar ? $right : 0));
    }
    return $result;
}
    tpl_action('media', 1, 'li');
}
tpl_action('index', 1, 'li');
?>
        </ul>
      </div>

    </div>

    <!-- TOPBAR - @tpl_mtb_schotland_2016-template@ -->
    <div class="topbar">
      <?php 
if (tpl_getConf("tpl_mtb_schotland_2016:htmltopbar")) {
    tpl_includeFile('topbar.php');
} else {
    tpl_include_page(tpl_getConf("tpl_mtb_schotland_2016:pagetopbar"), 1, 1);
}
?>
    </div>

    <!-- BREADCRUMBS -->
    <?php 
if ($conf['breadcrumbs'] || $conf['youarehere']) {
    ?>
      <div class="breadcrumbs">
        <?php 
    if ($conf['youarehere']) {
        ?>
          <div class="youarehere"><?php 
        tpl_youarehere();
        ?>
Esempio n. 26
0
if (!empty($INFO["exists"])) {
    //ATTENTION: "ca-view" is used as css id selector!
    $_vector_tabs_right["ca-view"]["text"] = $lang["vector_read"];
    if ($vector_context !== "discuss") {
        //$vector_context was defined within main.php
        $_vector_tabs_right["ca-view"]["wiki"] = ":" . getID();
        if ($ACT === "show") {
            //$ACT comes from DokuWiki core
            $_vector_tabs_right["ca-view"]["class"] = "selected";
        }
    } else {
        $_vector_tabs_right["ca-view"]["wiki"] = ":" . substr(getID(), strlen(tpl_getConf("vector_discuss_ns")) - 1);
    }
}
//hide some tabs for anonymous clients (closed wiki)?
if (empty($conf["useacl"]) || $loginname !== "" || !tpl_getConf("vector_closedwiki")) {
    //edit/create/show source tab
    //ATTENTION: "ca-edit" is used as css id selector!
    $_vector_tabs_right["ca-edit"]["href"] = wl(cleanID(getId()), array("do" => "edit", "rev" => (int) $rev), false, "&");
    $_vector_tabs_right["ca-edit"]["accesskey"] = "E";
    if (!empty($INFO["writable"])) {
        //$INFO comes from DokuWiki core
        if (!empty($INFO["draft"])) {
            $_vector_tabs_right["ca-edit"]["href"] = wl(cleanID(getId()), array("do" => "draft", "rev" => (int) $rev), false, "&");
            $_vector_tabs_right["ca-edit"]["text"] = $lang["btn_draft"];
            //language comes from DokuWiki core
        } else {
            if (!empty($INFO["exists"])) {
                $_vector_tabs_right["ca-edit"]["text"] = $lang["vector_edit"];
            } else {
                $_vector_tabs_right["ca-edit"]["text"] = $lang["vector_create"];
Esempio n. 27
0
<?php

html_msgarea();
?>

<?php 
if (tpl_getConf('topbar') == 'never') {
    $top_bar = false;
} else {
    if (tpl_getConf('topbar') == 'connected' && empty($_SERVER['REMOTE_USER'])) {
        $top_bar = false;
    } else {
        $top_bar = true;
    }
}
?>

<?php 
if (class_exists('Ld_Ui') && method_exists('Ld_Ui', 'top_bar') && $top_bar) {
    ?>
    <?php 
    $loginUrl = Ld_Ui::getAdminUrl(array('module' => 'default', 'controller' => 'auth', 'action' => 'login'));
    if (empty($loginUrl)) {
        $loginUrl = wl($ID, 'do=login&amp;sectok=' . getSecurityToken());
    }
    if (empty($logoutUrl)) {
        $logoutUrl = wl($ID, 'do=logout&amp;sectok=' . getSecurityToken());
    }
    ?>
    <?php 
    Ld_Ui::top_bar(array('loginUrl' => $loginUrl, 'logoutUrl' => $logoutUrl));
    ?>
	<div class="breadcrumbs">
	  <?php 
    tpl_youarehere();
    ?>
	</div>
	<?php 
}
?>
    <!-- trace stop -->

  <div class="clearer">&nbsp;</div>

  <!-- sidebar start for karate corners -->
  <?php 
if (tpl_getConf('enable')) {
    ?>
  <div id="sidebar" class="cornerBox">
    <div class="corner TL"></div>
    <div class="corner TR"></div>
    <div class="corner BL"></div>
    <div class="corner BR"></div>
	<div class="cornerBoxInner">
      <?php 
    tpl_userinfo();
    ?>
      <div id="sidebar_content">
        <?php 
    tpl_sidebar_content('blog_sidebar');
    ?>
      </div>
?>
                    <ul>
                        <?php 
tpl_action('recent', 1, 'li');
tpl_action('index', 1, 'li');
?>
                    </ul>
                </div>

            </div>
            <div class="clearer"></div>

            <!-- ********** tabs ********** -->
            <div id="dokuwiki__tabs">
                <?php 
tpl_include_page(tpl_getConf('sidebarID'));
?>
            </div><!-- /tabs -->
            <div class="clearer"></div>
            
            <!-- BREADCRUMBS -->
            <?php 
if ($conf['breadcrumbs']) {
    ?>
                <div class="breadcrumbs"><?php 
    tpl_breadcrumbs();
    ?>
</div>
            <?php 
}
?>
Esempio n. 30
0
/**
 * prints a horizontal navigation bar (composed of <li> items and some CSS tricks)
 * with the current active item highlited
 */
function tpl_tabnavi()
{
    global $ID;
    global $ACT;
    global $conf;
    // afegit jordi
    global $lang;
    // afegit jordi
    global $auth;
    // afegit jordi
    global $USERINFO;
    // afegit jordi
    $buttons = array();
    parse_str(tpl_getConf('navbar_buttons'), $buttons);
    echo "<ul>\n";
    foreach ($buttons as $title => $pagename) {
        echo '<li';
        // MODIFICAT  JORDI
        // Afegim control, per mostrar/no mostrar opció "Autoria" segons si l'usuari està validat (hi ha nom d'usuari) o no
        if ($USERINFO[name] == "") {
            if ($title != "Autoria") {
                if (strcasecmp($ID, $pagename) == 0 && $ACT == 'show') {
                    echo ' id="current"><div id="current_inner">' . $title . '</div>';
                } else {
                    echo '>';
                    tpl_link(wl($pagename), $title);
                }
            }
        } else {
            if (strcasecmp($ID, $pagename) == 0 && $ACT == 'show') {
                echo ' id="current"><div id="current_inner">' . $title . '</div>';
            } else {
                echo '>';
                tpl_link(wl($pagename), $title);
            }
        }
        echo "</li>\n";
    }
    // MODIFICAT JORDI
    //always add link to recent page, unless $action id already 'recent'
    if (tpl_getConf('navbar_recent')) {
        if ($ACT == 'recent') {
            echo '<li id="current"><div id="current_inner">' . tpl_getConf('navbar_recent') . '</div></li>';
        } else {
            echo '<li>';
            tpl_actionlink('recent', '', '', tpl_getConf('navbar_recent'));
            echo "</li>\n";
        }
    }
    echo "</ul>\n";
}