* DokuWiki Bootstrap3 Template: Footer page
 *
 * @link     http://dokuwiki.org/template:bootstrap3
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
$footer_page = 'footer';
resolve_pageid('', $footer_page, $footer_page_exists);
if ($footer_page_exists) {
    ?>
<div id="dw__footer" class="navbar <?php 
    echo bootstrap3_conf('inverseNavbar') ? 'navbar-inverse' : 'navbar-default';
    ?>
 navbar-fixed-bottom">
  <div class="container<?php 
    echo $fluidContainer ? '-fluid' : '';
    ?>
">
    <div class="navbar-text">
      <?php 
    tpl_include_page($footer_page, 1, 1);
    ?>
    </div>
  </div>
</div>
<?php 
}
<!-- ********** ASIDE ********** -->
<aside id="<?php 
echo $sidebar_id;
?>
" class="dw__sidebar <?php 
echo $sidebar_class;
?>
 hidden-print small">
  <div class="dw-sidebar-content">
    <div class="dw-sidebar-title hidden-lg hidden-md hidden-sm" data-toggle="collapse" data-target="#<?php 
echo $sidebar_id;
?>
 .dw-sidebar-body">
      <i class="fa fa-fw fa-th-list"></i> <?php 
echo $lang['sidebar'];
?>
    </div>
    <div class="dw-sidebar-body collapse in">
      <?php 
tpl_includeFile($sidebar_header);
?>
      <?php 
bootstrap3_sidebar(tpl_include_page($sidebar_page, 0, 1, bootstrap3_conf('useACL')));
?>
      <?php 
tpl_includeFile($sidebar_footer);
?>
    </div>
  </div>
</aside>
<?php

/**
 * DokuWiki Bootstrap3 Template: Translation Plugin
 *
 * @link     http://dokuwiki.org/template:bootstrap3
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
if (bootstrap3_conf('showTranslation') && ($translation = plugin_load('helper', 'translation'))) {
    if ($translation->istranslatable($INFO['id'])) {
        $translation->checkage();
        list($lc, $idpart) = $translation->getTransParts($INFO['id']);
        $trans_items = '';
        $trans_label = $translation->getLang('translations');
        foreach ($translation->translations as $trans) {
            $trans_items .= str_replace(array('<div class="li">', '</div>'), '', $translation->getTransItem($trans, $idpart));
        }
        ?>
<ul class="nav navbar-nav" id="dw__translation">
  <li class="dropdown">
    <a href="#" class="dropdown-toggle" data-toggle="dropdown" title="<?php 
        echo $trans_label;
        ?>
">
      <i class="fa fa-fw fa-flag"></i> <span class="hidden-lg hidden-md hidden-sm"><?php 
        echo $trans_label;
if (!defined('DOKU_INC')) {
    die;
}
if (bootstrap3_conf('showCookieLawBanner') && !(get_doku_pref('cookieNoticeAccepted', null) || get_doku_pref('cookieNoticeAccepted', ''))) {
    $cookie_policy_page_id = bootstrap3_conf('cookieLawPolicyPage');
    $cookie_banner_page_id = bootstrap3_conf('cookieLawBannerPage');
    resolve_pageid('', $cookie_policy_page_id, $cookie_policy_page_exists);
    ?>
<div id="cookieNotice" class="navbar <?php 
    echo bootstrap3_conf('inverseNavbar') ? 'navbar-inverse' : 'navbar-default';
    ?>
 navbar-fixed-bottom">
  <div class="container">
    <div class="navbar-text navbar-left">
    <?php 
    $cookie_banner_page = tpl_include_page($cookie_banner_page_id, 0, 1, bootstrap3_conf('useACL'));
    $cookie_banner_page = preg_replace('/<p>\\n(.*?)\\n<\\/p>/', '<i class="fa fa-info-circle text-primary"></i> $1', $cookie_banner_page);
    echo $cookie_banner_page;
    ?>
    </div>
    <div class="navbar-right">
      <button class="btn btn-primary btn-xs navbar-btn" id="cookieDismiss">OK</button>
      <?php 
    if ($cookie_policy_page_exists) {
        tpl_link(wl($cookie_policy_page_id), 'Policy', 'class="btn btn-default btn-xs navbar-btn" id="cookiePolicy"');
    }
    ?>
    </div>
  </div>
</div>
<script type="text/javascript">
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
if (($ACT == 'show' || defined('DOKU_MEDIADETAIL')) && bootstrap3_conf('showPageIcons')) {
    global $ID;
    $page_icons = bootstrap3_conf('pageIcons');
    $social_share = in_array('social-share', $page_icons);
    $social_share_providers = bootstrap3_conf('socialShareProviders');
    $help_page = false;
    $help_title = null;
    if (in_array('help', $page_icons)) {
        $help_page = page_findnearest('help', bootstrap3_conf('useACL'));
        $help_title = hsc(p_get_first_heading($help_page));
    }
    ?>
<div class="dw-page-icons pull-right hidden-print">

  <ul class="list-inline pull-right">
    <?php 
    if (in_array('feed', $page_icons)) {
        ?>
    <li>
      <a href="<?php 
        echo DOKU_URL . 'feed.php';
        ?>
" title="<?php 
        echo $lang['btn_recent'];
<?php

/**
 * DokuWiki Bootstrap3 Template: Theme Switcher
 *
 * @link     http://dokuwiki.org/template:bootstrap3
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
if (bootstrap3_conf('showThemeSwitcher')) {
    ?>
<!-- theme-switcher -->
<ul class="nav navbar-nav" id="dw__themes">
  <li class="dropdown">

    <a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-fw fa-tint"></i> <span class="hidden-lg hidden-md hidden-sm"><?php 
    echo tpl_getLang('themes');
    ?>
</span> <span class="caret"></span></a>

    <ul class="dropdown-menu" aria-labelledby="themes">
      <li class="dropdown-header"><i class="fa fa-fw fa-tint"></i> Bootswatch Themes</li>
      <?php 
    foreach (bootstrap3_bootswatch_themes_available() as $theme) {
        ?>
      <li<?php 
        echo $bootswatchTheme == $theme ? ' class="active"' : '';
$semantic = bootstrap3_conf('semantic');
$schemaOrgType = bootstrap3_conf('schemaOrgType');
$leftSidebarGrid = bootstrap3_conf('leftSidebarGrid');
$rightSidebarGrid = bootstrap3_conf('rightSidebarGrid');
$showLandingPage = bootstrap3_conf('showLandingPage');
$hideInThemeSwitcher = bootstrap3_conf('hideInThemeSwitcher');
$useLocalBootswatch = bootstrap3_conf('useLocalBootswatch');
$contentGrid = bootstrap3_container_grid();
$bootstrapStyles = array();
$tplConfigJSON = array('tableFullWidth' => (int) bootstrap3_conf('tableFullWidth'), 'tableStyle' => bootstrap3_conf('tableStyle'), 'tagsOnTop' => (int) bootstrap3_conf('tagsOnTop'), 'useAnchorJS' => (int) bootstrap3_conf('useAnchorJS'));
$JSINFO['bootstrap3'] = $tplConfigJSON;
if ($fluidContainerBtn) {
    $fluidContainer = bootstrap3_fluid_container_button();
}
// Display a landing page (set the pageOnPanel and showSidebar config to "off")
if ($showLandingPage && (bool) preg_match_all(bootstrap3_conf('landingPages'), $ID)) {
    $showSidebar = false;
    $pageOnPanel = false;
}
if ($showThemeSwitcher && $bootstrapTheme == 'bootswatch') {
    if (get_doku_pref('bootswatchTheme', null) !== null && get_doku_pref('bootswatchTheme', null) !== '') {
        $bootswatchTheme = get_doku_pref('bootswatchTheme', null);
    }
    global $INPUT;
    if ($INPUT->str('bootswatchTheme')) {
        $bootswatchTheme = $INPUT->str('bootswatchTheme');
        set_doku_pref('bootswatchTheme', $bootswatchTheme);
    }
}
switch ($bootstrapTheme) {
    case 'optional':
function bootstrap3_is_fluid_navbar()
{
    $fluid_container = bootstrap3_is_fluid_container();
    $fixed_top_nabvar = bootstrap3_conf('fixedTopNavbar');
    return $fluid_container || $fluid_container && !$fixed_top_nabvar || !$fluid_container && !$fixed_top_nabvar;
}
<?php

/**
 * DokuWiki Bootstrap3 Template: Badges
 *
 * @link     http://dokuwiki.org/template:bootstrap3
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
if (bootstrap3_conf('showBadges')) {
    $target = $conf['target']['extern'] ? 'target="' . $conf['target']['extern'] . '"' : '';
    $dw_path = dirname(tpl_basedir());
    ?>
<div class="text-center hidden-print">
  <p id="dw__badges">
    <?php 
    tpl_license('button', true, false, false);
    // license button, no wrapper
    ?>
    <a href="http://getbootstrap.com" title="Built with Bootstrap 3" <?php 
    echo $target;
    ?>
>
      <img src="<?php 
    echo tpl_basedir();
    ?>
images/button-bootstrap3.png" width="80" height="15" alt="Built with Bootstrap 3" />
          <?php 
}
?>

          <?php 
if (empty($_SERVER['REMOTE_USER'])) {
    ?>
          <li>
            <span class="dw__actions dw-action-icon">
              <?php 
    $register_label = sprintf('<span class="%s">%s</span>', in_array('register', $navbar_labels) ? null : 'sr-only', $lang['btn_register']);
    $login_label = sprintf('<span class="%s">%s</span>', in_array('login', $navbar_labels) ? null : 'sr-only', $lang['btn_login']);
    $register_btn = tpl_actionlink('register', null, null, $register_label, true);
    $register_btn = str_replace('action', 'action btn btn-success navbar-btn', $register_btn);
    echo $register_btn;
    if (!bootstrap3_conf('hideLoginLink')) {
        $login_btn = tpl_actionlink('login', null, null, $login_label, true);
        $login_btn = str_replace('action', 'action btn btn-default navbar-btn', $login_btn);
        echo $login_btn;
    }
    ?>
            </span>
          </li>
          <?php 
}
?>

        </ul>

        <?php 
include_once dirname(__FILE__) . '/tpl_user_menu.php';
/**
 * Check if the fluid container button is enabled (from the user cookie)
 *
 * @author  Giuseppe Di Terlizzi <*****@*****.**>
 *
 * @return  boolean
 */
function bootstrap3_fluid_container_button()
{
    if (!bootstrap3_conf('fluidContainerBtn')) {
        return false;
    }
    if (get_doku_pref('fluidContainer', null) !== null && get_doku_pref('fluidContainer', null) !== '' && get_doku_pref('fluidContainer', null) !== '0') {
        return true;
    }
    return false;
}
        $bootstrap_styles[] = DOKU_TPL . 'assets/bootstrap/css/bootstrap-theme.min.css';
        break;
    case 'custom':
        $bootstrap_styles[] = $customTheme;
        break;
    case 'bootswatch':
        $url = bootstrap3_conf('useLocalBootswatch') ? DOKU_TPL . 'assets/bootswatch' : '//maxcdn.bootstrapcdn.com/bootswatch/3.3.6';
        $bootstrap_styles[] = "{$url}/{$bootswatch_theme}/bootstrap.min.css";
        break;
    case 'default':
    default:
        $bootstrap_styles[] = DOKU_TPL . 'assets/bootstrap/css/bootstrap.min.css';
        break;
}
$navbar_padding = 20;
if (bootstrap3_conf('fixedTopNavbar')) {
    if ($bootstrapTheme == 'bootswatch') {
        // Set the navbar height for all Bootswatch Themes (values from bootswatch/*/_variables.scss)
        switch ($bootswatchTheme) {
            case 'simplex':
            case 'superhero':
                $navbar_height = 40;
                break;
            case 'yeti':
                $navbar_height = 45;
                break;
            case 'cerulean':
            case 'cosmo':
            case 'custom':
            case 'cyborg':
            case 'lumen':
    die;
}
if (bootstrap3_conf('showTools')) {
    $all_tools = bootstrap3_tools_menu();
    foreach (bootstrap3_conf('showIndividualTool') as $tool) {
        if ($dropdown = bootstrap3_toolsevent($tool . 'tools', $all_tools[$tool]['menu'], 'main', true)) {
            $tools[$tool] = $all_tools[$tool];
            $tools[$tool]['dropdown'] = $dropdown;
        }
    }
    ?>

<ul class="nav navbar-nav" id="dw__tools">

<?php 
    if (bootstrap3_conf('individualTools')) {
        foreach ($tools as $id => $menu) {
            ?>

  <li class="dropdown">

    <a href="#" class="dropdown-toggle" data-toggle="dropdown" title="<?php 
            echo $lang[$id . '_tools'];
            ?>
">
      <i class="<?php 
            echo $menu['icon'];
            ?>
"></i> <span class="hidden-lg hidden-md hidden-sm"><?php 
            echo $lang[$id . '_tools'];
            ?>
if (!defined('DOKU_INC')) {
    die;
}
if (bootstrap3_conf('showThemeSwitcher')) {
    global $ID;
    $bootswatch_theme = bootstrap3_bootswatch_theme();
    ?>
<!-- theme-switcher -->
<ul class="nav navbar-nav" id="dw__themes">
  <li class="dropdown">

    <a href="<?php 
    wl($ID);
    ?>
" class="dropdown-toggle" data-toggle="dropdown" data-target="#" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-fw fa-tint"></i> <span class="<?php 
    echo in_array('themes', bootstrap3_conf('navbarLabels')) ? '' : 'hidden-lg hidden-md hidden-sm';
    ?>
"><?php 
    echo tpl_getLang('themes');
    ?>
</span> <span class="caret"></span></a>

    <ul class="dropdown-menu" aria-labelledby="themes">
      <li class="dropdown-header"><i class="fa fa-fw fa-tint"></i> Bootswatch Themes</li>
      <?php 
    foreach (bootstrap3_bootswatch_themes_available() as $theme) {
        ?>
      <li<?php 
        echo $bootswatch_theme == $theme ? ' class="active"' : '';
        ?>
>
/**
 * DokuWiki Bootstrap3 Template: Footer page
 *
 * @link     http://dokuwiki.org/template:bootstrap3
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
if (page_findnearest('footer', bootstrap3_conf('useACL'))) {
    ?>
<footer id="dw__footer" class="small navbar <?php 
    echo bootstrap3_conf('inverseNavbar') ? 'navbar-inverse' : 'navbar-default';
    ?>
">
  <div class="container<?php 
    echo bootstrap3_is_fluid_container() ? '-fluid' : '';
    ?>
">
    <div class="navbar-text">
      <?php 
    tpl_include_page('footer', 1, 1, bootstrap3_conf('useACL'));
    ?>
    </div>
  </div>
</footer>
<?php 
}
Esempio n. 16
0
        <div class="text-right">

          <?php 
if ($showPageInfo) {
    ?>
          <span class="docInfo">
            <?php 
    tpl_pageinfo();
    ?>
          </span>
          <?php 
}
?>

          <?php 
if (bootstrap3_conf('showLoginOnFooter') && !$_SERVER['REMOTE_USER']) {
    ?>
          <span class="loginLink hidden-print">
            <?php 
    echo tpl_action('login', 1, 0, 1, '<i class="fa fa-sign-in"></i> ');
    ?>
          </span>
          <?php 
}
?>

        </div>

        <?php 
// DokuWiki badges
require_once 'tpl_badges.php';
/**
 * 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':
            return !$value || !empty($_SERVER['REMOTE_USER']);
        case 'browserTitle':
            if (bootstrap3_conf('browserTitleShowNS')) {
                $ns_parts = explode(':', $ID);
                $ns_pages = array();
                $ns_titles = array();
                $ns_separator = sprintf(' %s ', bootstrap3_conf('browserTitleCharSepNS'));
                if (useHeading('navigation')) {
                    foreach ($ns_parts as $ns_part) {
                        $ns_page .= "{$ns_part}:";
                        $ns_pages[] = $ns_page;
                    }
                    $ns_pages = array_unique($ns_pages);
                    foreach ($ns_pages as $ns_page) {
                        resolve_pageid(getNS($ns_page), $ns_page, $exists);
                        $ns_page_title_heading = hsc(p_get_first_heading($ns_page));
                        $ns_page_title_page = noNSorNS($ns_page);
                        $ns_page_title = $ns_page_title_heading ? $ns_page_title_heading : $ns_page_title_page;
                        $ns_titles[] = $ns_page_title;
                    }
                    $ns_titles[] = tpl_pagetitle($ID, true);
                    $ns_titles = array_unique($ns_titles);
                } else {
                    $ns_titles = $ns_parts;
                }
                if (bootstrap3_conf('browserTitleOrderNS') == 'normal') {
                    $ns_titles = array_reverse($ns_titles);
                }
                $browser_title = implode($ns_separator, $ns_titles);
            } else {
                $browser_title = tpl_pagetitle($ID, true);
            }
            return str_replace(array('@WIKI@', '@TITLE@'), array(strip_tags($conf['title']), $browser_title), $value);
        case 'showSidebar':
            return page_findnearest($conf['sidebar']) && $ACT == 'show';
        case 'showRightSidebar':
            return page_findnearest(tpl_getConf('rightSidebar')) && $ACT == 'show';
        case 'landingPages':
            return sprintf('/%s/', $value);
    }
    //$type = bootstrap3_metadata($key);
    //if ($type[0] == 'regex') {
    //  return sprintf('/%s/', $value);
    //}
    return $value;
}
Esempio n. 18
0
              <img src="<?php 
        echo $gravatar_img;
        ?>
" class="img-circle" />
            <?php 
    } else {
        ?>
              <i class="fa fa-fw fa-user fa-5x"></i>
            <?php 
    }
    ?>
          </li>
        </ul>
        <ul class="nav navbar-nav col-sm-8">
          <?php 
    if (bootstrap3_conf('showUserHomeLink')) {
        ?>
          <li>
            <a href="<?php 
        echo bootstrap3_user_homepage_link();
        ?>
">
              <i class="fa fa-fw fa-home"></i> Personal Home-Page
            </a>
          </li>
          <?php 
    }
    ?>
          <li>
            <a href="mailto:<?php 
    echo $INFO['userinfo']['mail'];
<?php

/**
 * DokuWiki Bootstrap3 Template: Page Tools
 *
 * @link     http://dokuwiki.org/template:bootstrap3
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
if (bootstrap3_conf('showPageTools')) {
    ?>
<div id="dw__pagetools" class="hidden-print panel panel-default">
  <div class="tools">
    <ul class="nav nav-stacked nav-pills">
      <?php 
    $tools = bootstrap3_tools_menu();
    unset($tools['page']['menu']['top']);
    $tools_menu = bootstrap3_toolsevent('pagetools', $tools['page']['menu'], 'main', true);
    $tools_menu = str_replace(array('class="action', '</i>', '</a>'), array('class="action text-muted', '</i><span class="sr-only">', '</span></a>'), $tools_menu);
    echo $tools_menu;
    ?>
    </ul>
  </div>
</div>
<?php 
}
?>
<?php

/**
 * DokuWiki Bootstrap3 Template: Theme Switcher
 *
 * @link     http://dokuwiki.org/template:bootstrap3
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
if (bootstrap3_conf('showThemeSwitcher') && bootstrap3_conf('bootstrapTheme') == 'bootswatch' && ($available_themes = array_diff(bootstrap3_bootswatch_theme_list(), bootstrap3_conf('hideInThemeSwitcher')))) {
    ?>
<!-- theme-switcher -->
<ul class="nav navbar-nav" id="dw__themes">
  <li class="dropdown">

    <a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-fw fa-tint"></i> <span class="hidden-lg hidden-md hidden-sm"><?php 
    echo tpl_getLang('themes');
    ?>
</span> <span class="caret"></span></a>

    <ul class="dropdown-menu" aria-labelledby="themes">
      <li class="dropdown-header"><i class="fa fa-fw fa-tint"></i> Bootswatch Themes</li>
      <?php 
    foreach ($available_themes as $theme) {
        ?>
      <li<?php 
        echo $bootswatchTheme == $theme ? ' class="active"' : '';
<?php

/**
 * DokuWiki Bootstrap3 Template: Administration Menu
 *
 * @link     http://dokuwiki.org/template:bootstrap3
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
global $ID, $auth;
if (bootstrap3_conf('showAdminMenu')) {
    $admin_plugins = plugin_list('admin');
    $administrative_tasks = array('usermanager', 'acl', 'extension', 'config', 'styling', 'revert', 'popularity');
    $additional_plugins = array_diff($admin_plugins, $administrative_tasks);
    $plugins = array(tpl_getLang('administrative_tasks') => $administrative_tasks, tpl_getLang('additional_plugins') => $additional_plugins);
    ?>
<ul class="nav navbar-nav">
  <li class="dropdown dropdown-large">

    <a href="#" class="dropdown-toggle" data-toggle="dropdown" title="<?php 
    echo $lang['btn_admin'];
    ?>
">
      <i class="fa fa-fw fa-cogs"></i>  <span class="hidden-lg hidden-md hidden-sm"><?php 
    echo $lang['btn_admin'];
    ?>
</span> <span class="caret"></span>
        <div class="text-right">

          <?php 
if (bootstrap3_conf('showPageInfo')) {
    ?>
          <span class="docInfo text-muted">
            <?php 
    tpl_pageinfo();
    ?>
          </span>
          <?php 
}
?>

          <?php 
if (bootstrap3_conf('showLoginOnFooter')) {
    ?>
          <span class="loginLink hidden-print">
            <?php 
    echo tpl_action('login', 1, 0, 1, '<i class="fa fa-sign-in"></i> ');
    ?>
          </span>
          <?php 
}
?>

        </div>

        <div class="text-center hidden-print">
          <p id="dw__license"><?php 
tpl_license('');
/**
 * Add Bootstrap classes in DokuWiki Content
 *
 * @author  Giuseppe Di Terlizzi <*****@*****.**>
 *
 * @param   string  $content from tpl_content()
 * @return  string
 * */
function bootstrap3_content($content)
{
    global $ACT;
    global $INPUT;
    // Search Hit
    $content = str_replace('<span class="search_hit">', '<span class="mark">', $content);
    // Tabs (Extension Manager)
    $content = str_replace('<ul class="tabs">', '<ul class="nav nav-tabs">', $content);
    // Page Heading (<h[1-2]>)
    $content = preg_replace('/<h([1-2]) id="(.*)">/', '<h$1 class="page-header" id="$2">', $content);
    $content = preg_replace('/<h([1-2]) class="(.*)" id="(.*)">/', '<h$1 class="$2 page-header" id="$3">', $content);
    $content = preg_replace('/<h([1-2])>/', '<h$1 class="page-header">', $content);
    // Media Images
    $content = preg_replace('/<img (.*) class="(media|medialeft|mediacenter|mediaright)"/', '<img $1 class="$2 img-responsive"', $content);
    // Alerts
    $content = str_replace('<div class="info">', '<div class="alert alert-info"><i class="fa fa-fw fa-info-circle"></i>', $content);
    $content = str_replace('<div class="error">', '<div class="alert alert-danger"><i class="fa fa-fw fa-times-circle"></i>', $content);
    $content = str_replace('<div class="success">', '<div class="alert alert-success"><i class="fa fa-fw fa-check-circle"></i>', $content);
    $content = str_replace(array('<div class="notify">', '<div class="msg notify">'), '<div class="alert alert-warning"><i class="fa fa-fw fa-warning"></i>', $content);
    // Configuration Manager Template Sections
    if ($ACT == 'admin' && $INPUT->str('page') == 'config') {
        $admin_sections = array('theme' => array('bootstrapTheme', 'fa-tint'), 'sidebar' => array('sidebarPosition', 'fa-columns'), 'navbar' => array('inverseNavbar', 'fa-navicon'), 'semantic' => array('semantic', 'fa-share-alt'), 'layout' => array('fluidContainer', 'fa-desktop'), 'toc' => array('tocAffix', 'fa-list'), 'discussion' => array('showDiscussion', 'fa-comments'), 'cookie_law' => array('showCookieLawBanner', 'fa-legal'), 'google_analytics' => array('useGoogleAnalytics', 'fa-google'), 'browser_title' => array('browserTitle', 'fa-header'), 'page' => array('showPageInfo', 'fa-file'));
        foreach ($admin_sections as $section => $items) {
            $search = $items[0];
            $icon = $items[1];
            $content = preg_replace('/<tr(.*)>\\s+<td(.*)>\\s+<span(.*)>(tpl»bootstrap3»' . $search . ')<\\/span>/', '</table></div></fieldset><fieldset id="bootstrap3__' . $section . '"><legend><i class="fa ' . $icon . '"></i> ' . tpl_getLang("config_{$section}") . '</legend><div class="table"><table class="inline"><tr$1><td$2><span$3>$4</span>', $content);
        }
    }
    // Revisions & Recents
    if ($ACT == 'revisions' || $ACT == 'recent') {
        $search = array('class="sizechange positive"', 'class="sizechange negative"', 'class="minor"');
        $replace = array('class="sizechange positive label label-success"', 'class="sizechange negative label label-danger"', 'class="minor text-muted"');
        $content = str_replace($search, $replace, $content);
    }
    // Difference
    if ($ACT == 'diff') {
        $btn_default = 'btn btn-default fa';
        $search = array('class="diff-deletedline"', 'class="diff-addedline', 'class="diffprevrev', 'class="diffnextrev', 'class="diffbothprevrev', 'class="minor"');
        $replace = array('class="diff-deletedline bg-danger text-danger"', 'class="diff-addedline bg-success text-success"', "class=\"diffprevrev {$btn_default} fa-angle-left\"", "class=\"diffnextrev {$btn_default} fa-angle-right\"", "class=\"diffbothprevrev {$btn_default} fa-angle-double-left\"", 'class="minor text-muted"');
        $content = str_replace($search, $replace, $content);
    }
    // Tables
    $table_classes = 'table';
    foreach (bootstrap3_conf('tableStyle') as $class) {
        if ($class == 'responsive') {
            $content = str_replace('<div class="table', '<div class="table table-responsive', $content);
        } else {
            $table_classes .= " table-{$class}";
        }
    }
    $content = preg_replace('/<table(.*)class="(inline|import_failures)"(.*)>/', sprintf('<table$1class="$2 %s"$3>', $table_classes), $content);
    $content = str_replace('<div class="table ', '<div class="', $content);
    return $content;
}
      <span class="loginLink hidden-print">
        <?php 
    echo tpl_action('login', 1, 0, 1, '<i class="fa fa-sign-in"></i> ');
    ?>
      </span>
      <?php 
}
?>

    </div>

    <?php 
if ($conf['license']) {
    ?>
    <div id="dw__license" class="text-center small" <?php 
    bootstrap3_conf('semantic') ? 'itemprop="license"' : '';
    ?>
>
      <?php 
    echo tpl_license('');
    ?>
    </div>
    <?php 
}
?>

    <?php 
// DokuWiki badges
require_once 'tpl_badges.php';
// Footer hook
tpl_includeFile('footer.html');
    ?>
        </li>
      </ul>
      <?php 
}
?>

      <?php 
echo bootstrap3_navbar();
?>
      <?php 
echo bootstrap3_dropdown_page('dropdownpage');
?>

      <?php 
if (file_exists(dirname(__FILE__) . '/navbar.html') && bootstrap3_conf('useLegacyNavbar')) {
    ?>
      <ul class="nav navbar-nav">
        <?php 
    tpl_includeFile('navbar.html');
    ?>
      </ul>
      <?php 
}
?>

      <div class="navbar-right">

        <?php 
if ($showSearchForm) {
    ?>