示例#1
0
 function getOptionsSupported()
 {
     $gallery = new Gallery();
     $opts = array();
     $exclude = array('404.php', 'themeoptions.php', 'theme_description.php');
     foreach (array_keys($gallery->getThemes()) as $theme) {
         $curdir = getcwd();
         $root = SERVERPATH . '/' . THEMEFOLDER . '/' . $theme . '/';
         chdir($root);
         $filelist = safe_glob('*.php');
         $list = array();
         foreach ($filelist as $file) {
             if (!in_array($file, $exclude)) {
                 $list[$script = stripSuffix(filesystemToInternal($file))] = 'colorbox_' . $theme . '_' . $script;
             }
         }
         chdir($curdir);
         $opts[$theme] = array('key' => 'colorbox_' . $theme . '_scripts', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'checkboxes' => $list, 'desc' => gettext('The scripts for which Colorbox is enabled. {Should have been set by the themes!}'));
     }
     return $opts;
 }
示例#2
0
        ?>
		<li><?php 
        printf(gettext('Zenphoto version <strong>%1$s [%2$s] (%3$s)</strong>'), ZENPHOTO_VERSION, ZENPHOTO_RELEASE, $official);
        ?>
</li>
		<li><?php 
        if (ZENPHOTO_LOCALE) {
            printf(gettext('Current locale setting: <strong>%1$s</strong>'), ZENPHOTO_LOCALE);
        } else {
            echo gettext('<strong>Locale setting has failed</strong>');
        }
        ?>
		</li>
		<li>
			<?php 
        $themes = $gallery->getThemes();
        $currenttheme = $gallery->getCurrentTheme();
        if (array_key_exists($currenttheme, $themes) && isset($themes[$currenttheme]['name'])) {
            $currenttheme = $themes[$currenttheme]['name'];
        }
        printf(gettext('Current gallery theme: <strong>%1$s</strong>'), $currenttheme);
        ?>
		</li>
		<li><?php 
        printf(gettext('PHP version: <strong>%1$s</strong>'), phpversion());
        ?>
</li>
		<?php 
        if (!defined('RELEASE')) {
            ?>
			<li>
if (file_exists(dirname(__FILE__) . '/js/editor_config.js.php') && file_exists(SERVERPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . "/tiny_mce/tiny_mce.js")) {
    setOptionDefault('tinyMCEPresent', 1);
} else {
    setOptionDefault('tinyMCEPresent', 0);
}
setOptionDefault('AlbumThumbSelectField', 'ID');
setOptionDefault('AlbumThumbSelectDirection', 'DESC');
gettext($str = 'most recent');
setOptionDefault('AlbumThumbSelectorText', getAllTranslations($str));
setOptionDefault('site_email', "zenphoto@" . $_SERVER['SERVER_NAME']);
if (isset($_POST['themelist'])) {
    $list = sanitize($_POST['themelist']);
    setOption('Zenphoto_theme_list', $list);
    $gallery = new Gallery();
    $themes = unserialize($list);
    $foreignthemes = array_diff(array_keys($gallery->getThemes()), $themes);
    ?>
	<script type="text/javascript">
		// <!-- <![CDATA[
		<?php 
    foreach (array_keys($gallery->getThemes()) as $theme) {
        $requirePath = getPlugin('themeoptions.php', $theme);
        if (!empty($requirePath)) {
            ?>
				$.ajax({
					type: 'POST',
					url: '<?php 
            echo WEBPATH . '/' . ZENFOLDER;
            ?>
/setup/setup_themeOptions.php',
					data: 'theme=<?php 
示例#4
0
    $current_theme = $themename;
} else {
    $current_theme = $galleryTheme;
    foreach ($themelist as $albumtitle => $alb) {
        break;
    }
    if (empty($alb)) {
        $themename = $_zp_gallery->getCurrentTheme();
    } else {
        $alb = sanitize_path($alb);
        $album = newAlbum($alb);
        $albumtitle = $album->getTitle();
        $themename = $album->getAlbumTheme();
    }
}
$themes = $_zp_gallery->getThemes();
if (empty($themename)) {
    $current_theme = $galleryTheme;
    $theme = $themes[$galleryTheme];
    $themenamedisplay = '</em><small>' . gettext("no theme assigned, defaulting to Gallery theme") . '</small><em>';
    $gallerydefault = true;
} else {
    $theme = $themes[$themename];
    $themenamedisplay = $theme['name'];
    $gallerydefault = false;
}
if (count($themelist) > 1) {
    echo '<form action="#" method="post">';
    echo gettext("Show theme for: ");
    echo '<select id="themealbum" name="themealbum" onchange="this.form.submit()">';
    generateListFromArray(array(pathurlencode($alb)), $themelist, false, true);