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


PHP setThemeOption函数代码示例

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


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

示例1: 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.
             setThemeOption('zenpage_homepage', 'none', NULL, 'zpEnlighten');
         } 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:ariep,项目名称:ZenPhoto20-DEV,代码行数:30,代码来源:themeoptions.php

示例2: __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');
     }
 }
开发者ID:bgenere,项目名称:negpos,代码行数:35,代码来源:themeoptions.php

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

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

示例5: __construct

 function __construct()
 {
     // force core theme options for this theme
     setThemeOption('albums_per_row', 2, null, 'zpfocus');
     setThemeOption('images_per_row', 3, null, 'zpfocus');
     setThemeOption('thumb_size', 160, null, 'zpfocus');
     setThemeOption('thumb_crop', 0, null, 'zpfocus');
     setThemeOption('image_size', 800, null, 'zpfocus');
     //for sized cb target option only
     setThemeOption('image_use_side', 'longest', null, 'zpfocus');
     setThemeOption('custom_index_page', '', null, 'zpfocus');
     // set core theme option defaults
     setThemeOptionDefault('albums_per_page', 6);
     setThemeOptionDefault('images_per_page', 9);
     setThemeOptionDefault('thumb_transition', 2);
     // set theme option defaults
     $str = '';
     setOptionDefault('zpfocus_tagline', getAllTranslations($str));
     gettext($str = 'A ZenPhoto / ZenPage Powered Theme');
     setThemeOptionDefault('zpfocus_allow_search', true);
     setThemeOptionDefault('zpfocus_show_archive', true);
     setThemeOptionDefault('zpfocus_use_colorbox', true);
     setThemeOptionDefault('zpfocus_use_colorbox_slideshow', true);
     setThemeOptionDefault('zpfocus_homepage', 'none');
     setThemeOptionDefault('zpfocus_spotlight', 'manual');
     setOptionDefault('zpfocus_spotlight_text', getAllTranslations($str));
     gettext($str = '<p>This is the <span class="spotlight-span">spotlight</span> area that can be set in the theme options.  You can either enter the text manually in the options or set it to display the latest news if ZenPage is being used. If you want nothing to appear here, set the spotlight to none.</p>');
     setThemeOptionDefault('zpfocus_show_credit', false);
     setThemeOptionDefault('zpfocus_menutype', 'dropdown');
     setThemeOptionDefault('zpfocus_logotype', true);
     setThemeOptionDefault('zpfocus_logofile', 'logo.jpg');
     setThemeOptionDefault('zpfocus_showrandom', 'rotator');
     setThemeOptionDefault('zpfocus_rotatoreffect', 'fade');
     setThemeOptionDefault('zpfocus_rotatorspeed', '3000');
     setThemeOptionDefault('zpfocus_cbtarget', true);
     setThemeOptionDefault('zpfocus_cbstyle', 'example3');
     setThemeOptionDefault('zpfocus_cbtransition', 'fade');
     setThemeOptionDefault('zpfocus_cbssspeed', '2500');
     setThemeOptionDefault('zpfocus_final_link', 'nolink');
     setThemeOptionDefault('zpfocus_news', true);
     // plugin options
     setOptionDefault('jcarousel_zpfocus_image', 1);
     if (class_exists('cacheManager')) {
         cacheManager::deleteThemeCacheSizes('zpfocus');
         cacheManager::addThemeCacheSize('zpfocus', null, 600, 900, null, null, null, null, false, getOption('fullimage_watermark'), false, true);
         cacheManager::addThemeCacheSize('zpfocus', null, 300, 300, 300, 300, null, null, true, getOption('fullimage_watermark'), false, false);
         if (getOption('zpfocus_use_colorbox') && getOption('zpfocus_cbtarget')) {
             cacheManager::addThemeCacheSize('zpfocus', 800, null, null, null, null, null, null, false, getOption('fullimage_watermark'), false, false);
         }
     }
 }
开发者ID:kokyandrei,项目名称:Unsupported,代码行数:51,代码来源:themeoptions.php

示例6: __construct

 function __construct()
 {
     $me = basename(dirname(__FILE__));
     setThemeOptionDefault('Theme_logo', '');
     setThemeOptionDefault('Allow_search', true);
     setThemeOptionDefault('Slideshow', true);
     setThemeOptionDefault('Graphic_logo', '*');
     setThemeOptionDefault('Watermark_head_image', true);
     setThemeOptionDefault('effervescence_personality', 'image_page');
     setThemeOptionDefault('effervescence_transition', 'slide-hori');
     setThemeOptionDefault('effervescence_caption_location', 'image');
     setThemeOptionDefault('Theme_colors', 'kish-my father');
     setThemeOptionDefault('effervescence_menu', '');
     setThemeOptionDefault('albums_per_page', 9);
     setThemeOptionDefault('albums_per_row', 3);
     setThemeOptionDefault('images_per_page', 20);
     setThemeOptionDefault('images_per_row', 5);
     setThemeOption('image_size', 595, NULL, 'effervescence+');
     setThemeOption('image_use_side', 'longest', NULL, 'effervescence+');
     setThemeOptionDefault('thumb_transition', 1);
     setThemeOptionDefault('thumb_size', 90);
     setThemeOptionDefault('thumb_crop_width', 90);
     setThemeOptionDefault('thumb_crop_height', 90);
     setThemeOptionDefault('thumb_crop', 1);
     setThemeOptionDefault('gallery_index', 1);
     setThemeOptionDefault('effervescence_daily_album_image', 1);
     setThemeOptionDefault('effervescence_daily_album_image_effect', '');
     setOptionDefault('colorbox_' . $me . '_album', 1);
     setOptionDefault('colorbox_' . $me . '_favorites', 1);
     setOptionDefault('colorbox_' . $me . '_image', 1);
     setOptionDefault('colorbox_' . $me . '_search', 1);
     if (class_exists('cacheManager')) {
         cacheManager::deleteThemeCacheSizes($me);
         cacheManager::addThemeCacheSize($me, 595, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL);
         cacheManager::addThemeCacheSize($me, getThemeOption('thumb_size'), NULL, NULL, getThemeOption('thumb_crop_width'), getThemeOption('thumb_crop_height'), NULL, NULL, true, NULL, NULL, NULL);
         cacheManager::addThemeCacheSize($me, NULL, 180, 80, NUll, NULL, 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' => 'html', 'title' => gettext('News Articles Rule'), 'link' => '<li class="menu_rule menu_menulabel"></li>', 'show' => 1, 'include_li' => 0, 'nesting' => 0), array('type' => 'custompage', 'title' => gettext('Gallery'), 'link' => 'gallery', 'show' => 1, 'nesting' => 0), 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' => 'html', 'title' => gettext('Gallery Rule'), 'link' => '<li class="menu_rule menu_menulabel"></li>', 'show' => 1, 'include_li' => 0, 'nesting' => 0), 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, getOption("menu_manager_truncate_string")), array('type' => 'html', 'title' => gettext('Pages Rule'), 'link' => '<li class="menu_rule menu_menulabel"></li>', 'show' => 1, 'include_li' => 0, 'nesting' => 0), array('type' => 'menulabel', 'title' => gettext('Archive'), 'link' => '', 'show' => 1, 'nesting' => 0), array('type' => 'custompage', 'title' => gettext('Gallery and News'), 'link' => 'archive', 'show' => 1, 'nesting' => 1), array('type' => 'html', 'title' => gettext('Archive Rule'), 'link' => '<li class="menu_rule menu_menulabel"></li>', 'show' => 1, 'include_li' => 0, 'nesting' => 0));
         if (extensionEnabled('rss')) {
             $rssItems = array(array('type' => 'menulabel', 'title' => gettext('RSS'), 'link' => '', 'show' => 1, 'nesting' => 0), array('type' => 'customlink', 'title' => gettext('Gallery'), 'link' => WEBPATH . '/index.php?rss', 'show' => 1, 'nesting' => 1), array('type' => 'customlink', 'title' => gettext('News'), 'link' => getRSSLink('news'), 'show' => 1, 'nesting' => 1), array('type' => 'customlink', 'title' => gettext('News and Gallery'), 'link' => getRSSLink('news') . '&amp;withimages', 'show' => 1, 'nesting' => 1));
             $menuitems = array_merge($menuitems, $rssItems);
         }
         createMenuIfNotExists($menuitems, 'effervescence');
     }
 }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:46,代码来源:themeoptions.php

示例7: __construct

 function __construct()
 {
     $me = basename(dirname(__FILE__));
     setThemeOptionDefault('Allow_search', true);
     setThemeOptionDefault('Allow_cloud', true);
     setThemeOptionDefault('albums_per_page', 6);
     setThemeOptionDefault('albums_per_row', 2);
     setThemeOptionDefault('images_per_page', 20);
     setThemeOptionDefault('images_per_row', 5);
     setThemeOption('image_size', 520, NULL, 'garland');
     setThemeOption('image_use_side', 'longest', NULL, 'garland');
     setThemeOptionDefault('thumb_transition', 1);
     setThemeOption('thumb_size', 85, NULL, 'garland');
     setThemeOptionDefault('thumb_crop_width', 85);
     setThemeOptionDefault('thumb_crop_height', 85);
     setThemeOptionDefault('thumb_crop', 1);
     setThemeOptionDefault('garland_customHome', '');
     setThemeOptionDefault('garland_personality', 'image_page');
     setThemeOptionDefault('garland_transition', 'slide-hori');
     setThemeOptionDefault('garland_caption_location', 'image');
     setOptionDefault('colorbox_' . $me . '_image', 1);
     setOptionDefault('colorbox_' . $me . '_album', 1);
     setOptionDefault('colorbox_' . $me . '_search', 1);
     setThemeOptionDefault('garland_menu', '');
     if (extensionEnabled('zenpage')) {
         setThemeOption('custom_index_page', 'gallery', NULL, 'garland', false);
     } else {
         setThemeOption('custom_index_page', '', NULL, 'garland', false);
     }
     if (class_exists('cacheManager')) {
         $me = basename(dirname(__FILE__));
         cacheManager::deleteThemeCacheSizes($me);
         cacheManager::addThemeCacheSize($me, 520, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL);
         cacheManager::addThemeCacheSize($me, 85, 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,"inner_ul",false,"list",false,getOption("menu_manager_truncate_string"));', 'show' => 1, 'include_li' => 0, 'nesting' => 1), array('type' => 'html', 'title' => gettext('News Articles Rule'), 'link' => '<li class="menu_rule menu_menulabel"></li>', 'show' => 1, 'include_li' => 0, 'nesting' => 0), array('type' => 'custompage', 'title' => gettext('Gallery'), 'link' => 'gallery', 'show' => 1, 'nesting' => 0), array('type' => 'menufunction', 'title' => gettext('All Albums'), 'link' => 'printAlbumMenuList("list",NULL,"","menu-active","inner_ul","menu-active","",false,false,false,false,getOption("menu_manager_truncate_string"));', 'show' => 1, 'include_li' => 0, 'nesting' => 1), array('type' => 'html', 'title' => gettext('Gallery Rule'), 'link' => '<li class="menu_rule menu_menulabel"></li>', 'show' => 1, 'include_li' => 0, 'nesting' => 0), array('type' => 'menulabel', 'title' => gettext('Pages'), 'link' => '', 'show' => 1, 'nesting' => 0), array('type' => 'menufunction', 'title' => gettext('All pages'), 'link' => 'printPageMenu("list","","menu-active","inner_ul","menu-active","",0,false,getOption("menu_manager_truncate_string"));', 'show' => 1, 'include_li' => 0, 'nesting' => 1, getOption("menu_manager_truncate_string")), array('type' => 'html', 'title' => gettext('Pages Rule'), 'link' => '<li class="menu_rule menu_menulabel"></li>', 'show' => 1, 'include_li' => 0, 'nesting' => 0));
         createMenuIfNotExists($menuitems, 'garland');
     }
 }
开发者ID:rb26,项目名称:zenphoto,代码行数:40,代码来源:themeoptions.php

示例8: ThemeOptions

 function ThemeOptions()
 {
     // force core theme options for this theme
     setThemeOption('albums_per_row', 3, null, 'zpskeleton');
     setThemeOption('images_per_row', 8, null, 'zpskeleton');
     setThemeOption('thumb_size', 220, null, 'zpskeleton');
     setThemeOption('image_size', 630, null, 'zpskeleton');
     setThemeOption('image_use_side', 'longest', null, 'zpskeleton');
     setThemeOption('custom_index_page', 'none', null, 'zpskeleton');
     // set core theme option defaults
     setThemeOptionDefault('albums_per_page', 6);
     setThemeOptionDefault('images_per_page', 9);
     setThemeOptionDefault('thumb_transition', 2);
     setThemeOptionDefault('thumb_crop', 0);
     // set theme option defaults
     setThemeOptionDefault('zpskel_usenews', true);
     setThemeOptionDefault('zpskel_debuguser', false);
     setThemeOptionDefault('zpskel_disablewarning', false);
     setThemeOptionDefault('zpskel_pptarget', 'sized');
     setThemeOptionDefault('zpskel_strip', 'latest');
     setThemeOptionDefault('zpskel_thumbsize', 'large');
     setThemeOptionDefault('zpskel_download', true);
     setThemeOptionDefault('zpskel_archive', true);
     setThemeOptionDefault('zenpage_homepage', 'none');
     if (class_exists('cacheManager')) {
         cacheManager::deleteThemeCacheSizes('zpskeleton');
         cacheManager::addThemeCacheSize('zpskeleton', null, 420, 200, 420, 200, null, null, null, true, getOption('Image_watermark'), false, false);
         // album thumbs
         cacheManager::addThemeCacheSize('zpskeleton', 220, null, null, null, null, null, null, true, getOption('Image_watermark'), false, false);
         // image thumbs: uncropped large
         cacheManager::addThemeCacheSize('zpskeleton', 190, null, null, null, null, null, null, true, getOption('Image_watermark'), false, false);
         // image thumbs: uncropped small
         cacheManager::addThemeCacheSize('zpskeleton', null, 190, 190, 190, 190, null, null, true, getOption('Image_watermark'), false, false);
         // bottom image strip
         cacheManager::addThemeCacheSize('zpskeleton', 420, null, null, null, null, null, null, false, getOption('fullimage_watermark'), null, null);
         // mobile full
         cacheManager::addThemeCacheSize('zpskeleton', 630, null, null, null, null, null, null, false, getOption('fullimage_watermark'), null, null);
         // desktop full
     }
 }
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:40,代码来源:themeoptions.php

示例9: extensionEnabled

// Check some settings
$zenpage = extensionEnabled('zenpage');
if (getOption('zpbase_newsname') == '') {
    $newsname = gettext('News');
} else {
    $newsname = getOption('zpbase_newsname');
}
$image_page = 'popup';
$galleryactive = '';
$layoutbodyclass = '';
$sspage = false;
$objectclass = '';
$rss_option = null;
$rss_title = null;
// tinymce input not good for responsiveness...overkill anyway.
setThemeOption('tinymce4_comments', false, null, 'zpbase');
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;
开发者ID:BimbaLaszlo,项目名称:zpbase,代码行数:31,代码来源:functions.php

示例10: setOptionDefault

setOptionDefault('RSS_comments', 1);
setOptionDefault('RSS_articles', 1);
setOptionDefault('RSS_pages', 1);
setOptionDefault('RSS_article_comments', 1);
setOptionDefault('AlbumThumbSelect', 1);
setOptionDefault('site_email', "zenphoto@" . $_SERVER['SERVER_NAME']);
setOptionDefault('site_email_name', 'ZenPhoto20');
//effervescence_plus migration
if (file_exists(SERVERPATH . '/' . THEMEFOLDER . '/effervescence_plus')) {
    if ($_zp_gallery->getCurrentTheme() == 'effervescence_plus') {
        $_zp_gallery->setCurrentTheme('effervescence+');
        $_zp_gallery->save();
    }
    $options = query_full_array('SELECT LCASE(`name`) as name, `value` FROM ' . prefix('options') . ' WHERE `theme`="effervescence_plus"');
    foreach ($options as $option) {
        setThemeOption($option['name'], $option['value'], NULL, 'effervescence+', true);
    }
    zpFunctions::removeDir(SERVERPATH . '/' . THEMEFOLDER . '/effervescence_plus');
}
?>
<p>
	<?php 
$deprecate = false;
$themes = array_keys($_zp_gallery->getThemes());
natcasesort($themes);
echo gettext('Theme setup:') . '<br />';
foreach ($themes as $key => $theme) {
    if (protectedTheme($theme)) {
        unset($themes[$key]);
    } else {
        $deprecate = true;
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:setup-option-defaults.php

示例11: getRandomImagesAlbum

/**
 * Returns  a randomly selected image from the album or one of its subalbums
 * if the album has no images.
 * (May return NULL if no images found)
 *
 * @param mixed $rootAlbum optional album object/folder from which to get the image.
 * @param bool $daily set to true to change picture only once a day.
 *
 * @return object
 */
function getRandomImagesAlbum($rootAlbum = NULL, $daily = false)
{
    global $_zp_current_album, $_zp_gallery, $_zp_current_search;
    if (empty($rootAlbum)) {
        $album = $_zp_current_album;
    } else {
        if (is_object($rootAlbum)) {
            $album = $rootAlbum;
        } else {
            $album = newAlbum($rootAlbum);
        }
    }
    if ($daily && ($potd = getOption('picture_of_the_day:' . $album->name))) {
        $potd = getSerializedArray($potd);
        if (date('Y-m-d', $potd['day']) == date('Y-m-d')) {
            $rndalbum = newAlbum($potd['folder']);
            $image = newImage($rndalbum, $potd['filename']);
            if ($image->exists) {
                return $image;
            }
        }
    }
    $album->setSortType('random');
    $image = $album->getImage(0);
    if (!$image) {
        $album->setSortType('random', 'album');
        foreach ($album->getAlbums() as $subalbum) {
            if ($image = getRandomImagesAlbum($subalbum)) {
                break;
            }
        }
    }
    if ($image && $image->exists) {
        if ($daily) {
            $potd = array('day' => time(), 'folder' => $image->getAlbumName(), 'filename' => $image->getFileName());
            setThemeOption('picture_of_the_day:' . $album->name, serialize($potd), NULL, $_zp_gallery->getCurrentTheme());
        }
        return $image;
    }
    return NULL;
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:51,代码来源:template-functions.php

示例12: processCustomOptionSave

function processCustomOptionSave($returntab, $themename = NULL, $themealbum = NULL)
{
    foreach ($_POST as $postkey => $value) {
        if (preg_match('/^' . CUSTOM_OPTION_PREFIX . '/', $postkey)) {
            // custom option!
            $key = substr($postkey, strpos($postkey, '-') + 1);
            $switch = substr($postkey, strlen(CUSTOM_OPTION_PREFIX), -strlen($key) - 1);
            switch ($switch) {
                case 'text':
                    $value = process_language_string_save($key, 1);
                    break;
                case 'cleartext':
                    if (isset($_POST[$key])) {
                        $value = sanitize($_POST[$key], 0);
                    } else {
                        $value = '';
                    }
                    break;
                case 'chkbox':
                    $value = (int) isset($_POST[$key]);
                    break;
                default:
                    if (isset($_POST[$key])) {
                        $value = sanitize($_POST[$key], 1);
                    } else {
                        $value = '';
                    }
                    break;
            }
            if ($themename) {
                setThemeOption($key, $value, $themealbum, $themename);
            } else {
                setOption($key, $value);
            }
        } else {
            if (strpos($postkey, 'show-') === 0) {
                if ($value) {
                    $returntab .= '&' . $postkey;
                }
            }
        }
    }
    return $returntab;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:44,代码来源:admin-functions.php

示例13: foreach

 if ($prevRel < 1690) {
     // cleanup root album DB records
     $gallery->garbageCollect(true, true);
 }
 // 1.1.7 conversion to the theme option tables
 $albums = $gallery->getAlbums();
 foreach ($albums as $albumname) {
     $album = new Album($gallery, $albumname);
     $theme = $album->getAlbumTheme();
     if (!empty($theme)) {
         $tbl = prefix(getOptionTableName($album->name));
         $sql = "SELECT `name`,`value` FROM " . $tbl;
         $result = query_full_array($sql, true);
         if (is_array($result)) {
             foreach ($result as $row) {
                 setThemeOption($album, $row['name'], $row['value']);
             }
         }
         query('DROP TABLE ' . $tbl, true);
     }
 }
 // 1.2 force up-convert to tag tables
 $convert = false;
 $result = query_full_array("SHOW COLUMNS FROM " . prefix('images') . ' LIKE "%tags%"');
 if (is_array($result)) {
     foreach ($result as $row) {
         if ($row['Field'] == 'tags') {
             $convert = true;
             break;
         }
     }
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:31,代码来源:setup.php

示例14: ThemeOptions

 function ThemeOptions()
 {
     // force core theme options for this theme
     setThemeOption('albums_per_row', 3, null, 'zpbase');
     setThemeOption('images_per_row', 3, null, 'zpbase');
     setThemeOption('image_use_side', 'longest', null, 'zpbase');
     // set core theme option defaults
     setThemeOptionDefault('albums_per_page', 6);
     setThemeOptionDefault('images_per_page', 12);
     setThemeOptionDefault('thumb_crop', false);
     // set zpbase option defaults
     setThemeOptionDefault('zpbase_pnglogo', '');
     setThemeOptionDefault('zpbase_style', 'light');
     setThemeOptionDefault('zpbase_maxwidth', '960');
     setThemeOptionDefault('zpbase_verticalscale', true);
     setThemeOptionDefault('zpbase_align', 'center');
     setThemeOptionDefault('zpbase_date_albums', true);
     setThemeOptionDefault('zpbase_date_images', true);
     setThemeOptionDefault('zpbase_date_news', true);
     setThemeOptionDefault('zpbase_date_pages', true);
     setThemeOptionDefault('zpbase_social', true);
     setThemeOptionDefault('zpbase_download', true);
     setThemeOptionDefault('zpbase_selectmenu', 'chosen');
     setThemeOptionDefault('zpbase_indexlayout', 'index-grid');
     setThemeOptionDefault('zpbase_galleryishome', true);
     setThemeOptionDefault('zpbase_defaultalbum', 'album-grid');
     setThemeOptionDefault('zpbase_newsstyle', 'masonry-style');
     setThemeOptionDefault('zpbase_searchlayout', 'search-masonry');
     setThemeOptionDefault('zpbase_usenews', true);
     setThemeOptionDefault('zpbase_newsname', '');
     setThemeOptionDefault('zpbase_archive', true);
     setThemeOptionDefault('zpbase_iscrollbehavior', 'manual-first');
     setThemeOptionDefault('zpbase_galss', true);
     setThemeOptionDefault('zpbase_galclicknext', false);
     setThemeOptionDefault('zpbase_galcropop', 'landscape');
     setThemeOptionDefault('zpbase_galpan', false);
     setThemeOptionDefault('zpbase_galcaption', false);
     setThemeOptionDefault('zpbase_galhomeop', 'albums');
     setThemeOptionDefault('zpbase_galhomecount', 30);
     setThemeOptionDefault('zpbase_galautoplay', false);
     setThemeOptionDefault('zpbase_galinterval', '4000');
     setThemeOptionDefault('zpbase_galtrans', 'fadeslide');
     setThemeOptionDefault('zpbase_galtranspeed', '400');
     setThemeOptionDefault('zpbase_galhistory', true);
     setThemeOptionDefault('zpbase_galbigsize', 1200);
     setThemeOptionDefault('zpbase_googlefont1', '');
     setThemeOptionDefault('zpbase_googlefont2', '');
     setThemeOptionDefault('zpbase_fontsize', '12');
     setThemeOptionDefault('zpbase_customcss', '');
     setThemeOptionDefault('zpbase_bg', '');
     setThemeOptionDefault('zpbase_facebook', '');
     setThemeOptionDefault('zpbase_twitter', '');
     setThemeOptionDefault('zpbase_google', '');
     setThemeOptionDefault('zpbase_copy', '© ' . date("Y"));
     setThemeOptionDefault('zpbase_cbtarget', true);
     setThemeOptionDefault('zpbase_nodetailpage', false);
     setThemeOptionDefault('zpbase_disqus', false);
     setThemeOptionDefault('zpbase_disqus_shortname', '');
     setThemeOptionDefault('zpbase_disqus_comment_form_albums', true);
     setThemeOptionDefault('zpbase_disqus_comment_form_images', true);
     setThemeOptionDefault('zpbase_disqus_comment_form_pages', false);
     setThemeOptionDefault('zpbase_disqus_comment_form_articles', true);
     setThemeOptionDefault('zpbase_magnific_grid', false);
     setThemeOptionDefault('zpbase_magnific_masonry', true);
     setThemeOptionDefault('zpbase_magnific_sds', true);
     setThemeOptionDefault('zpbase_magnific_target', 'image');
     setThemeOptionDefault('zpbase_mobiletogrid', true);
     setThemeOptionDefault('zpbase_sds_maxheight', 500);
     setThemeOptionDefault('zpbase_sds_pagination', 'paginate');
     setThemeOptionDefault('zpbase_analytics', '');
     setThemeOptionDefault('zpbase_analytics_type', 'universal');
     // set image sizes based on maxwidth
     setThemeOption('image_size', round(getOption('zpbase_maxwidth')), null, 'zpbase');
     setThemeOption('thumb_size', round(0.31 * getOption('zpbase_maxwidth')), null, 'zpbase');
     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, getThemeOption('zpbase_galbigsize'), NULL, NULL, NULL, NULL, NULL, NULL, false, getOption('fullimage_watermark'), NULL, NULL);
         //slideshow big image
         cacheManager::addThemeCacheSize($me, NULL, NULL, getOption('zpbase_sds_maxheight'), NULL, NULL, NULL, NULL, true, getOption('Image_watermark'), NULL, NULL);
         //sds layout image
     }
 }
开发者ID:BimbaLaszlo,项目名称:zpbase,代码行数:87,代码来源:themeoptions.php

示例15: getRandomImagesAlbum

/**
 * Returns  a randomly selected image from the album or its subalbums. (May be NULL if none exists)
 *
 * @param mixed $rootAlbum optional album object/folder from which to get the image.
 * @param bool $daily set to true to change picture only once a day.
 *
 * @return object
 */
function getRandomImagesAlbum($rootAlbum = NULL, $daily = false)
{
    global $_zp_current_album, $_zp_gallery, $_zp_current_search;
    if (empty($rootAlbum)) {
        $album = $_zp_current_album;
    } else {
        if (is_object($rootAlbum)) {
            $album = $rootAlbum;
        } else {
            $album = newAlbum($rootAlbum);
        }
    }
    if ($daily && ($potd = getOption('picture_of_the_day:' . $album->name))) {
        $potd = getSerializedArray($potd);
        if (date('Y-m-d', $potd['day']) == date('Y-m-d')) {
            $rndalbum = newAlbum($potd['folder']);
            $image = newImage($rndalbum, $potd['filename']);
            if ($image->exists) {
                return $image;
            }
        }
    }
    $image = NULL;
    if ($album->isDynamic()) {
        $images = $album->getImages(0);
        shuffle($images);
        while (count($images) > 0) {
            $result = array_pop($images);
            if (Gallery::validImage($result['filename'])) {
                $image = newImage(newAlbum($result['folder']), $result['filename']);
            }
        }
    } else {
        $albumfolder = $album->getFileName();
        if ($album->isMyItem(LIST_RIGHTS)) {
            $imageWhere = '';
            $albumInWhere = '';
        } else {
            $imageWhere = " AND " . prefix('images') . ".show=1";
            $albumInWhere = prefix('albums') . ".show=1";
        }
        $query = "SELECT id FROM " . prefix('albums') . " WHERE ";
        if ($albumInWhere) {
            $query .= $albumInWhere . ' AND ';
        }
        $query .= "folder LIKE " . db_quote(db_LIKE_escape($albumfolder) . '%');
        $result = query($query);
        if ($result) {
            $albumInWhere = prefix('albums') . ".id IN (";
            while ($row = db_fetch_assoc($result)) {
                $albumInWhere = $albumInWhere . $row['id'] . ", ";
            }
            db_free_result($result);
            $albumInWhere = ' AND ' . substr($albumInWhere, 0, -2) . ')';
            $sql = 'SELECT `folder`, `filename` ' . ' FROM ' . prefix('images') . ', ' . prefix('albums') . ' WHERE ' . prefix('albums') . '.folder!="" AND ' . prefix('images') . '.albumid = ' . prefix('albums') . '.id ' . $albumInWhere . $imageWhere . ' ORDER BY RAND()';
            $result = query($sql);
            $image = filterImageQuery($result, $album->name);
        }
    }
    if ($image) {
        if ($daily) {
            $potd = array('day' => time(), 'folder' => $image->getAlbumName(), 'filename' => $image->getFileName());
            setThemeOption('picture_of_the_day:' . $album->name, serialize($potd), NULL, $_zp_gallery->getCurrentTheme());
        }
    }
    return $image;
}
开发者ID:IliyanGochev,项目名称:zenphoto,代码行数:75,代码来源:template-functions.php


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