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


PHP Gallery::getThemes方法代码示例

本文整理汇总了PHP中Gallery::getThemes方法的典型用法代码示例。如果您正苦于以下问题:PHP Gallery::getThemes方法的具体用法?PHP Gallery::getThemes怎么用?PHP Gallery::getThemes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gallery的用法示例。


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

示例1: getOptionsSupported

 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;
 }
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:21,代码来源:colorbox.php

示例2: printf

        ?>
		<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>
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:admin.php

示例3: setOptionDefault

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 
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:setup-option-defaults.php

示例4: foreach

    $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);
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:admin-themes.php


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