本文整理汇总了PHP中extensionEnabled函数的典型用法代码示例。如果您正苦于以下问题:PHP extensionEnabled函数的具体用法?PHP extensionEnabled怎么用?PHP extensionEnabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了extensionEnabled函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getOptionsSupported
function getOptionsSupported()
{
global $personalities;
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/image_effects.php';
$note = '<p class="notebox">' . gettext('<strong>Note:</strong> This option is valid only if the Zenpage plugin is enabled or the Separate gallery index option is checked. Of course the <em>menu_manager</em> plugin must also be enabled.') . '</p>';
if (!extensionEnabled('print_album_menu') && (($m = getOption('effervescence_menu')) == 'effervescence' || $m == 'zenpage' || $m == 'garland')) {
$note .= '<p class="notebox">' . sprintf(gettext('<strong>Note:</strong> The <em>%s</em> custom menu makes use of the <em>print_album_menu</em> plugin.'), $m) . '</p>';
}
$options = array(gettext('Separate gallery index') => array('key' => 'gallery_index', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 1, 'desc' => gettext('Check to move the gallery index from the home page to gallery.php.') . '<p class="notebox">' . gettext('<strong>Note:</strong> this is assumed if the zenpage plugin is enabled.') . '</p>'), gettext('Theme logo') => array('key' => 'Theme_logo', 'type' => OPTION_TYPE_TEXTBOX, 'multilingual' => 1, 'order' => 8, 'desc' => gettext('The text for the theme logo')), gettext('Watermark head image') => array('key' => 'Watermark_head_image', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 11, 'desc' => gettext('Check to place a watermark on the heading image. (Image watermarking must be set.)')), gettext('Daily image') => array('key' => 'effervescence_daily_album_image', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 3, 'desc' => gettext('If checked the heading image will change daily rather than on each page load.')), gettext('Allow search') => array('key' => 'Allow_search', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 3.5, 'desc' => gettext('Check to enable search form.')), gettext('Slideshow') => array('key' => 'Slideshow', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 6, 'desc' => gettext('Check to enable slideshow for the <em>Smoothgallery</em> personality.')), gettext('Graphic logo') => array('key' => 'Graphic_logo', 'type' => OPTION_TYPE_CUSTOM, 'order' => 4, 'desc' => sprintf(gettext('Select a logo (PNG files in the <em>%s/images</em> folder) or leave empty for text logo.'), UPLOAD_FOLDER)), gettext('Theme personality') => array('key' => 'effervescence_personality', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $personalities, 'order' => 9, 'desc' => gettext('Select the theme personality')), gettext('Theme colors') => array('key' => 'Theme_colors', 'type' => OPTION_TYPE_CUSTOM, 'order' => 7, 'desc' => gettext('Select the colors of the theme')), gettext('Custom menu') => array('key' => 'effervescence_menu', 'type' => OPTION_TYPE_CUSTOM, 'order' => 2, 'desc' => gettext('Set this to the <em>menu_manager</em> menu you wish to use.') . $note));
if (getOption('effervescence_personality') == 'Image_gallery') {
$options[gettext('Image gallery transition')] = array('key' => 'effervescence_transition', 'type' => OPTION_TYPE_SELECTOR, 'selections' => array(gettext('None') => '', gettext('Fade') => 'fade', gettext('Shrink/grow') => 'resize', gettext('Horizontal') => 'slide-hori', gettext('Vertical') => 'slide-vert'), 'order' => 10, 'desc' => gettext('Transition effect for Image gallery'));
$options[gettext('Image gallery caption')] = array('key' => 'effervescence_caption_location', 'type' => OPTION_TYPE_RADIO, 'buttons' => array(gettext('On image') => 'image', gettext('Separate') => 'separate', gettext('Omit') => 'none'), 'order' => 10.5, 'desc' => gettext('Location for Image gallery picture caption'));
}
$effects = new image_effects();
$effectOptions = $effects->getOptionsSupported();
$effect = array_shift($effectOptions);
while ($effect && !array_key_exists('selections', $effect)) {
$effect = array_shift($effectOptions);
}
if ($effect && array_key_exists('selections', $effect)) {
$options[gettext('Index Image')] = array('key' => 'effervescence_daily_album_image_effect', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $effect['selections'], 'null_selection' => gettext('none'), 'order' => 5, 'desc' => gettext('Apply this effect to the index page image.'));
if (!extensionEnabled('image_effects')) {
$options[gettext('Index Image')]['disabled'] = true;
$options[gettext('Index Image')]['desc'] .= '<p class="notebox">' . gettext('This option requires the <em>image_effects</em> plugin to be enabled.') . '</p>';
}
}
return $options;
}
示例2: getOptionsSupported
/**
*
* supported options
*/
function getOptionsSupported()
{
global $_zp_CMS;
$options = array(gettext('Consumer key') => array('key' => 'tweet_news_consumer', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 2, 'desc' => gettext('This <code>tweet_news</code> app for this site needs a <em>consumer key</em>, a <em>consumer key secret</em>, an <em>access token</em>, and an <em>access token secret</em>.') . '<p class="notebox">' . gettext('Get these from <a href="http://dev.twitter.com/">Twitter developers</a>') . '</p>'), gettext('Secret') => array('key' => 'tweet_news_consumer_secret', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 3, 'desc' => gettext('The <em>secret</em> associated with your <em>consumer key</em>.')), gettext('Access token') => array('key' => 'tweet_news_oauth_token', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 4, 'desc' => gettext('The application <em>oauth_token</em> token.')), gettext('Access token secret') => array('key' => 'tweet_news_oauth_token_secret', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 5, 'desc' => gettext('The application <em>oauth_token</em> secret.')), gettext('Protected objects') => array('key' => 'tweet_news_protected', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 7, 'desc' => gettext('If checked, protected items will be tweeted. <strong>Note:</strong> followers will need the password to visit the tweeted link.')));
$list = array('<em>' . gettext('Albums') . '</em>' => 'tweet_news_albums', '<em>' . gettext('Images') . '</em>' => 'tweet_news_images');
if (extensionEnabled('zenpage')) {
$list['<em>' . gettext('News') . '</em>'] = 'tweet_news_news';
$list['<em>' . gettext('Pages') . '</em>'] = 'tweet_news_pages';
} else {
setOption('tweet_news_news', 0);
setOption('tweet_news_pages', 0);
}
$options[gettext('Tweet')] = array('key' => 'tweet_news_items', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'order' => 6, 'checkboxes' => $list, 'desc' => gettext('If a <em>type</em> is checked, a Tweet will be made when an object of that <em>type</em> is published.'));
if (getOption('multi_lingual')) {
$options[gettext('Tweet Language')] = array('key' => 'tweet_language', 'type' => OPTION_TYPE_SELECTOR, 'order' => 5.5, 'selections' => generateLanguageList(), 'desc' => gettext('Select the language for the Tweet message.'));
}
if (getOption('tweet_news_news') && is_object($_zp_CMS)) {
$catlist = getSerializedArray(getOption('tweet_news_categories'));
$news_categories = $_zp_CMS->getAllCategories(false);
$catlist = array(gettext('*not categorized*') => 'tweet_news_categories_none');
foreach ($news_categories as $category) {
$option = 'tweet_news_categories_' . $category['titlelink'];
$catlist[$category['title']] = $option;
setOptionDefault($option, NULL);
}
$options[gettext('News categories')] = array('key' => 'tweet_news_categories', 'type' => OPTION_TYPE_CHECKBOX_UL, 'order' => 6.5, 'checkboxes' => $catlist, 'desc' => gettext('Only those <em>news categories</em> checked will be Tweeted. <strong>Note:</strong> <em>*not categorized*</em> means those news articles which have no category assigned.'));
}
return $options;
}
示例3: __construct
function __construct()
{
$me = basename(dirname(__FILE__));
setThemeOptionDefault('zenpage_zp_index_news', false);
setThemeOptionDefault('Allow_search', true);
setThemeOptionDefault('Use_thickbox', true);
setThemeOptionDefault('zenpage_homepage', 'none');
setThemeOptionDefault('zenpage_contactpage', true);
setThemeOptionDefault('zenpage_custommenu', false);
setThemeOptionDefault('albums_per_page', 6);
setThemeOptionDefault('albums_per_row', 2);
setThemeOptionDefault('images_per_page', 20);
setThemeOptionDefault('images_per_row', 5);
setThemeOption('image_size', 580, NULL, 'zenpage');
setThemeOption('image_use_side', 'longest', NULL, 'zenpage');
setThemeOption('thumb_size', 95, NULL, 'zenpage');
setThemeOptionDefault('thumb_crop_width', 95);
setThemeOptionDefault('thumb_crop_height', 95);
setThemeOptionDefault('thumb_crop', 1);
setThemeOptionDefault('thumb_transition', 1);
if (extensionEnabled('zenpage')) {
setThemeOption('custom_index_page', 'gallery', NULL, 'zenpage', false);
} else {
setThemeOption('custom_index_page', '', NULL, 'zenpage', false);
}
if (class_exists('cacheManager')) {
cacheManager::deleteThemeCacheSizes($me);
cacheManager::addThemeCacheSize($me, NULL, 580, 580, NULL, NULL, NULL, NULL, NULL, false, NULL, true);
cacheManager::addThemeCacheSize($me, 95, NULL, NULL, getThemeOption('thumb_crop_width'), getThemeOption('thumb_crop_height'), NULL, NULL, true, NULL, NULL, NULL);
}
if (function_exists('createMenuIfNotExists')) {
$menuitems = array(array('type' => 'menulabel', 'title' => gettext('News Articles'), 'link' => '', 'show' => 1, 'nesting' => 0), array('type' => 'menufunction', 'title' => gettext('All news'), 'link' => 'printAllNewsCategories("All news",TRUE,"","menu-active",false,false,false,"list",false,getOption("menu_manager_truncate_string"));', 'show' => 1, 'include_li' => 0, 'nesting' => 1), array('type' => 'menulabel', 'title' => gettext('Gallery'), 'link' => '', 'show' => 1, 'nesting' => 0), array('type' => 'custompage', 'title' => gettext('Gallery index'), 'link' => 'gallery', 'show' => 1, 'nesting' => 1), array('type' => 'menufunction', 'title' => gettext('All Albums'), 'link' => 'printAlbumMenuList("list",NULL,"","menu-active","submenu","menu-active","",false,false,false,false,getOption("menu_manager_truncate_string"));', 'show' => 1, 'include_li' => 0, 'nesting' => 1), array('type' => 'menulabel', 'title' => gettext('Pages'), 'link' => '', 'show' => 1, 'nesting' => 0), array('type' => 'menufunction', 'title' => gettext('All pages'), 'link' => 'printPageMenu("list","","menu-active","submenu","menu-active","",0,false,getOption("menu_manager_truncate_string"));', 'show' => 1, 'include_li' => 0, 'nesting' => 1));
createMenuIfNotExists($menuitems, 'zenpage');
}
}
示例4: getOptionsSupported
static function getOptionsSupported()
{
$list = array(gettext('Gallery') => 'defaultCodeblocks_object_gallery', gettext('Album') => 'defaultCodeblocks_object_albums', gettext('Image') => 'defaultCodeblocks_object_images');
if (extensionEnabled('zenpage')) {
$list = array_merge($list, array(gettext('News category') => 'defaultCodeblocks_object_news_categories', gettext('News') => 'defaultCodeblocks_object_news', gettext('Page') => 'defaultCodeblocks_object_pages'));
}
$options = array(gettext('Objects') => array('key' => 'defaultCodeblocks_objects', 'type' => OPTION_TYPE_CHECKBOX_UL, 'order' => 0, 'checkboxes' => $list, 'desc' => gettext('Default codeblocks will be applied for the checked objects.')), gettext('Codeblocks') => array('key' => 'defaultCodeblocks_blocks', 'type' => OPTION_TYPE_CUSTOM, 'order' => 2, 'desc' => gettext('Codeblocks to be inserted when the one for the object is empty.')));
return $options;
}
示例5: getOptionsSupported
static function getOptionsSupported()
{
setOptionDefault('ldap_id_offset', 100000);
$ldapOptions = array(gettext('LDAP domain') => array('key' => 'ldap_domain', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1, 'desc' => gettext('Domain name of the LDAP server')), gettext('LDAP base dn') => array('key' => 'ldap_basedn', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1.1, 'desc' => gettext('Base DN strings for the LDAP searches.')), gettext('ID offset for LDAP usersids') => array('key' => 'ldap_id_offset', 'type' => OPTION_TYPE_NUMBER, 'order' => 1.4, 'desc' => gettext('This number is added to the LDAP <em>userid</em> to insure that there is no overlap to ZenPhoto20 <em>userids</em>.')), gettext('LDAP reader user') => array('key' => 'ldap_reader_user', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1.2, 'desc' => gettext('User name for LDAP searches. If empty the searches will be anonymous.')), gettext('LDAP reader password') => array('key' => 'ldap_reader_pass', 'type' => OPTION_TYPE_PASSWORD, 'order' => 1.3, 'desc' => gettext('User password for LDAP searches.')));
if (extensionEnabled('user_groups')) {
$ldapOptions[gettext('LDAP Group map')] = array('key' => 'ldap_group_map_custom', 'type' => OPTION_TYPE_CUSTOM, 'order' => 1.5, 'desc' => gettext('Mapping of LDAP groups to ZenPhoto20 groups') . '<p class="notebox">' . gettext('<strong>Note:</strong> if the LDAP group is empty no mapping will take place.') . '</p>');
if (!extensionEnabled('LDAP_auth')) {
$ldapOptions['note'] = array('key' => 'LDAP_auth_note', 'type' => OPTION_TYPE_NOTE, 'order' => 0, 'desc' => '<p class="notebox">' . gettext('The LDAP Group map cannot be managed with the plugin disabled') . '</p>');
}
}
return $ldapOptions;
}
示例6: getOptionsSupported
/**
* Reports the supported options
*
* @return array
*/
function getOptionsSupported()
{
global $_zp_captcha;
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tinymce.php';
$checkboxes = array(gettext('Albums') => 'comment_form_albums', gettext('Images') => 'comment_form_images');
if (extensionEnabled('zenpage')) {
$checkboxes = array_merge($checkboxes, array(gettext('Pages') => 'comment_form_pages', gettext('News') => 'comment_form_articles'));
}
$configarray = gettinymceConfigFiles('comment');
$options = array(gettext('Enable comment notification') => array('key' => 'email_new_comments', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 0, 'desc' => gettext('Email the Admin when new comments are posted')), gettext('Name field') => array('key' => 'comment_name_required', 'type' => OPTION_TYPE_RADIO, 'order' => 0.1, 'buttons' => array(gettext('Omit') => 0, gettext('Show') => 1, gettext('Require') => 'required'), 'desc' => gettext('If the <em>Name</em> field is required, the poster must provide a name.')), gettext('Email field') => array('key' => 'comment_email_required', 'type' => OPTION_TYPE_RADIO, 'order' => 0.2, 'buttons' => array(gettext('Omit') => 0, gettext('Show') => 1, gettext('Require') => 'required'), 'desc' => gettext('If the <em>Email</em> field is required, the poster must provide an email address.')), gettext('Website field') => array('key' => 'comment_web_required', 'type' => OPTION_TYPE_RADIO, 'order' => 0.3, 'buttons' => array(gettext('Omit') => 0, gettext('Show') => 1, gettext('Require') => 'required'), 'desc' => gettext('If the <em>Website</em> field is required, the poster must provide a website.')), gettext('Captcha field') => array('key' => 'Use_Captcha', 'type' => OPTION_TYPE_RADIO, 'order' => 0.4, 'buttons' => array(gettext('Omit') => 0, gettext('For guests') => 2, gettext('Require') => 1), 'desc' => $_zp_captcha->name ? gettext('If <em>Captcha</em> is required, the form will include a Captcha verification.') : '<span class="notebox">' . gettext('No captcha handler is enabled.') . '</span>'), gettext('Address fields') => array('key' => 'comment_form_addresses', 'type' => OPTION_TYPE_RADIO, 'order' => 7, 'buttons' => array(gettext('Omit') => 0, gettext('Show') => 1, gettext('Require') => 'required'), 'desc' => gettext('If <em>Address fields</em> are shown or required, the form will include positions for address information. If required, the poster must supply data in each address field.')), gettext('Allow comments on') => array('key' => 'comment_form_allowed', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'order' => 0.9, 'checkboxes' => $checkboxes, 'desc' => gettext('Comment forms will be presented on the checked pages.')), gettext('Toggled comment block') => array('key' => 'comment_form_toggle', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 2, 'desc' => gettext('If checked, existing comments will be initially hidden. Clicking on the provided button will show them.')), gettext('Show author URL') => array('key' => 'comment_form_showURL', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 7, 'desc' => gettext('To discourage SPAM, uncheck this box and the author URL will not be revealed.')), gettext('Only members can comment') => array('key' => 'comment_form_members_only', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 4, 'desc' => gettext('If checked, only logged in users will be allowed to post comments.')), gettext('Allow private postings') => array('key' => 'comment_form_private', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 6, 'desc' => gettext('If checked, posters may mark their comments as private (not for publishing).')), gettext('Allow anonymous posting') => array('key' => 'comment_form_anon', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 5, 'desc' => gettext('If checked, posters may exclude their personal information from the published post.')), gettext('Include RSS link') => array('key' => 'comment_form_rss', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 8, 'desc' => gettext('If checked, an RSS link will be included at the bottom of the comment section.')), gettext('Comments per page') => array('key' => 'comment_form_comments_per_page', 'type' => OPTION_TYPE_NUMBER, 'order' => 9, 'desc' => gettext('The comments that should show per page on the admin tab and when using the jQuery pagination')), gettext('Comment editor configuration') => array('key' => 'tinymce_comments', 'type' => OPTION_TYPE_SELECTOR, 'order' => 1, 'selections' => $configarray, 'null_selection' => gettext('Disabled'), 'desc' => gettext('Configuration file for TinyMCE when used for comments. Set to <code>Disabled</code> to disable visual editing.')), gettext('Admin comment editor configuration') => array('key' => 'tinymce_admin_comments', 'type' => OPTION_TYPE_SELECTOR, 'order' => 1.1, 'selections' => $configarray, 'null_selection' => gettext('Disabled'), 'desc' => gettext('Configuration file for TinyMCE when used for the <em>edit comments</em> tab.')), gettext('Pagination') => array('key' => 'comment_form_pagination', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 3, 'desc' => gettext('Uncheck to disable the jQuery pagination of comments. Enabled by default.')));
return $options;
}
示例7: handleOption
function handleOption($option, $currentValue)
{
switch ($option) {
case 'garland_menu':
$menusets = array($currentValue => $currentValue);
echo '<select id="garland_menuset" name="garland_menu"';
if (function_exists('printCustomMenu') && extensionEnabled('zenpage')) {
$result = query_full_array("SELECT DISTINCT menuset FROM " . prefix('menu') . " ORDER BY menuset");
foreach ($result as $set) {
$menusets[$set['menuset']] = $set['menuset'];
}
} else {
echo ' disabled="disabled"';
}
echo ">\n";
echo '<option value="" style="background-color:LightGray">' . gettext('*standard menu') . '</option>';
generateListFromArray(array($currentValue), $menusets, false, false);
echo "</select>\n";
break;
}
}
示例8: constructor
/**
*
* This method establishes the current set of database fields. It will add the
* fields to the database if they are not already present. Fields from previous
* constructor calls that are no longer in the list will be removed from the
* database (along with any data associated with them.)
*
* @param array $newfields
*/
function constructor($me, $newfields)
{
$previous = getSerializedArray(getOption(get_class($this) . '_addedFields'));
$current = $fields = array();
if (extensionEnabled($me)) {
//need to update the database tables.
foreach ($newfields as $newfield) {
$current[$newfield['table']][$newfield['name']] = true;
unset($previous[$newfield['table']][$newfield['name']]);
switch (strtolower($newfield['type'])) {
default:
$dbType = strtoupper($newfield['type']);
break;
case 'int':
case 'varchar':
$dbType = strtoupper($newfield['type']) . '(' . min(255, $newfield['size']) . ')';
break;
}
$sql = 'ALTER TABLE ' . prefix($newfield['table']) . ' ADD COLUMN `' . $newfield['name'] . '` ' . $dbType;
if (query($sql, false) && in_array($newfield['table'], array('albums', 'images', 'news', 'news_categories', 'pages'))) {
$fields[] = strtolower($newfield['name']);
}
}
setOption(get_class($this) . '_addedFields', serialize($current));
} else {
purgeOption(get_class($this) . '_addedFields');
}
$set_fields = array_flip(explode(',', getOption('search_fields')));
foreach ($previous as $table => $orpahed) {
//drop fields no longer defined
foreach ($orpahed as $field => $v) {
unset($set_fields[$field]);
$sql = 'ALTER TABLE ' . prefix($table) . ' DROP `' . $field . '`';
query($sql, false);
}
}
$set_fields = array_unique(array_merge($fields, array_flip($set_fields)));
setOption('search_fields', implode(',', $set_fields));
}
示例9: my_checkPageValidity
function my_checkPageValidity($request, $gallery_page, $page)
{
switch ($gallery_page) {
case 'gallery.php':
$gallery_page = 'index.php';
// same as an album gallery index
break;
case 'index.php':
if (!extensionEnabled('zenpage') || getOption('zbase_indexlayout') != 'news') {
// only one index page if zenpage plugin is enabled & displaying
break;
}
default:
if ($page != 1) {
return false;
}
case 'news.php':
case 'album.php':
case 'search.php':
break;
}
return checkPageValidity($request, $gallery_page, $page);
}
示例10: getOptionsSupported
function getOptionsSupported()
{
global $personalities;
if (!extensionEnabled('print_album_menu') && (($m = getOption('garland_menu')) == 'garland' || $m == 'zenpage' || $m == 'garland')) {
$note = '<p class="notebox">' . sprintf(gettext('<strong>Note:</strong> The <em>%s</em> custom menu makes use of the <em>print_album_menu</em> plugin.'), $m) . '</p>';
} else {
$note = '';
}
$options = array(gettext('Theme personality') => array('key' => 'garland_personality', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $personalities, 'desc' => gettext('Select the theme personality')), gettext('Allow search') => array('key' => 'Allow_search', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Set to enable search form.')), gettext('Allow cloud') => array('key' => 'Allow_cloud', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Set to enable tag cloud for album page.')), gettext('Custom menu') => array('key' => 'garland_menu', 'type' => OPTION_TYPE_CUSTOM, 'desc' => gettext('Set this to the <em>menu_manager</em> menu you wish to use.') . $note));
if (extensionEnabled('zenpage')) {
global $_zp_zenpage;
$pages = $_zp_zenpage->getPages(false);
$list = array();
foreach ($pages as $page) {
$list[getBare($page['title'])] = $page['titlelink'];
}
$options[gettext('Custom Homepage')] = array('key' => 'garland_customHome', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $list, 'null_selection' => gettext('none'), 'desc' => gettext('Select the <em>pages</em> titlelink for the home page. Only unpublished pages are offered for selection.'));
}
if (getOption('garland_personality') == 'image_gallery') {
$options[gettext('Image gallery transition')] = array('key' => 'garland_transition', 'type' => OPTION_TYPE_SELECTOR, 'selections' => array(gettext('None') => '', gettext('Fade') => 'fade', gettext('Shrink/grow') => 'resize', gettext('Horizontal') => 'slide-hori', gettext('Vertical') => 'slide-vert'), 'order' => 10, 'desc' => gettext('Transition effect for Image gallery'));
$options[gettext('Image gallery caption')] = array('key' => 'garland_caption_location', 'type' => OPTION_TYPE_RADIO, 'buttons' => array(gettext('On image') => 'image', gettext('Separate') => 'separate', gettext('Omit') => 'none'), 'order' => 10.5, 'desc' => gettext('Location for Image gallery picture caption'));
}
return $options;
}
示例11: __construct
function __construct()
{
global $_userAddressFields;
$firstTime = extensionEnabled('userAddressFields') && is_null(getOption('userAddressFields_addedFields'));
parent::constructor('userAddressFields', self::fields());
if ($firstTime) {
// migrate the custom data user data
$result = query('SELECT * FROM ' . prefix('administrators') . ' WHERE `valid`!=0');
if ($result) {
while ($row = db_fetch_assoc($result)) {
$custom = getSerializedArray($row['custom_data']);
if (!empty($custom)) {
$sql = 'UPDATE ' . prefix('administrators') . ' SET ';
foreach ($custom as $field => $val) {
$sql .= '`' . $field . '`=' . db_quote($val) . ',';
}
$sql .= '`custom_data`=NULL WHERE `id`=' . $row['id'];
query($sql);
}
}
db_free_result($result);
}
}
}
示例12: defaultExtension
*
* If you are using more than one player on a page you need to pass a 3rd parameter with for example an unique number:<br>
* [MEDIAPLAYER album1 video1.mp4 <var>1</var>]<br>
* [MEDIAPLAYER album2 video2.mp4 <var>2</var>]
*
* <b>NOTE:</b> This player does not support external albums!
*
* @author Malte Müller (acrylian)
* @package plugins
* @subpackage media
*/
$plugin_is_filter = defaultExtension(5 | CLASS_PLUGIN);
$plugin_description = gettext("This plugin handles <code>flv</code>, <code>fla</code>, <code>mp3</code>, <code>mp4</code>, <code>m4v</code>, and <code>m4a</code> multi-media files.");
gettext("Please see <a href='http://jplayer.org'>jplayer.org</a> for more info about the player and its license.");
$plugin_author = "Malte Müller (acrylian)";
$plugin_disable = zpFunctions::pluginDisable(array(array(!extensionEnabled('class-video'), gettext('This plugin requires the <em>class-video</em> plugin')), array(!extensionEnabled('jplayer') && class_exists('Video') && Video::multimediaExtension() != 'pseudoPlayer', sprintf(gettext('jPlayer not enabled, %s is already instantiated.'), class_exists('Video') ? Video::multimediaExtension() : false)), array(getOption('album_folder_class') === 'external', gettext('This player does not support <em>External Albums</em>.'))));
$option_interface = 'jplayer_options';
if ($plugin_disable) {
enableExtension('jplayer', 0);
} else {
Gallery::addImageHandler('flv', 'Video');
Gallery::addImageHandler('fla', 'Video');
Gallery::addImageHandler('mp3', 'Video');
Gallery::addImageHandler('mp4', 'Video');
Gallery::addImageHandler('m4v', 'Video');
Gallery::addImageHandler('m4a', 'Video');
zp_register_filter('content_macro', 'jPlayer::macro');
}
class jplayer_options
{
public $name = 'jPlayer';
示例13: array_keys
<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;
?>
" alt="<?php
echo $extension;
?>
" height="16px" width="16px" />
</span>
<?php
}
?>
</p>
<?php
$_zp_gallery->garbageCollect();
if (extensionEnabled('auto_backup')) {
//Run the backup since for sure things have changed.
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/auto_backup.php';
auto_backup::timer_handler('');
}
示例14: is_valid
static function is_valid($image, $valid_types)
{
if (is_object($image)) {
$image = $image->filename;
}
$ext = getSuffix($image);
if (in_array($ext, $valid_types)) {
return $ext;
}
return false;
}
}
if ($plugin_disable) {
enableExtension('slideshow', 0);
}
if (extensionEnabled('slideshow')) {
$slideshow_instance = 0;
/**
* Prints a link to call the slideshow (not shown if there are no images in the album)
* To be used on album.php and image.php
* A CSS id names 'slideshowlink' is attached to the link so it can be directly styled.
*
* If the mode is set to "jQuery Colorbox" and the Colorbox plugin is enabled this link starts a Colorbox slideshow
* from a hidden HTML list of all images in the album. On album.php it starts with the first always, on image.php with the current image.
*
* @param string $linktext Text for the link
* @param string $linkstyle Style of Text for the link
*/
function printSlideShowLink($linktext = NULL, $linkstyle = Null)
{
global $_zp_gallery, $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance, $_zp_gallery_page;
示例15: getOptionsSupported
function getOptionsSupported()
{
$checkboxes = array(gettext('Albums') => 'multiple_layouts_albums', gettext('Images') => 'multiple_layouts_images');
if (extensionEnabled('zenpage')) {
$checkboxes = array_merge($checkboxes, array(gettext('Pages') => 'multiple_layouts_pages', gettext('News') => 'multiple_layouts_news', gettext('News categories') => 'multiple_layouts_news_categories'));
}
$options = array(gettext('Enable multiple layouts for') => array('key' => 'multiple_layouts_allowed', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'checkboxes' => $checkboxes, 'desc' => ''));
return $options;
}