本文整理汇总了PHP中getOption函数的典型用法代码示例。如果您正苦于以下问题:PHP getOption函数的具体用法?PHP getOption怎么用?PHP getOption使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getOption函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: filterMessage
/**
* The function for processing a message to see if it might be SPAM
* returns:
* 0 if the message is SPAM
* 1 if the message might be SPAM (it will be marked for moderation)
* 2 if the message is not SPAM
*
* @param string $author Author field from the posting
* @param string $email Email field from the posting
* @param string $website Website field from the posting
* @param string $body The text of the comment
* @param object $receiver The object on which the post was made
* @param string $ip the IP address of the comment poster
*
* @return int
*/
function filterMessage($author, $email, $website, $body, $receiver, $ip)
{
if (strpos(getOption('Banned_IP_list'), $ip) !== false) {
return 0;
}
$forgive = getOption('Forgiving');
$list = getOption('Words_to_die_on');
$list = strtolower($list);
$this->wordsToDieOn = explode(',', $list);
$list = getOption('Patterns_to_die_on');
$list = strtolower($list);
$this->patternsToDieOn = explode(' ', $list);
$this->excessiveURLCount = getOption('Excessive_URL_count');
$die = 2;
// good comment until proven bad
foreach (array($author, $email, $website, $body) as $check) {
if ($check) {
if (($num = substr_count($check, 'http://')) >= $this->excessiveURLCount) {
// too many links
$die = $forgive;
} else {
if ($pattern = $this->hasSpamPattern($check)) {
$die = $forgive;
} else {
if ($spamWords = $this->hasSpamWords($check)) {
$die = $forgive;
}
}
}
}
}
return $die;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:49,代码来源:simple.php
示例2: connect
function connect()
{
if (!$this->options['hostname'] || !$this->options['username'] || !$this->options['password']) {
if (!defined('SUPPORT_URL')) {
define('SUPPORT_URL', getOption('supportURL'));
}
appUpdateMsg('<a href="' . SUPPORT_URL . 'solution/articles/195233-asking-for-ftp-sftp-details-during-update/" target="_blank">See how to add the FTP details</a>.');
return false;
}
if (isset($this->options['ssl']) && $this->options['ssl'] && function_exists('ftp_ssl_connect')) {
$this->link = @ftp_ssl_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT);
} else {
$this->link = @ftp_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT);
}
if (!$this->link) {
//$this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port']));
appUpdateMsg(sprintf('Failed to connect to the FTP server "%1$s:%2$s"', $this->options['hostname'], $this->options['port']));
return false;
}
if (!@ftp_login($this->link, $this->options['username'], $this->options['password'])) {
//$this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username']));
appUpdateMsg(sprintf('FTP username or password incorrect for "%s"', $this->options['username']));
return false;
}
//Set the Connection to use Passive FTP
if ($this->options['passive']) {
@ftp_pasv($this->link, true);
}
if (@ftp_get_option($this->link, FTP_TIMEOUT_SEC) < FS_TIMEOUT) {
@ftp_set_option($this->link, FTP_TIMEOUT_SEC, FS_TIMEOUT);
}
return true;
}
开发者ID:Trideon,项目名称:gigolo,代码行数:33,代码来源:fileSystemFTPExt.php
示例3: __construct
/**
* class instantiation function
*
*/
function __construct()
{
if (OFFSET_PATH == 2) {
$old = getOption('tinymce_comments');
setOptionDefault('email_new_comments', 1);
setOptionDefault('comment_name_required', 'required');
setOptionDefault('comment_email_required', 'required');
setOptionDefault('comment_web_required', 'show');
setOptionDefault('Use_Captcha', false);
setOptionDefault('comment_form_addresses', 0);
setOptionDefault('comment_form_require_addresses', 0);
setOptionDefault('comment_form_members_only', 0);
setOptionDefault('comment_form_albums', 1);
setOptionDefault('comment_form_images', 1);
setOptionDefault('comment_form_articles', 1);
setOptionDefault('comment_form_pages', 1);
setOptionDefault('comment_form_rss', 1);
setOptionDefault('comment_form_private', 1);
setOptionDefault('comment_form_anon', 1);
setOptionDefault('comment_form_showURL', 1);
setOptionDefault('comment_form_comments_per_page', 10);
setOptionDefault('comment_form_pagination', true);
setOptionDefault('comment_form_toggle', 1);
setOptionDefault('tinymce_comments', 'comment-ribbon.php');
setOptionDefault('tinymce_admin_comments', 'comment-ribbon.php');
}
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:comment_form.php
示例4: getSidebar
function getSidebar()
{
if (getOption('sidebar_active') == TRUE) {
include TEMPDIR . '/sidebar.php';
} else {
}
}
开发者ID:roxanne,项目名称:penguin-cms,代码行数:7,代码来源:functions.php
示例5: ThemeOptions
function ThemeOptions()
{
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_row', 2);
setThemeOptionDefault('images_per_row', 5);
setThemeOptionDefault('thumb_transition', 1);
setOptionDefault('zp_plugin_colorbox', 1);
setOptionDefault('colorbox_zenpage_album', 1);
setOptionDefault('colorbox_zenpage_image', 1);
setOptionDefault('colorbox_zenpage_search', 1);
if (getOption('zp_plugin_zenpage')) {
setThemeOption('custom_index_page', 'gallery', NULL, NULL, false);
} else {
setThemeOption('custom_index_page', '', NULL, NULL, false);
}
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');
}
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:25,代码来源:themeoptions.php
示例6: getOptionsSupported
function getOptionsSupported()
{
$MapTypes = array();
// order matters here because the first allowed map is selected if the 'gmaps_starting_map' is not allowed
if (getOption('gmaps_maptype_map')) {
$MapTypes[gettext('Map')] = 'G_NORMAL_MAP';
}
if (getOption('gmaps_maptype_hyb')) {
$MapTypes[gettext('Hybrid')] = 'G_HYBRID_MAP';
}
if (getOption('gmaps_maptype_sat')) {
$MapTypes[gettext('Satellite')] = 'G_SATELLITE_MAP';
}
if (getOption('gmaps_maptype_P')) {
$MapTypes[gettext('Terrain')] = 'G_PHYSICAL_MAP';
}
if (getOption('gmaps_maptype_3D')) {
$MapTypes[gettext('Google Earth')] = 'G_SATELLITE_3D_MAP';
}
$defaultmap = getOption('gmaps_starting_map');
if (array_search($defaultmap, $MapTypes) === false) {
// the starting map is not allowed, pick a new one
$temp = $MapTypes;
$defaultmap = array_shift($temp);
setOption('gmaps_starting_map', $defaultmap);
}
return array(gettext('Google Maps API key') => array('key' => 'gmaps_apikey', 'type' => 0, 'desc' => gettext('If you are going to be using Google Maps, <a href="http://www.google.com/apis/maps/signup.html" target="_blank">get an API key</a> and enter it here.')), gettext('All album points') => array('key' => 'gmaps_show_all_album_points', 'type' => 1, 'desc' => gettext('Controls which image points are shown on an album page. Check to show points for all images in the album. If not checked points are shown only for those images whose thumbs are on the page.')), gettext('Map dimensions—width') => array('key' => 'gmaps_width', 'type' => 0, 'desc' => gettext('The default width of the map.')), gettext('Map dimensions—height') => array('key' => 'gmaps_height', 'type' => 0, 'desc' => gettext('The default height of the map.')), gettext('Allowed maps') => array('key' => 'gmaps_allowed_maps', 'type' => 6, 'checkboxes' => array(gettext('Map') => 'gmaps_maptype_map', gettext('Satellite') => 'gmaps_maptype_sat', gettext('Hybrid') => 'gmaps_maptype_hyb', gettext('Terrain') => 'gmaps_maptype_P', gettext('Google Earth') => 'gmaps_maptype_3D'), 'desc' => gettext('Select the map types that are allowed.')), gettext('Map type selector') => array('key' => 'gmaps_control_maptype', 'type' => 4, 'buttons' => array(gettext('Buttons') => 1, gettext('List') => 2), 'desc' => gettext('Use buttons or list for the map type selector.')), gettext('Map controls') => array('key' => 'gmaps_control', 'type' => 4, 'buttons' => array(gettext('None') => 'None', gettext('Small') => 'Small', gettext('Large') => 'Large'), 'desc' => gettext('Select the kind of map controls.')), gettext('Map background') => array('key' => 'gmaps_background', 'type' => 0, 'desc' => gettext('Set the map background color to match the one of your theme. (Use the same <em>color</em> values as in your CSS background statements.)')), gettext('Initial map display selection') => array('key' => 'gmaps_starting_map', 'type' => 5, 'selections' => $MapTypes, 'desc' => gettext('Select the initial type of map to display. <br /><strong>Note:</strong> If <code>Google Earth</code> is selected the <em>toggle</em> function which initially hides the map is ignored. The browser <em>Google Earth Plugin</em> does not initialize properly when the map is hidden.')));
}
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:28,代码来源:google_maps.php
示例7: viewer_size_image_options
function viewer_size_image_options()
{
$default = getOption('image_size');
setOptionDefault('viewer_size_image_sizes', '$s=' . ($default - 200) . '; $s=' . ($default - 100) . '; $s=' . $default . '; $s=' . ($default + 100) . '; $s=' . ($default + 200) . ';');
setOptionDefault('viewer_size_image_default', '$s=' . $default);
setOptionDefault('viewer_size_image_radio', 2);
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:7,代码来源:viewer_size_image.php
示例8: 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
示例9: filterMessage
/**
* The function for processing a message to see if it might be SPAM
* returns:
* 0 if the message is SPAM
* 1 if the message might be SPAM (it will be marked for moderation)
* 2 if the message is not SPAM
*
* @param string $author Author field from the posting
* @param string $email Email field from the posting
* @param string $website Website field from the posting
* @param string $body The text of the comment
* @param string $imageLink A link to the album/image on which the post was made
* @param string $ip the IP address of the comment poster
*
* @return int
*/
function filterMessage($author, $email, $website, $body, $imageLink, $ip)
{
$commentData = array('author' => $author, 'email' => $email, 'website' => $website, 'body' => $body, 'permalink' => $imageLink);
$zp_galUrl = FULLWEBPATH;
// Sets the webpath for the Akismet server
$zp_akismetKey = getOption('Akismet_key');
$forgive = getOption('Forgiving');
$die = 2;
// good comment until proven bad
$akismet = new Akismet($zp_galUrl, $zp_akismetKey, $commentData);
if ($akismet->errorsExist()) {
// TODO: Add more improved error handling (maybe)
// echo "Couldn't connected to Akismet server!";
// print_r ($akismet->getErrors());
$die = 1;
// mark for moderation if we can't check for Spam
} else {
if ($akismet->isSpam()) {
// Message is spam according to Akismet
// echo 'Spam detected';
// echo "bad message.";
$die = $forgive;
} else {
// Message is not spam according to Akismet
// echo "spam filter is true. good message.";
}
}
return $die;
}
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:45,代码来源:akismet.php
示例10: getOptionsSupported
function getOptionsSupported()
{
$MapTypes = array();
// order matters here because the first allowed map is selected if the 'gmap_starting_map' is not allowed
if (getOption('gmap_map')) {
$MapTypes[gettext('Map')] = 'map';
}
if (getOption('gmap_hybrid')) {
$MapTypes[gettext('Hybrid')] = 'hybrid';
}
if (getOption('gmap_satellite')) {
$MapTypes[gettext('Satellite')] = 'satellite';
}
if (getOption('gmap_terrain')) {
$MapTypes[gettext('Terrain')] = 'terrain';
}
$defaultmap = getOption('gmap_starting_map');
if (array_search($defaultmap, $MapTypes) === false) {
// the starting map is not allowed, pick a new one
$temp = $MapTypes;
$defaultmap = array_shift($temp);
setOption('gmap_starting_map', $defaultmap);
}
return array(gettext('Map dimensions—width') => array('key' => 'gmap_width', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 6, 'desc' => gettext('The default width of the map.')), gettext('Map dimensions—height') => array('key' => 'gmap_height', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 6.5, 'desc' => gettext('The default height of the map.')), gettext('Initial Zoom') => array('key' => 'gmap_zoom', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 7, 'desc' => gettext('The initial zoom of the map.')), gettext('Allowed maps') => array('key' => 'gmap_allowed_maps', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'order' => 1, 'checkboxes' => array(gettext('Map') => 'gmap_map', gettext('Satellite') => 'gmap_satillite', gettext('Hybrid') => 'gmap_hybrid', gettext('Terrain') => 'gmap_terrain'), 'desc' => gettext('Select the map types that are allowed.')), gettext('Map control size') => array('key' => 'gmap_control_size', 'type' => OPTION_TYPE_RADIO, 'buttons' => array(gettext('Small') => 'small', gettext('Large') => 'large'), 'order' => 4, 'desc' => gettext('Use buttons or list for the map type selector.')), gettext('Map controls') => array('key' => 'gmap_control', 'type' => OPTION_TYPE_RADIO, 'buttons' => array(gettext('None') => 'none', gettext('Dropdown') => 'dropdown', gettext('Horizontal') => 'horizontal'), 'order' => 3, 'desc' => gettext('Select the kind of map controls.')), gettext('Initial map display selection') => array('key' => 'gmap_starting_map', 'type' => OPTION_TYPE_SELECTOR, 'selections' => $MapTypes, 'order' => 2, 'desc' => gettext('Select the initial type of map to display.')), gettext('Map display') => array('key' => 'gmap_display', 'type' => OPTION_TYPE_SELECTOR, 'selections' => array(gettext('show') => 'show', gettext('hide') => 'hide', gettext('colorbox') => 'colorbox'), 'order' => 2.5, 'desc' => gettext('Select <em>hide</em> to initially hide the map. Select <em>colorbox</em> for the map to display in a colorbox. Select <em>show</em> and the map will display when the page loads.')));
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:25,代码来源:GoogleMap.php
示例11: 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;
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:28,代码来源:themeoptions.php
示例12: __construct
public function __construct()
{
$this->defines = array_merge(config('katniss.extensions'), HomeThemeFacade::extensions());
$this->statics = config('katniss.static_extensions');
$this->activated = array_unique(array_merge((array) getOption('activated_extensions', []), $this->staticExtensions()));
$this->adminExcepts = config('katniss.admin_except_extensions');
}
开发者ID:linhntaim,项目名称:katniss,代码行数:7,代码来源:Extensions.php
示例13: auto_backup_timer_handler
/**
* Handles the periodic start of the backup/restore utility to backup the database
* @param string $discard
*/
function auto_backup_timer_handler($discard)
{
setOption('last_backup_run', time());
$curdir = getcwd();
$folder = SERVERPATH . "/" . BACKUPFOLDER;
if (!is_dir($folder)) {
mkdir($folder, CHMOD_VALUE);
}
chdir($folder);
$filelist = safe_glob('*' . '.zdb');
$list = array();
foreach ($filelist as $file) {
$list[$file] = filemtime($file);
}
chdir($curdir);
asort($list);
$list = array_flip($list);
$keep = getOption('backups_to_keep');
while (count($list) >= $keep) {
$file = array_shift($list);
unlink(SERVERPATH . "/" . BACKUPFOLDER . '/' . $file);
}
cron_starter(SERVERPATH . '/' . ZENFOLDER . '/' . UTILITIES_FOLDER . '/backup_restore.php', array('backup' => 1, 'compress' => sprintf('%u', getOption('backup_compression')), 'XSRFTag' => 'backup'));
return $discard;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:29,代码来源:auto_backup.php
示例14: ThemeOptions
function ThemeOptions()
{
// force core theme options for this theme
setThemeOption('albums_per_row', 3, null, 'libratus');
setThemeOption('images_per_row', 6, null, 'libratus');
setThemeOption('image_use_side', 'longest', null, 'libratus');
setThemeOptionDefault('image_size', 800, null, 'libratus');
setThemeOption('image_use_side', 'longest', null, 'libratus');
setThemeOption('thumb_size', 300, null, 'libratus');
// set core theme option defaults
setThemeOptionDefault('albums_per_page', 15);
setThemeOptionDefault('images_per_page', 30);
setThemeOptionDefault('thumb_crop', false);
// set libratus option defaults
setThemeOptionDefault('libratus_maxwidth', '1400');
setThemeOptionDefault('libratus_ss_type', 'random');
setThemeOptionDefault('libratus_ss_album', '');
setThemeOptionDefault('libratus_ss_interval', 5000);
setThemeOptionDefault('libratus_index_fullwidth', false);
setThemeOptionDefault('libratus_date_albums', true);
setThemeOptionDefault('libratus_date_images', true);
setThemeOptionDefault('libratus_date_news', true);
setThemeOptionDefault('libratus_date_pages', true);
setThemeOptionDefault('libratus_social', true);
setThemeOptionDefault('libratus_download', true);
setThemeOptionDefault('libratus_customcss', '');
setThemeOptionDefault('libratus_facebook', '');
setThemeOptionDefault('libratus_twitter', '');
setThemeOptionDefault('libratus_google', '');
setThemeOptionDefault('libratus_copy', '© ' . date("Y"));
setThemeOptionDefault('libratus_analytics', '');
setThemeOptionDefault('libratus_analytics_type', 'universal');
setThemeOptionDefault('libratus_stats_images_popular', true);
setThemeOptionDefault('libratus_stats_images_latestbyid', true);
setThemeOptionDefault('libratus_stats_images_mostrated', true);
setThemeOptionDefault('libratus_stats_images_toprated', true);
setThemeOptionDefault('libratus_stats_albums_popular', true);
setThemeOptionDefault('libratus_stats_albums_latestbyid', true);
setThemeOptionDefault('libratus_stats_albums_mostrated', true);
setThemeOptionDefault('libratus_stats_albums_toprated', true);
setThemeOptionDefault('libratus_stats_albums_latestupdated', true);
setThemeOptionDefault('libratus_stats_number', 30);
setThemeOptionDefault('libratus_bottom_stats_number', 5);
setThemeOptionDefault('libratus_bottom_stats_perrow', 3);
setThemeOptionDefault('libratus_stats_images_popular_bottom', true);
setThemeOptionDefault('libratus_stats_images_latestbyid_bottom', true);
setThemeOptionDefault('libratus_stats_images_toprated_bottom', true);
setThemeOptionDefault('libratus_related_maxnumber', 10);
if (class_exists('cacheManager')) {
$me = basename(dirname(__FILE__));
cacheManager::deleteThemeCacheSizes($me);
cacheManager::addThemeCacheSize($me, getThemeOption('image_size'), NULL, NULL, NULL, NULL, NULL, NULL, false, getOption('fullimage_watermark'), NULL, NULL);
// full image size
cacheManager::addThemeCacheSize($me, getThemeOption('thumb_size'), NULL, NULL, NULL, NULL, NULL, NULL, true, getOption('Image_watermark'), NULL, NULL);
// default thumb
cacheManager::addThemeCacheSize($me, NULL, getThemeOption('libratus_maxwidth'), 550, NULL, NULL, NULL, NULL, true, getOption('Image_watermark'), NULL, NULL);
//big header images
}
}
开发者ID:ckfreeman,项目名称:libratus,代码行数:59,代码来源:themeoptions.php
示例15: __construct
public function __construct()
{
if ($this::EXTENSION_EDITABLE) {
$this->data = (array) getOption($this->EXTENSION_OPTION(), []);
$this->params = [];
$this->__init();
}
}
开发者ID:linhntaim,项目名称:katniss,代码行数:8,代码来源:Extension.php
示例16: getOptionsSupported
/**
* Reports the supported options
*
* @return array
*/
function getOptionsSupported()
{
$checkboxes = array(gettext('Albums') => 'comment_form_albums', gettext('Images') => 'comment_form_images');
if (getOption('zp_plugin_zenpage')) {
$checkboxes = array_merge($checkboxes, array(gettext('Pages') => 'comment_form_pages', gettext('News') => 'comment_form_articles'));
}
return array(gettext('Address fields') => array('key' => 'comment_form_addresses', 'type' => OPTION_TYPE_RADIO, 'order' => 0, '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' => 5, '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' => 6, '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' => 1, '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' => 2, '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' => 3, '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' => 4, '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.')));
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:13,代码来源:comment_form.php
示例17: iconColor
function iconColor($icon)
{
global $themeColor;
if (getOption('css_style') == 'dark') {
$icon = stripSuffix($icon) . '-white.png';
}
return $icon;
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:8,代码来源:functions.php
示例18: head
static function head()
{
if (!zp_loggedin(TAGS_RIGHTS)) {
if (getOption('tagFromSearch_tagOnly')) {
setOption('search_fields', 'tags', false);
}
}
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:8,代码来源:tagFromSearch.php
示例19: handleOption
function handleOption($option, $currentValue)
{
$list = unserialize(getOption('filterIPAccess_IP_list'));
if (getOption('zp_plugin_filterIPAccess')) {
$disabled = '';
} else {
$disabled = ' disabled="disabled"';
}
$key = 0;
foreach ($list as $key => $range) {
?>
<input type="textbox" size="20" name="filterIPAccess_ip_start_<?php
echo $key;
?>
" value="<?php
echo html_encode($range['start']);
?>
"<?php
echo $disabled;
?>
/>
-
<input type="textbox" size="20" name="filterIPAccess_ip_end_<?php
echo $key;
?>
" value="<?php
echo html_encode($range['end']);
?>
"<?php
echo $disabled;
?>
/>
<br />
<?php
}
$i = $key;
while ($i < $key + 4) {
$i++;
?>
<input type="textbox" size="20" name="filterIPAccess_ip_start_<?php
echo $i;
?>
" value=""<?php
echo $disabled;
?>
/>
-
<input type="textbox" size="20" name="filterIPAccess_ip_end_<?php
echo $i;
?>
" value=""<?php
echo $disabled;
?>
/>
<br />
<?php
}
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:58,代码来源:filterIPAccess.php
示例20: googleVerifyHead
function googleVerifyHead()
{
?>
<meta name="google-site-verification" content="<?php
echo getOption('google-site-verification');
?>
" />
<?php
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:9,代码来源:googleVerify.php
注:本文中的getOption函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论