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


PHP exist_plugin函数代码示例

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


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

示例1: plugin_gb_pageset_convert

/**
 * GreyBox (gb_pageset) プラグイン
 *
 * @copyright   Copyright &copy; 2009, Katsumi Saito <katsumi@jo1upk.ymt.prug.or.jp>
 * @version     $Id: gb_pageset.inc.php,v 0.1 2009/03/31 00:37:00 upk Exp $
 * @link	http://orangoo.com/labs/GreyBox/
 */
function plugin_gb_pageset_convert()
{
    global $script, $vars;
    static $get_greybox = true;
    if ($get_greybox) {
        $get_greybox = false;
        if (exist_plugin('greybox')) {
            greybox_set_head_tags();
        } else {
            die_message('greybox plugin not found.');
        }
    }
    $argv = func_get_args();
    $argc = func_num_args();
    $field = array('page_set_name', 'caption', 'url');
    for ($i = 0; $i < $argc; $i++) {
        ${$field}[$i] = htmlspecialchars($argv[$i], ENT_QUOTES);
    }
    if (empty($page_set_name) || empty($url)) {
        return 'usage: #gb_pageset(page_set_name, caption, url)';
    }
    if (empty($caption)) {
        $caption = 'no title';
    }
    $caption = str_replace('&amp;#039;', '\'', $caption);
    // ' の対応
    return '<a href="' . $url . '" title="' . $caption . '" rel="gb_pageset[' . $page_set_name . ']">' . $caption . "</a>\n";
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:35,代码来源:gb_pageset.inc.php

示例2: plugin_fb_page_init

/**
 *   Facebook Inframe Page Plugin
 *   -------------------------------------------
 *   fb_page.inc.php
 *   
 *   Copyright (c) 2011 hokuken
 *   http://hokuken.com/
 *   
 *   created  : 2011-07-26
 *   modified :
 *   
 *   「いいね!」ボタンを押した人だけ見られるページにできる
 *   
 *   Usage :
 *   
 */
function plugin_fb_page_init()
{
    if (!exist_plugin("fb_root")) {
        die('Cannot find fb_root plugin');
    }
    do_plugin_init("fb_root");
}
开发者ID:big2men,项目名称:qhm,代码行数:23,代码来源:fb_page.inc.php

示例3: page_write

function page_write($page, $postdata, $notimestamp = FALSE)
{
    global $trackback;
    if (PKWK_READONLY) {
        return;
    }
    // Do nothing
    $postdata = make_str_rules($postdata);
    // Create and write diff
    $oldpostdata = is_page($page) ? join('', get_source($page)) : '';
    $diffdata = do_diff($oldpostdata, $postdata);
    file_write(DIFF_DIR, $page, $diffdata);
    // Create backup
    make_backup($page, $postdata == '');
    // Is $postdata null?
    // Create wiki text
    file_write(DATA_DIR, $page, $postdata, $notimestamp);
    if ($trackback) {
        // TrackBack Ping
        $_diff = explode("\n", $diffdata);
        $plus = join("\n", preg_replace('/^\\+/', '', preg_grep('/^\\+/', $_diff)));
        $minus = join("\n", preg_replace('/^-/', '', preg_grep('/^-/', $_diff)));
        tb_send($page, $plus, $minus);
    }
    links_update($page);
    // kazuwaya
    if (exist_plugin('ajaxtree')) {
        plugin_ajaxtree_write_after();
    }
}
开发者ID:lolo3-sight,项目名称:wiki,代码行数:30,代码来源:file.php

示例4: plugin_fb_pagebox_init

/**
 *   Facebook LikeBox Plugin
 *   -------------------------------------------
 *   ./plugin/fb_likebox.inc.php
 *
 *   Copyright (c) 2015 hokuken
 *   http://hokuken.com/
 *
 *   created  : 2015-06-11
 *   modified :
 *
 *   Put Facebook Page Plugin
 *
 *   Usage : #fb_pagebox
 *
 */
function plugin_fb_pagebox_init()
{
    if (!exist_plugin("fb_root")) {
        die('Fatal error: fb_root plugin not found');
    }
    do_plugin_init("fb_root");
}
开发者ID:big2men,项目名称:qhm,代码行数:23,代码来源:fb_pagebox.inc.php

示例5: plugin_fb_comments_convert

function plugin_fb_comments_convert()
{
    global $script, $vars;
    $page = $vars['page'];
    $r_page = rawurlencode($page);
    $qm = get_qm();
    $qt = get_qt();
    $args = func_get_args();
    if (!exist_plugin("fb_root")) {
        die('Fatal error: fb_root plugin not found');
    }
    $orders = array('social', 'reverse_time', 'time');
    // scaffold
    $def_attrs = array('href' => '', 'width' => FALSE, 'numposts' => '2', 'colorscheme' => 'light', 'mobile' => FALSE, 'order-by' => array(FALSE, $orders));
    $attrs = plugin_fb_root_parse_args($args, $def_attrs);
    //default URL set
    if ($attrs['href'] == '') {
        if ($page === $defaultpage) {
            $attrs['href'] = dirname($script . 'dummy');
        } else {
            $attrs['href'] = $script . '?' . $r_page;
        }
    }
    plugin_fb_root_set_jsapi(TRUE);
    $tag = plugin_fb_root_create_tag('fb-comments', $attrs);
    $body = $tag;
    return $tag;
}
开发者ID:big2men,项目名称:qhm,代码行数:28,代码来源:fb_comments.inc.php

示例6: plugin_monobook_toolbox_convert

function plugin_monobook_toolbox_convert()
{
    global $vars, $_monobook_toolbox_messages;
    $items = func_get_args();
    if (empty($items)) {
        $items = array('add', 'backup', 'copy', 'diff', 'edit', 'filelist', 'freeze', 'help', 'list', 'new', 'rdf', 'recent', 'refer', 'related', 'reload', 'rename', 'rss', 'rss10', 'rss20', 'search', 'source', 'top', 'trackback', 'upload', 'attachlist', 'attachlistall', 'yetlist');
    }
    if (!exist_plugin('monobook_getlink')) {
        return;
    }
    $body = '<div class="toolbox"><ul>';
    foreach ($items as $item) {
        if (!$item && $body !== '<div class="toolbox"><ul>') {
            $body .= '</ul><hr /><ul>';
            continue;
        }
        $link = plugin_monobook_getlink($item, $_monobook_toolbox_messages);
        if ($link) {
            $body .= '<li>' . $link . '</li>';
        }
    }
    if (substr($body, -15) === '</ul><hr /><ul>') {
        $body = substr($body, 0, -15);
    }
    $body .= '</ul></div>';
    return $body;
}
开发者ID:orangeal2o3,项目名称:pukiwiki-plugin,代码行数:27,代码来源:monobook_toolbox.inc.php

示例7: plugin_l_init

/** $Id: l.inc.php 227 2007-01-13 15:35:48Z sonots $
 * multilang wrapper. Shorten the word 'multilang' to 'l'
 * Usage: See multilang plugin
 */
function plugin_l_init()
{
    exist_plugin('multilang');
    // to require_once
    if (function_exists('plugin_multilang_init')) {
        plugin_multilang_init();
    }
}
开发者ID:orangeal2o3,项目名称:pukiwiki-plugin,代码行数:12,代码来源:l.inc.php

示例8: exist_plugin_inline

function exist_plugin_inline($name)
{
	if (!exist_plugin($name))
	{
		return FALSE;
	}
	return function_exists('plugin_'.$name.'_inline');
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:8,代码来源:plugin.php

示例9: plugin_scrollup_convert

/**
 *   トップに戻るリンク
 *   -------------------------------------------
 *   scrollup.inc.php
 *
 *   Copyright (c) 2014 hokuken
 *   http://hokuken.com/
 *
 *   created  : 14/08/26
 *   modified :
 *
 *   Usage :
 *     #scrollup
 *
 */
function plugin_scrollup_convert()
{
    $args = func_get_args();
    $qt = get_qt();
    $target = 'body';
    $title = 'トップ';
    if (count($args) > 0) {
        $target = h(trim($args[0]));
        if (isset($args[1])) {
            $title = h(trim($args[1]));
        }
    }
    if (exist_plugin('icon')) {
        plugin_icon_set_font_awesome();
    }
    $add_style = <<<EOD
<style data-qhm-plugin="scrollup">
.qhm-plugin-scrollup {
  color: inherit;
  bottom: 10px;
  right: 10px;
  cursor: pointer;
}
.qhm-plugin-scrollup.affix:hover {
  color: inherit;
  opacity: .8;
}
</style>
EOD;
    $qt->appendv_once('plugin_scrollup_style', 'beforescript', $add_style);
    $add_script = <<<EOD
<script data-qhm-plugin="scrollup">
\$(function() {
    \$("body").append('<a class="qhm-plugin-scrollup"></a>').find(".qhm-plugin-scrollup")
    .html('<i class="fa fa-arrow-up fa-2x"></i>')
    .attr({
      'data-target': "{$target}",
      'title': "{$title}"
    })
    .affix({
      offset: {
        top: 50
      }
    });

    \$(".qhm-plugin-scrollup").on("click", function(e){
      QHM.scroll(\$(this).data("target"));
      e.preventDefault();
      return false;
    });
});
</script>
EOD;
    $qt->appendv_once('plugin_scrollup_script', 'lastscript', $add_script);
    return;
}
开发者ID:big2men,项目名称:qhm,代码行数:71,代码来源:scrollup.inc.php

示例10: plugin_thumbnails_convert

/**
 *   Bootstrap Thumbnails Plugin
 *   -------------------------------------------
 *   /plugin/thumbnails.inc.php
 *   
 *   Copyright (c) 2014 hokuken
 *   http://hokuken.com/
 *   
 *   created  : 14/06/10
 *   modified :
 *   
 *   Description
 *   
 *   Usage :
 *   
 */
function plugin_thumbnails_convert()
{
    if (!exist_plugin('cols')) {
        return '';
    }
    plugin_cols_type('set', 'thumbnails');
    $args = func_get_args();
    $body = call_user_func_array('plugin_cols_convert', $args);
    plugin_cols_type('set', 'normal');
    return $body;
}
开发者ID:big2men,项目名称:qhm,代码行数:27,代码来源:thumbnails.inc.php

示例11: plugin_navibar2_convert

function plugin_navibar2_convert()
{
    global $vars, $hr;
    $page = strip_bracket($vars['page']);
    $navi_page = plugin_navibar2_search_navipage($page);
    if (!empty($navi_page)) {
        return plugin_navibar2_makehtml($navi_page);
    }
    exist_plugin('navibar');
    return do_plugin_convert('navibar', NAVIBAR2_DEFAULT_PARM) . $hr;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:11,代码来源:navibar2.inc.php

示例12: plugin_monobook_navigation

function plugin_monobook_navigation($wikinote, $tabs, $background)
{
    global $vars, $plugin, $_monobook_navigation_messages;
    if (!exist_plugin('monobook_getlink')) {
        die('monobook_getlink plugin not found');
    }
    do_plugin_init('monobook_navigation');
    $main_tabs = '';
    if ($wikinote->is_effect()) {
        $main_tabs = str_replace(array('<ul class="wikinote">', '</ul>', "\n"), '', $wikinote->show_tabs(array(array('cmd' => 'main', 'label' => $_monobook_navigation_messages['article']), array('cmd' => 'note', 'label' => $_monobook_navigation_messages['discuss']))));
    }
    $sub_tabs = '';
    $selected_flag = FALSE;
    foreach ($tabs as $tab) {
        if ($tab === 'edit' && is_freeze($vars['page']) && !in_array('source', $tabs)) {
            $tab = 'source';
        }
        if ($tab === 'edit' && $plugin === 'paraedit') {
            $tab = 'paraedit';
        }
        if ($tab === 'edit' && exist_plugin('revert') && plugin_revert_getlink()) {
            $tab = 'revert';
        }
        list($link, $selected) = plugin_monobook_getlink($tab, $_monobook_navigation_messages, TRUE);
        if (!$link) {
            continue;
        }
        if ($selected) {
            $sub_tabs .= '<li class="selected">' . $link . '</li>';
            $selected_flag = TRUE;
        } else {
            $sub_tabs .= '<li>' . $link . '</li>';
        }
    }
    if (!$selected_flag) {
        $link = plugin_monobook_getlink('nowplugin', $_monobook_navigation_messages);
        if (!$main_tabs) {
            if ($link) {
                $sub_tabs = '<li class="selected" id="separate">' . $link . '</li>' . $sub_tabs;
            } else {
                $sub_tabs = '<li class="selected"><a href="' . get_script_uri() . strrchr($_SERVER['REQUEST_URI'], '?') . '">' . $_monobook_navigation_messages['undefined'] . '</a></li>';
            }
        } elseif ($main_tabs && !arg_check('read') && $link) {
            $sub_tabs = '<li class="selected">' . $link . '</li>' . $sub_tabs;
        }
    }
    return '<div id="navigator"><ul' . $background . '>' . $main_tabs . $sub_tabs . '</ul></div>' . "\n";
}
开发者ID:orangeal2o3,项目名称:pukiwiki-plugin,代码行数:48,代码来源:monobook_navigation.inc.php

示例13: plugin_rewritemap_url

function plugin_rewritemap_url($page)
{
    global $defaultpage;
    $script = get_script_uri();
    $baseurl = substr($script, 0, strrpos($script, '/')) . '/';
    if ($page == $defaultpage) {
        return $baseurl;
    }
    $alias = plugin_rewritemap_get_alias($page);
    if (empty($alias)) {
        if (exist_plugin('statichtml')) {
            $alias = PluginStatichtml::encode($page);
        } else {
            $alias = str_replace('%2F', '/', rawurlencode($page));
        }
    }
    return $baseurl . $alias . PLUGIN_REWRITEMAP_POSTFIX;
}
开发者ID:orangeal2o3,项目名称:pukiwiki-plugin,代码行数:18,代码来源:rewritemap.inc.php

示例14: plugin_brokenlink_action

function plugin_brokenlink_action()
{
    global $vars, $_brokenlink_msg;
    $retval = array('msg' => $_brokenlink_msg['msg_title'], 'body' => '');
    if (empty($vars['page'])) {
        $retval['body'] = $_brokenlink_msg['msg_param_error'];
        return $retval;
    }
    // ユーザ認証されていない
    $id = Auth::check_auth();
    if (empty($id)) {
        $retval['body'] = $_brokenlink_msg['msg_not_access'];
        return $retval;
    }
    if (!exist_plugin('xbel')) {
        $retval['body'] = $_brokenlink_msg['msg_not_found_xbel'];
        return $retval;
    }
    $links = xbel::get_link_list($vars['page']);
    $data = '';
    foreach ($links as $href => $aname) {
        $rc = http_request($href, 'HEAD');
        switch ($rc['rc']) {
            case 200:
                // Ok
            // Ok
            case 301:
                // Moved Permanently
            // Moved Permanently
            case 401:
                // Unauthorized
                continue;
            default:
                $data .= '-[[' . $aname . '>' . $href . ']] (' . $rc['rc'] . ")\n";
        }
    }
    if ($data == '') {
        $data = $_brokenlink_msg['msg_all_ok'];
    }
    $retval['body'] = RendererFactorty::factory($data);
    return $retval;
}
开发者ID:logue,项目名称:pukiwiki_adv,代码行数:42,代码来源:brokenlink.inc.php

示例15: plugin_gcounter_init_gcounter

function plugin_gcounter_init_gcounter()
{
    if (is_page(PLUGIN_GCOUNTER_PAGE)) {
        return;
    }
    if (!exist_plugin('counter')) {
        return;
    }
    $pages = get_existpages();
    $gtotal = $gtoday = $gyesterday = 0;
    $gdate = $gip = '';
    foreach ($pages as $file => $page) {
        $counter = COUNTER_DIR . encode($page) . PLUGIN_COUNTER_SUFFIX;
        $lines = file($counter);
        $lines = array_map('rtrim', $lines);
        $total = $lines[0];
        $date = $lines[1];
        $today = $lines[2];
        $yesterday = $lines[3];
        $ip = $lines[4];
        $gtotal += $total;
        // Ignore today, yesterday because they must take into account
        // $date (when is today), but will be deleted tomorrow.
        // date and ip are also not important.
    }
    $counter = COUNTER_DIR . encode(PLUGIN_GCOUNTER_PAGE) . PLUGIN_COUNTER_SUFFIX;
    $source = "{$gtotal}\n{$gdate}\n{$gtoday}\n{$gyesterday}\n{$gip}\n";
    if (!($fp = fopen($counter, "w"))) {
        return FALSE;
    }
    if (!fwrite($fp, $source)) {
        return FALSE;
    }
    fclose($fp);
    page_write(PLUGIN_GCOUNTER_PAGE, "Log Page for Global Counter\n#counter");
}
开发者ID:orangeal2o3,项目名称:pukiwiki-plugin,代码行数:36,代码来源:gcounter.inc.php


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