本文整理汇总了PHP中getPluginFiles函数的典型用法代码示例。如果您正苦于以下问题:PHP getPluginFiles函数的具体用法?PHP getPluginFiles怎么用?PHP getPluginFiles使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getPluginFiles函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
foreach (getPluginFiles('*.php') as $extension => $plugin) {
$deprecated = stripSuffix($plugin) . '/deprecated-functions.php';
if (file_exists($deprecated)) {
$plugin = basename(dirname($deprecated));
$content = preg_replace('~#.*function~', '', file_get_contents($deprecated));
// remove the comments!
preg_match_all('~@deprecated\\s+.*since\\s+.*(\\d+\\.\\d+\\.\\d+)~', $content, $versions);
preg_match_all('/([public static|static]*)\\s*function\\s+(.*)\\s?\\(.*\\)\\s?\\{/', $content, $functions);
if ($plugin == 'deprecated-functions') {
$plugin = 'core';
$suffix = '';
} else {
$suffix = ' (' . $plugin . ')';
}
foreach ($functions[2] as $key => $function) {
if ($functions[1][$key]) {
$flag = '_method';
$star = '*';
} else {
$star = $flag = '';
}
$name = $function . $star . $suffix;
$option = 'deprecated_' . $plugin . '_' . $function . $flag;
setOptionDefault($option, 1);
$this->unique_functions[strtolower($function)] = $this->listed_functions[$name] = array('plugin' => $plugin, 'function' => $function, 'class' => trim($functions[1][$key]), 'since' => @$versions[1][$key], 'option' => $option, 'multiple' => array_key_exists($function, $this->unique_functions));
}
}
}
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:deprecated-functions.php
示例2: getOptionsSupported
function getOptionsSupported()
{
$buttons = array();
$icons = getPluginFiles('*.png', 'flag_thumbnail');
foreach ($icons as $icon) {
$icon = str_replace(SERVERPATH, WEBPATH, $icon);
$buttons[' <img src="' . $icon . '" />'] = basename($icon);
}
return array('» ' . gettext('Criteria') => array('key' => 'flag_thumbnail_date', 'type' => OPTION_TYPE_SELECTOR, 'order' => 3.6, 'selections' => array(gettext('date') => "date", gettext('mtime') => "mtime"), 'desc' => gettext("Select the basis for considering if an image is new.")), '» ' . gettext('Icon') . chr(0) . '3' => array('key' => 'flag_thumbnail_new_icon', 'type' => OPTION_TYPE_RADIO, 'order' => 3.1, 'buttons' => $buttons, 'behind' => true, 'desc' => gettext('Select the icon that will show for "new" images.')), '» ' . gettext('Icon') . chr(0) . '2' => array('key' => 'flag_thumbnail_unpublished_icon', 'type' => OPTION_TYPE_RADIO, 'order' => 2.1, 'buttons' => $buttons, 'behind' => true, 'desc' => gettext('Select the icon that will show for "un-published" images.')), '» ' . gettext('Icon') . chr(0) . '4' => array('key' => 'flag_thumbnail_locked_icon', 'type' => OPTION_TYPE_RADIO, 'order' => 4.1, 'buttons' => $buttons, 'behind' => true, 'desc' => gettext('Select the icon that will show for "Protected" images.')), '» ' . gettext('Icon') . chr(0) . '5' => array('key' => 'flag_thumbnail_geodata_icon', 'type' => OPTION_TYPE_RADIO, 'order' => 5.1, 'buttons' => $buttons, 'behind' => true, 'desc' => gettext('Select the icon that will show for images tagged with geodata.')), gettext('Un-published') => array('key' => 'flag_thumbnail_flag_unpublished', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 2, 'desc' => gettext('Thumbnails for images which are not <em>published</em> will be marked.')), gettext('Protected') => array('key' => 'flag_thumbnail_flag_locked', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 4, 'desc' => gettext('Thumbnails for images which are password protected or in password protected albums will be marked.')), gettext('New') => array('key' => 'flag_thumbnail_flag_new', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 3, 'desc' => gettext('Thumbnails for images which have recently been added to the gallery will be marked.')), gettext('Geotagged') => array('key' => 'flag_thumbnail_flag_geodata', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 5, 'desc' => gettext('Thumbnails for images which are geodata tagged will be marked.')), '» ' . gettext('Aging') => array('key' => 'flag_thumbnail_range', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 3.7, 'desc' => gettext("The range in days until images are no longer flagged as new.")), '» ' . gettext('Text') . chr(0) . '3' => array('key' => 'flag_thumbnail_new_text', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 3.5, 'desc' => gettext("Text flag for <em>new</em> images.")), '» ' . gettext('Text') . chr(0) . '2' => array('key' => 'flag_thumbnail_unpublished_text', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 2.5, 'desc' => gettext("Text flag for <em>un-published</em> images.")), '» ' . gettext('Text') . chr(0) . '4' => array('key' => 'flag_thumbnail_locked_text', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 4.5, 'desc' => gettext("Text flag for <em>protected</em> images.")), gettext('Use text') => array('key' => 'flag_thumbnail_use_text', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 8, 'desc' => gettext('If checked, the defined <em>text</em> will be used in place of the icon. (Use the class<code>textasnewflag</code> for styling "text" overlays.)')), '» ' . gettext('Text') . chr(0) . '5' => array('key' => 'flag_thumbnail_geodata_text', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 5.5, 'desc' => gettext("Text flag for <em>geodata tagged</em> images.")));
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:10,代码来源:flag_thumbnail.php
示例3: getTinyMCEConfigFiles
function getTinyMCEConfigFiles()
{
$files = getPluginFiles('*.js.php', 'tiny_mce/config/');
$array = array();
foreach ($files as $file) {
$filename = strrchr($file, '/');
$filename = substr($filename, 1);
$array[ucfirst(substr($filename, 0, strpos($filename, '.js.php')))] = $filename;
}
return $array;
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:11,代码来源:tiny_mce.php
示例4: getOptionsSupported
/**
* Returns array of supported options for the admin-options handler
*
* @return unknown
*/
function getOptionsSupported()
{
$themes = array(gettext('Red') => 'red', gettext('White') => 'white', gettext('Black Glass') => 'blackglass', gettext('Clean') => 'clean');
$custom = getPluginFiles('*', 'reCaptcha', false);
foreach ($custom as $theme => $path) {
if (is_dir($path)) {
$themes[$theme = basename($theme)] = $theme;
}
}
return array(gettext('Public key') => array('key' => 'reCaptcha_public_key', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1, 'desc' => gettext('Enter your <em>reCaptcha</em> public key. You can obtain this key from the Google <a href="http://www.google.com/recaptcha">reCaptcha</a> site')), gettext('Private key') => array('key' => 'reCaptcha_private_key', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 2, 'desc' => gettext('Enter your <em>reCaptcha</em> private key.')), gettext('Theme') => array('key' => 'reCaptcha_theme', 'type' => OPTION_TYPE_SELECTOR, 'order' => 3, 'selections' => $themes, 'desc' => gettext('Select the <em>reCaptcha</em> theme.')), '' => array('key' => 'reCcaptcha_image', 'type' => OPTION_TYPE_CUSTOM, 'order' => 4, 'desc' => gettext('Sample CAPTCHA image')));
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:16,代码来源:reCaptcha.php
示例5: getTinyMCE4ConfigFiles
function getTinyMCE4ConfigFiles($mode)
{
// get only those that work!
$files = getPluginFiles($mode . '-*.js.php', 'tinymce4/config/');
$array = array();
foreach ($files as $file) {
$filename = strrchr($file, '/');
$filename = substr($filename, 1);
$option = preg_replace('/^' . $mode . '-/', '', $filename);
$option = ucfirst(preg_replace('/.js.php$/', '', $option));
$array[$option] = $filename;
}
return $array;
}
开发者ID:rb26,项目名称:zenphoto,代码行数:14,代码来源:tinymce4.php
示例6: getTinyMCEConfigFiles
function getTinyMCEConfigFiles()
{
$array = array();
$files = getPluginFiles('*.js.php', 'tiny_mce/config/');
$default = array(gettext('TinyMCE disabled') => '');
$array = array_merge($array, $default);
foreach ($files as $file) {
$filename = strrchr($file, '/');
$filename = substr($filename, 1);
$filearray = array($filename => $filename);
//print_r($filearray);
$array = array_merge($array, $filearray);
}
return $array;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:15,代码来源:tiny_mce.php
示例7: getOptionsSupported
function getOptionsSupported()
{
global $_zp_gallery;
$themes = getPluginFiles('colorbox_js/themes/*.*');
$list = array('Custom (theme based)' => 'custom');
foreach ($themes as $theme) {
$theme = stripSuffix(basename($theme));
$list[ucfirst($theme)] = $theme;
}
$opts = array(gettext('Colorbox theme') => array('key' => 'colorbox_theme', 'type' => OPTION_TYPE_SELECTOR, 'order' => 0, 'selections' => $list, 'desc' => gettext("The Colorbox script comes with 5 example themes you can select here. If you select <em>custom (within theme)</em> you need to place a folder <em>colorbox_js</em> containing a <em>colorbox.css</em> file and a folder <em>images</em> within the current theme to override to use a custom Colorbox theme.")));
$c = 1;
foreach (getThemeFiles(array('404.php', 'themeoptions.php', 'theme_description.php')) as $theme => $scripts) {
$list = array();
foreach ($scripts as $script) {
$list[$script] = 'colorbox_' . $theme . '_' . stripSuffix($script);
}
$opts[$theme] = array('key' => 'colorbox_' . $theme . '_scripts', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'order' => $c++, 'checkboxes' => $list, 'desc' => gettext('The scripts for which Colorbox is enabled. {Should have been set by the themes!}'));
}
return $opts;
}
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:20,代码来源:colorbox_js.php
示例8: gettext
</p>
<p class="notebox"><?php
echo gettext("<strong>Note:</strong>" . "<br /><br />Login from the front-end user login form is secure only if <em>https</em> is selected." . "<br /><br />If you select <em>https</em> or <em>secure admin</em> your server <strong>MUST</strong> support <em>https</em>. " . "If you set either of these on a server which does not support <em>https</em> you will not be able to access the <code>admin</code> pages to reset the option! " . "Your only possibility then is to change the option in the database.");
?>
</p>
</td>
</tr>
<tr>
<td width="175"><?php
echo gettext('CAPTCHA generator:');
?>
</td>
<td width="350">
<select id="captcha" name="captcha">
<?php
$captchas = getPluginFiles('*.php', 'captcha');
generateListFromArray(array(getOption('captcha')), array_keys($captchas), false, false);
?>
</select>
</td>
<td><?php
echo gettext('Select the <em>CAPTCHA</em> generator to be used by Zenphoto.');
?>
</td>
</tr>
<tr>
<td width="175"><?php
echo gettext('Obscure cache filenames');
?>
</td>
<td width="350">
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:admin-options.php
示例9: headJS
static function headJS()
{
$skin = @array_shift(getPluginFiles('*.css', 'jplayer/skin/' . getOption('jplayer_skin')));
if (file_exists($skin)) {
$skin = str_replace(SERVERPATH, WEBPATH, $skin);
//replace SERVERPATH as that does not work as a CSS link
} else {
$skin = WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/jplayer/skin/zenphotolight/jplayer.zenphotolight.css';
}
?>
<link href="<?php
echo $skin;
?>
" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
?>
/jplayer/js/jquery.jplayer.min.js"></script>
<?php
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:20,代码来源:jplayer.php
示例10: alt_login_handler
/**
* Provides a list of alternate handlers for logon
* @param $handler_list
*/
static function alt_login_handler($handler_list)
{
$files = getPluginFiles('*_logon.php', 'federated_logon');
foreach ($files as $key => $link) {
$option = getOption('federated_logon_handler' . $key);
if ($option || is_null($option)) {
$link = str_replace(SERVERPATH, WEBPATH, str_replace('\\', '/', $link));
$name = str_replace('_', ' ', substr(basename($link), 0, -10));
$handler_list[$name] = array('script' => $link, 'params' => array());
}
}
return $handler_list;
}
开发者ID:rb26,项目名称:zenphoto,代码行数:17,代码来源:federated_logon.php
示例11: effectsJS
static function effectsJS()
{
global $_image_effects_random;
$effectlist = array_keys(getPluginFiles('*.txt', 'image_effects'));
shuffle($effectlist);
$common = array();
do {
$_image_effects_random = array_shift($effectlist);
if (getOption('image_effects_random_' . $_image_effects_random)) {
$effectdata = image_effects::getEffect($_image_effects_random);
$invalid_effect = $effectdata && array_key_exists('error', $effectdata);
} else {
$invalid_effect = true;
}
} while ($_image_effects_random && $invalid_effect);
if (!$_image_effects_random) {
echo "<br />random effect empty!";
}
$selected_effects = array_unique(array(getOption('image_std_images'), getOption('image_custom_images'), getOption('image_std_album_thumbs'), getOption('image_std_image_thumbs'), getOption('image_custom_album_thumbs'), $_image_effects_random));
if (false !== ($key = array_search('!', $selected_effects))) {
unset($selected_effects[$key]);
}
if (count($selected_effects) > 0) {
foreach ($selected_effects as $effect) {
$effectdata = image_effects::getEffect($effect);
if (array_key_exists('head', $effectdata)) {
$common_data = trim($effectdata['head']);
while ($common_data) {
$i = strcspn($common_data, '= >');
if ($i === false) {
$common_data = '';
} else {
$tag = '</' . trim(substr($common_data, 1, $i)) . '>';
$k = strpos($common_data, '>');
$j = strpos($common_data, $tag, $k + 1);
if ($j === false) {
$j = strpos($common_data, '/>');
if ($j === false) {
$common_data = '';
} else {
$j = $j + 2;
}
} else {
$j = $j + strlen($tag);
}
if ($j === false) {
$common_data = '';
} else {
$common_element = substr($common_data, 0, $j);
$common_data = trim(substr($common_data, strlen($common_element)));
$common_element = trim($common_element);
if (!in_array($common_element, $common)) {
$common[] = $common_element;
}
}
}
}
}
}
if (!empty($common)) {
echo implode("\n", $common);
}
}
}
开发者ID:rb26,项目名称:zenphoto,代码行数:64,代码来源:image_effects.php
示例12: setOptionDefault
$version = (int) $vers[0] . '.' . (int) $vers[1] . '.' . (int) $vers[2];
}
}
if (is_null(getOption('disallow_' . $dirname)) && $version < $zpversion) {
setOptionDefault('disallow_' . $dirname, 1);
}
if (setupLocale($dirname)) {
purgeOption('unsupported_' . $dirname);
} else {
setOption('unsupported_' . $dirname, 1);
}
}
}
//The following should be done LAST so it catches anything done above
//set plugin default options by instantiating the options interface
$plugins = getPluginFiles('*.php');
?>
<p>
<?php
$plugins = array_keys($plugins);
natcasesort($plugins);
echo gettext('Plugin setup:') . '<br />';
foreach ($plugins as $extension) {
?>
<span>
<img src="<?php
echo FULLWEBPATH . '/' . ZENFOLDER . '/setup/setup_pluginOptions.php?plugin=' . $extension;
?>
" title="<?php
echo $extension;
?>
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:setup-option-defaults.php
示例13: getEnabledPlugins
/**
* Returns an array of the currently enabled plugins
*
* @return array
*/
function getEnabledPlugins()
{
global $_EnabledPlugins;
if (is_array($_EnabledPlugins)) {
return $_EnabledPlugins;
}
$_EnabledPlugins = array();
$sortlist = getPluginFiles('*.php');
foreach ($sortlist as $extension => $path) {
$opt = 'zp_plugin_' . $extension;
if ($option = getOption($opt)) {
$_EnabledPlugins[$extension] = array('priority' => $option, 'path' => $path);
}
}
$_EnabledPlugins = sortMultiArray($_EnabledPlugins, 'priority', true);
return $_EnabledPlugins;
}
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:22,代码来源:functions.php
示例14: define
/**
* Bulk enable/disable of plugins
* @package core
*/
// force UTF-8 Ø
define('OFFSET_PATH', 3);
require_once dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))) . "/zp-core/admin-globals.php";
admin_securityChecks(ADMIN_RIGHTS, $return = currentRelativeURL());
XSRFdefender('pluginEnabler');
if (isset($_GET['pluginsRemember'])) {
setOption('pluginEnabler_currentset', serialize(array_keys(getEnabledPlugins())));
$report = gettext('Current enabled plugins remembered');
}
if (isset($_GET['pluginsEnable'])) {
$paths = getPluginFiles('*.php');
$pluginlist = array_keys($paths);
switch ($setting = sanitize_numeric($_GET['pluginsEnable'])) {
case 0:
$report = gettext('Plugins disabled');
break;
case 1:
$report = gettext('Zenphoto plugins enabled');
break;
case 2:
$report = gettext('Remembered plugins enabled');
$savedlist = getSerializedArray(getOption('pluginEnabler_currentset'));
break;
case 3:
$report = gettext('All plugins enabled');
break;
开发者ID:benuri,项目名称:DevTools,代码行数:30,代码来源:handler.php
示例15: getPluginTabs
/**
* Figures out which plugin tabs to display
*/
function getPluginTabs()
{
if (isset($_GET['tab'])) {
$default = sanitize($_GET['tab']);
} else {
$default = 'all';
}
$paths = getPluginFiles('*.php');
$classXlate = array('all' => gettext('all'), 'thirdparty' => gettext('3rd party'), 'enabled' => gettext('enabled'), 'admin' => gettext('admin'), 'demo' => gettext('demo'), 'development' => gettext('development'), 'feed' => gettext('feed'), 'mail' => gettext('mail'), 'media' => gettext('media'), 'misc' => gettext('misc'), 'spam' => gettext('spam'), 'seo' => gettext('seo'), 'uploader' => gettext('uploader'), 'users' => gettext('users'));
zp_apply_filter('plugin_tabs', $classXlate);
$classes = $member = $thirdparty = array();
foreach ($paths as $plugin => $path) {
$p = file_get_contents($path);
$key = 'misc';
if ($str = isolate('@subpackage', $p)) {
preg_match('|@subpackage\\s+(.*)\\s|', $str, $matches);
if (isset($matches[1])) {
$key = strtolower(trim($matches[1]));
}
}
$classes[$key][] = $plugin;
if (extensionEnabled($plugin)) {
$active[$plugin] = $path;
}
if (strpos($path, SERVERPATH . '/' . USER_PLUGIN_FOLDER) === 0) {
if ($str = isolate('@category', $p)) {
preg_match('|@category\\s+(.*)\\s|', $str, $matches);
$deprecate = !isset($matches[1]) || $matches[1] != 'package';
} else {
$deprecate = true;
}
if ($deprecate) {
$thirdparty[$plugin] = $path;
}
}
if (array_key_exists($key, $classXlate)) {
$local = $classXlate[$key];
} else {
$local = $classXlate[$key] = $key;
}
$member[$plugin] = $local;
}
ksort($classes);
$tabs[$classXlate['all']] = 'admin-plugins.php?page=plugins&tab=all';
if (!empty($thirdparty)) {
$tabs[$classXlate['thirdparty']] = 'admin-plugins.php?page=plugins&tab=thirdparty';
}
if (!empty($active)) {
$tabs[$classXlate['enabled']] = 'admin-plugins.php?page=plugins&tab=active';
}
switch ($default) {
case 'all':
$currentlist = array_keys($paths);
break;
case 'active':
$currentlist = array_keys($active);
break;
case 'thirdparty':
$currentlist = array_keys($thirdparty);
break;
default:
$currentlist = array();
break;
}
foreach ($classes as $class => $list) {
$tabs[$classXlate[$class]] = 'admin-plugins.php?page=plugins&tab=' . $class;
if ($class == $default) {
$currentlist = $list;
}
}
return array($tabs, $default, $currentlist, $paths, $member);
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:75,代码来源:admin-functions.php
示例16: define
* document processor will substitute the actual value for these tags when it renders the document.
* Image URIs are also processed. Use the appropriate Zenphoto definition tokens to cause the URI to point
* to the actual image. E.g. <var><img src="%WEBPATH%/%ZENFOLDER%/images/action.png" /></var>
*
* @package admin
* @subpackage development
*/
// force UTF-8 Ø
if (!defined('OFFSET_PATH')) {
define('OFFSET_PATH', 2);
require_once dirname(__FILE__) . '/admin-globals.php';
require_once SERVERPATH . '/' . ZENFOLDER . '/template-functions.php';
header('Last-Modified: ' . ZP_LAST_MODIFIED);
header('Content-Type: text/html; charset=' . LOCAL_CHARSET);
$real_locale = getUserLocale();
$extensions = getPluginFiles('*.php');
$extensions = array_keys($extensions);
$extension = sanitize($_GET['extension']);
if (!in_array($extension, $extensions)) {
exit;
}
$thirdparty = isset($_GET['thirdparty']);
if ($thirdparty) {
$pluginToBeDocPath = SERVERPATH . '/' . USER_PLUGIN_FOLDER . '/' . $extension . '.php';
} else {
$pluginToBeDocPath = SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/' . $extension . '.php';
}
$plugin_description = '';
$plugin_notice = '';
$plugin_disable = '';
$plugin_author = '';
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:pluginDoc.php
示例17: image_effects
/**
* Class instantiation function
*
* @return effenberger
*/
function image_effects()
{
$effect = getPluginFiles('*.txt', 'image_effects');
foreach ($this->effects = array_keys($effect) as $suffix) {
setOptionDefault('image_effects_random_' . $suffix, 1);
}
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:12,代码来源:image_effects.php
示例18: getEnabledPlugins
/**
* Returns an array of the currently enabled plugins
*
* @return array
*/
function getEnabledPlugins()
{
global $_EnabledPlugins;
if (is_array($_EnabledPlugins)) {
return $_EnabledPlugins;
}
$_EnabledPlugins = array();
$sortlist = getPluginFiles('*.php');
foreach ($sortlist as $extension => $path) {
$opt = 'zp_plugin_' . $extension;
if ($option = getOption($opt)) {
$_EnabledPlugins[$extension] = $option;
}
}
arsort($_EnabledPlugins);
return $_EnabledPlugins;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:22,代码来源:functions.php
示例19: define
* document processor will substitute the actual value for these tags when it renders the document.
* Image URIs are also processed. Use the appropriate definition tokens to cause the URI to point
* to the actual image. E.g. <var><img src="%WEBPATH%/%ZENFOLDER%/images/action.png" /></var>
*
* @author Stephen Billard (sbillard)
*
* @package admin
* @subpackage development
*/
// force UTF-8 Ø
if (!defined('OFFSET_PATH')) {
define('OFFSET_PATH', 2);
require_once dirname(__FILE__) . '/admin-globals.php';
require_once SERVERPATH . '/' . ZENFOLDER . '/template-functions.php';
$extension = sanitize($_GET['extension']);
if (!in_array($extension, array_keys(getPluginFiles('*.php')))) {
exit;
}
header('Last-Modified: ' . ZP_LAST_MODIFIED);
header('Content-Type: text/html; charset=' . LOCAL_CHARSET);
$real_locale = getUserLocale();
$pluginType = @$_GET['type'];
if ($pluginType) {
$pluginToBeDocPath = SERVERPATH . '/' . USER_PLUGIN_FOLDER . '/' . $extension . '.php';
} else {
$pluginToBeDocPath = SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/' . $extension . '.php';
}
$plugin_description = '';
$plugin_notice = '';
$plugin_disable = '';
$plugin_author = '';
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:pluginDoc.php
示例20: getOptionsSupported
/**
* Provides option list
*/
function getOptionsSupported()
{
global $_zp_authority;
$admins = $_zp_authority->getAdministrators('groups');
$ordered = array();
foreach ($admins as $key => $admin) {
if ($admin['rights'] && !($admin['rights'] & ADMIN_RIGHTS)) {
$ordered[$admin['user']] = $admin['user'];
}
}
if (getOption('zp_plugin_register_user')) {
$disable = gettext('* The option may be set via the <a href="javascript:gotoName(\'register_user\');"><em>register_user</em></a> plugin options..');
} else {
$disable = false;
}
$files = getPluginFiles('*_logon.php', 'federated_logon');
foreach ($files as $key => $link) {
$list[str_replace('_logon', '', $key)] = 'federated_logon_handler' . $key;
}
$options = array(gettext('Assign user to') => array('key' => 'federated_login_group', 'type' => OPTION_TYPE_SELECTOR, 'order' => 0, 'selections' => $ordered, 'desc' => gettext('The user group to which to map the federated login.')), gettext('Handlers') => array('key' => 'federated_logon_handler', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'checkboxes' => $list, 'order' => 1, 'desc' => gettext('Un-check any handler you do not want to support.')), sprintf(gettext('Notify%s'), $disable ? '*' : '') => array('key' => 'register_user_notify', 'type' => OPTION_TYPE_CHECKBOX, 'disabled' => $disable, 'order' => 7, 'desc' => gettext('If checked, an e-mail will be sent to the gallery admin when a new user has verified his registration. (Verification is required only if the Federated Logon provider does not supply an e-mail address.)')));
$files = getPluginFiles('*_logon.php', 'federated_logon');
if ($disable) {
$options['note'] = array('key' => 'federated_logon_truncate_note', 'type' => OPTION_TYPE_NOTE, 'order' => 8, 'desc' => '<p class="notebox">' . $disable . '</p>');
} else {
if (getOption('zp_plugin_zenpage')) {
$options['note'] = array('key' => 'federated_logon_truncate_note', 'type' => OPTION_TYPE_NOTE, 'order' => 8, 'desc' => gettext('<p class="notebox">*<strong>Note:</strong> The setting of these options are shared with other the <em>register_user</em> plugin.</p>'));
}
}
return $options;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:33,代码来源:federated_logon.php
注:本文中的getPluginFiles函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论