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

PHP getPlugin函数代码示例

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

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



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

示例1: installPlugin

function installPlugin($pluginName)
{
    $aErrors = array();
    $aResult = array('name' => $pluginName, 'status' => '', 'errors' => &$aErrors);
    // make sure this is a legitimate bundled plugin request
    if ($aPlugin = getPlugin($pluginName)) {
        require_once MAX_PATH . '/lib/OA.php';
        //OA::logMem('start deliveryLog/installPlugin');
        require_once LIB_PATH . '/Plugin/PluginManager.php';
        $oPluginManager = new OX_PluginManager();
        if (!array_key_exists($aPlugin['name'], $GLOBALS['_MAX']['CONF']['plugins'])) {
            $filename = $aPlugin['name'] . '.' . $aPlugin['ext'];
            $filepath = $aPlugin['path'] . $filename;
            // TODO: refactor for remote paths?
            $oPluginManager->installPackage(array('tmp_name' => $filepath, 'name' => $filename));
            if ($oPluginManager->countErrors()) {
                $aResult['status'] = 'Failed';
                foreach ($oPluginManager->aErrors as $errmsg) {
                    $aErrors[] = $errmsg;
                }
            } else {
                $aResult['status'] = 'OK';
            }
        } else {
            $aResult['status'] = 'Already Installed';
            $aErrors[] = 'Could not be installed because previous installation (whole or partial) was found';
        }
        unset($oPluginManager);
        //OA::logMem('stop deliveryLog/installPlugin');
    } else {
        $aResult['status'] = 'Invalid';
        $aErrors[] = 'Not a valid default plugin';
    }
    return $aResult;
}
开发者ID:villos,项目名称:tree_admin,代码行数:35,代码来源:install-plugin.php


示例2: tinymceConfigJS

function tinymceConfigJS($editorconfig, $mode)
{
    if (empty($editorconfig)) {
        // only if we get here first!
        $locale = 'en';
        $loc = str_replace('_', '-', strtolower(getOption("locale")));
        if ($loc) {
            if (file_exists(SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tiny_mce/langs/' . $loc . '.js')) {
                $locale = $loc;
            } else {
                $loc = substr($loc, 0, 2);
                if (file_exists(SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tiny_mce/langs/' . $loc . '.js')) {
                    $locale = $loc;
                }
            }
        }
        $editorconfig = getOption('tinymce_' . $mode);
        if (!empty($editorconfig)) {
            $editorconfig = getPlugin('/tiny_mce/config/' . $editorconfig);
            if (!empty($editorconfig)) {
                require_once $editorconfig;
            }
        }
    }
    return $editorconfig;
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:26,代码来源:tiny_mce.php


示例3: tinymceConfigJS

function tinymceConfigJS($mode)
{
    global $_editorconfig, $MCEskin, $MCEdirection, $MCEcss, $MCEspecial, $MCEimage_advtab, $MCEtoolbars;
    $MCEskin = $MCEdirection = $MCEcss = $MCEspecial = $MCEimage_advtab = $MCEtoolbars = NULL;
    if (empty($_editorconfig)) {
        // only if we get here first!
        $locale = 'en';
        $loc = str_replace('_', '-', getOption("locale"));
        if ($loc) {
            if (file_exists(SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tinymce/langs/' . $loc . '.js')) {
                $locale = $loc;
            } else {
                $loc = substr($loc, 0, 2);
                if (file_exists(SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tinymce/langs/' . $loc . '.js')) {
                    $locale = $loc;
                }
            }
        }
        $_editorconfig = getOption('tinymce_' . $mode);
        if (!empty($_editorconfig)) {
            $_editorconfig = getPlugin('tinymce/config/' . $_editorconfig, true);
            if (!empty($_editorconfig)) {
                require_once $_editorconfig;
            }
        }
    }
    return $mode;
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:28,代码来源:tinymce.php


示例4: tinymce4ConfigJS

function tinymce4ConfigJS($mode)
{
    global $_editorconfig;
    if (empty($_editorconfig)) {
        // only if we get here first!
        $locale = 'en';
        $loc = str_replace('_', '-', getOption("locale"));
        if ($loc) {
            if (file_exists(SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tinymce4/langs/' . $loc . '.js')) {
                $locale = $loc;
            } else {
                $loc = substr($loc, 0, 2);
                if (file_exists(SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tinymce4/langs/' . $loc . '.js')) {
                    $locale = $loc;
                }
            }
        }
        $_editorconfig = getOption('tinymce4_' . $mode);
        if (!empty($_editorconfig)) {
            $_editorconfig = getPlugin('/tinymce4/config/' . $_editorconfig, true);
            if (!empty($_editorconfig)) {
                require_once $_editorconfig;
            }
        }
    }
    return $mode;
}
开发者ID:rb26,项目名称:zenphoto,代码行数:27,代码来源:tinymce4.php


示例5: ratingJS

function ratingJS()
{
    $ME = substr(basename(__FILE__), 0, -4);
    ?>
	<script type="text/javascript" src="<?php 
    echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/' . $ME;
    ?>
/jquery.MetaData.js"></script>
	<script type="text/javascript" src="<?php 
    echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/' . $ME;
    ?>
/jquery.rating.js"></script>
	<?php 
    $css = getPlugin('rating/jquery.rating.css', true, true);
    ?>
	<link rel="stylesheet" href="<?php 
    echo pathurlencode($css);
    ?>
" type="text/css" />
	<script type="text/javascript">
		// <!-- <![CDATA[
		$.fn.rating.options = { cancel: '<?php 
    echo gettext('retract');
    ?>
'	};
		// ]]> -->
	</script>
	<?php 
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:29,代码来源:rating.php


示例6: testServices

 public function testServices()
 {
     $ins = getAuth();
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Auth\IAuth::class, $ins);
     $ins = getView();
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\View\IView::class, $ins);
     $ins = getLog();
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Log\ILog::class, $ins);
     //        $ins = getDB();
     //        $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Database\MedooDB::class, $ins);
     //        $ins = getRedis();
     //        $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Database\PRedis::class, $ins);
     //        $ins = getDataPool();
     //        $this->assertInstanceOf(\Wwtg99\DataPool\Common\IDataPool::class, $ins);
     $ins = getCache();
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Storage\Cache::class, $ins);
     $ins = getSession();
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Storage\SessionUtil::class, $ins);
     $ins = getCookie();
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Storage\CookieUtil::class, $ins);
     $ins = getOValue();
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Storage\OldValue::class, $ins);
     $ins = getAssets();
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\View\AssetsManager::class, $ins);
     $ins = getMailer();
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Utils\Mail::class, $ins);
     $ins = Flight::Express();
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Utils\Express::class, $ins);
     $ins = getPlugin('php');
     $this->assertInstanceOf(\Wwtg99\Flight2wwu\Component\Plugin\IPlugin::class, $ins);
 }
开发者ID:wwtg99,项目名称:flight2wwu,代码行数:31,代码来源:ComponentTester.php


示例7: do_pull

function do_pull($formatter, $params = array())
{
    global $Config;
    $pagename = $formatter->page->name;
    if ($formatter->refresh) {
        $params['refresh'] = 1;
    }
    $ret = array();
    $params['retval'] =& $ret;
    $params['call'] = true;
    if (!empty($Config['pull_ignore_re']) and preg_match('/' . $Config['pull_ignore_re'] . '/i', $pagename)) {
        $ret['error'] = 'protected from pull';
        $ret['status'] = 404;
        // fake
    } else {
        macro_Pull($formatter, $pagename, $params);
    }
    if (!empty($params['check'])) {
        echo $params['retval']['status'];
        return;
    }
    if (!empty($ret['error'])) {
        if (!empty($Config['pull_fallback']) && ($plugin = getPlugin($Config['pull_fallback']))) {
            // FIXME
            if (!function_exists('do_' . $plugin)) {
                include_once "plugin/{$plugin}.php";
            }
            if (function_exists('do_' . $plugin)) {
                call_user_func('do_' . $plugin, $formatter, $params);
            }
            return;
        }
        echo $ret['error'];
    }
}
开发者ID:reviforks,项目名称:moniwiki,代码行数:35,代码来源:pull.php


示例8: do_pull

function do_pull($formatter, $params = array())
{
    global $Config;
    $pagename = $formatter->page->name;
    if ($formatter->refresh) {
        $params['refresh'] = 1;
    }
    $ret = array();
    $params['retval'] =& $ret;
    $params['call'] = true;
    if (!empty($Config['pull_ignore_re']) and preg_match('/' . $Config['pull_ignore_re'] . '/i', $pagename)) {
        $ret['error'] = 'protected from pull';
        $ret['status'] = 404;
        // fake
    } else {
        macro_Pull($formatter, $pagename, $params);
    }
    if (!empty($params['check'])) {
        $status = $params['retval']['status'];
        if (isset($status) && $status != 304) {
            header('Cache-Control: public, max-age=5, s-maxage=5');
            #header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
            #header("Pragma: no-cache");
            #header('Cache-Control: no-store, no-cache, must-revalidate', false);
        } else {
            header('Cache-Control: public, max-age=60, s-maxage=60');
        }
        header('Content-Type: text/plain');
        if (in_array($status, array(200, 404, 304))) {
            header('Status: ' . $status);
        }
        echo $status;
        return;
    }
    if (!empty($ret['error'])) {
        if (!empty($Config['pull_fallback']) && ($plugin = getPlugin($Config['pull_fallback']))) {
            // FIXME
            if (!function_exists('do_' . $plugin)) {
                include_once "plugin/{$plugin}.php";
            }
            if (function_exists('do_' . $plugin)) {
                call_user_func('do_' . $plugin, $formatter, $params);
            }
            return;
        }
        $status = $ret['status'];
        if (isset($status) && $status != 304) {
            header('Cache-Control: public, max-age=5, s-maxage=5');
            #header("Pragma: no-cache");
            #header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
            #header('Cache-Control: no-store, no-cache, must-revalidate', false);
        } else {
            header('Cache-Control: public, max-age=60, s-maxage=60');
        }
        header('Content-Type: text/plain');
        echo $ret['error'];
    }
}
开发者ID:ahastudio,项目名称:moniwiki,代码行数:58,代码来源:pull.php


示例9: __construct

 public function __construct($params = null)
 {
     parent::__construct();
     $this->pluginName = preg_replace('/Plugin$/', '', get_class($this));
     if (isset($params['plugin'])) {
         $this->plugin = $params['plugin'];
     } else {
         $this->plugin = getPlugin();
     }
 }
开发者ID:nicolargo,项目名称:frontend,代码行数:10,代码来源:PluginBase.php


示例10: image

 protected static function image($html, $which, $where)
 {
     $img = getPlugin($which);
     $size = zp_imageDims($img);
     $wide = $size['width'];
     $high = $size['height'];
     $img = str_replace(SERVERPATH, WEBPATH, $img);
     $html .= '<img src="' . $img . '" class="imageasflag" width="' . $wide . 'px" height="' . $high . 'px" alt="" style="max-width:' . $wide . 'px; position: ' . $where . '" />' . "\n";
     return $html;
 }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:10,代码来源:flag_thumbnail.php


示例11: __construct

 public function __construct()
 {
     // requires the FacebookConnect plugin to be enabled
     $this->isActive = getPlugin()->isActive('FacebookConnect');
     if ($this->isActive) {
         $conf = getPlugin()->loadConf('FacebookConnect');
         $this->id = $conf['id'];
         $this->secret = $conf['secret'];
         $this->fb = new Facebook(array('appId' => $this->id, 'secret' => $this->secret));
     }
 }
开发者ID:nicolargo,项目名称:frontend,代码行数:11,代码来源:LoginFacebook.php


示例12: __construct

 public function __construct()
 {
     $this->api = getApi();
     $this->config = getConfig()->get();
     $this->plugin = getPlugin();
     $this->route = getRoute();
     $this->session = getSession();
     $this->template = getTemplate();
     $this->utility = new Utility();
     $this->url = new Url();
     $this->apiVersion = Request::getApiVersion();
 }
开发者ID:nicolargo,项目名称:frontend,代码行数:12,代码来源:ApiBaseController.php


示例13: JS

    static function JS()
    {
        // the scripts needed
        ?>
		<script type="text/javascript" src="<?php 
        echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
        ?>
/tag_suggest/encoder.js"></script>
		<script type="text/javascript" src="<?php 
        echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
        ?>
/tag_suggest/tag.js"></script>
		<?php 
        $css = getPlugin('tag_suggest/tag.css', true, true);
        ?>
		<link type="text/css" rel="stylesheet" href="<?php 
        echo pathurlencode($css);
        ?>
" />
		<?php 
        $taglist = getAllTagsUnique(OFFSET_PATH ? false : NULL, OFFSET_PATH ? 0 : getOption('tag_suggest_threshold'));
        $tags = array();
        foreach ($taglist as $tag) {
            $tags[] = addslashes($tag);
        }
        if (OFFSET_PATH || getOption('search_space_is') == 'OR') {
            $tagseparator = ' ';
        } else {
            $tagseparator = ',';
        }
        ?>
		<script type="text/javascript">
			// <!-- <![CDATA[
			var _tagList = ["<?php 
        echo implode($tags, '","');
        ?>
"];
			$(function () {
				$('#search_input, #edit-editable_4, .tagsuggest').tagSuggest({separator: '<?php 
        echo $tagseparator;
        ?>
', tags: _tagList, quoteSpecial: <?php 
        echo OFFSET_PATH ? 'false' : 'true';
        ?>
})
			});
			// ]]> -->
		</script>
		<?php 
    }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:50,代码来源:tag_suggest.php


示例14: federated_logon_css

/**
 * Load the CSS for the logon buttons
 */
function federated_logon_css()
{
    global $_zp_gallery;
    if (OFFSET_PATH) {
        $inTheme = false;
    } else {
        $inTheme = $_zp_gallery->getCurrentTheme();
    }
    $css = getPlugin('federated_logon/federated_logon_buttons.css', $inTheme, true);
    ?>
	<link rel="stylesheet" href="<?php 
    echo $css;
    ?>
" type="text/css" />
	<?php 
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:19,代码来源:federated_logon.php


示例15: tagSuggestJS

function tagSuggestJS()
{
    // the scripts needed
    ?>
	<script type="text/javascript" src="<?php 
    echo WEBPATH . '/' . ZENFOLDER;
    ?>
/js/encoder.js"></script>
	<script type="text/javascript" src="<?php 
    echo WEBPATH . '/' . ZENFOLDER;
    ?>
/js/tag.js"></script>
	<?php 
    $css = getPlugin('tag_suggest/tag.css', true, true);
    ?>
	<link type="text/css" rel="stylesheet" href="<?php 
    echo pathurlencode($css);
    ?>
" />
	<?php 
    $taglist = getAllTagsUnique();
    $c = 0;
    $list = '';
    foreach ($taglist as $tag) {
        if ($c > 0) {
            $list .= ',';
        }
        $c++;
        $list .= '"' . addslashes(sanitize($tag, 3)) . '"';
    }
    ?>
	<script type="text/javascript">
		// <!-- <![CDATA[
		var _tagList = [<?php 
    echo $list;
    ?>
];
		$(function () {
			$('#search_input, #edit-editable_4').tagSuggest({ separator:'<?php 
    echo getOption('search_space_is') == 'OR' ? ' ' : ',';
    ?>
', tags: _tagList })
			});
		// ]]> -->
	</script>
	<?php 
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:47,代码来源:tag_suggest.php


示例16: tinymceConfigJS

function tinymceConfigJS($editorconfig, $mode)
{
    if (empty($editorconfig)) {
        // only if we get here first!
        $locale = getLocaleForTinyMCEandAFM();
        switch ($mode) {
            case 'zenphoto':
                $editorconfig = getOption('tinymce_zenphoto');
                break;
            case 'zenpage':
                $editorconfig = getOption('tinymce_zenpage');
                break;
        }
        if (!empty($editorconfig)) {
            $editorconfig = getPlugin('/tiny_mce/config/' . $editorconfig);
            require_once $editorconfig;
        }
    }
    return $editorconfig;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:20,代码来源:tiny_mce.php


示例17: __construct

 public function __construct()
 {
     $this->api = getApi();
     $this->config = getConfig()->get();
     $this->plugin = getPlugin();
     $this->route = getRoute();
     $this->session = getSession();
     $this->template = getTemplate();
     $this->theme = getTheme();
     $this->utility = new Utility();
     $this->url = new Url();
     $this->template->template = $this->template;
     $this->template->config = $this->config;
     $this->template->plugin = $this->plugin;
     $this->template->session = $this->session;
     $this->template->theme = $this->theme;
     $this->template->utility = $this->utility;
     $this->template->url = $this->url;
     $this->template->user = new User();
 }
开发者ID:gg1977,项目名称:frontend,代码行数:20,代码来源:BaseController.php


示例18: update

 public function update($plugin)
 {
     getAuthentication()->requireAuthentication();
     $params = $_POST;
     $pluginObj = getPlugin();
     $conf = $pluginObj->loadConf($plugin);
     if (!$conf) {
         return $this->error('Cannot update settings for a deactivated plugin, try activating first.', false);
     }
     foreach ($conf as $name => $value) {
         if (isset($_POST[$name])) {
             $conf[$name] = $_POST[$name];
         }
     }
     $status = $pluginObj->writeConf($plugin, $this->utility->generateIniString($conf));
     if ($status) {
         return $this->success('Plugin updated successfully', $conf);
     } else {
         return $this->error('Could not update plugin', false);
     }
 }
开发者ID:nicolargo,项目名称:frontend,代码行数:21,代码来源:ApiPluginController.php


示例19: colorbox_css

function colorbox_css()
{
    global $_zp_gallery;
    if (OFFSET_PATH) {
        $inTheme = false;
    } else {
        $inTheme = $_zp_gallery->getCurrentTheme();
    }
    $css = getPlugin('colorbox/colorbox.css', $inTheme, true);
    ?>
	<script type="text/javascript" src="<?php 
    echo FULLWEBPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER;
    ?>
/colorbox/jquery.colorbox-min.js"></script>
	<link rel="stylesheet" href="<?php 
    echo $css;
    ?>
" type="text/css" />
	<?php 
    $navigator_user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
    if (stristr($navigator_user_agent, "msie") && !stristr($navigator_user_agent, '9')) {
        include dirname(__FILE__) . '/colorbox/colorbox_ie.css.php';
    }
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:24,代码来源:colorbox.php


示例20: printPageSelector

        ?>
									<tr>
										<th style="text-align:left">
										</th>
										<th style="text-align:right; padding-right: 10px;">
											<?php 
        printPageSelector($subpage, $rangeset, 'admin-options.php', array('page' => 'options', 'tab' => 'plugin'));
        ?>
										</th>
										<th></th>
									</tr>
									<?php 
    }
    foreach ($plugins as $extension) {
        $option_interface = NULL;
        $path = getPlugin($extension . '.php');
        $pluginStream = file_get_contents($path);
        if ($str = isolate('$plugin_description', $pluginStream)) {
            if (false === eval($str)) {
                $plugin_description = '';
            }
        } else {
            $plugin_description = '';
        }
        $str = isolate('$option_interface', $pluginStream);
        if (false !== $str) {
            require_once $path;
            if (preg_match('/\\s*=\\s*new\\s(.*)\\(/i', $str)) {
                eval($str);
                $warn = gettext('<strong>Note:</strong> Instantiating the option interface within the plugin may cause performance issues. You should instead set <code>$option_interface</code> to the name of the class as a string.');
            } else {
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:31,代码来源:admin-options.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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