當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。