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


PHP getNumAlbums函数代码示例

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


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

示例1: setThemeColumns

/**
 * controls the thumbnail layout of themes.
 *
 * Uses the theme options:
 * 	albums_per_row
 * 	albums_per_page
 * 	images_per_row
 * 	images_per_page
 *
 * Computes a normalized images/albums per page and computes the number of
 * images that will fit on the "transitional" page between album thumbs and
 * image thumbs. This function is "internal" and is called from the root
 * index.php script before the theme script is loaded.
 */
function setThemeColumns()
{
    global $_zp_current_album, $_firstPageImages;
    $_firstPageImages = false;
    if (($albumColumns = getOption('albums_per_row')) <= 1) {
        $albumColumns = false;
    }
    if (($imageColumns = getOption('images_per_row')) <= 1) {
        $imageColumns = false;
    }
    $albcount = max(1, getOption('albums_per_page'));
    if ($albumColumns && $albcount % $albumColumns != 0) {
        setOption('albums_per_page', $albcount = (floor($albcount / $albumColumns) + 1) * $albumColumns, false);
    }
    $imgcount = max(1, getOption('images_per_page'));
    if ($imageColumns && $imgcount % $imageColumns != 0) {
        setOption('images_per_page', $imgcount = (floor($imgcount / $imageColumns) + 1) * $imageColumns, false);
    }
    if (getOption('thumb_transition') && in_context(ZP_ALBUM | ZP_SEARCH) && $albumColumns && $imageColumns) {
        $count = getNumAlbums();
        if ($count == 0) {
            $_firstPageImages = 0;
        }
        $rowssused = ceil($count % $albcount / $albumColumns);
        /* number of album rows unused */
        $leftover = floor(max(1, getOption('images_per_page')) / $imageColumns) - $rowssused;
        $_firstPageImages = max(0, $leftover * $imageColumns);
        /* number of images that fill the leftover rows */
        if ($_firstPageImages == $imgcount) {
            $_firstPageImages = 0;
        }
    }
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:47,代码来源:template-functions.php

示例2: jqm_printImageAlbumCount

/**
 * Prints the image/subalbum count for the album loop
 */
function jqm_printImageAlbumCount()
{
    $numalb = getNumAlbums();
    $numimg = getNumImages();
    if ($numalb != 0) {
        printf(ngettext("%d album", "%d albums", $numalb), $numalb);
    }
    if ($numalb != 0 && $numimg != 0) {
        echo ' / ';
    }
    if ($numimg != 0) {
        printf(ngettext("%d image", "%d images", $numimg), $numimg);
    }
}
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:17,代码来源:functions.php

示例3: getAlbumTitle

    ?>
"
					title="<?php 
    if (getAlbumDesc() == "") {
        echo getAlbumTitle();
    } else {
        echo getAlbumTitle() . ' - ' . getAlbumDesc();
    }
    ?>
"><img
					src="<?php 
    echo getCustomAlbumThumb(0, 100, 100);
    ?>
"
					alt="<?php 
    echo 'Album ' . ($count + ($currentPage - 1) * $albumsPerPage) . ' of ' . getNumAlbums();
    ?>
"
					width="100" height="100"<?php 
    if ($pc_AjaxFx) {
        echo '
				onLoad="new Effect.Fade(this, {from: 1 , to: .5, queue: \'parallel\', duration: .3});"
				onMouseOver="new Effect.Appear(this, {from: .5 , to: 1, queue: \'parallel\', duration: .3});"
				onMouseOut="new Effect.Fade(this, {from: 1 , to: .5, queue: \'parallel\', duration: .3});"
				';
    }
    ?>
 /></a>
			</div>
<?php 
    if (!($count % $pc_AlbumsPerRow) && $pc_RowBreak) {
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:index.php

示例4: printAlbumDate

						<ul class="taglist">
							<li class="meta-date"><?php 
        printAlbumDate("");
        ?>
</li>
							<li class="meta-contents">
								<?php 
        if (getNumAlbums() > 0 && getNumImages() > 0) {
            $divider = '- ';
        } else {
            $divider = '';
        }
        ?>
		<?php 
        if (getNumAlbums() > 0) {
            echo getNumAlbums() . ' ' . gettext("subalbums");
        }
        ?>
		<?php 
        echo $divider;
        ?>
		<?php 
        if (getNumImages() > 0) {
            echo getNumImages() . ' ' . gettext("images");
        }
        ?>
							</li>
						</ul>
					</div>
					<p class="albumdesc"><?php 
        echo strip_tags(truncate_string(getAlbumDesc(), 80, '...'));
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:search.php

示例5: while

				<div id="main"<?php 
if ($zpmin_switch) {
    echo ' class="switch"';
}
?>
>
					<div id="albums-wrap">
						<?php 
while (next_album()) {
    ?>
						<div class="album-maxspace">
							<a class="thumb-link" href="<?php 
    echo html_encode(getAlbumURL());
    ?>
" title="<?php 
    echo getNumAlbums() . ' ' . gettext('subalbums') . ' / ' . getNumImages() . ' ' . gettext('images') . ' - ' . strip_tags(shortenContent(getBareAlbumDesc(), 300, '...'));
    ?>
">
								<?php 
    if ($zpmin_thumb_crop) {
        printCustomAlbumThumbImage(getAnnotatedAlbumTitle(), null, $zpmin_album_thumb_size, $zpmin_album_thumb_size, $zpmin_album_thumb_size, $zpmin_album_thumb_size);
    } else {
        printCustomAlbumThumbImage(getAnnotatedAlbumTitle(), $zpmin_album_thumb_size);
    }
    ?>
								<span class="album-title"><?php 
    echo shortenContent(getBareAlbumTitle(), 25, '...');
    ?>
</span>
							</a>
						</div>
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:album.php

示例6: printAlbumDesc

	</div>
	<p class="description"><?php 
printAlbumDesc(true, '', gettext('Edit Description...'));
?>
</p>

	<?php 
if (isAlbumPage()) {
    ?>
	<div class="subalbum-wrap">
		<h4 class="blockhead"><span><?php 
    echo gettext('SubAlbums in ');
    echo getBareAlbumTitle();
    ?>
 (<?php 
    echo getNumAlbums();
    ?>
)</span></h4>
		<ul>
			<?php 
    $x = 1;
    while (next_album()) {
        if ($odd = $x % 2) {
            $css = 'goleft';
        } else {
            $css = 'goright';
        }
        ?>
			<li class="<?php 
        echo $css;
        ?>
开发者ID:kokyandrei,项目名称:Unsupported,代码行数:31,代码来源:album.php

示例7: gettext

			<div class="module">
				<h2><?php 
echo gettext("Gallery data");
?>
</h2>
				<table cellspacing="0" class="gallerydata">
						<tr>
							<th><a href="<?php 
echo $archivepageURL;
?>
"><?php 
echo gettext('Galleries');
?>
</a></th>
							<td><?php 
$albumNumber = getNumAlbums();
echo $albumNumber;
?>
</td>
							<td></td>
						</tr>
						<tr>
							<th><?php 
echo gettext('Photos');
?>
</th>
							<td><?php 
$photosArray = query_single_row("SELECT count(*) FROM " . prefix('images'));
$photosNumber = array_shift($photosArray);
echo $photosNumber;
?>
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:index.php

示例8: printFooter

function printFooter($admin = true)
{
    global $_zp_themeroot, $_zp_gallery, $_zp_gallery_page, $_zp_current_zenpage_news, $_zp_current_zenpage_page;
    $h = NULL;
    ?>
	<!-- Footer -->
	<div class="footlinks">
		<?php 
    $h = @call_user_func('getHitcounter');
    if (!is_null($h)) {
        ?>
			<p>
				<?php 
        printf(ngettext('%1$u hit on this %2$s', '%1$u hits on this %2$s', $h), $h, gettext('page'));
        ?>
			</p>
			<?php 
    }
    if ($_zp_gallery_page == 'gallery.php') {
        ?>
			<p>
				<small>
					<?php 
        $albumNumber = getNumAlbums();
        echo sprintf(ngettext("%u Album", "%u Albums", $albumNumber), $albumNumber);
        ?>
 &middot;
					<?php 
        $c = get_subalbum_count();
        echo sprintf(ngettext("%u Subalbum", "%u Subalbums", $c), $c);
        ?>
 &middot;
					<?php 
        $photosNumber = db_count('images');
        echo sprintf(ngettext("%u Image", "%u Images", $photosNumber), $photosNumber);
        ?>
					<?php 
        if (function_exists('printCommentForm')) {
            ?>
						&middot;
						<?php 
            $commentsNumber = db_count('comments', " WHERE inmoderation = 0");
            echo sprintf(ngettext("%u Comment", "%u Comments", $commentsNumber), $commentsNumber);
        }
        ?>
				</small>
			</p>
			<?php 
    }
    ?>

		<?php 
    printThemeInfo();
    ?>
		<?php 
    printZenphotoLink();
    ?>
		<br />
		<?php 
    if (function_exists('printFavoritesURL') && $_zp_gallery_page != 'password.php' && $_zp_gallery_page != 'favorites.php') {
        printFavoritesURL(NULL, '', ' | ', '<br />');
    }
    ?>
		<?php 
    if ($_zp_gallery_page == 'gallery.php') {
        if (class_exists('RSS')) {
            printRSSLink('Gallery', '', 'Gallery RSS', '');
        }
        echo '<br />';
    }
    ?>
		<?php 
    @call_user_func('printUserLogin_out', '', '<br />');
    ?>
		<?php 
    if ($_zp_gallery_page != 'contact.php' && extensionEnabled('contact_form') && ($_zp_gallery_page != 'password.php' || $_zp_gallery->isUnprotectedPage('contact'))) {
        printCustomPageURL(gettext('Contact us'), 'contact', '', '');
        echo '<br />';
    }
    ?>
		<?php 
    if ($_zp_gallery_page != 'register.php' && function_exists('printRegisterURL') && !zp_loggedin() && ($_zp_gallery_page != 'password.php' || $_zp_gallery->isUnprotectedPage('register'))) {
        printRegisterURL(gettext('Register for this site'), '');
        echo '<br />';
    }
    ?>
		<?php 
    @call_user_func('mobileTheme::controlLink');
    ?>
	<?php 
    @call_user_func('printLanguageSelector');
    ?>
		<br class="clearall" />
	</div>
	<!-- Administration Toolbox -->
	<?php 
}
开发者ID:rb26,项目名称:zenphoto,代码行数:97,代码来源:functions.php

示例9: html_encode

	<a href="<?php 
    echo html_encode(getAlbumLinkURL());
    ?>
"
		title="<?php 
    echo gettext('View album:') . ' ';
    echo getAnnotatedAlbumTitle();
    ?>
"
		class="img"><?php 
    printCustomAlbumThumbImage(getAnnotatedAlbumTitle(), null, ALBUM_THUMB_WIDTH, ALBUM_THUMB_HEIGHT, ALBUM_THUMB_WIDTH, ALBUM_THUMB_HEIGHT);
    ?>
</a>
		<p>
		<?php 
    $anumber = getNumAlbums();
    $inumber = getNumImages();
    if ($anumber > 0 || $inumber > 0) {
        echo '<p><em>(';
        if ($anumber == 0) {
            if ($inumber != 0) {
                printf(ngettext('%u image', '%u images', $inumber), $inumber);
            }
        } else {
            if ($anumber == 1) {
                if ($inumber > 0) {
                    printf(ngettext('1 album,&nbsp;%u image', '1 album,&nbsp;%u images', $inumber), $inumber);
                } else {
                    printf(gettext('1 album'));
                }
            } else {
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:gallery.php

示例10: printSlideShowLink

    printSlideShowLink(gettext('Slideshow'));
    ?>
			</div>
		</div>
	<?php 
}
?>

	<div class="pagination-nogal clearfix">
	<?php 
printPageListWithNav(' « ', ' » ', false, true, 'clearfix', NULL, true, 7);
?>
	</div>

	<?php 
if (getNumAlbums() > 0) {
    include 'inc_print_album_thumb.php';
}
if (getNumImages() > 0) {
    include 'inc_print_image_thumb.php';
}
?>

	<div class="pagination-nogal clearfix">
<?php 
printPageListWithNav(' « ', ' » ', false, true, 'clearfix', NULL, true, 7);
?>
	</div>

</div>
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:30,代码来源:search.php

示例11: printFooter

function printFooter($admin = true)
{
    global $_zp_themeroot, $_zp_gallery_page, $_zp_current_zenpage_news, $_zp_current_zenpage_page;
    $h = NULL;
    ?>
	<!-- Footer -->
	<div class="footlinks">
		<?php 
    $h = getHitcounter();
    if (!is_null($h)) {
        ?>
			<p>
			<?php 
        printf(ngettext('%1$u hit on this %2$s', '%1$u hits on this %2$s', $h), $h, gettext('page'));
        ?>
			</p>
			<?php 
    }
    if ($_zp_gallery_page == 'gallery') {
        ?>
			<p>
				<small>
					<?php 
        $albumNumber = getNumAlbums();
        echo sprintf(ngettext("%u Album", "%u Albums", $albumNumber), $albumNumber);
        ?>
 &middot;
						<?php 
        $c = get_subalbum_count();
        echo sprintf(ngettext("%u Subalbum", "%u Subalbums", $c), $c);
        ?>
 &middot;
						<?php 
        $photosArray = query_single_row("SELECT count(*) FROM " . prefix('images'));
        $photosNumber = array_shift($photosArray);
        echo sprintf(ngettext("%u Image", "%u Images", $photosNumber), $photosNumber);
        ?>
						<?php 
        if (function_exists('printCommentForm')) {
            ?>
							&middot;
							<?php 
            $commentsArray = query_single_row("SELECT count(*) FROM " . prefix('comments') . " WHERE inmoderation = 0");
            $commentsNumber = array_shift($commentsArray);
            echo sprintf(ngettext("%u Comment", "%u Comments", $commentsNumber), $commentsNumber);
            ?>
						<?php 
        }
        ?>
				</small>
			</p>
			<?php 
    }
    ?>
		<?php 
    printThemeInfo();
    ?>
		<?php 
    printZenphotoLink();
    ?>
		<?php 
    if ($_zp_gallery_page == 'gallery') {
        printRSSLink('Gallery', '<br />', 'Gallery RSS', '');
    }
    ?>
		<?php 
    if (function_exists('printUserLogin_out') && $_zp_gallery_page != 'password') {
        printUserLogin_out('<br />', '', true);
    }
    ?>
		<?php 
    if (getOption('zp_plugin_contactform') && ($_zp_gallery_page != 'password' || $_zp_gallery->isUnprotectedPage('contact'))) {
        printCustomPageURL(gettext('Contact us'), 'contact', '', '<br />');
    }
    ?>
		<?php 
    if (!zp_loggedin() && function_exists('printRegistrationForm') && ($_zp_gallery_page != 'password' || $_zp_gallery->isUnprotectedPage('unprotected_register'))) {
        printCustomPageURL(gettext('Register for this site'), 'register', '', '<br />');
    }
    ?>
		<?php 
    if (function_exists('printLanguageSelector')) {
        printLanguageSelector();
    }
    ?>
		<br clear="all" />
	</div>
	<!-- Administration Toolbox -->
	<?php 
    if ($admin) {
        printAdminToolbox();
    }
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:93,代码来源:functions.php

示例12: getNumAlbums

<?php

global $_zp_themeroot, $_zp_current_album, $_zp_gallery;
$isAlbumPage = true;
AlbumUtil::setAlbumPage($isAlbumPage);
ThemeUtil::$script .= "var images = [], initialImageThumbSelection = 0;\n";
$cls = 'album-page';
$albumCount = getNumAlbums(false, true);
?>

<div id="album-nav" class="left opa60">
	<div class="nav-cell filler"><span>&nbsp;</span></div>
	<?php 
$prevText = "<div id='image-nav-prev' class='image-nav-scroll opa60'><img src='{$_zp_themeroot}/resources/images/arrow_up.png' width='16' height='16'/></div>";
$nextText = "<div id='image-nav-next' class='image-nav-scroll opa60 {$cls}'><img src='{$_zp_themeroot}/resources/images/arrow_down.png' width='16' height='16'/></div>";
$prevNext = AlbumUtil::printNavigation($prevText, $nextText, false, 7, true);
?>
	<div class="nav-cell filler end"><span>&nbsp;</span></div>
</div>

<div style="padding-left: 1px;">
	<div id="album-menu" class="opa60">
		<div id="album-thumb">
			<img src="<?php 
echo getRandomImages()->getCustomImage(NULL, 192, 48, 192, 48, NULL, null, false);
?>
" width="195" height="48"/>
		</div>
	</div>
	<div id="album-count" class="opa60">
		<?php 
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:left.php

示例13: printf

                printf(gettext('Sorry, no matches for <em>%s</em>. Try refining your search.'), $searchwords);
            }
            ?>
			</p>
			</div>
			</div> <!-- main3 -->
		<?php 
        }
    }
    ?>

<!-- Page Numbers -->

		<div id="pagenumbers">
		<?php 
    if (getNumAlbums() != 0 || $_noFlash) {
        printPageListWithNav("&laquo; prev", "next &raquo;", !$_noFlash);
    }
    ?>
		</div> <!-- pagenumbers -->
</div> <!-- subcontent -->

<!-- Footer -->
<div class="footlinks">

<?php 
    if (getOption('Use_Simpleviewer') && !getOption('mod_rewrite')) {
        /* display missing css file error */
        echo '<div class="errorbox" id="message">';
        echo "<h2>" . gettext('Simpleviewer requires <em>mod_rewrite</em> to be set. Simpleviewer is disabled.') . "</h2>";
        echo '</div>';
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:31,代码来源:search.php

示例14: getNumSubalbums

/**
 * @deprecated
 */
function getNumSubalbums()
{
    deprecated_function_notify(gettext('Use getNumAlbums().'));
    return getNumAlbums();
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:8,代码来源:deprecated-functions.php

示例15: pageCount

 static function pageCount($count, $gallery_page, $page)
 {
     global $_firstPageImages, $_oneImagePage;
     if (stripSuffix($gallery_page) == 'favorites') {
         $albums_per_page = max(1, getOption('albums_per_page'));
         $pageCount = (int) ceil(getNumAlbums() / $albums_per_page);
         $imageCount = getNumImages();
         if ($_oneImagePage) {
             if ($_oneImagePage === true) {
                 $imageCount = min(1, $imageCount);
             } else {
                 $imageCount = 0;
             }
         }
         $images_per_page = max(1, getOption('images_per_page'));
         $count = $pageCount + (int) ceil(($imageCount - $_firstPageImages) / $images_per_page);
         if ($count < $page && isset($_POST['addToFavorites']) && !$_POST['addToFavorites']) {
             //We've deleted last item on page, need a place to land when we return
             global $_zp_page;
             header('location: ' . FULLWEBPATH . '/' . $this->getLink($_zp_page - 1));
             exitZP();
         }
     }
     return $count;
 }
开发者ID:rb26,项目名称:zenphoto,代码行数:25,代码来源:favoritesClass.php


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