• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP p_wiki_xhtml函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了p_wiki_xhtml函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 <[email protected]>
 * @author Louis Wolf <[email protected]>
 */
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 <[email protected]>
 */
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


示例16: tpl_menu2

/**
 * 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>';
    }
}
开发者ID:reidab,项目名称:osbp_dokuwiki_theme,代码行数:26,代码来源:tpl_functions.php


示例17: handle_ajax_call

 /**
  * Handles the AJAX calls
  *
  * @author Michael Klier <[email protected]>
  */
 function handle_ajax_call(&$event, $param)
 {
     global $lang;
     if ($event->data == 'snippet_preview' or $event->data == 'snippet_insert') {
         $event->preventDefault();
         $event->stopPropagation();
         $id = cleanID($_REQUEST['id']);
         if (page_exists($id)) {
             if ($event->data == 'snippet_preview') {
                 if (auth_quickaclcheck($id) >= AUTH_READ) {
                     print p_wiki_xhtml($id);
                 } else {
                     print p_locale_xhtml('denied');
                 }
             } elseif ($event->data == 'snippet_insert') {
                 if (auth_quickaclcheck($id) >= AUTH_READ) {
                     print "\n\n";
                     // always start on a new line (just to be safe)
                     print trim(preg_replace('/<snippet>.*?<\\/snippet>/s', '', io_readFile(wikiFN($id))));
                 }
             }
         }
     }
 }
开发者ID:houshuang,项目名称:folders2web,代码行数:29,代码来源:action.php


示例18: p_sidebar_xhtml

/**
 * Removes the TOC of the sidebar pages and 
 * shows a edit button if the user has enough rights
 *
 * TODO sidebar caching
 * 
 * @author Michael Klier <[email protected]>
 */
function p_sidebar_xhtml($sb, $pos, $subst = array())
{
    $data = p_wiki_xhtml($sb, '', false);
    if (!empty($subst)) {
        $data = preg_replace($subst['pattern'], $subst['replace'], $data);
    }
    if (auth_quickaclcheck($sb) >= AUTH_EDIT) {
        $data .= '<div class="secedit">' . html_btn('secedit', $sb, '', array('do' => 'edit', 'rev' => '', 'post')) . '</div>';
    }
    // strip TOC
    $data = preg_replace('/<div class="toc">.*?(<\\/div>\\n<\\/div>)/s', '', $data);
    // replace headline ids for XHTML compliance
    $data = preg_replace('/(<h.*?><a.*?name=")(.*?)(".*?id=")(.*?)(">.*?<\\/a><\\/h.*?>)/', '\\1sb_' . $pos . '_\\2\\3sb_' . $pos . '_\\4\\5', $data);
    return $data;
}
开发者ID:RockyRoad29,项目名称:dokuwiki-template-arctic,代码行数:23,代码来源:tpl_functions.php


示例19: html_show

/**
 * Show a wiki page
 *
 * @author Andreas Gohr <[email protected]>
 *
 * @param null|string $txt wiki text or null for showing $ID
 */
function html_show($txt = null)
{
    global $ID;
    global $REV;
    global $HIGH;
    global $INFO;
    global $DATE_AT;
    //disable section editing for old revisions or in preview
    if ($txt || $REV) {
        $secedit = false;
    } else {
        $secedit = true;
    }
    if (!is_null($txt)) {
        //PreviewHeader
        echo '<br id="scroll__here" />';
        echo p_locale_xhtml('preview');
        echo '<div class="preview"><div class="pad">';
        $html = html_secedit(p_render('xhtml', p_get_instructions($txt), $info), $secedit);
        if ($INFO['prependTOC']) {
            $html = tpl_toc(true) . $html;
        }
        echo $html;
        echo '<div class="clearer"></div>';
        echo '</div></div>';
    } else {
        if ($REV || $DATE_AT) {
            $data = array('rev' => &$REV, 'date_at' => &$DATE_AT);
            trigger_event('HTML_SHOWREV_OUTPUT', $data, 'html_showrev');
        }
        $html = p_wiki_xhtml($ID, $REV, true, $DATE_AT);
        $html = html_secedit($html, $secedit);
        if ($INFO['prependTOC']) {
            $html = tpl_toc(true) . $html;
        }
        $html = html_hilight($html, $HIGH);
        echo $html;
    }
}
开发者ID:evacomaroski,项目名称:dokuwiki,代码行数:46,代码来源:html.php


示例20: htmlPage

 /**
  * Return a wiki page rendered to html
  */
 function htmlPage($id, $rev = '')
 {
     $id = $this->resolvePageId($id);
     if (auth_quickaclcheck($id) < AUTH_READ) {
         throw new RemoteAccessDeniedException('You are not allowed to read this page', 111);
     }
     return p_wiki_xhtml($id, $rev, false);
 }
开发者ID:neosunchess,项目名称:dokuwiki,代码行数:11,代码来源:RemoteAPICore.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pack函数代码示例发布时间:2022-05-15
下一篇:
PHP p_set_metadata函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap