function __construct() { $me = basename(dirname(__FILE__)); setThemeOptionDefault('Allow_search', true); setThemeOptionDefault('Theme_colors', 'light'); setThemeOptionDefault('albums_per_page', 6); setThemeOptionDefault('albums_per_row', 2); setThemeOptionDefault('images_per_page', 20); setThemeOptionDefault('images_per_row', 5); setThemeOptionDefault('image_size', 595); setThemeOptionDefault('image_use_side', 'longest'); setThemeOptionDefault('thumb_size', 100); setThemeOptionDefault('thumb_crop_width', 100); setThemeOptionDefault('thumb_crop_height', 100); setThemeOptionDefault('thumb_crop', 1); setThemeOptionDefault('thumb_transition', 1); setOptionDefault('colorbox_' . $me . '_album', 1); setOptionDefault('colorbox_' . $me . '_image', 1); setOptionDefault('colorbox_' . $me . '_search', 1); if (class_exists('cacheManager')) { $me = basename(dirname(__FILE__)); cacheManager::deleteThemeCacheSizes($me); cacheManager::addThemeCacheSize($me, getThemeOption('image_size'), 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); } }
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'); } }
function ThemeOptions() { setThemeOptionDefault('Allow_search', true); setThemeOptionDefault('demoTheme_colors', 'none'); setThemeOptionDefault('albums_per_page', 6); setThemeOptionDefault('albums_per_row', 2); setThemeOptionDefault('images_per_page', 20); setThemeOptionDefault('images_per_row', 5); setThemeOptionDefault('image_size', 595); setThemeOptionDefault('image_use_side', 'longest'); setThemeOptionDefault('thumb_size', 100); setThemeOptionDefault('thumb_crop_width', 100); setThemeOptionDefault('thumb_crop_height', 100); setThemeOptionDefault('thumb_crop', 1); setThemeOptionDefault('thumb_transition', 1); /* You can of course also set other options if your theme requires this. This example enables the colorbox plugin if it is used for the theme pages noted. */ setOptionDefault('colorbox_default_album', 1); setOptionDefault('colorbox_default_image', 1); setOptionDefault('colorbox_default_search', 1); /* This is adds support for the cache manager so you can pre-cache your thumbs and other sized images as defined. Zenphoto generally does this on the fly when needed but on very slow servers or if you have really a lot of images that also are quite big it might be necessary to do this. */ if (class_exists('cacheManager')) { cacheManager::deleteThemeCacheSizes('default'); cacheManager::addThemeCacheSize('default', getThemeOption('image_size'), NULL, NULL, NULL, NULL, NULL, NULL, false, getOption('fullimage_watermark'), NULL, NULL); cacheManager::addThemeCacheSize('default', getThemeOption('thumb_size'), NULL, NULL, getThemeOption('thumb_crop_width'), getThemeOption('thumb_crop_height'), NULL, NULL, true, getOption('Image_watermark'), NULL, NULL); } }
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 } }
function __construct() { setThemeOptionDefault('albums_per_row', 3); setThemeOptionDefault('albums_per_page', 9); setThemeOptionDefault('images_per_row', 5); setThemeOptionDefault('images_per_page', 20); setThemeOptionDefault('thumb_size', 150); setThemeOptionDefault('thumb_crop', 1); setThemeOptionDefault('thumb_crop_width', 150); setThemeOptionDefault('thumb_crop_height', 150); setThemeOptionDefault('image_size', 700); setThemeOptionDefault('image_use_side', 'longest'); setThemeOptionDefault('use_image_logo_filename', 'banniere3.jpg'); setThemeOptionDefault('show_image_logo_on_image', false); setThemeOptionDefault('css_style', 'dark'); setThemeOptionDefault('links_style', 'default'); setThemeOptionDefault('zenpage_homepage', 'none'); setThemeOptionDefault('show_archive', false); setThemeOptionDefault('allow_search', true); setThemeOptionDefault('show_tag', true); setThemeOptionDefault('image_statistic', 'random'); setThemeOptionDefault('use_galleriffic', true); setThemeOptionDefault('galleriffic_delai', 3000); setThemeOptionDefault('use_colorbox_album', false); setThemeOptionDefault('use_colorbox_image', false); setThemeOptionDefault('show_exif', true); setOption('colorbox_zpArdoise_album', 1); setOption('colorbox_zpArdoise_archive', 1); setOption('colorbox_zpArdoise_contact', 1); setOption('colorbox_zpArdoise_favorites', 1); setOption('colorbox_zpArdoise_gallery', 1); setOption('colorbox_zpArdoise_image', 1); setOption('colorbox_zpArdoise_index', 1); setOption('colorbox_zpArdoise_news', 1); setOption('colorbox_zpArdoise_pages', 1); setOption('colorbox_zpArdoise_password', 1); setOption('colorbox_zpArdoise_register', 1); setOption('colorbox_zpArdoise_search', 1); if (class_exists('cacheManager')) { $me = basename(dirname(__FILE__)); cacheManager::deleteThemeCacheSizes($me); cacheManager::addThemeCacheSize($me, getThemeOption('thumb_size'), NULL, NULL, getThemeOption('thumb_crop_width'), getThemeOption('thumb_crop_height'), NULL, NULL, true); if (getOption('use_galleriffic')) { cacheManager::addThemeCacheSize($me, 85, NULL, NULL, 85, 85, NULL, NULL, true); cacheManager::addThemeCacheSize($me, 525, NULL, NULL, NULL, NULL, NULL, NULL, false); } cacheManager::addThemeCacheSize($me, getThemeOption('image_size'), NULL, NULL, NULL, NULL, NULL, NULL, false); } }
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') . '&withimages', 'show' => 1, 'nesting' => 1)); $menuitems = array_merge($menuitems, $rssItems); } createMenuIfNotExists($menuitems, 'effervescence'); } }
function css_head($ignore) { global $themecolors, $zenCSS, $themeColor, $_zp_themeroot; if (!$themeColor) { $themeColor = getThemeOption('Theme_colors'); } if ($editorConfig = getOption('tinymce4_comments')) { if (strpos($themeColor, 'dark') !== false) { setOption('tinymce4_comments', 'dark_' . $editorConfig, false); } } $zenCSS = $_zp_themeroot . '/styles/' . $themeColor . '.css'; $unzenCSS = str_replace(WEBPATH, '', $zenCSS); if (!file_exists(SERVERPATH . internalToFilesystem($unzenCSS))) { $zenCSS = $_zp_themeroot . "/styles/light.css"; } return $ignore; }
function EF_head($ignore) { global $themeColor; if (!$themeColor) { $themeColor = getThemeOption('Theme_colors'); } if (!file_exists(SERVERPATH . '/' . DATA_FOLDER . '/effervescence_plus/styles/' . $themeColor . '.css') || filemtime(SERVERPATH . '/' . DATA_FOLDER . '/effervescence_plus/styles/' . $themeColor . '.css') < filemtime(SERVERPATH . '/' . THEMEFOLDER . '/effervescence_plus/styles/' . $themeColor . '.txt')) { eval(file_get_contents(SERVERPATH . '/' . THEMEFOLDER . '/effervescence_plus/styles/' . $themeColor . '.txt')); $css = file_get_contents(SERVERPATH . '/' . THEMEFOLDER . '/effervescence_plus/base.css'); $css = strtr($css, $tr); $css = preg_replace('|\\.\\./images/|', WEBPATH . '/' . THEMEFOLDER . '/effervescence_plus/images/', $css); mkdir_recursive(SERVERPATH . '/' . DATA_FOLDER . '/effervescence_plus/styles/', FOLDER_MOD); file_put_contents(SERVERPATH . '/' . DATA_FOLDER . '/effervescence_plus/styles/' . $themeColor . '.css', $css); } ?> <link rel="stylesheet" href="<?php echo WEBPATH . '/' . DATA_FOLDER; ?> /effervescence_plus/styles/<?php echo $themeColor; ?> .css" type="text/css" /> <link rel="stylesheet" href="<?php echo WEBPATH . '/' . THEMEFOLDER; ?> /effervescence_plus/common.css" type="text/css" /> <script type="text/javascript"> // <!-- <![CDATA[ function blurAnchors() { if (document.getElementsByTagName) { var a = document.getElementsByTagName("a"); for (var i = 0; i < a.length; i++) { a[i].onfocus = function() { this.blur() }; } } } // ]]> --> </script> <?php return $ignore; }
function handleOption($option, $currentValue) { switch ($option) { case 'garland_menu': $menusets = array(); echo '<select id="garland_menuset" name="garland_menu"'; if (function_exists('printCustomMenu') && getThemeOption('custom_index_page', NULL, 'garland') === 'gallery') { $result = query_full_array("SELECT DISTINCT menuset FROM " . prefix('menu') . " ORDER BY menuset"); foreach ($result as $set) { $menusets[$set['menuset']] = $set['menuset']; } } else { echo ' disabled="disabled"'; } echo ">\n"; echo '<option value="" style="background-color:LightGray">' . gettext('*standard menu') . '</option>'; generateListFromArray(array($currentValue), $menusets, false, false); echo "</select>\n"; break; } }
function __construct() { setThemeOptionDefault('albums_per_row', 3); setThemeOptionDefault('albums_per_page', 9); setThemeOptionDefault('images_per_row', 4); setThemeOptionDefault('images_per_page', 16); setThemeOptionDefault('thumb_size', 220); setThemeOptionDefault('thumb_crop', 1); setThemeOptionDefault('thumb_crop_width', 220); setThemeOptionDefault('thumb_crop_height', 220); setThemeOptionDefault('image_size', 800, NULL); setThemeOptionDefault('image_use_side', 'longest'); setThemeOptionDefault('zpB_homepage', true); setThemeOptionDefault('allow_search', true); setThemeOptionDefault('zpB_show_archive', true); setThemeOptionDefault('zpB_show_tags', true); setThemeOptionDefault('zpB_social_links', true); setThemeOptionDefault('zpB_show_exif', true); // configure some zenphoto plugin options setOption('colorbox_zpBootstrap_album', 1); setOption('colorbox_zpBootstrap_favorites', 1); setOption('colorbox_zpBootstrap_image', 1); setOption('colorbox_zpBootstrap_search', 1); setOption('slideshow_zpBootstrap_album', 1); setOption('slideshow_zpBootstrap_image', 1); setOption('slideshow_zpBootstrap_favorites', 1); setOption('slideshow_zpBootstrap_search', 1); setOption('cycle_zpBootstrap_album', 1); setOption('cycle_zpBootstrap_image', 1); setOption('cycle_zpBootstrap_favorites', 1); setOption('cycle_zpBootstrap_search', 1); if (class_exists('cacheManager')) { $me = basename(dirname(__FILE__)); cacheManager::deleteThemeCacheSizes($me); cacheManager::addThemeCacheSize($me, getThemeOption('thumb_size'), NULL, NULL, getThemeOption('thumb_crop_width'), getThemeOption('thumb_crop_height'), NULL, NULL, true); cacheManager::addThemeCacheSize($me, getThemeOption('image_size'), NULL, NULL, NULL, NULL, NULL, NULL, false); } }
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 . '_favorites', 1); setOptionDefault('colorbox_' . $me . '_album', 1); setOptionDefault('colorbox_' . $me . '_search', 1); setThemeOptionDefault('garland_menu', ''); 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'); } }
/** * @deprecated * @since 1.4.4 */ function getTheme(&$zenCSS, &$themeColor, $defaultColor) { deprecated_functions::notify(gettext("If you need this function copy it to your theme’s functions.php script.")); global $_zp_themeroot; $themeColor = getThemeOption('Theme_colors'); $zenCSS = $_zp_themeroot . '/styles/' . $themeColor . '.css'; $unzenCSS = str_replace(WEBPATH, '', $zenCSS); if (!file_exists(SERVERPATH . internalToFilesystem($unzenCSS))) { $zenCSS = $_zp_themeroot . "/styles/" . $defaultColor . ".css"; return $themeColor == ''; } else { return true; } }
<div id="wrapnav"> <div id="navbar"> <span><?php if ($_zp_gallery->getWebsiteURL()) { printHomeLink('', ' | '); } echo gettext('Home'); ?> </span> </div> </div> <!-- wrapnav --> </div> <!-- header --> <!-- The Image --> <?php $randomImage = getRandomImages($imageofday = getThemeOption('effervescence_daily_album_image')); if ($randomImage) { makeImageCurrent($randomImage); $size = floor(getOption('image_size') * $imagereduction); $s = getDefaultWidth($size) + 22; $wide = " style=\"width:" . $s . "px;"; $s = getDefaultHeight($size) + 72; $high = " height:" . $s . "px;\""; } else { $wide = " style=\"width:332px;"; $high = " height:162px;\""; } if ($imageofday) { ?> <p align="center"> <?php
echo gettext("Theme head <title> tag"); ?> </td> <td> <label><input type="checkbox" name="theme_head_listparents" value="1"<?php if (getThemeOption('theme_head_listparents', $album, $themename)) { echo ' checked="checked"'; } ?> /><?php echo gettext('enabled'); ?> </label> <br /> <input type="text" name="theme_head_separator" size="2em" value="<?php echo getThemeOption('theme_head_separator', $album, $themename); ?> " /><?php echo "separator"; ?> </td> <td><?php echo gettext('Select if you want parent breadcrumbs and if so the separator for them.'); ?> </td> </tr> <?php } if (count($supportedOptions) > 0) {
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 } }
* Author URI: http://www.rcbdesigns.net * Tags: xenforo * File: content-frontpage.php * * Loads the specific loop for the front page of the site. */ if (getThemeOption("homepage_block") == 1) { get_template_part('content', 'page'); } else { the_post(); addScript("div.titleBar", "html", "<h1>" . get_the_title() . "</h1>"); } $tmp = $wp_query; $wp_query = null; $wp_query = new WP_Query(); $args = array('posts_per_page' => 4, 'cat' => getThemeOption("featured_cat"), 'paged' => $paged); $wp_query->query($args); while ($wp_query->have_posts()) { $wp_query->the_post(); ?> <fieldset> <ol class="nodeList sectionMain" id="forums"> <li class="node category level_1" id="main-category.1"> <div class="nodeInfo categoryNodeInfo categoryStrip"> <div class="categoryText"> <h3 class="nodeTitle"> <a href="<?php echo get_permalink(); ?> "><?php echo get_the_title();
/** * Finds the name of the themeColor option selected on the admin options tab * Returns a path and name of the theme css file. Returns the value passed for defaultcolor if the * theme css option file does not exist. * * @param string &$zenCSS path to the css file * @param string &$themeColor name of the css file * @param string $defaultColor name of the default css file * @return string * @since 1.1 */ function getTheme(&$zenCSS, &$themeColor, $defaultColor) { global $_zp_themeroot; $themeColor = getThemeOption('Theme_colors'); $zenCSS = $_zp_themeroot . '/styles/' . $themeColor . '.css'; $unzenCSS = str_replace(WEBPATH, '', $zenCSS); if (!file_exists(SERVERPATH . internalToFilesystem($unzenCSS))) { $zenCSS = $_zp_themeroot . "/styles/" . $defaultColor . ".css"; return $themeColor == ''; } else { return true; } }
function customOptions($optionHandler, $indent = "", $album = NULL, $showhide = false, $supportedOptions = NULL, $theme = false, $initial = 'none') { if (is_null($supportedOptions)) { $supportedOptions = $optionHandler->getOptionsSupported(); } if (count($supportedOptions) > 0) { $whom = get_class($optionHandler); $options = $supportedOptions; $option = array_shift($options); if (array_key_exists('order', $option)) { $options = sortMultiArray($supportedOptions, 'order'); $options = array_keys($options); } else { $options = array_keys($supportedOptions); natcasesort($options); } foreach ($options as $option) { $row = $supportedOptions[$option]; if (false !== ($i = stripos($option, chr(0)))) { $option = substr($option, 0, $i); } $type = $row['type']; $desc = $row['desc']; $key = $row['key']; $optionID = $whom . '_' . $key; if (isset($row['multilingual'])) { $multilingual = $row['multilingual']; } else { $multilingual = $type == OPTION_TYPE_TEXTAREA; } if (isset($row['texteditor']) && $row['texteditor']) { $editor = 'texteditor'; } else { $editor = ''; } if (isset($row['disabled']) && $row['disabled']) { $disabled = ' disabled="disabled"'; } else { $disabled = ''; } if ($theme) { $v = getThemeOption($key, $album, $theme); } else { $sql = "SELECT `value` FROM " . prefix('options') . " WHERE `name`=" . db_quote($key); $db = query_single_row($sql); if ($db) { $v = $db['value']; } else { $v = NULL; } } if ($showhide) { ?> <tr id="tr_<?php echo $optionID; ?> " class="<?php echo $showhide; ?> extrainfo" style="display:<?php echo $initial; ?> "> <?php } else { ?> <tr id="tr_<?php echo $optionID; ?> "> <?php } if ($type != OPTION_TYPE_NOTE) { ?> <td width="175"><?php if ($option) { echo $indent . $option; } ?> </td> <?php } switch ($type) { case OPTION_TYPE_NOTE: ?> <td colspan="3"><?php echo $desc; ?> </td> <?php break; case OPTION_TYPE_CLEARTEXT: $multilingual = false; case OPTION_TYPE_TEXTBOX: case OPTION_TYPE_TEXTAREA: if ($type == OPTION_TYPE_CLEARTEXT) { $clear = 'clear'; } else { $clear = ''; } ?> <td width="350"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . $clear . 'text-' . $key; ?> " value="0" /> <?php if ($multilingual) { print_language_string_list($v, $key, $type, NULL, $editor); } else { if ($type == OPTION_TYPE_TEXTAREA) { ?> <textarea id="<?php echo $key; ?> " name="<?php echo $key; ?> " cols="<?php echo TEXTAREA_COLUMNS; ?> " style="width: 320px" rows="6"<?php echo $disabled; ?> ><?php echo html_encode($v); ?> </textarea> <?php } else { ?> <input type="text" size="40" id="<?php echo $key; ?> " name="<?php echo $key; ?> " style="width: 338px" value="<?php echo html_encode($v); ?> "<?php echo $disabled; ?> /> <?php } } ?> </td> <?php break; case OPTION_TYPE_CHECKBOX: ?> <td width="350"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'chkbox-' . $key; ?> " value="0" /> <input type="checkbox" id="<?php echo $key; ?> " name="<?php echo $key; ?> " value="1" <?php echo checked('1', $v); echo $disabled; ?> /> </td> <?php break; case OPTION_TYPE_CUSTOM: ?> <td width="350"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'custom-' . $key; ?> " value="0" /> <?php $optionHandler->handleOption($key, $v); ?> </td> <?php break; case OPTION_TYPE_RADIO: $behind = isset($row['behind']) && $row['behind']; ?> <td width="350"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'radio-' . $key; ?> " value="0"<?php echo $disabled; ?> /> <?php generateRadiobuttonsFromArray($v, $row['buttons'], $key, $behind); ?> </td> <?php break; case OPTION_TYPE_SELECTOR: ?> <td width="350"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'selector-' . $key; ?> " value="0" /> <select id="<?php echo $key; ?> " name="<?php echo $key; ?> "<?php echo $disabled; ?> > <?php if (array_key_exists('null_selection', $row)) { ?> <option value=""<?php if (empty($v)) { echo ' selected="selected"'; } ?> ><?php echo $row['null_selection']; ?> </option> <?php } ?> <?php generateListFromArray(array($v), $row['selections'], false, true); ?> </select> </td> <?php break; case OPTION_TYPE_CHECKBOX_ARRAY: $behind = isset($row['behind']) && $row['behind']; ?> <td width="350"> <?php foreach ($row['checkboxes'] as $display => $checkbox) { if ($theme) { $v = getThemeOption($checkbox, $album, $theme); } else { $sql = "SELECT `value` FROM " . prefix('options') . " WHERE `name`=" . db_quote($checkbox); $db = query_single_row($sql); if ($db) { $v = $db['value']; } else { $v = 0; } } $display = str_replace(' ', ' ', $display); ?> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'chkbox-' . $checkbox; ?> " value="0" /> <label class="checkboxlabel"> <?php if ($behind) { echo $display; } ?> <input type="checkbox" id="<?php echo $checkbox; ?> " name="<?php echo $checkbox; ?> " value="1"<?php echo checked('1', $v); echo $disabled; ?> /> <?php if (!$behind) { echo $display; } ?> </label> <?php } ?> </td> <?php break; case OPTION_TYPE_CHECKBOX_UL: ?> <td width="350"> <?php $all = true; $cvarray = array(); foreach ($row['checkboxes'] as $display => $checkbox) { ?> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'chkbox-' . $checkbox; ?> " value="0" /> <?php if ($theme) { $v = getThemeOption($checkbox, $album, $theme); } else { $sql = "SELECT `value` FROM " . prefix('options') . " WHERE `name`=" . db_quote($checkbox); $db = query_single_row($sql); if ($db) { $v = $db['value']; } else { $v = 0; } } if ($v) { $cvarray[] = $checkbox; } else { $all = false; } } ?> <ul class="customchecklist"> <?php generateUnorderedListFromArray($cvarray, $row['checkboxes'], '', '', true, true); ?> </ul> <script type="text/javascript"> // <!-- <![CDATA[ function <?php echo $key; ?> _all() { var check = $('#all_<?php echo $key; ?> ').attr('checked'); <?php foreach ($row['checkboxes'] as $display => $checkbox) { ?> $('#<?php echo $checkbox; ?> ').attr('checked',check); <?php } ?> } // ]]> --> </script> <label> <input type="checkbox" name="all_<?php echo $key; ?> " id="all_<?php echo $key; ?> " onclick="<?php echo $key; ?> _all();" <?php if ($all) { echo ' checked="checked"'; } ?> /> <?php echo gettext('all'); ?> </label> </td> <?php break; case OPTION_TYPE_COLOR_PICKER: if (empty($v)) { $v = '#000000'; } ?> <td width="350" style="margin:0; padding:0"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'text-' . $key; ?> " value="0" /> <script type="text/javascript"> // <!-- <![CDATA[ $(document).ready(function() { $('#<?php echo $key; ?> _colorpicker').farbtastic('#<?php echo $key; ?> '); }); // ]]> --> </script> <table style="margin:0; padding:0" > <tr> <td><input type="text" id="<?php echo $key; ?> " name="<?php echo $key; ?> " value="<?php echo $v; ?> " style="height:100px; width:100px; float:right;" /></td> <td><div id="<?php echo $key; ?> _colorpicker"></div></td> </tr> </table> </td> <?php break; } if ($type != OPTION_TYPE_NOTE) { ?> <td><?php echo $desc; ?> </td> <?php } ?> </tr> <?php } } }
$fileDir = dirname(__FILE__) . "/{$XenDynamic_indexFile}"; // $fileDir = ABSPATH . getThemeOption("xenforo_path"); // $fileDir = dirname(__FILE__) . "/../../../.." . getThemeOption("xenforo_path"); if (!class_exists("XenForo_Autoloader")) { require $fileDir . '/library/XenForo/Autoloader.php'; XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library'); XenForo_Application::initialize($fileDir . '/library', $fileDir); XenForo_Application::set('page_start_time', $startTime); XenForo_Application::disablePhpErrorHandler(); error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE ^ E_WARNING); } ob_start(); $XenDynamic_fc = new RCBD_XenDynamic_FrontController(new XenForo_Dependencies_Public()); $xenforoOutput = $XenDynamic_fc->runXenDynamic(ob_get_clean()); global $templateParts; $templateParts = getTemplateParts($xenforoOutput, getThemeOption("xenforo_path")); } //****************************************************************************** // This function takes the raw buffer from Xenforo and breaks it into the header // and the rest of the file it also does some jquery replacements for elements // that need to be changed on all wordpress templates. // RCBD TODO: It's ugly and I'm going to try to find a better way to do it. //****************************************************************************** function getTemplateParts($buffer, $fileDir) { $uri = explode("/", $_SERVER['REQUEST_URI']); if (sizeof($uri) < 3) { $uri[1] = "home"; } $slug = str_replace("-", "", $uri[1]); $buffer = str_replace("</body>", '<script type="text/javascript">
function customOptions($optionHandler, $indent = "", $album = NULL, $showhide = false, $supportedOptions = NULL, $theme = false, $initial = 'none', $extension = NULL) { if (is_null($supportedOptions)) { $supportedOptions = $optionHandler->getOptionsSupported(); } if (count($supportedOptions) > 0) { $whom = get_class($optionHandler); $options = $supportedOptions; $option = array_shift($options); if (array_key_exists('order', $option)) { $options = sortMultiArray($supportedOptions, 'order', false, true, false, true); $options = array_keys($options); } else { $options = array_keys($supportedOptions); natcasesort($options); } if (method_exists($optionHandler, 'handleOptionSave')) { ?> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX; ?> save-<?php echo $whom; ?> " value="<?php echo $extension; ?> " /> <?php } foreach ($options as $option) { $descending = NULL; $row = $supportedOptions[$option]; if (false !== ($i = stripos($option, chr(0)))) { $option = substr($option, 0, $i); } $type = $row['type']; $desc = $row['desc']; $key = @$row['key']; $postkey = postIndexEncode($key); $optionID = $whom . '_' . $key; if (isset($row['multilingual'])) { $multilingual = $row['multilingual']; } else { $multilingual = $type == OPTION_TYPE_TEXTAREA; } if ($type == OPTION_TYPE_RICHTEXT || isset($row['texteditor']) && $row['texteditor']) { $editor = 'texteditor'; } else { $editor = ''; } if (isset($row['disabled']) && $row['disabled']) { $disabled = ' disabled="disabled"'; } else { $disabled = ''; } if (isset($row['deprecated']) && $option) { $deprecated = $row['deprecated']; if (!$deprecated) { $deprecatedd = gettext('Deprecated.'); } $option = '<div class="warningbox">' . $option . '<br /><em>' . $deprecated . '</em></div>'; } if ($theme) { $v = getThemeOption($key, $album, $theme); } else { $sql = "SELECT `value` FROM " . prefix('options') . " WHERE `name`=" . db_quote($key); $db = query_single_row($sql); if ($db) { $v = $db['value']; } else { $v = NULL; } } if ($showhide) { ?> <tr id="tr_<?php echo $optionID; ?> " class="<?php echo $showhide; ?> extrainfo" style="display:<?php echo $initial; ?> "> <?php } else { ?> <tr id="tr_<?php echo $optionID; ?> "> <?php } if ($type != OPTION_TYPE_NOTE) { ?> <td width="175"><?php if ($option) { echo $indent . $option; } ?> </td> <?php } switch ($type) { case OPTION_TYPE_NOTE: ?> <td colspan="3"><?php echo $desc; ?> </td> <?php break; case OPTION_TYPE_NUMBER: case OPTION_TYPE_CLEARTEXT: case OPTION_TYPE_PASSWORD: case OPTION_TYPE_TEXTBOX: case OPTION_TYPE_TEXTAREA: case OPTION_TYPE_RICHTEXT: $clear = ''; $wide = '338px'; switch ($type) { case OPTION_TYPE_CLEARTEXT: $clear = 'clear'; $multilingual = false; default: $inputtype = 'text'; break; case OPTION_TYPE_PASSWORD: $inputtype = 'password" autocomplete="off'; $multilingual = false; break; case OPTION_TYPE_NUMBER: $multilingual = false; $clear = 'numeric'; if (!is_numeric($v)) { $v = 0; } $wide = '100px'; if (isset($row['limits'])) { $inputtype = 'number'; if (isset($row['limits']['min'])) { $inputtype .= '" min="' . $row['limits']['min']; } if (isset($row['limits']['max'])) { $inputtype .= '" max="' . $row['limits']['max']; } if (isset($row['limits']['step'])) { $inputtype .= '" step="' . $row['limits']['step']; } else { $inputtype .= '" step="1'; } } else { $inputtype = 'number" min="0" step="1'; } break; } ?> <td width="350"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . $clear . 'text-' . $postkey; ?> " value="1" /> <?php if ($multilingual) { print_language_string_list($v, $postkey, $type, NULL, $editor); } else { if ($type == OPTION_TYPE_TEXTAREA || $type == OPTION_TYPE_RICHTEXT) { $v = get_language_string($v); // just in case.... ?> <textarea id="<?php echo $key; ?> "<?php if ($type == OPTION_TYPE_RICHTEXT) { echo ' class="texteditor"'; } ?> name="<?php echo $postkey; ?> " cols="<?php echo TEXTAREA_COLUMNS; ?> " style="width: 320px" rows="6"<?php echo $disabled; ?> ><?php echo html_encode($v); ?> </textarea> <?php } else { ?> <input type="<?php echo $inputtype; ?> " id="<?php echo $key; ?> " name="<?php echo $postkey; ?> " style="width: <?php echo $wide; ?> " value="<?php echo html_encode($v); ?> "<?php echo $disabled; ?> /> <?php } } ?> </td> <?php break; case OPTION_TYPE_CHECKBOX: ?> <td width="350"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'chkbox-' . $postkey; ?> " value="1" /> <input type="checkbox" id="<?php echo $key; ?> " name="<?php echo $postkey; ?> " value="1" <?php checked('1', $v); echo $disabled; ?> /> </td> <?php break; case OPTION_TYPE_CUSTOM: ?> <td width="350"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'custom-' . $postkey; ?> " value="0" /> <?php $optionHandler->handleOption($key, $v); ?> </td> <?php break; case OPTION_TYPE_RADIO: $behind = isset($row['behind']) && $row['behind']; ?> <td width="350"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'radio-' . $postkey; ?> " value="1"<?php echo $disabled; ?> /> <?php generateRadiobuttonsFromArray($v, $row['buttons'], $postkey, $behind, 'checkboxlabel', $disabled); ?> </td> <?php break; case OPTION_TYPE_SELECTOR: $descending = false; case OPTION_TYPE_ORDERED_SELECTOR: ?> <td width="350"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'selector-' . $postkey; ?> " value="1" /> <select id="<?php echo $key; ?> " name="<?php echo $postkey; ?> "<?php echo $disabled; ?> > <?php if (array_key_exists('null_selection', $row)) { ?> <option value=""<?php if (empty($v)) { echo ' selected="selected"'; } ?> style="background-color:LightGray;"><?php echo $row['null_selection']; ?> </option> <?php } $list = array(); foreach ($row['selections'] as $rowkey => $rowvalue) { $list[$rowkey] = $rowvalue; } generateListFromArray(array($v), $list, $descending, true); ?> </select> </td> <?php break; case OPTION_TYPE_CHECKBOX_ARRAY: $behind = isset($row['behind']) && $row['behind']; ?> <td width="350"> <?php foreach ($row['checkboxes'] as $display => $checkbox) { if ($theme) { $v = getThemeOption($checkbox, $album, $theme); } else { $sql = "SELECT `value` FROM " . prefix('options') . " WHERE `name`=" . db_quote($checkbox); $db = query_single_row($sql); if ($db) { $v = $db['value']; } else { $v = 0; } } $display = str_replace(' ', ' ', $display); ?> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'chkbox-' . postIndexEncode($checkbox); ?> " value="1" /> <label class="checkboxlabel"> <?php if ($behind) { echo $display; } ?> <input type="checkbox" id="<?php echo $checkbox; ?> " name="<?php echo postIndexEncode($checkbox); ?> " value="1"<?php checked('1', $v); echo $disabled; ?> /> <?php if (!$behind) { echo $display; } ?> </label> <?php } ?> </td> <?php break; case OPTION_TYPE_CHECKBOX_UL: ?> <td width="350"> <?php $all = true; $cvarray = array(); foreach ($row['checkboxes'] as $display => $checkbox) { ?> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'chkbox-' . postIndexEncode($checkbox); ?> " value="1" /> <?php if ($theme) { $v = getThemeOption($checkbox, $album, $theme); } else { $sql = "SELECT `value` FROM " . prefix('options') . " WHERE `name`=" . db_quote($checkbox); $db = query_single_row($sql); if ($db) { $v = $db['value']; } else { $v = 0; } } if ($v) { $cvarray[] = $checkbox; } else { $all = false; } } ?> <ul class="customchecklist"> <?php generateUnorderedListFromArray($cvarray, $row['checkboxes'], '', '', true, true, 'all_' . $key); ?> </ul> <script type="text/javascript"> // <!-- <![CDATA[ function <?php echo $key; ?> _all() { var check = $('#all_<?php echo $key; ?> ').prop('checked'); $('.all_<?php echo $key; ?> ').prop('checked', check); } // ]]> --> </script> <label> <input type="checkbox" name="all_<?php echo $key; ?> " id="all_<?php echo $key; ?> " class="all_<?php echo $key; ?> " onclick="<?php echo $key; ?> _all();" <?php if ($all) { echo ' checked="checked"'; } ?> /> <?php echo gettext('all'); ?> </label> </td> <?php break; case OPTION_TYPE_COLOR_PICKER: if (empty($v)) { $v = '#000000'; } ?> <td width="350" style="margin:0; padding:0"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'text-' . $postkey; ?> " value="1" /> <script type="text/javascript"> // <!-- <![CDATA[ $(document).ready(function () { $('#<?php echo $key; ?> _colorpicker').farbtastic('#<?php echo $key; ?> '); }); // ]]> --> </script> <table style="margin:0; padding:0" > <tr> <td><input type="text" id="<?php echo $key; ?> " name="<?php echo $postkey; ?> " value="<?php echo $v; ?> " style="height:100px; width:100px; float:right;" /></td> <td><div id="<?php echo $key; ?> _colorpicker"></div></td> </tr> </table> </td> <?php break; case OPTION_TYPE_SLIDER: $min = $row['min']; $max = $row['max']; ?> <td width="350" style="margin:0; padding:0"> <input type="hidden" name="<?php echo CUSTOM_OPTION_PREFIX . 'slider-' . $postkey; ?> " value="1" /> <?php putSlider('', $postkey, $min, $max, $v); ?> </td> <?php break; } if ($type != OPTION_TYPE_NOTE) { ?> <td><?php echo $desc; ?> </td> <?php } ?> </tr> <?php } } }
$list[] = str_replace('.php', '', FilesystemToUTF8($file)); } $list = array_diff($list, array('themeoptions', 'theme_description', '404', 'slideshow', 'search', 'image', 'index', 'album', 'customfunctions', 'news', 'pages')); generateListFromArray(array(getThemeOption($album, 'user_registration_page')), $list, false, false); chdir($curdir); ?> </select> <br /> <?php echo gettext('Link text') . ' '; print_language_string_list(getThemeOption($album, 'user_registration_text'), 'user_registration_text'); ?> <br /> <?php echo gettext('Hint text') . ' '; print_language_string_list(getThemeOption($album, 'user_registration_tip'), 'user_registration_tip'); ?> </td> <td><?php echo gettext("If this option is not empty, the visitor login form will include a link to this page. The link text will be labeled with the text provided."); ?> </td> </tr> <?php } if (!(false === ($requirePath = getPlugin('themeoptions.php', $themename)))) { require_once $requirePath; $optionHandler = new ThemeOptions(); $supportedOptions = $optionHandler->getOptionsSupported(); if (count($supportedOptions) > 0) { ?>
<?php // force UTF-8 Ø if (getOption('Allow_search')) { printSearchForm(NULL, 'search', $_zp_themeroot . '/images/search.png'); ?> <br class="clearall" /> <?php } if (function_exists('printCustomMenu') && getThemeOption('custom_index_page', NULL, 'garland') === 'gallery' && ($menu = getThemeOption('garland_menu'))) { ?> <!-- custom menu --> <div class="menu"> <?php printCustomMenu($menu, 'list', '', "menu-active", "submenu", "menu-active", 2); ?> </div> <?php } else { // "standard zenpage sidebar menus ?> <!-- standard menu --> <?php if (extensionEnabled('zenpage') && ZP_NEWS_ENABLED) { if (getNumNews(true)) { ?> <div class="menu"> <h3><?php echo gettext("News articles"); ?> </h3> <?php
<option value="" style="background-color:LightGray"><?php echo gettext('none'); ?> </option> <?php $curdir = getcwd(); $root = SERVERPATH . '/' . THEMEFOLDER . '/' . $themename . '/'; chdir($root); $filelist = safe_glob('*.php'); $list = array(); foreach ($filelist as $file) { $file = filesystemToInternal($file); $list[$file] = str_replace('.php', '', $file); } $list = array_diff($list, standardScripts()); generateListFromArray(array(getThemeOption('custom_index_page', $album, $themename)), $list, false, true); chdir($curdir); ?> </select> </td> <td><?php echo gettext("If this option is not empty, the Gallery Index URL that would normally link to the theme <code>index.php</code> script will instead link to this script. This frees up the <code>index.php</code> script so that you can create a customized <em>Home page</em> script. This option applies only to the main theme for the <em>Gallery</em>."); ?> </td> </tr> <?php } if (count($supportedOptions) > 0) { ?> <tr class="alt1" > <td align="left">
function handleOption($option, $currentValue) { global $themecolors; switch ($option) { case 'Theme_colors': echo '<select id="EF_themeselect_colors" name="' . $option . '"' . ">\n"; generateListFromArray(array($currentValue), $themecolors, false, false); echo "</select>\n"; break; case 'effervescence_menu': $menusets = array(); echo '<select id="EF_menuset" name="effervescence_menu"'; if (function_exists('printCustomMenu') && getThemeOption('custom_index_page', NULL, 'effervescence_plus') === 'gallery') { $result = query_full_array("SELECT DISTINCT menuset FROM " . prefix('menu') . " ORDER BY menuset"); foreach ($result as $set) { $menusets[$set['menuset']] = $set['menuset']; } } else { echo ' disabled="disabled"'; } echo ">\n"; echo '<option value="" style="background-color:LightGray">' . gettext('*standard menu') . '</option>'; generateListFromArray(array($currentValue), $menusets, false, false); echo "</select>\n"; break; case 'Graphic_logo': ?> <select id="EF_themeselect_logo" name="Graphic_logo"> <option value="" style="background-color:LightGray"><?php echo gettext('*no logo selected'); ?> </option>'; <option value="*"<?php if ($currentValue == '*') { echo ' selected="selected"'; } ?> ><?php echo gettext('Effervescence'); ?> </option>'; <?php generateListFromFiles($currentValue, SERVERPATH . '/' . UPLOAD_FOLDER . '/images', '.png'); ?> </select> <?php break; } }
</div> <!-- gallerytitle --> <!-- Crumb Trail Navigation --> <div id="wrapnav"> <div id="navbar"> <span><?php printHomeLink('', ' | '); printGalleryIndexURL(' | '); ?> </span> </div> </div> <!-- wrapnav --> </div> <!-- header --> <!-- Random Image --> <?php printHeadingImage(getRandomImages(getThemeOption('effervescence_daily_album_image'))); ?> <!-- Wrap Main Body --> <div id="content"> <div id="main"> <!-- Album List --> <ul id="albums"> <?php $firstAlbum = null; $lastAlbum = null; while (next_album()) { if (is_null($firstAlbum)) { $lastAlbum = albumNumber(); $firstAlbum = $lastAlbum;
/** * Creates a zip file of the album * * @param object $album album folder * @param string $zipname name of zip file * @param bool fromcache if true, images will be the "sized" image in the cache file */ static function create($album, $zipname, $fromcache) { global $_zp_zip_list, $_zp_albums_visited_albumMenu, $_zp_gallery, $defaultSize; if (!$album->exists) { self::pageError(404, gettext('Album not found')); } if (!$album->checkAccess()) { self::pageError(403, gettext("Forbidden")); } $_zp_albums_visited_albumMenu = $_zp_zip_list = array(); if ($fromcache) { $opt = array('large_file_size' => 5 * 1024 * 1024, 'comment' => sprintf(gettext('Created from cached images of %1$s on %2$s.'), $album->name, zpFormattedDate(DATE_FORMAT, time()))); $defaultSize = getThemeOption('image_size', NULL, $_zp_gallery->getCurrentTheme()); } else { $defaultSize = NULL; $opt = array('large_file_size' => 5 * 1024 * 1024, 'comment' => sprintf(gettext('Created from images in %1$s on %2$s.'), $album->name, zpFormattedDate(DATE_FORMAT, time()))); } self::AddAlbum($album, $fromcache); if (class_exists('ZipArchive')) { $zipfileFS = tempnam('', 'zip'); $zip = new ZipArchive(); $zip->open($zipfileFS, ZipArchive::CREATE); foreach ($_zp_zip_list as $path => $file) { @set_time_limit(6000); $zip->addFile($path, internalToFilesystem(trim($file, '/'))); } $zip->close(); ob_get_clean(); header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private", false); header("Content-Type: application/zip"); header("Content-Disposition: attachment; filename=" . basename($zipname . '.zip') . ";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: " . filesize($zipfileFS)); readfile($zipfileFS); // remove zip file from temp path unlink($zipfileFS); } else { require_once SERVERPATH . '/' . ZENFOLDER . '/lib-zipStream.php'; $zip = new ZipStream(internalToFilesystem($zipname) . '.zip', $opt); foreach ($_zp_zip_list as $path => $file) { @set_time_limit(6000); $zip->add_file_from_path(internalToFilesystem($file), $path); } $zip->finish(); } }