Exemplo n.º 1
0
 static function printNewsNavigation($nexttext, $prevtext)
 {
     global $_zp_zenpage_total_pages;
     $total = ceil(getTotalArticles() / getOption("zenpage_articles_per_page"));
     $current = getCurrentNewsPage();
     if ($total > 1) {
         $j = max(1, min($current - 3, $total - 6));
         if ($j != 1) {
             echo '<div class="nav-cell">';
             echo "<span class='valign'>";
             echo "<a href=\"" . getNewsBaseURL() . getNewsCategoryPathNav() . getNewsArchivePathNav() . getNewsPagePath() . max($j - 4, 1) . "\">...</a>";
             echo "</span></div>\n";
         }
         for ($i = $j; $i <= min($total, $j + 6); $i++) {
             if ($i == $current) {
                 echo '<div class="nav-cell current">';
                 echo "<span class='valign'>";
                 echo $i;
                 echo "</span></div>\n";
             } else {
                 echo '<div class="nav-cell">';
                 echo "<span class='valign'>";
                 echo "<a href='" . getNewsBaseURL() . getNewsCategoryPathNav() . getNewsArchivePathNav() . getNewsPagePath() . $i . "' >" . $i . "</a>";
                 echo "</span></div>\n";
             }
         }
         if ($i <= $total) {
             echo '<div class="nav-cell">';
             echo "<span class='valign'>";
             echo "<a href=\"" . getNewsBaseURL() . getNewsCategoryPathNav() . getNewsArchivePathNav() . getNewsPagePath() . min($j + 10, $total) . "\">...</a>";
             echo "</span></div>\n";
         }
         $prevUrl = self::getPrevNewsPageURL();
         if ($prevUrl) {
             $prevnext['prev'] = "<a href='{$prevUrl}'>{$prevtext}</a>";
         }
         $nextUrl = getNextNewsPageURL();
         if ($nextUrl && $current < $total) {
             $prevnext['next'] = "<a href='{$nextUrl}'>{$nexttext}</a>";
         }
         return $prevnext;
     }
 }
/**
 * Prints the link to the next news page
 *
 * @param string $next The linktext
 * @param string $class The CSS class for the disabled link
 *
 * @return string
 */
function printNextNewsPageLink($next = 'next »', $class = 'disabledlink')
{
    global $_zp_page;
    if (getNextNewsPageURL()) {
        echo "<a href='" . getNextNewsPageURL() . "' title='" . gettext("Next page") . " " . ($_zp_page + 1) . "'>" . html_encode($next) . "</a>\n";
    } else {
        echo "<span class=\"{$class}\">" . html_encode($next) . "</span>\n";
    }
}
Exemplo n.º 3
0
<?php

global $_zp_themeroot, $_zp_current_album;
$total = ceil(getTotalArticles() / getOption("zenpage_articles_per_page"));
$current = getCurrentNewsPage();
$prevUrl = NewsUtil::getPrevNewsPageURL();
if ($current < $total) {
    $nextUrl = getNextNewsPageURL();
}
?>
<div id="list">
	<div id="navigation" <?php 
echo $prevUrl ? "next='" . $prevUrl . "'" : "";
echo $nextUrl ? "prev='" . $nextUrl . "'" : "";
?>
>
		<div id="bar">	
			<div class="nav-cell filler"><span>&nbsp;</span></div>
			<?php 
$nextText = "<div id='news-nav-prev' class='news-nav-scroll opa60'><img src='{$_zp_themeroot}/resources/images/arrow_up.png' width='16' height='16'/></div>";
$prevText = "<div id='news-nav-next' class='news-nav-scroll opa60 {$cls}'><img src='{$_zp_themeroot}/resources/images/arrow_down.png' width='16' height='16'/></div>";
$prevNext = NewsUtil::printNewsNavigation($prevText, $nextText);
?>
			<div class="nav-cell filler end"><span>&nbsp;</span></div>
		</div>
		<div id="nav">
			<div class="prev"><?php 
echo isset($prevNext['prev']) ? $prevNext['prev'] : "<div id='news-nav-prev' class='proxy'></div>";
?>
</div>
			<div class="next"><?php 
Exemplo n.º 4
0
 <?php 
        }
        ?>
</span>
							</div>	
							<?php 
        printNewsContent();
        printCodeblock(1);
        ?>
						</div>	
						<?php 
    }
    ?>
					</div>
					<?php 
    if (getNextNewsPageURL() || getPrevNewsPageURL()) {
        ?>
				
					<div id="pagination">
						<?php 
        printNewsPageListWithNav(gettext('Next →'), gettext('← Prev'), true, '');
        ?>
					</div>
					<?php 
    }
    ?>
					<?php 
}
?>
 
				</div>
Exemplo n.º 5
0
							</div>	
							<?php 
    printNewsContent();
    ?>
						</div>
					</div>
					<?php 
}
?>
				</div>
				
				<?php 
if ($zpbase_newsstyle == 'masonry-style') {
    ?>
				<?php 
    if (getNextNewsPageURL()) {
        ?>
	
				<div id="page-nav-mas">
					<?php 
        printNextNewsPageLink(gettext('Load More...'));
        ?>
				</div>
				<?php 
    }
    ?>
				<div id="page-nav" class="clearfix">
					<div class="jump"><?php 
    printBaseAlbumMenuJump('count', gettext('Gallery Index'));
    ?>
</div>
Exemplo n.º 6
0
        ?>
<span>Prev</span><?php 
    }
    ?>
					</div>
					<div id="next" <?php 
    if (getNextNewsPageURL()) {
        echo 'class="active"';
    }
    ?>
>
						<?php 
    if (getNextNewsPageURL()) {
        ?>
<a href="<?php 
        echo getNextNewsPageURL();
        ?>
">Next</a><?php 
    } else {
        ?>
<span>Next</span><?php 
    }
    ?>
					</div>
					<?php 
}
?>
				</div>
				<?php 
if (is_NewsArticle()) {
    if (function_exists('printCommentForm') and function_exists('zenFBComments')) {
/**
 * Prints the link to the next news page
 *
 * @param string $next The linktext
 * @param string $class The CSS class for the disabled link
 *
 * @return string
 */
function printNextNewsPageLink($next = 'next &raquo;', $class = 'disabledlink')
{
    global $_zp_zenpage;
    $page = $_zp_zenpage->getCurrentNewsPage();
    if (getNextNewsPageURL()) {
        echo "<a href='" . getNextNewsPageURL() . "' title='" . gettext("Next page") . " " . ($page + 1) . "'>" . $next . "</a>\n";
    } else {
        echo "<span class=\"{$class}\">" . $next . "</span>\n";
    }
}