當前位置: 首頁>>代碼示例>>PHP>>正文


PHP setOption函數代碼示例

本文整理匯總了PHP中setOption函數的典型用法代碼示例。如果您正苦於以下問題:PHP setOption函數的具體用法?PHP setOption怎麽用?PHP setOption使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了setOption函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: switcher_head

function switcher_head($ignore)
{
    global $personalities, $themecolors, $themeColor;
    $themeColor = getOption('themeSwitcher_default_color');
    if (isset($_GET['themeColor'])) {
        $new = $_GET['themeColor'];
        if (in_array($new, $themecolors)) {
            setOption('themeSwitcher_default_color', $new);
            $themeColor = $new;
        }
    }
    ?>
	<script type="text/javascript">
		// <!-- <![CDATA[
		window.onload = function() {
			$('#themeSwitcher_zenpage').html('');
		}
		function switchColors() {
			personality = $('#themeColor').val();
			window.location = '?themeColor=' + personality;
		}
		// ]]> -->
	</script>
	<?php 
    return $ignore;
}
開發者ID:rb26,項目名稱:zenphoto,代碼行數:26,代碼來源:functions.php

示例2: 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

示例3: 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

示例4: 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;
 }
開發者ID:ariep,項目名稱:ZenPhoto20-DEV,代碼行數:33,代碼來源:tweet_news.php

示例5: 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_hybrid')) {
         $MapTypes[gettext('Hybrid')] = 'HYBRID';
     }
     if (getOption('gmap_map_roadmap')) {
         $MapTypes[gettext('Map')] = 'ROADMAP';
     }
     if (getOption('gmap_map_satellite')) {
         $MapTypes[gettext('Satellite')] = 'SATELLITE';
     }
     if (getOption('gmap_map_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('Allowed maps') => array('key' => 'gmap_allowed_maps', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'order' => 1, 'checkboxes' => array(gettext('Hybrid') => 'gmap_map_hybrid', gettext('Map') => 'gmap_map_roadmap', gettext('Satellite') => 'gmap_map_satellite', gettext('Terrain') => 'gmap_map_terrain'), 'desc' => gettext('Select the map types that are allowed.')), gettext('Initial map display selection') => array('key' => 'gmap_starting_map', 'type' => OPTION_TYPE_SELECTOR, 'order' => 2, 'selections' => $MapTypes, 'desc' => gettext('Select the initial type of map to display.')), gettext('Map display') => array('key' => 'gmap_display', 'type' => OPTION_TYPE_SELECTOR, 'order' => 3, 'selections' => array(gettext('show') => 'show', gettext('hide') => 'hide', gettext('colorbox') => 'colorbox'), '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.')), gettext('Map controls') => array('key' => 'gmap_control_type', 'type' => OPTION_TYPE_RADIO, 'order' => 4, 'buttons' => array(gettext('None') => 'none', gettext('Default') => 'DEFAULT', gettext('Dropdown') => 'DROPDOWN_MENU', gettext('Horizontal') => 'HORIZONTAL_BAR'), 'desc' => gettext('Display options for the Map type control.')), gettext('Zoom controls') => array('key' => 'gmap_zoom_size', 'type' => OPTION_TYPE_RADIO, 'order' => 5, 'buttons' => array(gettext('Small') => 'SMALL', gettext('Default') => 'DEFAULT', gettext('Large') => 'LARGE'), 'desc' => gettext('Display options for the Zoom control.')), gettext('Max zoom level') => array('key' => 'gmap_cluster_max_zoom', 'type' => OPTION_TYPE_NUMBER, 'order' => 6, 'desc' => gettext('The max zoom level for clustering pictures on map.')), gettext('Map dimensions—width') => array('key' => 'gmap_width', 'type' => OPTION_TYPE_NUMBER, 'order' => 7, 'desc' => gettext('The default width of the map.')), gettext('Map dimensions—height') => array('key' => 'gmap_height', 'type' => OPTION_TYPE_NUMBER, 'order' => 8, 'desc' => gettext('The default height of the map.')), gettext('Map sessions') => array('key' => 'gmap_sessions', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 9, 'desc' => gettext('If checked GoogleMaps will use sessions to pass map data for the <em>colorbox</em> display option. We recommend this option be selected. It protects against reference forgery security attacks and mitigates problems with data exceeding the allowed by some browsers.')));
 }
開發者ID:ariep,項目名稱:ZenPhoto20-DEV,代碼行數:25,代碼來源:googleMap.php

示例6: handleOption

 function handleOption($option, $currentValue)
 {
     if ($option == "zenpage_homepage") {
         $unpublishedpages = query_full_array("SELECT titlelink FROM " . prefix('pages') . " WHERE `show` != 1 ORDER by `sort_order`");
         if (empty($unpublishedpages)) {
             echo gettext("No unpublished pages available");
             // clear option if no unpublished pages are available or have been published meanwhile
             // so that the normal gallery index appears and no page is accidentally set if set to unpublished again.
             setOption("zenpage_homepage", "none", true);
         } else {
             echo '<input type="hidden" name="' . CUSTOM_OPTION_PREFIX . 'selector-zenpage_homepage" value="0" />' . "\n";
             echo '<select id="' . $option . '" name="zenpage_homepage">' . "\n";
             if ($currentValue === "none") {
                 $selected = " selected = 'selected'";
             } else {
                 $selected = "";
             }
             echo "<option{$selected}>" . gettext("none") . "</option>";
             foreach ($unpublishedpages as $page) {
                 if ($currentValue === $page["titlelink"]) {
                     $selected = " selected = 'selected'";
                 } else {
                     $selected = "";
                 }
                 echo "<option{$selected}>" . $page["titlelink"] . "</option>";
             }
             echo "</select>\n";
         }
     }
 }
開發者ID:Imagenomad,項目名稱:Unsupported,代碼行數:30,代碼來源:themeoptions.php

示例7: 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

示例8: getOptionsSupported

 function getOptionsSupported()
 {
     global $_zp_captcha;
     $mailinglist = explode(';', getOption("contactform_mailaddress"));
     array_walk($mailinglist, 'contactformOptions::trim_value');
     setOption('contactform_mailaddress', implode(';', $mailinglist));
     $list = array(gettext("required") => "required", gettext("show") => "show", gettext("omitted") => "omitted");
     $mailfieldinstruction = gettext("Set if the <code>%s</code> field should be required, just shown or omitted");
     $options = array(gettext('Intro text') => array('key' => 'contactform_introtext', 'type' => OPTION_TYPE_TEXTAREA, 'order' => 13, 'desc' => gettext("The intro text for your contact form")), gettext('Confirm text') => array('key' => 'contactform_confirmtext', 'type' => OPTION_TYPE_TEXTAREA, 'order' => 14, 'desc' => gettext("The text that asks the visitor to confirm that he really wants to send the message.")), gettext('Thanks text') => array('key' => 'contactform_thankstext', 'type' => OPTION_TYPE_TEXTAREA, 'order' => 15, 'desc' => gettext("The text that is shown after a message has been confirmed and sent.")), gettext('New message link text') => array('key' => 'contactform_newmessagelink', 'type' => OPTION_TYPE_TEXTAREA, 'order' => 16, 'desc' => gettext("The text for the link after the thanks text to return to the contact page to send another message.")), gettext('Require confirmation') => array('key' => 'contactform_confirm', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 0.1, 'desc' => gettext("If checked, a confirmation form will be presented before sending the contact message.")), gettext('Send copy') => array('key' => 'contactform_sendcopy', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 0.3, 'desc' => gettext("If checked, a copy of the message will be sent to the address provided. <p class='notebox'><strong>Caution: </strong> If you check this option it is strongly recommend to use Captcha and the confirmation option. Be aware that someone could misuse the e-mail address entered for spamming with this form and that in some countries’ jurisdictions(e.g. most European countries) you may be made responsible for this then!</p>")), gettext('Send copy note text') => array('key' => 'contactform_sendcopy_text', 'type' => OPTION_TYPE_TEXTAREA, 'order' => 0.2, 'desc' => gettext("The text for the note about sending a copy to the address provided in case that option is set.")), gettext('Contact recipients') => array('key' => 'contactform_mailaddress', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 17, 'desc' => gettext("The e-mail address the messages should be sent to. Enter one or more address separated by semicolons.")), gettext('Title') => array('key' => 'contactform_title', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 1, 'desc' => sprintf($mailfieldinstruction, gettext("Title"))), gettext('Name') => array('key' => 'contactform_name', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 2, 'desc' => sprintf($mailfieldinstruction, gettext("Name"))), gettext('Company') => array('key' => 'contactform_company', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 3, 'desc' => sprintf($mailfieldinstruction, gettext("Company"))), gettext('Street') => array('key' => 'contactform_street', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 4, 'desc' => sprintf($mailfieldinstruction, gettext("Street"))), gettext('City') => array('key' => 'contactform_city', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 5, 'desc' => sprintf($mailfieldinstruction, gettext("City"))), gettext('State') => array('key' => 'contactform_state', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 5.1, 'desc' => sprintf($mailfieldinstruction, gettext("State"))), gettext('Postal code') => array('key' => 'contactform_postal', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 5.2, 'desc' => sprintf($mailfieldinstruction, gettext("Postal code"))), gettext('Country') => array('key' => 'contactform_country', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 6, 'desc' => sprintf($mailfieldinstruction, gettext("Country"))), gettext('E-mail') => array('key' => 'contactform_email', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 7, 'desc' => sprintf($mailfieldinstruction, gettext("E-mail"))), gettext('Website') => array('key' => 'contactform_website', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 8, 'desc' => sprintf($mailfieldinstruction, gettext("Website"))), gettext('CAPTCHA') => array('key' => 'contactform_captcha', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 9, 'desc' => $_zp_captcha->name ? gettext('If checked, the form will include a Captcha verification.') : '<span class="notebox">' . gettext('No captcha handler is enabled.') . '</span>'), gettext('Phone') => array('key' => 'contactform_phone', 'type' => OPTION_TYPE_RADIO, 'buttons' => $list, 'order' => 10, 'desc' => sprintf($mailfieldinstruction, gettext("Phone number"))));
     return $options;
 }
開發者ID:rb26,項目名稱:zenphoto,代碼行數:11,代碼來源:contact_form.php

示例9: getOptionsSupported

 function getOptionsSupported()
 {
     global $_zp_RTL_css;
     if ($_zp_RTL_css) {
         setOption('tiny_mce_rtl_override', 1, false);
     }
     $configs_zenpage = gettinymceConfigFiles('zenpage');
     $configs_zenphoto = gettinymceConfigFiles('zenphoto');
     $options = array(gettext('Text editor configuration - zenphoto') => array('key' => 'tinymce_zenphoto', 'type' => OPTION_TYPE_SELECTOR, 'order' => 0, 'selections' => $configs_zenphoto, 'null_selection' => gettext('Disabled'), 'desc' => gettext('Applies to <em>admin</em> editable text other than for Zenpage pages and news articles.')), gettext('Text editor configuration - zenpage') => array('key' => 'tinymce_zenpage', 'type' => OPTION_TYPE_SELECTOR, 'order' => 1, 'selections' => $configs_zenpage, 'null_selection' => gettext('Disabled'), 'desc' => gettext('Applies to editing on the Zenpage <em>pages</em> and <em>news</em> tabs.')), gettext('Text editor text direction') => array('key' => 'tiny_mce_rtl_override', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 2, 'desc' => gettext('This option should be checked if your language writing direction is right-to-left')));
     return $options;
 }
開發者ID:ariep,項目名稱:ZenPhoto20-DEV,代碼行數:11,代碼來源:tinymce.php

示例10: getOptionsSupported

 /**
  * Standard option interface
  *
  * @return array
  */
 function getOptionsSupported()
 {
     global $_zp_imagick_present, $_zp_graphics_optionhandlers;
     if ($disabled = $this->canLoadMsg()) {
         setOption('use_imagick', 0, true);
     }
     $imagickOptions = array(gettext('Enable Imagick') => array('key' => 'use_imagick', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 0, 'disabled' => $disabled, 'desc' => $disabled ? '<p class="notebox">' . $disabled . '</p>' : gettext('Your PHP has support for Imagick. Check this option if you wish to use the Imagick graphics library.')));
     if (!$disabled) {
         $imagickOptions += array(gettext('Max height') => array('key' => 'magick_max_height', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1, 'desc' => sprintf(gettext('The maximum height used by the site for processed images. Set to %d for unconstrained. Default is <strong>%d</strong>'), self::$ignore_size, self::$ignore_size)), gettext('Max width') => array('key' => 'magick_max_width', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 2, 'desc' => sprintf(gettext('The maximum width used by the site for processed images. Set to %d for unconstrained. Default is <strong>%d</strong>.'), self::$ignore_size, self::$ignore_size)));
     }
     return $imagickOptions;
 }
開發者ID:rb26,項目名稱:zenphoto,代碼行數:17,代碼來源:lib-Imagick.php

示例11: getOptionsSupported

 /**
  * Standard option interface
  *
  * @return array
  */
 function getOptionsSupported()
 {
     global $_zp_imagick_present, $_zp_graphics_optionhandlers;
     if ($disabled = $this->canLoadMsg()) {
         setOption('use_imagick', 0, true);
     }
     $imagickOptions = array(gettext('Enable Imagick') => array('key' => 'use_imagick', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 0, 'disabled' => $disabled, 'desc' => $disabled ? '<p class="notebox">' . $disabled . '</p>' : gettext('Your PHP has support for Imagick. Check this option if you wish to use the Imagick graphics library.')));
     if (!$disabled) {
         $imagickOptions += array(gettext('Max height') => array('key' => 'magick_max_height', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 1, 'desc' => sprintf(gettext('The maximum height used by the site for processed images. Set to %d for unconstrained. Default is <strong>%d</strong>'), self::$ignore_size, self::$ignore_size)), gettext('Max width') => array('key' => 'magick_max_width', 'type' => OPTION_TYPE_TEXTBOX, 'order' => 2, 'desc' => sprintf(gettext('The maximum width used by the site for processed images. Set to %d for unconstrained. Default is <strong>%d</strong>.'), self::$ignore_size, self::$ignore_size)), gettext('Chroma sampling') => array('key' => 'magick_sampling_factor', 'type' => OPTION_TYPE_ORDERED_SELECTOR, 'null_selection' => '', 'selections' => array(gettext('no sampling') => '1x1 1x1 1x1', gettext('horizontally halved') => '4x1 2x1 2x1', gettext('vertically halved') => '1x4 1x2 1x2', gettext('horizontally and vertically halved') => '4x4 2x2 2x2'), 'order' => 3, 'desc' => gettext('Select a Chroma sampling pattern. Leave empty for the image default.')));
     }
     return $imagickOptions;
 }
開發者ID:ariep,項目名稱:ZenPhoto20-DEV,代碼行數:17,代碼來源:lib-Imagick.php

示例12: getOptionsSupported

 /**
  * Standard option interface
  *
  * @return array
  */
 function getOptionsSupported()
 {
     $listi = array();
     foreach (get_AnyFile_suffixes() as $suffix) {
         $listi[$suffix] = 'AnyFile_file_list_' . $suffix;
     }
     if ($suffix = getOption('AnyFile_file_new')) {
         setOption('AnyFile_file_new', '');
         $listi[$suffix] = 'AnyFile_file_list_' . $suffix;
         setOption('AnyFile_file_list_' . $suffix, 1);
     }
     return array(gettext('Watermark default images') => array('key' => 'AnyFile_watermark_default_images', 'type' => OPTION_TYPE_CHECKBOX, 'desc' => gettext('Check to place watermark image on default thumbnail images.')), gettext('Handled files') => array('key' => 'AnyFile_file_list', 'type' => OPTION_TYPE_CHECKBOX_UL, 'checkboxes' => $listi, 'desc' => gettext('File suffixes to be handled.')), gettext('Add file suffix') => array('key' => 'AnyFile_file_new', 'type' => OPTION_TYPE_TEXTBOX, 'desc' => gettext('Add a file suffix to be handled by the plugin')));
 }
開發者ID:hatone,項目名稱:zenphoto-1.4.1.4,代碼行數:18,代碼來源:class-AnyFile.php

示例13: __construct

 /**
  * class instantiation function
  *
  * @return zp_PHPMailer
  */
 function __construct()
 {
     setOptionDefault('PHPMailer_mail_protocol', 'sendmail');
     setOptionDefault('PHPMailer_server', '');
     setOptionDefault('PHPMailer_pop_port', '110');
     setOptionDefault('PHPMailer_smtp_port', '25');
     setOptionDefault('PHPMailer_user', '');
     setOptionDefault('PHPMailer_password', '');
     setOptionDefault('PHPMailer_secure', 0);
     if (getOption('PHPMailer_secure') == 1) {
         setOption('PHPMailer_secure', 'ssl');
     }
 }
開發者ID:rb26,項目名稱:zenphoto,代碼行數:18,代碼來源:PHPMailer.php

示例14: handleOptionSave

 function handleOptionSave($themename, $themealbum)
 {
     if (isset($_POST['AnyFile_file_list'])) {
         $mysetoptions = sanitize($_POST['AnyFile_file_list']);
     } else {
         $mysetoptions = array();
     }
     if ($new = getOption('AnyFile_file_new')) {
         $mysetoptions[] = $new;
     }
     purgeOption('AnyFile_file_new');
     setOption('AnyFileSuffixList', serialize($mysetoptions));
     return false;
 }
開發者ID:ariep,項目名稱:ZenPhoto20-DEV,代碼行數:14,代碼來源:class-AnyFile.php

示例15: archive_createSection

/**
 * Обработчик события "Создание раздела".
 *
 * @param string $section Полный строковой идентификатор раздела.
 * @param array $params Параметры события.
 */
function archive_createSection($section, $params)
{
    if ($params['module'] == 'archive') {
        $ids = A::$DB->getCol("\r\r\n    SELECT id FROM " . getDomain($section) . "_sections\r\r\n\tWHERE module='catalog' AND (lang='" . A::$LANG . "' OR lang='all')");
        setOption($section, 'sections', serialize($ids));
    } elseif ($params['module'] == 'catalog') {
        if ($archive = getSectionByModule('archive')) {
            $ids = getOption($archive, 'sections');
            $ids = !empty($ids) ? unserialize($ids) : array();
            $ids[] = $params['id'];
            setOption($archive, 'sections', serialize($ids));
        }
    }
}
開發者ID:procivam,項目名稱:s-mir-new,代碼行數:20,代碼來源:include.php


注:本文中的setOption函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。