当前位置: 首页>>代码示例>>PHP>>正文


PHP p_wiki_xhtml函数代码示例

本文整理汇总了PHP中p_wiki_xhtml函数的典型用法代码示例。如果您正苦于以下问题:PHP p_wiki_xhtml函数的具体用法?PHP p_wiki_xhtml怎么用?PHP p_wiki_xhtml使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了p_wiki_xhtml函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testInnerToOuter

 public function testInnerToOuter()
 {
     $thirdHTML = p_wiki_xhtml('test:plugin_include:nested:third');
     $secondHTML = p_wiki_xhtml('test:plugin_include:nested:second');
     $mainHTML = p_wiki_xhtml('test:plugin_include:nested:start');
     $this->_validateContent($mainHTML, $secondHTML, $thirdHTML);
 }
开发者ID:houshuang,项目名称:folders2web,代码行数:7,代码来源:nested_include.test.php

示例2: tpl_sidebar

function tpl_sidebar($user_defined_page_name = "")
{
    global $ID, $REV, $conf;
    // save globals
    $saveID = $ID;
    $saveREV = $REV;
    // discover file to be displayed in navigation sidebar
    $fileSidebar = '';
    // damien
    $pagename = "";
    if ($user_defined_page_name != "") {
        $pagename = $user_defined_page_name;
    } else {
        if (isset($conf['sidebar']['page'])) {
            $pagename = $conf['sidebar']['page'];
        }
    }
    if ($pagename != "") {
        $fileSidebar = getSidebarFN(getNS($ID), $pagename);
    }
    // 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;
}
开发者ID:postgresqlfr,项目名称:pgfr_materials,代码行数:33,代码来源:tplfn_sidebar.php

示例3: p_file_xhtml

function p_file_xhtml($id, $excuse = false)
{
    if (@file_exists($id)) {
        return p_cached_output($id, 'xhtml', $id);
    }
    return p_wiki_xhtml($id, '', $excuse);
}
开发者ID:jthoenes,项目名称:dokuwiki2evernote,代码行数:7,代码来源:export_dokuwiki.php

示例4: _getMenu

function _getMenu($menu, $edit)
{
    global $conf, $ID, $REV, $INFO, $lang;
    $currID = false;
    // Remember $ID and $REV
    $svID = $ID;
    $svREV = $REV;
    // Parent side ID
    $sub = substr($ID, 0, strpos($ID, ":"));
    $menuOutput = "";
    if (file_exists(wikiFN($ID . "/" . $menu))) {
        $menuOutput = p_wiki_xhtml($ID . "/" . $menu, '', false);
        $currID = $ID;
        $menuID = $currID . ":" . $menu;
    } else {
        if (file_exists(wikiFN($sub . "/" . $menu))) {
            $menuOutput = p_wiki_xhtml($sub . "/" . $menu, '', false);
            $currID = $sub;
            $menuID = $currID . ":" . $menu;
        }
    }
    if ($INFO['perm'] > AUTH_READ && true == $edit) {
        $menuOutput = '<ul><li><a href="?id=' . $menuID . '&amp;do=edit" class="wikilink1" title="Edit Menu"><b>Edit Menu</b></a></li></ul>';
    }
    $ID = $svID;
    $REV = $svREV;
    return $menuOutput;
}
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:28,代码来源:tpl_functions.php

示例5: test_basic_weekpicker_syntax

 public function test_basic_weekpicker_syntax()
 {
     global $INFO;
     $id = 'test:plugin_datepicker:syntax4';
     $INFO['id'] = $id;
     saveWikiText($id, '<weekpicker 14/02>' . DOKU_LF . '<weekpicker# 14/02>' . DOKU_LF . '<weekpicker\\ 14/02>' . DOKU_LF, 'test');
     $xhtml = p_wiki_xhtml($id);
     $doc = phpQuery::newDocument($xhtml);
     $mselector = pq("span.weekpicker", $doc);
     $this->assertTrue($mselector->length === 3);
     $this->assertEquals('14/02', trim($mselector->eq(0)->text()));
     $this->assertEquals('14/02', trim($mselector->eq(1)->text()));
     $this->assertEquals('14/02', trim($mselector->eq(2)->text()));
 }
开发者ID:araname,项目名称:datepicker,代码行数:14,代码来源:syntax.test.php

示例6: _show404

 function _show404(&$event, $param)
 {
     global $ACT;
     if ($ACT != 'notfound') {
         return false;
     }
     $event->stopPropagation();
     $event->preventDefault();
     global $ID;
     $oldid = $ID;
     $ID = $this->getConf('404page');
     echo p_wiki_xhtml($ID, '', false);
     $ID = $oldid;
     $ACT = 'show';
     return true;
 }
开发者ID:splitbrain,项目名称:dokuwiki-plugin-notfound,代码行数:16,代码来源:action.php

示例7: print_overlay

    function print_overlay(&$event, $param)
    {
        global $ID;
        $overlay = '';
        $paths = $this->getConf('nsoverlays');
        $namespace = getNS($ID);
        $sort_paths = $this->_natsort_ns($paths);
        $sort_paths = explode(',', $sort_paths);
        $overlays = $this->_get_overlays($sort_paths);
        $parent_ns = $this->_get_parent_ns($namespace);
        foreach ($overlays as $key => $val) {
            // first check if was specified an overlay for a specific namespace
            if ($val[1] != '') {
                if ($val[1] == ':') {
                    $overlay = $overlays[$key][0];
                } elseif (strpos($namespace, $val[1]) === 0) {
                    $overlay = $overlays[$key][0];
                    break;
                }
            } else {
                if ($overlay == '') {
                    if ('' == $val[1]) {
                        foreach ($parent_ns as $ns) {
                            $wikifile = wikiFN($ns . ':' . $val[0]);
                            if (file_exists($wikifile)) {
                                $overlay = str_replace('/', ':', $ns) . ':' . $val[0];
                                break 2;
                            }
                        }
                    }
                }
            }
        }
        if (auth_quickaclcheck($ID) >= AUTH_READ) {
            $insert = p_wiki_xhtml($overlay);
        }
        if (!$insert) {
            return;
        }
        $close = trim($this->getLang('close'));
        $text = <<<TEXT
<div id='overlay'><div  class = "close">
<a href="javascript:jQuery('#overlay').toggle();void(0);" rel="nofollow" title="{$close}">{$close}</a>
</div> {$insert}</div>
TEXT;
        echo $text;
    }
开发者ID:TorMec,项目名称:Dokuwiki-Nav-Overlay,代码行数:47,代码来源:action.php

示例8: test_topic_tag

 function test_topic_tag()
 {
     saveWikiText('tagged_page', '{{tag>mytag test2tag}}', 'Test');
     saveWikiText('topic_page', '{{topic>mytag}}' . DOKU_LF . DOKU_LF . '{{tag>topictag mytag}}' . DOKU_LF, 'Test');
     idx_addPage('topic_page');
     idx_addPage('tagged_page');
     $this->assertContains('tag:topictag', p_wiki_xhtml('topic_page'), 'Page with tag syntax doesn\'t contain tag output');
     $this->assertNotContains('tag:test2tag', p_wiki_xhtml('topic_page'), 'Page with tag and topic syntax tag which is listed in a page that is listed in the topic syntax but not on the page itself');
     $this->assertContains('topic_page', p_wiki_xhtml('topic_page'), 'Page with topic and tag syntax doesn\'t list itself in the topic syntax');
     $this->assertContains('tagged_page', p_wiki_xhtml('topic_page'), 'Page with topic syntax doesn\'t list matching page');
     $this->assertContains('tag:mytag', p_wiki_xhtml('tagged_page'), 'Page with tag syntax doesn\'t contain tag output');
     $this->assertContains('tag:test2tag', p_wiki_xhtml('tagged_page'), 'Page with tag syntax doesn\'t contain tag output');
     $this->assertNotContains('tag:topictag', p_wiki_xhtml('tagged_page'), 'Page with tag syntax contains tag from a page in which it is listed in the topic syntax');
     saveWikiText('tagged_page', '{{tag>test2tag}}', 'Deleted mytag');
     $this->assertNotContains('tagged_page', p_wiki_xhtml('topic_page'), 'Page that no longer contains the tag is still listed in the topic syntax (caching problems?)');
     $this->assertNotContains('tag:mytag', p_wiki_xhtml('tagged_page'), 'Removed tag is still listed in XHTML output');
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:17,代码来源:topic_tag.test.php

示例9: tpl_topbar

/**
 * Renders the topbar
 *
 * @author Michael Klier <chi@chimeric.de>
 * @author Louis Wolf <louiswolf@chirripo.nl>
 */
function tpl_topbar()
{
    global $ID;
    $found = false;
    $tbar = '';
    $path = explode(':', $ID);
    while (!$found && count($path) >= 0) {
        $tbar = implode(':', $path) . ':' . 'topbar';
        $found = @file_exists(wikiFN($tbar));
        array_pop($path);
        // check if nothing was found
        if (!$found && $tbar == ':topbar') {
            return;
        }
    }
    if ($found && auth_quickaclcheck($tbar) >= AUTH_READ) {
        $toolbar = p_wiki_xhtml($tbar, '', false);
        $lines = explode("\n", $toolbar);
        $nr = count($lines);
        $open_ul = 0;
        $primary_ul = 0;
        $positions = array();
        for ($i = 0; $i < $nr; $i++) {
            if (trim($lines[$i]) == '<ul>') {
                $open_ul = $open_ul + 1;
                if ($open_ul == 1) {
                    $primary_ul++;
                    $lines[$i] = '<ul class="primary">' . "\n";
                    array_push($positions, $i);
                }
            } else {
                if (strpos($lines[$i], '</ul>') !== false) {
                    $open_ul = $open_ul - 1;
                }
            }
        }
        $first_position = $positions[0];
        $last_position = $positions[count($positions) - 1];
        $lines[$first_position] = '<ul class="primary start">' . "\n";
        $lines[$last_position] = '<ul class="primary end">' . "\n";
        $width = $primary_ul * 150;
        print '<div id="tpl_simple_navi" style="width:' . $width . 'px;">';
        print implode($lines);
        print '</div>';
    }
}
开发者ID:hannesdorn,项目名称:newday,代码行数:52,代码来源:tpl_functions.php

示例10: template_tpl_include_page

/**
 * Includes the rendered HTML of a given page
 *
 * This function is useful to populate sidebars or similar features in a
 * template
 */
function template_tpl_include_page($pageid, $print = true, $propagate = false, $rev = '')
{
    if (!$pageid) {
        return false;
    }
    if ($propagate) {
        $pageid = page_findnearest($pageid);
    }
    global $TOC;
    $oldtoc = $TOC;
    $html = p_wiki_xhtml($pageid, $rev, false);
    $TOC = $oldtoc;
    if (!$print) {
        return $html;
    }
    echo $html;
    return $html;
}
开发者ID:araname,项目名称:template-lisps,代码行数:24,代码来源:main.php

示例11: tpl_navigation

/**
 * Prints the navigation
 *
 * @author Michael Klier <chi@chimeric.de>
 */
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>';
}
开发者ID:adri,项目名称:Dokuwiki-OS-X-Template,代码行数:24,代码来源:tpl_functions.php

示例12: test_cache_handling

 /**
  * @group slow
  */
 function test_cache_handling()
 {
     $testid = 'wiki:bar:test';
     saveWikiText($testid, '[[wiki:foo:]]', 'Test setup');
     idx_addPage($testid);
     saveWikiText('wiki:foo:start', 'bar', 'Test setup');
     idx_addPage('wiki:foo:start');
     sleep(1);
     // wait in order to make sure that conditions with < give the right result.
     p_wiki_xhtml($testid);
     // populate cache
     $cache = new cache_renderer($testid, wikiFN($testid), 'xhtml');
     $this->assertTrue($cache->useCache());
     /** @var helper_plugin_move_op $move */
     $move = plugin_load('helper', 'move_op');
     $this->assertTrue($move->movePage('wiki:foo:start', 'wiki:foo2:start'));
     $cache = new cache_renderer($testid, wikiFN($testid), 'xhtml');
     $this->assertFalse($cache->useCache());
 }
开发者ID:kochichi,项目名称:dokuwiki-plugin-move,代码行数:22,代码来源:plugin_move_cache_handling.test.php

示例13: alterLoginPageBefore

 /**
  * Alters login page via HTML_LOGINFORM_OUTPUT event
  * @param $event
  * @param $param
  */
 public function alterLoginPageBefore($event, $param)
 {
     print '<div class="login container">' . NL;
     $helpId = $this->getConf(self::CONF_HELP_PAGE);
     global $conf;
     if (!empty($conf['lang'])) {
         $lang = $conf['lang'];
         if (!empty($conf['plugin']['translation']['translations']) && preg_match("/{$lang}/", $conf['plugin']['translation']['translations'])) {
             $helpId = ':' . $lang . $helpId;
         }
     }
     if (page_exists($helpId)) {
         print '<div class="login help">' . p_wiki_xhtml($helpId) . '</div>' . NL;
     }
     if (!empty($this->getConf(self::CONF_RENAME_LOCAL))) {
         /** @var Doku_Form $form */
         $form = $event->data;
         $form->_content[0]['_legend'] = $this->getLang('login_local');
     }
 }
开发者ID:tomaskadlec,项目名称:dokuwiki-plugin-authhelp,代码行数:25,代码来源:action.php

示例14: renderBar

function renderBar($page, $fallbackToIndex = false)
{
    global $ID, $REV;
    // save globals
    $saveID = $ID;
    $saveREV = $REV;
    $fileSidebar = getBarFN(getNS($ID), $page);
    // determine what to display
    if ($fileSidebar) {
        $ID = $fileSidebar;
        $REV = '';
        print p_wiki_xhtml($ID, $REV, false);
    } elseif ($fallbackToIndex) {
        global $IDX;
        html_index($IDX);
    }
    // restore globals
    $ID = $saveID;
    $REV = $saveREV;
}
开发者ID:pombredanne,项目名称:bayes-swarm,代码行数:20,代码来源:tplfn_sidebar.php

示例15: tpl_sidebar

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;
}
开发者ID:philipp02,项目名称:volleyball-rueppurr-dokuwiki,代码行数:40,代码来源:tplfn_sidebar.php


注:本文中的p_wiki_xhtml函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。