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


PHP wiki_parse_content函数代码示例

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


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

示例1: wiki_refresh_cachedcontent

function wiki_refresh_cachedcontent($page, $newcontent = null)
{
    global $DB;
    $version = wiki_get_current_version($page->id);
    if (empty($version)) {
        return null;
    }
    if (!isset($newcontent)) {
        $newcontent = $version->content;
    }
    $options = array('swid' => $page->subwikiid, 'pageid' => $page->id);
    $parseroutput = wiki_parse_content($version->contentformat, $newcontent, $options);
    $page->cachedcontent = $parseroutput['toc'] . $parseroutput['parsed_text'];
    $page->timerendered = time();
    $DB->update_record('wiki_pages', $page);
    wiki_refresh_page_links($page, $parseroutput['link_count']);
    return array('page' => $page, 'sections' => $parseroutput['repeated_sections'], 'version' => $version->version);
}
开发者ID:esyacelga,项目名称:sisadmaca,代码行数:18,代码来源:locallib.php

示例2: print_pretty_view

 private function print_pretty_view()
 {
     $version = wiki_get_current_version($this->page->id);
     $content = wiki_parse_content($version->contentformat, $version->content, array('printable' => true, 'swid' => $this->subwiki->id, 'pageid' => $this->page->id, 'pretty_print' => true));
     $html = $content['parsed_text'];
     $id = $this->subwiki->wikiid;
     if ($cm = get_coursemodule_from_instance("wiki", $id)) {
         $context = context_module::instance($cm->id);
         $html = file_rewrite_pluginfile_urls($html, 'pluginfile.php', $context->id, 'mod_wiki', 'attachments', $this->subwiki->id);
     }
     echo '<div id="wiki_printable_content">';
     echo format_text($html, FORMAT_HTML);
     echo '</div>';
 }
开发者ID:jackdaniels79,项目名称:moodle,代码行数:14,代码来源:pagelib.php

示例3: print_pretty_view

    private function print_pretty_view() {
        $version = wiki_get_current_version($this->page->id);

        $content = wiki_parse_content($version->contentformat, $version->content, array('printable' => true, 'swid' => $this->subwiki->id, 'pageid' => $this->page->id, 'pretty_print' => true));

        echo '<div id="wiki_printable_content">';
        echo format_text($content['parsed_text'], FORMAT_HTML);
        echo '</div>';
    }
开发者ID:Burick,项目名称:moodle,代码行数:9,代码来源:pagelib.php

示例4: wiki_print_page_content

function wiki_print_page_content(&$text, &$WS)
{
    global $CFG;
    echo wiki_parse_content($text, $WS);
    // display attached files, if any :-) (nadavkav)
    if ($WS->upload_bar or $WS->dfperms['attach'] and count($WS->dfdir->content) != 0) {
        //Scritp WIKI_TREE
        $prop = null;
        $prop->type = 'text/javascript';
        if (isset($WS->dfcourse)) {
            $prop->src = '../mod/wiki/editor/wiki_tree.js';
        } else {
            $prop->src = 'editor/wiki_tree.js';
        }
        wiki_script('', $prop);
        wiki_print_view_uploaded($WS);
    }
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:18,代码来源:locallib.php


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