Пример #1
0
    public function getDuoshuoScript()
    {
        $short_name = $this->getConf('shortname');
        $wiki_id = getID();
        $wiki_title = tpl_pagetitle($wiki_id, true);
        $host = $_SERVER['HTTPS'] ? "https" : "http";
        $host = $host . "://" . $_SERVER['SERVER_NAME'];
        $wiki_url = $host . wl($wiki_id);
        $doc = '
        <!-- 多说评论框 start -->
    <div class="ds-thread" data-thread-key="" data-title="' . $wiki_title . '" data-url="' . $wiki_url . '"></div>
<!-- 多说评论框 end -->
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
var duoshuoQuery = {short_name:"' . $short_name . '"};
    (function() {
        var ds = document.createElement("script");
        ds.type = "text/javascript";ds.async = true;
        ds.src = (document.location.protocol == "https:" ? "https:" : "http:") + "//static.duoshuo.com/embed.js";
        ds.charset = "UTF-8";
        (document.getElementsByTagName("head")[0] 
         || document.getElementsByTagName("body")[0]).appendChild(ds);
    })();
    </script>
<!-- 多说公共JS代码 end -->';
        return $doc;
    }
    public function document_start()
    {
        global $conf;
        global $ID;
        global $updateVersion;
        $this->base = DOKU_BASE . 'lib/plugins/impressjs/tpl/';
        $this->tpl = $this->getConf('template');
        // prepare seed for js and css
        $tseed = $updateVersion;
        $depends = getConfigFiles('main');
        foreach ($depends as $f) {
            $tseed .= @filemtime($f);
        }
        $tseed = md5($tseed);
        $this->doc .= '<!DOCTYPE html>
<html lang="' . $conf['lang'] . '">
<head>
    <meta name="viewport" content="width=1024" />
    <meta charset="utf-8" />
    <title>' . tpl_pagetitle($ID, true) . '</title>
                
    <meta name="generator" content="impress.js" />
    <meta name="version" content="impress.js ab44798b081997319f4207dabbb052736acfc512" />
                
    <link rel="stylesheet" href="' . DOKU_BASE . 'lib/exe/css.php?t=none&tseed=' . $tseed . '" type="text/css" media="screen" />
    <link href="' . $this->base . $this->tpl . '/impress.css" rel="stylesheet" />
    <link href="' . $this->base . $this->tpl . '/impress-extra.css" rel="stylesheet" />
</head>
<body>
    <div id="impress">';
    }
 function test_pageFunctionTitle()
 {
     global $ID, $ACT;
     $ID = 'foo:bar';
     $ACT = 'revisions';
     $this->assertEquals('foo:bar - Old revisions', tpl_pagetitle(null, true));
 }
Пример #4
0
 /**
  * Handler for the TPL_ACT_RENDER event
  */
 function handle_act_render(&$event, $params)
 {
     global $ID;
     // Action not 'show'? Quit
     if ($event->data != 'show') {
         return;
     }
     // Trackbacks disabled? Quit
     if (!$this->getConf('enable_trackback')) {
         return;
     }
     // Get linkback metadata
     $file = metaFN($ID, '.linkbacks');
     $data = array('send' => false, 'receive' => false, 'display' => false, 'sentpings' => array(), 'receivedpings' => array(), 'number' => 0);
     if (@file_exists($file)) {
         $data = unserialize(io_readFile($file, false));
     }
     // Does not accept linkbacks? Quit
     if (!$data['receive']) {
         return;
     }
     // if trackbacks are enabled, insert RDF definition of trackback into output
     if ($this->getConf('enable_trackback')) {
         echo '<!--<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"' . NL . 'xmlns:dc="http://purl.org/dc/elements/1.1/"' . NL . 'xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">' . NL . '<rdf:Description' . NL . 'rdf:about="' . wl($ID, '', true) . '"' . NL . 'dc:identifier="' . wl($ID, '', true) . '"' . NL . 'dc:title="' . tpl_pagetitle($ID, true) . '"' . NL . 'trackback:ping="' . DOKU_URL . 'lib/plugins/linkback/exe/trackback.php/' . $ID . '" />' . NL . '</rdf:RDF>-->';
     }
 }
Пример #5
0
    /**
     * Initialize the rendering
     */
    function document_start() {
        global $ID;
        global $conf;
        global $lang;

        // call the parent
        parent::document_start();

        // store the content type headers in metadata
        $headers = array(
            'Content-Type' => 'text/html; charset=utf-8'
        );
       $theme = isset($_GET['theme'])?$_GET['theme']:$this->getConf('theme');
       p_set_metadata($ID,array('format' => array('revealjs' => $headers) ));
        $this->base = DOKU_BASE.'lib/plugins/revealjs/';
       $this->doc = '
<!DOCTYPE html>
<html lang="'.$conf['lang'].'" dir="'.$lang['direction'].'">

	<head>
		<meta charset="utf-8">

		<title>'.tpl_pagetitle($ID, true).'</title>

		<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
		<meta name="author" content="Hakim El Hattab">

		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

                <link rel="stylesheet" href="'.$this->base.'css/reveal.css">
		<link rel="stylesheet" href="'.$this->base.'css/theme/'.$theme.'.css" id="theme">
                <link rel="stylesheet" href="'.$this->base.'doku-substitutes.css"> 

		<!-- Code syntax highlighting -->
		<link rel="stylesheet" href="'.$this->base.'lib/css/zenburn.css">

		<!-- Printing and PDF exports -->
		<script>
			var link = document.createElement( \'link\' );
			link.rel = \'stylesheet\';
			link.type = \'text/css\';
			link.href = window.location.search.match( /print-pdf/gi ) ? \''.$this->base.'css/print/pdf.css\' : \''.$this->base.'css/print/paper.css\';
			document.getElementsByTagName( \'head\' )[0].appendChild( link );
		</script>

		<!--[if lt IE 9]>
		<script src='.$this->base.'"lib/js/html5shiv.js"></script>
		<![endif]-->
	</head>
<body>

		<div class="reveal">

			<!-- Any section element inside of this container is displayed as a slide -->
			<div class="slides">
';
    }
 function test_pageFunctionTitle()
 {
     $this->markTestSkipped('Skipped because it is failing');
     global $ID, $ACT;
     $ID = 'foo:bar';
     $ACT = 'revisions';
     $this->assertEquals('foo:bar - Old revisions', tpl_pagetitle(null, true));
 }
function tpl_action_url($url)
{
    $page_url = urlencode(selfURL());
    $page_title = urlencode(tpl_pagetitle(null, true));
    $url = str_replace("%PAGEURL%", $page_url, $url);
    $url = str_replace("%PAGETITLE%", $page_title, $url);
    return $url;
}
Пример #8
0
function dokui_navigation_page()
{
    global $dokui;
    if ($dokui['navigation']['page'] == null) {
        $page = explode(':', tpl_pagetitle(NULL, true));
        array_pop($page);
        $page = count($page) > 0 ? implode(':', $page) . ':navigation' : 'navigation';
        $dokui['navigation']['page'] = $page;
    }
    return $dokui['navigation']['page'];
}
Пример #9
0
 /**
  * Handler for the TPL_ACT_RENDER event
  */
 function handle_act_render(&$event, $params)
 {
     if (!$this->run) {
         return;
     }
     // Action not 'show'? Quit
     if ($event->data != 'show') {
         return;
     }
     global $ID;
     // insert RDF definition of trackback into output
     echo '<!--<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"' . NL . 'xmlns:dc="http://purl.org/dc/elements/1.1/"' . NL . 'xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">' . NL . '<rdf:Description' . NL . 'rdf:about="' . wl($ID, '', true) . '"' . NL . 'dc:identifier="' . wl($ID, '', true) . '"' . NL . 'dc:title="' . tpl_pagetitle($ID, true) . '"' . NL . 'trackback:ping="' . DOKU_URL . 'lib/plugins/blogtng/exe/trackback.php/' . $ID . '" />' . NL . '</rdf:RDF>-->';
 }
Пример #10
0
/**
 * Displays the menu2 
 *
 */
function tpl_menu2()
{
    global $conf, $ID, $REV, $INFO, $lang;
    $currID = false;
    if ($conf['tpl_mmClean']['menu2Permanent']) {
        $path = "";
    } else {
        if (false != strpos($ID, ":")) {
            $path = substr($ID, 0, strpos($ID, ":"));
        } else {
            $path = $ID;
        }
        $path .= ":";
    }
    print "<h1>";
    print tpl_pagetitle();
    print "</h1>";
    print p_wiki_xhtml($path . "menu2", '', false);
    if ($INFO['perm'] > AUTH_READ) {
        print '<ul><li><a href="?id=' . $path . 'menu2&amp;do=edit" class="wikilink1" title="Edit"><b>Edit</b></a></li></ul>';
    }
}
/**
 * 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;
}
Пример #12
0
    /**
     * Print the header of the page
     *
     * Gets called when the very first H1 header is discovered. It includes
     * all the S5 CSS and JavaScript magic
     */
    function s5_init($title)
    {
        global $conf;
        global $lang;
        global $INFO;
        global $ID;
        //throw away any previous content
        $this->doc = '
<!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="' . $conf['lang'] . '"
 lang="' . $conf['lang'] . '" dir="' . $lang['direction'] . '">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>' . hsc($title) . '</title>
<!-- metadata -->
<meta name="generator" content="S5" />
<meta name="version" content="S5 1.1" />
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<meta name="controlVis" content="hidden" />
<!-- style sheet links -->
<link rel="stylesheet" href="' . DOKU_BASE . 'lib/styles/all.css" type="text/css" media="screen" />
<link rel="stylesheet" href="' . DOKU_BASE . 'lib/styles/screen.css" type="text/css" media="screen" />
<link rel="stylesheet" href="' . $this->base . $this->tpl . '/slides.css" type="text/css" media="projection" id="slideProj" />
<link rel="stylesheet" href="' . $this->base . 'default/outline.css" type="text/css" media="screen" id="outlineStyle" />
<link rel="stylesheet" href="' . $this->base . 'default/print.css" type="text/css" media="print" id="slidePrint" />
<link rel="stylesheet" href="' . $this->base . 'default/opera.css" type="text/css" media="projection" id="operaFix" />
<!-- S5 JS -->
<script src="' . $this->base . 'default/slides.js" type="text/javascript"></script>
</head>
<body>
<div class="layout">
<div id="controls"><!-- DO NOT EDIT --></div>
<div id="currentSlide"><!-- DO NOT EDIT --></div>
<div id="header"></div>
<div id="footer">
<h1>' . tpl_pagetitle($ID, true) . '</h1>
<h2>' . hsc($conf['title']) . ' &#8226; ' . strftime($conf['dformat'], $INFO['lastmod']) . '</h2>
</div>

</div>
<div class="presentation">
';
    }
Пример #13
0
<?php

define("DOKU_INC", realpath(dirname(__FILE__) . '/../../../../') . '/');
require_once DOKU_INC . 'inc/init.php';
require_once DOKU_INC . 'inc/template.php';
if (isset($_REQUEST['dw_id']) && $_REQUEST['dw_id']) {
    $page = urldecode($_REQUEST['dw_id']);
    $page = ltrim($page, ':');
} else {
    echo $_REQUEST['dw_id'] . "\n";
    exit;
}
$t = trim(tpl_pagetitle($page, 1));
echo "{$t}\n";
Пример #14
0
?>
 </li>
               <li ><?php 
tpl_actionlink('admin');
?>
 </li>
               <li ><?php 
tpl_actionlink('profile');
?>
 </li>
            </ul>
         </div>

         <div class="headerPagename">
           [[<?php 
tpl_link(wl($ID, 'do=backlink'), tpl_pagetitle($ID, true));
?>
]]
         </div>

          
         <div class="headerLogo">
           <?php 
tpl_link(wl(), $conf['title'], 'name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[ALT+H]"');
?>
         </div>
         
         <div class="clearfix"> </div>
      </div>

   	<div id="wrapper" class="clearfix" >
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
$showTools = tpl_getConf('showTools') != 'never' && (tpl_getConf('showTools') == 'always' || !empty($_SERVER['REMOTE_USER']));
$individualTools = tpl_getConf('individualTools');
$showUserHomeLink = tpl_getConf('showUserHomeLink');
$showLoginOnFooter = tpl_getConf('showLoginOnFooter');
$showLoginLink = !tpl_getConf('hideLoginLink') || !empty($_SERVER['REMOTE_USER']);
$showSidebar = page_findnearest($conf['sidebar']) && $ACT == 'show';
$sidebarPosition = tpl_getConf('sidebarPosition');
$showRightSidebar = page_findnearest(tpl_getConf('rightSidebar')) && $ACT == 'show';
$rightSidebar = tpl_getConf('rightSidebar');
$showCookieLawBanner = tpl_getConf('showCookieLawBanner');
$cookieLawBannerPage = tpl_getConf('cookieLawBannerPage');
$cookieLawPolicyPage = tpl_getConf('cookieLawPolicyPage');
$browserTitle = str_replace(array('@WIKI@', '@TITLE@'), array(strip_tags($conf['title']), tpl_pagetitle(null, true)), tpl_getConf('browserTitle'));
$showThemeSwitcher = tpl_getConf('showThemeSwitcher');
$fixedTopNavbar = tpl_getConf('fixedTopNavbar');
$inverseNavbar = tpl_getConf('inverseNavbar');
$bootstrapTheme = tpl_getConf('bootstrapTheme');
$customTheme = tpl_getConf('customTheme');
$bootswatchTheme = tpl_getConf('bootswatchTheme');
$pageOnPanel = tpl_getConf('pageOnPanel');
$fluidContainer = tpl_getConf('fluidContainer');
$showPageInfo = tpl_getConf('showPageInfo');
$showBadges = tpl_getConf('showBadges');
$semantic = tpl_getConf('semantic');
$schemaOrgType = tpl_getConf('schemaOrgType');
$leftSidebarGrid = tpl_getConf('leftSidebarGrid');
$rightSidebarGrid = tpl_getConf('rightSidebarGrid');
$contentGrid = _tpl_get_container_grid();
Пример #16
0
    /**
     * Adds a javascript to interact with coComments
     */
    function _coComment()
    {
        global $ID;
        global $conf;
        global $INFO;
        $user = $_SERVER['REMOTE_USER'];
        ?>
        <script type="text/javascript"><!--//--><![CDATA[//><!--
          var blogTool  = "DokuWiki";
          var blogURL   = "<?php 
        echo DOKU_URL;
        ?>
";
          var blogTitle = "<?php 
        echo $conf['title'];
        ?>
";
          var postURL   = "<?php 
        echo wl($ID, '', true);
        ?>
";
          var postTitle = "<?php 
        echo tpl_pagetitle($ID, true);
        ?>
";
        <?php 
        if ($user) {
            ?>
          var commentAuthor = "<?php 
            echo $INFO['userinfo']['name'];
            ?>
";
        <?php 
        } else {
            ?>
          var commentAuthorFieldName = "name";
        <?php 
        }
        ?>
          var commentAuthorLoggedIn = <?php 
        echo $user ? 'true' : 'false';
        ?>
;
          var commentFormID         = "discussion__comment_form";
          var commentTextFieldName  = "text";
          var commentButtonName     = "submit";
          var cocomment_force       = false;
        //--><!]]></script>
        <script type="text/javascript" src="http://www.cocomment.com/js/cocomment.js">
        </script>
        <?php 
    }
function bootstrap3_page_browser_title()
{
    global $conf, $ACT, $ID;
    if (bootstrap3_conf('browserTitleShowNS') && $ACT == 'show') {
        $ns_parts = explode(':', $ID);
        $ns_pages = array();
        $ns_titles = array();
        $ns_separator = sprintf(' %s ', bootstrap3_conf('browserTitleCharSepNS'));
        if (useHeading('navigation')) {
            if (count($ns_parts) > 1) {
                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 = $exists ? $ns_page_title_heading : $ns_page_title_page;
                    if ($ns_page_title !== $conf['start']) {
                        $ns_titles[] = $ns_page_title;
                    }
                }
            }
            resolve_pageid(getNS($ID), $ID, $exists);
            if ($exists) {
                $ns_titles[] = tpl_pagetitle($ID, true);
            }
            $ns_titles = array_filter(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), bootstrap3_conf('browserTitle'));
}
/**
 * Hierarchical breadcrumbs
 *
 *
 * @return bool
 */
function tpl_youarehere_bootstrap()
{
    global $conf;
    global $ID;
    global $lang;
    // check if enabled
    if (!$conf['youarehere']) {
        return false;
    }
    $parts = explode(':', $ID);
    $count = count($parts);
    // print intermediate namespace links
    $part = '';
    print '<ol class="breadcrumb">' . PHP_EOL;
    // always print the startpage
    echo '<li>';
    echo $lang['youarehere'] . ' ';
    $page = $conf['start'];
    tpl_link(wl($page), tpl_pagetitle($page, true), 'title="' . $page . '"');
    echo '</li>' . PHP_EOL;
    for ($i = 0; $i < $count - 1; $i++) {
        $part .= $parts[$i] . ':';
        $page = $part;
        if ($page == $conf['start']) {
            continue;
        }
        // Skip startpage
        // output
        if ($i == $count) {
            print '<li class="active">';
        } else {
            print '<li>';
        }
        // html_wikilink because the page has the form pagename: and not pagename:pagename
        print html_wikilink($page);
        echo '</li>' . PHP_EOL;
    }
    // print current page, skipping start page, skipping for namespace index
    resolve_pageid('', $page, $exists);
    // skipping start page
    if (isset($page) && $page == $part . $parts[$i]) {
        echo '</ol>' . PHP_EOL;
        return true;
    }
    // skipping for namespace index
    $page = $part . $parts[$i];
    if ($page == $conf['start']) {
        echo '</ol>' . PHP_EOL;
        return true;
    }
    // print current page
    print '<li>';
    tpl_link(wl($page), tpl_pagetitle($page, true), 'title="' . $page . '"');
    print '</li>' . PHP_EOL;
    // close the breadcrumb
    echo '</ol>' . PHP_EOL;
    return true;
}
Пример #19
0
 * @author Martin Gabelmann <*****@*****.**> 
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
// include custom template functions stolen from arctic template
require_once dirname(__FILE__) . '/tpl_functions.php';
// load translation plugin (if present)
$translation = plugin_load('helper', 'translation');
echo '
    <!DOCTYPE html>
    <html lang="', $conf['lang'], '" dir="', $lang['direction'], '">
    <head>
    <meta charset="utf-8" />
    <title>', tpl_getConf("title_prefix"), preg_replace('/^' . $conf['lang'] . ':/', '', tpl_pagetitle(null, true)), '</title>', '<meta name="viewport" content="width=device-width, initial-scale=1.0">';
tpl_metaheaders();
echo tpl_favicon(array('favicon', 'mobile')), '
    </head>
    <body>
    <div class="dokuwiki">
    <div id="wrapper">';
html_msgarea();
// print the upper navigation with translation and login buttons
echo '<div id="metanavigation">';
tpl_link(wl(), 'HOME', 'name="dokuwiki__top" id="dokuwiki__top"');
tpl_link('https://www.kit.edu/impressum.php', tpl_getLang('imprint'));
tpl_link('https://www.kit.edu/', 'KIT');
if ($translation) {
    echo $translation->showTranslations();
    if (null != tpl_getConf("institute_" . $conf['lang'])) {
Пример #20
0
/**
 * DokuWiki Default Template 2012
 *
 * @link     http://dokuwiki.org/template
 * @author   Anika Henke <*****@*****.**>
 * @author   Clarence Lee <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
if (!defined('DOKU_INC')) {
    die;
}
/* must be run from within DokuWiki */
header('X-UA-Compatible: IE=edge,chrome=1');
$hasSidebar = page_findnearest($conf['sidebar']);
$showSidebar = $hasSidebar && $ACT == 'show';
$TITLE = tpl_pagetitle(null, true);
$SEARCH = array("method" => "get", "action" => "/start", "placeholder" => "Search", "name" => "id", "hidden" => array(array("name" => "do", "value" => "search")));
if (empty($_SERVER['REMOTE_USER'])) {
    $LINKS = array(array("href" => "?do=login", "text" => "Login"), array("href" => "?do=register", "text" => "Register"));
} else {
    $name = hsc($INFO['userinfo']['name']) . ' (' . hsc($_SERVER['REMOTE_USER']) . ')';
    $LINKS = array(array("href" => "?do=edit", "text" => "Edit this page"), array("href" => "?do=admin", "text" => "Admin"), array("href" => "?do=logout", "text" => "Logout"), array("href" => "?do=profile", "text" => $name));
}
ob_start();
tpl_metaheaders();
$HEAD_WIKI = ob_get_clean();
$CSS = array("/styles/wiki.css");
include __DIR__ . "/../../../shared/templates/header.inc";
?>

<section id="breadcrumbs">
Пример #21
0
 * @link     http://dokuwiki.org/template
 * @author   Anika Henke <*****@*****.**>
 * @author   Clarence Lee <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */

if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */

$hasSidebar = page_findnearest($conf['sidebar']);
$showSidebar = $hasSidebar && ($ACT=='show');
?><!DOCTYPE html>
<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
<head>
    <meta charset="utf-8" />
    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
    <?php tpl_metaheaders() ?>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
    <?php tpl_includeFile('meta.html') ?>
</head>

<body>
    <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
    <div id="dokuwiki__site"><div id="dokuwiki__top"
        class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'showSidebar' : '';
        ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">

        <?php include('tpl_header.php') ?>
Пример #22
0
			<ul class="uk-nav uk-nav-offcanvas">				
				<?php 
$nav = explode(':', tpl_pagetitle(NULL, true));
array_pop($nav);
$nav = count($nav) > 0 ? implode(':', $nav) . ':navigation' : 'navigation';
echo strip_tags(tpl_include_page($nav, 0, 0), '<li><a>');
if ($nav) {
    echo '';
}
?>
				
			</ul>
			
		</div>

	</div>
	
	<div class="uk-tooltip"></div>

	<form action="#">
		<input class="fixjs" type="hidden" name="title" value="<?php 
echo tpl_pagetitle(NULL, true);
?>
">
		<?php 
tpl_indexerWebBug();
?>
	</form>
	
</body>
</html>
Пример #23
0
  <?php 
tpl_flush();
?>

  <div class="stylefoot">

    <div class="meta">
      <div class="user">
        <?php 
tpl_userinfo();
?>
      </div>
      <div class="doc">
		[[<?php 
tpl_link(wl($ID, 'do=backlink'), tpl_pagetitle($ID, true), 'title="' . $lang['btn_backlink'] . '"');
?>
]]
        <?php 
tpl_pageinfo();
?>
      </div>
    </div>

   <?php 
/*old includehook*/
@(include dirname(__FILE__) . '/pagefooter.html');
?>

    <div class="bar" id="bar__bottom">
      <div class="bar-left" id="bar__bottomleft">
/**
 * Hierarchical breadcrumbs with Bootstrap style
 *
 * This code was suggested as replacement for the usual breadcrumbs.
 * It only makes sense with a deep site structure.
 *
 * @author Andreas Gohr <*****@*****.**>
 * @author Nigel McNie <*****@*****.**>
 * @author Sean Coates <*****@*****.**>
 * @author <*****@*****.**>
 * @author Giuseppe Di Terlizzi <*****@*****.**>
 * @todo   May behave strangely in RTL languages
 *
 * @return bool
 */
function bootstrap3_youarehere()
{
    global $conf;
    global $ID;
    global $lang;
    // check if enabled
    if (!$conf['youarehere']) {
        return false;
    }
    $parts = explode(':', $ID);
    $count = count($parts);
    echo '<ol class="breadcrumb">';
    echo '<li>' . $lang['youarehere'] . '</li>';
    // always print the startpage
    echo '<li>';
    tpl_link(wl($conf['start']), '<i class="fa fa-fw fa-home"></i>', 'title="' . $conf['start'] . '"');
    echo '</li>';
    // print intermediate namespace links
    $part = '';
    for ($i = 0; $i < $count - 1; $i++) {
        $part .= $parts[$i] . ':';
        $page = $part;
        if ($page == $conf['start']) {
            continue;
        }
        // Skip startpage
        // output
        echo '<li>';
        echo html_wikilink($page);
        echo '</li>';
    }
    // print current page, skipping start page, skipping for namespace index
    resolve_pageid('', $page, $exists);
    if (isset($page) && $page == $part . $parts[$i]) {
        echo '</ol>';
        return true;
    }
    $page = $part . $parts[$i];
    if ($page == $conf['start']) {
        echo '</ol>';
        return true;
    }
    echo '<li class="active">';
    tpl_pagetitle($page);
    echo '</li>';
    echo '</ol>';
    return true;
}
Пример #25
0
echo $page_type;
?>
 h6e-main-content">

    <h1 class="h6e-page-title">    
    <?php 
tpl_link(wl(), '<img src="' . H6E_CSS . '/uH_logo.png" alt="uH logo" id="uH-logo" /> ' . $conf['title'], 'name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[ALT+H]"');
?>
    </h1>

    <?php 
if (!tpl_getConf('hide-entry-title')) {
    ?>
        <h2 class="h6e-entry-title">
        <?php 
    tpl_pagetitle($ID);
    ?>
        </h2>
    <?php 
}
?>

    <?php 
if ($conf['breadcrumbs']) {
    ?>
    <div class="breadcrumbs">
      <?php 
    tpl_breadcrumbs();
    ?>
    </div>
    <?php 
Пример #26
0
 /**
  * Handler for the ACTION_ACT_PREPROCESS event and AFTER advise.
  * 
  * Sends linkback if previous action was 'save' and new one is show.
  */
 function handle_action_act_preprocess_after(&$event, $params)
 {
     global $ID;
     global $ACT;
     global $conf;
     // only perform linkbacks on save of a wikipage
     if ($this->preact != 'save' || $event->data != 'show') {
         return;
     }
     // if guests are not allowed to perform linkbacks, return
     if (!$this->getConf('allow_guests') && !$_SERVER['REMOTE_USER']) {
         return;
     }
     // get linkback meta file name
     $file = metaFN($ID, '.linkbacks');
     $data = array('send' => false, 'receive' => false, 'display' => false, 'sentpings' => array(), 'receivedpings' => array(), 'number' => 0);
     if (@file_exists($file)) {
         $data = unserialize(io_readFile($file, false));
     }
     $data['send'] = $_REQUEST['plugin__linkback_toggle'] ? true : false;
     if (!$data['send']) {
         return;
     }
     $meta = p_get_metadata($ID);
     // prepare linkback info
     $linkback_info = array();
     $linkback_info['title'] = tpl_pagetitle($ID, true);
     $linkback_info['url'] = wl($ID, '', true);
     $linkback_info['blog_name'] = $conf['title'];
     $linkback_info['excerpt'] = $meta['description']['abstract'];
     // get links
     $ilist = p_cached_instructions(wikiFN($ID), false, $ID);
     if (!is_array($ilist)) {
         return;
     }
     $pages = $this->_parse_instructionlist($ilist);
     $sentpings = array();
     foreach ($pages as $page) {
         if (!$data['sentpings'][$page]) {
             // try to ping pages not already pinged
             $this->_ping_page($page, $linkback_info);
         }
         $sentpings[$page] = true;
     }
     $data['sentpings'] = $sentpings;
     // save sent ping info
     io_saveFile($file, serialize($data));
     return true;
 }
Пример #27
0
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
echo $conf['lang'];
?>
"
  lang="<?php 
echo $conf['lang'];
?>
" dir="<?php 
echo $lang['direction'];
?>
">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?php 
tpl_pagetitle();
?>
 [<?php 
echo strip_tags($conf['title']);
?>
]</title>
    <?php 
tpl_metaheaders();
?>
    <link rel="shortcut icon" href="<?php 
echo _tpl_getFavicon();
?>
" />
    <?php 
_tpl_include('meta.html');
?>
                //we are not allowed to show the content of the defined wiki
                //article to use as custom sitenotice.
                //$_monobook_boxes["p-tb"]["xhtml"] = hsc($lang["monobook_accessdenied"])." (".tpl_getConf("monobook_toolbox_location").")";
            }
        }
    }
    //Languages/translations provided by Andreas Gohr's translation plugin,
    //see <https://www.dokuwiki.org/plugin:translation>
    if (!empty($transplugin) && is_object($transplugin)) {
        $_monobook_boxes["p-lang"]["headline"] = $lang["monobook_bar_inotherlanguages"];
        $_monobook_boxes["p-lang"]["xhtml"] = $transplugin->_showTranslations();
    }
    //QR Code of current page's URL (powered by <http://goqr.me/api/>)
    if (tpl_getConf("monobook_qrcodebox")) {
        //headline
        $_monobook_boxes["p-qrcode"]["headline"] = $lang["monobook_qrcodebox"];
        //content
        $_monobook_boxes["p-qrcode"]["xhtml"] = "        <span id=\"t-qrcode\">" . (cleanID(getID()) === "start" ? "<a href=\"http://" . ($conf["lang"] !== "de" ? "goqr.me" : "goqr.me/de") . "/\" target=\"_blank\" rel=\"nofollow\">" : "") . "<img src=\"" . (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] === "on" ? "https" : "http") . "://api.qrserver.com/v1/create-qr-code/?data=" . urlencode(wl(cleanID(getId()), false, true, "&")) . "&#38;size=130x130&#38;margin=0\" alt=\"" . hsc($lang["monobook_qrcodebox_qrcode"]) . " " . hsc(tpl_pagetitle(null, true)) . " (" . hsc($lang["monobook_qrcodebox_genforcurrentpage"]) . ")\" title=\"" . hsc($lang["monobook_qrcodebox_urlofcurrentpage"]) . "\" />" . (cleanID(getID()) === "start" ? "</a>" : "") . "</span>";
    }
} else {
    //headline
    $_monobook_boxes["p-login"]["headline"] = $lang["btn_login"];
    $_monobook_boxes["p-login"]["xhtml"] = "      <ul>\n" . "        <li id=\"t-login\"><a href=\"" . wl(cleanID(getId()), array("do" => "login")) . "\" rel=\"nofollow\">" . hsc($lang["btn_login"]) . "</a></li>\n" . "      </ul>";
}
/******************************************************************************
 ********************************  ATTENTION  *********************************
         DO NOT MODIFY THIS FILE, IT WILL NOT BE PRESERVED ON UPDATES!
 ******************************************************************************
  If you want to add some own boxes, have a look at the README of this
  template and "/user/boxes.php". You have been warned!
 *****************************************************************************/