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


PHP getPlugin函数代码示例

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


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


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