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

PHP html_wikilink函数代码示例

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

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



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

示例1: ajax_qsearch

/**
 * Searches for matching pagenames
 *
 * @author Andreas Gohr <[email protected]>
 */
function ajax_qsearch()
{
    global $conf;
    global $lang;
    $query = cleanID($_POST['q']);
    if (empty($query)) {
        $query = cleanID($_GET['q']);
    }
    if (empty($query)) {
        return;
    }
    require_once DOKU_INC . 'inc/html.php';
    require_once DOKU_INC . 'inc/fulltext.php';
    $data = array();
    $data = ft_pageLookup($query);
    if (!count($data)) {
        return;
    }
    print '<strong>' . $lang['quickhits'] . '</strong>';
    print '<ul>';
    foreach ($data as $id) {
        print '<li>';
        $ns = getNS($id);
        if ($ns) {
            $name = shorten(noNS($id), ' (' . $ns . ')', 30);
        } else {
            $name = $id;
        }
        print html_wikilink(':' . $id, $name);
        print '</li>';
    }
    print '</ul>';
}
开发者ID:jalemanyf,项目名称:wsnlocalizationscala,代码行数:38,代码来源:ajax.php


示例2: ajax_qsearch

/**
 * Searches for matching pagenames
 *
 * @author Andreas Gohr <[email protected]>
 */
function ajax_qsearch()
{
    global $conf;
    global $lang;
    global $INPUT;
    $query = $INPUT->post->str('q');
    if (empty($query)) {
        $query = $INPUT->get->str('q');
    }
    if (empty($query)) {
        return;
    }
    $query = urldecode($query);
    $data = ft_pageLookup($query, true, useHeading('navigation'));
    if (!count($data)) {
        return;
    }
    print '<strong>' . $lang['quickhits'] . '</strong>';
    print '<ul>';
    foreach ($data as $id => $title) {
        if (useHeading('navigation')) {
            $name = $title;
        } else {
            $ns = getNS($id);
            if ($ns) {
                $name = noNS($id) . ' (' . $ns . ')';
            } else {
                $name = $id;
            }
        }
        echo '<li>' . html_wikilink(':' . $id, $name) . '</li>';
    }
    print '</ul>';
}
开发者ID:AlexanderS,项目名称:Part-DB,代码行数:39,代码来源:ajax.php


示例3: ajax_qsearch

/**
 * Searches for matching pagenames
 *
 * @author Andreas Gohr <[email protected]>
 */
function ajax_qsearch()
{
    global $conf;
    global $lang;
    $query = $_POST['q'];
    if (empty($query)) {
        $query = $_GET['q'];
    }
    if (empty($query)) {
        return;
    }
    $data = ft_pageLookup($query, true, useHeading('navigation'));
    if (!count($data)) {
        return;
    }
    print '<strong>' . $lang['quickhits'] . '</strong>';
    print '<ul>';
    foreach ($data as $id => $title) {
        if (useHeading('navigation')) {
            $name = $title;
        } else {
            $ns = getNS($id);
            if ($ns) {
                $name = shorten(noNS($id), ' (' . $ns . ')', 30);
            } else {
                $name = $id;
            }
        }
        echo '<li>' . html_wikilink(':' . $id, $name) . '</li>';
    }
    print '</ul>';
}
开发者ID:stretchyboy,项目名称:dokuwiki,代码行数:37,代码来源:ajax.php


示例4: handle_start

 function handle_start(&$event, $param)
 {
     global $ID;
     global $ACT;
     global $INFO;
     if ($ACT != 'show') {
         return;
     }
     if (!$INFO['exists']) {
         return;
     }
     # don't try to read an article that doesn't exist
     $all = rtrim(rawWiki($ID));
     $inner = substr($all, 2, -2);
     if ($all == '[[' . $inner . ']]' and strpos($inner, '[[') === false and strpos($inner, ']]') === false) {
         if (!strpos($inner, '://') === false) {
             $url = $inner;
             # link is URL already
         } else {
             msg(sprintf('From: <a href="' . wl($ID, 'do=edit') . '">' . hsc($ID) . '</a>'));
             $url = html_wikilink($inner, $name = null, $search = '');
             $url = substr($url, strpos($url, '"') + 1);
             $url = substr($url, 0, strpos($url, '"'));
         }
         idx_addPage($ID);
         # ensure fulltext search indexing of referrer article - to put it on the backlink page of target article
         send_redirect($url);
     }
 }
开发者ID:demiankatz,项目名称:dokuwiki-mredirect,代码行数:29,代码来源:action.php


示例5: handle

 /** 
  * Handle the match 
  */
 function handle($match, $state, $pos, &$handler)
 {
     // extract target page from match pattern
     $page = substr($match, 11, -2);
     // prepare message here instead of in render
     $message = '<div class="noteredirect">' . sprintf($this->getLang('redirect_to'), html_wikilink($page)) . '</div>';
     return array($page, $message);
 }
开发者ID:nefercheprure,项目名称:dokuwiki-plugin-pageredirect,代码行数:11,代码来源:syntax.php


示例6: run

 /**
  * Handle the user input [required]
  *
  * @param helper_plugin_bureaucracy_field[] $fields the list of fields in the form
  * @param string                            $thanks the thank you message as defined in the form
  *                                                  or default one. Might be modified by the action
  *                                                  before returned
  * @param array                             $argv   additional arguments passed to the action
  * @return bool|string false on error, $thanks on success
  */
 public function run($fields, $thanks, $argv)
 {
     global $ID;
     // prepare replacements
     $this->prepareNamespacetemplateReplacements();
     $this->prepareDateTimereplacements();
     $this->prepareLanguagePlaceholder();
     $this->prepareNoincludeReplacement();
     $this->prepareFieldReplacements($fields);
     //handle arguments
     $page_to_modify = array_shift($argv);
     if ($page_to_modify === '_self') {
         # shortcut to modify the same page as the submitter
         $page_to_modify = $ID;
     } else {
         //resolve against page which contains the form
         resolve_pageid(getNS($ID), $page_to_modify, $ignored);
     }
     $template_section_id = cleanID(array_shift($argv));
     if (!page_exists($page_to_modify)) {
         msg(sprintf($this->getLang('e_pagenotexists'), html_wikilink($page_to_modify)), -1);
         return false;
     }
     // check auth
     //
     // This is an important point.  In order to be able to modify a page via this method ALL you need is READ access to the page
     // This is good for admins to be able to only allow people to modify a page via a certain method.  If you want to protect the page
     // from people to WRITE via this method, deny access to the form page.
     $auth = $this->aclcheck($page_to_modify);
     // runas
     if ($auth < AUTH_READ) {
         msg($this->getLang('e_denied'), -1);
         return false;
     }
     // fetch template
     $template = rawWiki($page_to_modify);
     if (empty($template)) {
         msg(sprintf($this->getLang('e_template'), $page_to_modify), -1);
         return false;
     }
     // do the replacements
     $template = $this->updatePage($template, $template_section_id);
     if (!$template) {
         msg(sprintf($this->getLang('e_failedtoparse'), $page_to_modify), -1);
         return false;
     }
     // save page
     saveWikiText($page_to_modify, $template, sprintf($this->getLang('summary'), $ID));
     //thanks message with redirect
     $link = wl($page_to_modify);
     return sprintf($this->getLang('pleasewait'), "<script type='text/javascript' charset='utf-8'>location.replace('{$link}')</script>", html_wikilink($page_to_modify));
 }
开发者ID:nadabenlahbib,项目名称:dokuwiki-pagemod,代码行数:62,代码来源:pagemod.php


示例7: _prepend_to_edit

 /**
  * main hooks
  */
 function _prepend_to_edit(&$event, $param)
 {
     global $ID;
     if ($event->data != 'edit') {
         return;
     }
     if (!$this->_auth_check_all($ID)) {
         return;
     }
     $link = html_wikilink($ID . '?do=editx');
     $intro = $this->locale_xhtml('intro');
     $intro = str_replace('@LINK@', $link, $intro);
     print $intro;
 }
开发者ID:houshuang,项目名称:folders2web,代码行数:17,代码来源:action.php


示例8: xhtml

 public function xhtml()
 {
     global $ID;
     $ns = getNS($ID);
     list($files, $subprojects) = Projects_file::project_files($ns);
     $generated = array();
     $source = array();
     foreach ($files as $id => $file) {
         if ($file->type() == 'source') {
             $source[$id] = $file;
         } elseif ($file->type() == 'generated') {
             $generated[$id] = $file;
         }
     }
     ksort($generated);
     ksort($source);
     sort($subprojects);
     echo '<h1>Source files</h1>' . DOKU_LF;
     echo '<ul>' . DOKU_LF;
     echo '<li>' . create_button('source') . '</li>' . DOKU_LF;
     foreach ($source as $id => $file) {
         echo '<li>' . html_wikilink($id) . ': ' . download_button($id) . ', ' . delete_button($id) . '</li>' . DOKU_LF;
     }
     echo '</ul>' . DOKU_LF;
     echo '<h1>Generated files</h1>' . DOKU_LF;
     echo '<ul>' . DOKU_LF;
     echo '<li>' . create_button('generated') . '</li>' . DOKU_LF;
     foreach ($generated as $id => $file) {
         $make = make_button($id, $file->status() == PROJECTS_MADE);
         echo '<li>' . html_wikilink($id) . ': ' . download_button($id) . ', ' . delete_button($id) . ', ' . $make . '</li>' . DOKU_LF;
     }
     echo '</ul>' . DOKU_LF;
     echo '<h1>Subprojects</h1>' . DOKU_LF;
     echo '<ul>' . DOKU_LF;
     echo '<li>' . create_button($ID, 'project') . '</li>' . DOKU_LF;
     foreach ($subprojects as $sub) {
         echo '<li><a href="' . wl($sub . ':', array('do' => 'manage_files')) . '">' . noNS($sub) . '</a></li>' . DOKU_LF;
     }
     echo '</ul>' . DOKU_LF;
     if ($ns) {
         $name = getNS($ns);
         $id = $name . ':';
         if (!$name) {
             $id = '/';
             $name = '/ (root)';
         }
         echo '<h1>Parent projects</h1>' . DOKU_LF;
         echo '<ul><li><a href="' . wl($id, array('do' => 'manage_files')) . '">' . $name . '</a></li></ul>' . DOKU_LF;
     }
 }
开发者ID:roverrobot,项目名称:projects,代码行数:50,代码来源:manage_files.php


示例9: ajax_qsearch

/**
 * Searches for matching pagenames
 *
 * @author Andreas Gohr <[email protected]>
 */
function ajax_qsearch()
{
    global $lang;
    global $INPUT;
    $maxnumbersuggestions = 50;
    $query = $INPUT->post->str('q');
    if (empty($query)) {
        $query = $INPUT->get->str('q');
    }
    if (empty($query)) {
        return;
    }
    $query = urldecode($query);
    $data = ft_pageLookup($query, true, useHeading('navigation'));
    if (!count($data)) {
        return;
    }
    print '<strong>' . $lang['quickhits'] . '</strong>';
    print '<ul>';
    $counter = 0;
    foreach ($data as $id => $title) {
        if (useHeading('navigation')) {
            $name = $title;
        } else {
            $ns = getNS($id);
            if ($ns) {
                /* Displays the Header of the Namespace-Page or of namespace:start as the Name of the NS */
                $ns_name = p_get_first_heading(getNS($id));
                if (!$ns_name) {
                    $ns_name = p_get_first_heading(getNS($id) . ':start');
                }
                $name = shorten(' [' . $ns_name . ']', 30);
            } else {
                $name = $id;
            }
        }
        echo '<li>' . html_wikilink(':' . $id, $name) . '</li>';
        $counter++;
        if ($counter > $maxnumbersuggestions) {
            echo '<li>...</li>';
            break;
        }
    }
    print '</ul>';
}
开发者ID:s-blu,项目名称:dokuwiki,代码行数:50,代码来源:ajax.php


示例10: handle

 /**
  * Handler to prepare matched data for the rendering process
  *
  * This function can only pass data to render() via its return value - render()
  * may be not be run during the object's current life.
  *
  * Usually you should only need the $match param.
  *
  * @param   string       $match   The text matched by the patterns
  * @param   int          $state   The lexer state for the match
  * @param   int          $pos     The character position of the matched text
  * @param   Doku_Handler $handler Reference to the Doku_Handler object
  * @return  array Return an array with all data you want to use in render
  */
 public function handle($match, $state, $pos, Doku_Handler $handler)
 {
     // extract target page from match pattern
     if ($match[0] == '#') {
         # #REDIRECT PAGE
         $page = substr($match, 10);
     } else {
         # ~~REDIRECT>PAGE~~
         $page = substr($match, 11, -2);
     }
     $page = trim($page);
     if (!preg_match('#^(https?)://#i', $page)) {
         $link = html_wikilink($page);
     } else {
         $link = '<a href="' . hsc($page) . '" class="urlextern">' . hsc($page) . '</a>';
     }
     // prepare message here instead of in render
     $message = '<div class="noteredirect">' . sprintf($this->getLang('redirect_to'), $link) . '</div>';
     return array($page, $message);
 }
开发者ID:cinlloc,项目名称:dokuwiki-plugin-pageredirect,代码行数:34,代码来源:syntax.php


示例11: addDependence

 public function addDependence($dependence, $automatic)
 {
     $li = $this->newElement('li');
     $this->list->appendChild($li);
     $span = $this->newElement('span', array('use' => $dependence, 'class' => 'dependency'));
     $li->appendChild($span);
     $use = $this->loadElement(html_wikilink($dependence));
     $span->appendChild($use);
     if ($automatic) {
         $li->appendChild($this->newText('(automatic)'));
     } else {
         if ($this->editable) {
             $li->appendChild($this->newText('('));
             $input = $this->newElement('a', array('class' => 'remove_dependency action', 'use' => $dependence, 'href' => ''), 'remove');
             $li->appendChild($input);
             $li->appendChild($this->newText(')'));
         }
     }
 }
开发者ID:roverrobot,项目名称:projects,代码行数:19,代码来源:xhtmltab.php


示例12: tpl_pagelink

/**
 * Prints a link to a WikiPage
 *
 * Wrapper around html_wikilink
 *
 * @author Andreas Gohr <[email protected]>
 *
 * @param string      $id   page id
 * @param string|null $name the name of the link
 * @return bool true
 */
function tpl_pagelink($id, $name = null)
{
    print '<bdi>' . html_wikilink($id, $name) . '</bdi>';
    return true;
}
开发者ID:RnBConsulting,项目名称:dokuwiki,代码行数:16,代码来源:template.php


示例13: _html_wikilink

 /**
  * Renders the page link, plus tooltip, abstract, casing, etc...
  * @param string $id
  * @param bool $display
  * @param string $abstract
  * @param array $opt
  * @param bool $track_snippets
  * @param bool $raw => non-formatted (no html)
  * @return string
  */
 private function _html_wikilink($id, $display, $abstract, $opt, $track_snippets = true, $raw = false)
 {
     $id = strpos($id, ':') === false ? ':' . $id : $id;
     // : needed for root pages (root level)
     $link = html_wikilink($id, $display);
     $type = $opt['snippet']['type'];
     $inline = '';
     $after = '';
     if ($type == 'tooltip') {
         $tooltip = str_replace("\n\n", "\n", $abstract);
         $tooltip = htmlentities($tooltip, ENT_QUOTES, 'UTF-8');
         $link = $this->_add_tooltip($link, $tooltip);
     } elseif (in_array($type, array('quoted', 'plain', 'inline')) && $this->snippet_cnt > 0) {
         $short = $this->_shorten($abstract, $opt['snippet']['extent']);
         $short = htmlentities($short, ENT_QUOTES, 'UTF-8');
         if (!empty($short)) {
             if ($type == 'quoted' || $type == 'plain') {
                 $more = html_wikilink($id, 'more');
                 $after = trim($short);
                 $after = str_replace("\n\n", "\n", $after);
                 $after = str_replace("\n", '<br/>', $after);
                 $after = '<div class="' . $type . '">' . $after . $more . '</div>' . DOKU_LF;
             } elseif ($type == 'inline') {
                 $inline .= '<span class=inline>' . $short . '</span>';
             }
         }
     }
     $border = $opt['underline'] ? 'border' : '';
     if ($raw) {
         $wikilink = $link . $inline;
     } else {
         $wikilink = '<li class="' . $border . '">' . $link . $inline . DOKU_LF . $after . '</li>';
     }
     if ($track_snippets) {
         $this->snippet_cnt--;
     }
     return $wikilink;
 }
开发者ID:unfoldingWord-dev,项目名称:pagequery,代码行数:48,代码来源:pagequery.php


示例14: render

 /**
  * Handles the actual output creation.
  */
 function render($mode, &$renderer, $data)
 {
     global $lang;
     if ($mode == 'xhtml') {
         $renderer->info['cache'] = false;
         @(require_once DOKU_INC . 'inc/fulltext.php');
         $backlinks = ft_backlinks($data[0]);
         $renderer->doc .= '<div id="plugin__backlinks">' . DW_LF;
         if (!empty($backlinks)) {
             $renderer->doc .= '<ul class="idx">';
             foreach ($backlinks as $backlink) {
                 $name = p_get_metadata($backlink, 'title');
                 if (empty($name)) {
                     $name = $backlink;
                 }
                 $renderer->doc .= '<li><div class="li">';
                 $renderer->doc .= html_wikilink(':' . $backlink, $name, '');
                 $renderer->doc .= '</div></li>';
             }
             $renderer->doc .= '</ul>';
         } else {
             $renderer->doc .= "<strong>Plugin Backlinks: " . $lang['nothingfound'] . "</strong>";
         }
         $renderer->doc .= '</div>' . DW_LF;
         return true;
     }
     return false;
 }
开发者ID:houshuang,项目名称:folders2web,代码行数:31,代码来源:syntax.php


示例15: tpl_img

                        <?php 
    tpl_img(900, 700);
    /* parameters: maximum width, maximum height (and more) */
    ?>

                        <div class="img_detail">
                            <?php 
    tpl_img_meta();
    ?>
                            <dl>
                            <?php 
    echo '<dt>' . $lang['reference'] . ':</dt>';
    $media_usage = ft_mediause($IMG, true);
    if (count($media_usage) > 0) {
        foreach ($media_usage as $path) {
            echo '<dd>' . html_wikilink($path) . '</dd>';
        }
    } else {
        echo '<dd>' . $lang['nothingfound'] . '</dd>';
    }
    ?>
                            </dl>
                            <p><?php 
    echo $lang['media_acl_warning'];
    ?>
</p>
                        </div>
                        <?php 
    //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));
    ?>
                    <?php 
开发者ID:kevinlovesing,项目名称:dokuwiki,代码行数:31,代码来源:detail.php


示例16: bootstrap3_youarehere

/**
 * 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 <[email protected]>
 * @author Nigel McNie <[email protected]>
 * @author Sean Coates <[email protected]>
 * @author <[email protected]>
 * @author Giuseppe Di Terlizzi <[email protected]>
 * @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);
    $semantic = bootstrap3_conf('semantic');
    echo '<ol class="breadcrumb"' . ($semantic ? ' itemscope itemtype="http://schema.org/BreadcrumbList"' : '') . '>';
    echo '<li>' . rtrim($lang['youarehere'], ':') . '</li>';
    // always print the startpage
    echo '<li' . ($semantic ? ' itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"' : '') . '>';
    tpl_link(wl($conf['start']), ($semantic ? '<span itemprop="name">' : '') . '<i class="fa fa-fw fa-home"></i>' . ($semantic ? '</span>' : ''), ($semantic ? ' itemprop="item" ' : '') . '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' . ($semantic ? ' itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"' : '') . '>';
        $link = html_wikilink($page);
        $link = str_replace(' class="curid"', '', html_wikilink($page));
        if ($semantic) {
            $link = str_replace(array('<a', '<span'), array('<a itemprop="item" ', '<span itemprop="name" '), $link);
        }
        echo $link;
        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"' . ($semantic ? ' itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"' : '') . '>';
    $link = html_wikilink($page);
    $link = str_replace(' class="curid"', '', html_wikilink($page));
    if ($semantic) {
        $link = str_replace(array('<a', '<span'), array('<a itemprop="item" ', '<span itemprop="name" '), $link);
    }
    echo $link;
    echo '</li>';
    echo '</ol>';
    return true;
}
开发者ID:huksley,项目名称:dokuwiki-template-bootstrap3,代码行数:74,代码来源:tpl_functions.php


示例17: bootstrap3_youarehere

/**
 * 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 <[email protected]>
 * @author Nigel McNie <[email protected]>
 * @author Sean Coates <[email protected]>
 * @author <[email protected]>
 * @author Giuseppe Di Terlizzi <[email protected]>
 * @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>' . rtrim($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 str_replace('curid', '', 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">';
    echo str_replace('curid', '', html_wikilink($page));
    echo '</li>';
    echo '</ol>';
    return true;
}
开发者ID:ERTurner,项目名称:dokuwiki-template-bootstrap3,代码行数:63,代码来源:tpl_functions.php


示例18: html_list_index

 static function html_list_index($item)
 {
     global $ID;
     $ret = '';
     $base = ':' . $item['id'];
     $base = substr($base, strrpos($base, ':') + 1);
     if ($item['type'] == 'f') {
         $ret .= html_wikilink(':' . $item['id']);
     } else {
         $ret .= '<strong>' . trim(substr($item['id'], strrpos($item['id'], ':', -2)), ':') . '</strong>';
     }
     return $ret;
 }
开发者ID:nefercheprure,项目名称:dokuwiki-plugin-bureaucracy,代码行数:13,代码来源:template.php


示例19: _list

 /**
  * List recent edits matching the given filter
  */
 function _list($filter)
 {
     global $conf;
     global $lang;
     echo '<hr /><br />';
     echo '<form action="" method="post"><div class="no">';
     echo '<input type="hidden" name="filter" value="' . hsc($filter) . '" />';
     formSecurityToken();
     $recents = getRecents(0, $this->max_lines);
     echo '<ul>';
     $cnt = 0;
     foreach ($recents as $recent) {
         if ($filter) {
             if (strpos(rawWiki($recent['id']), $filter) === false) {
                 continue;
             }
         }
         $cnt++;
         $date = strftime($conf['dformat'], $recent['date']);
         echo $recent['type'] === DOKU_CHANGE_TYPE_MINOR_EDIT ? '<li class="minor">' : '<li>';
         echo '<div class="li">';
         echo '<input type="checkbox" name="revert[]" value="' . hsc($recent['id']) . '" checked="checked" id="revert__' . $cnt . '" />';
         echo '<label for="revert__' . $cnt . '">' . $date . '</label> ';
         echo '<a href="' . wl($recent['id'], "do=diff") . '">';
         $p = array();
         $p['src'] = DOKU_BASE . 'lib/images/diff.png';
         $p['width'] = 15;
         $p['height'] = 11;
         $p['title'] = $lang['diff'];
         $p['alt'] = $lang['diff'];
         $att = buildAttributes($p);
         echo "<img {$att} />";
         echo '</a> ';
         echo '<a href="' . wl($recent['id'], "do=revisions") . '">';
         $p = array();
         $p['src'] = DOKU_BASE . 'lib/images/history.png';
         $p['width'] = 12;
         $p['height'] = 14;
         $p['title'] = $lang['btn_revs'];
         $p['alt'] = $lang['btn_revs'];
         $att = buildAttributes($p);
         echo "<img {$att} />";
         echo '</a> ';
         echo html_wikilink(':' . $recent['id'], useHeading('navigation') ? NULL : $recent['id']);
         echo ' – ' . htmlspecialchars($recent['sum']);
         echo ' <span class="user">';
         echo $recent['user'] . ' ' . $recent['ip'];
         echo '</span>';
         echo '</div>';
         echo '</li>';
         @set_time_limit(10);
         flush();
     }
     echo '</ul>';
     echo '<p>';
     echo '<input type="submit" class="button" value="' . $this->getLang('revert') . '" /> ';
     printf($this->getLang('note2'), hsc($filter));
     echo '</p>';
     echo '</div></form>';
 }
开发者ID:nextghost,项目名称:dokuwiki,代码行数:63,代码来源:admin.php


示例20: handle_pageredirect_note

 function handle_pageredirect_note(&$event, $param)
 {
     global $ID, $ACT;
     if ($ACT == 'show' || $ACT == '') {
         if (!$this->getConf('show_note')) {
             return;
         }
         if (isset($_GET['redirect']) && $_GET['redirect'] > 0 && $_GET['redirect'] < 6) {
             if (isset($_SESSION[DOKU_COOKIE]['redirect']) && $_SESSION[DOKU_COOKIE]['redirect'] != '') {
                 // we were redirected from another page, show it!
                 $page = $_SESSION[DOKU_COOKIE]['redirect'];
                 global $conf;
                 //$pagetitle = $conf['useheading'] ? p_get_first_heading($page) : $page;
                 //echo '<div class="noteredirect">'.sprintf($this->getLang('redirected_from'), '<a href="'.wl(':'.$page, Array('redirect' => 'no'), TRUE, '&').'" class="wikilink1" title="'.$page.'">'.$pagetitle.'</a>').'</div>';
                 echo '<div class="noteredirect">' . sprintf($this->getLang('redirected_from'), html_wikilink($page . '?redirect=no')) . '</div>';
                 unset($_SESSION[DOKU_COOKIE]['redirect']);
                 return true;
             }
         }
     }
     return true;
 }
开发者ID:nefercheprure,项目名称:dokuwiki-plugin-pageredirect,代码行数:22,代码来源:action.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP html_window_title函数代码示例发布时间:2022-05-15
下一篇:
PHP html_type_rss函数代码示例发布时间: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