/** * Prints the link of the previous article in single news article pagination if available * * NOTE: This is not available if using the CombiNews feature * * @param string $next If you want to show something with the title of the article like a symbol * @return string */ function printPrevNewsLink($prev = "« ") { $article_url = getNextPrevNews("prev"); if ($article_url && array_key_exists('link', $article_url) && $article_url['link'] != "") { echo html_encode($prev) . " <a href=\"" . html_encode($article_url['link']) . "\" title=\"" . html_encode(getBare($article_url['title'])) . "\">" . $article_url['title'] . "</a>"; } }
?> <span>Prev</span><?php } ?> </div> <div id="next" <?php if (getNextNewsURL()) { echo 'class="active"'; } ?> > <?php if (getNextNewsURL()) { ?> <a href="<?php echo getNextPrevNews('next')['link']; ?> ">Next</a><?php } else { ?> <span>Next</span><?php } ?> </div> <?php } else { // Affichage de la liste de news ?> <div id="prev" <?php if (getPrevNewsPageURL()) { echo 'class="active"';
echo gettext("Prev Article"); ?> </a> <?php } else { ?> <span class="button prev-link"><i class="fa fa-caret-left"></i> <?php echo gettext("Prev Article"); ?> </span> <?php } ?> <?php if ($next = getNextPrevNews('next')) { ?> <a class="button next-link" href="<?php echo $next['link']; ?> " title="<?php echo $next['title']; ?> "><?php echo gettext("Next Article"); ?> <i class="fa fa-caret-right"></i></a> <?php } else { ?> <span class="button next-link"><?php
/** * Prints the link of the previous article in single news article pagination if available * * NOTE: This is not available if using the CombiNews feature * * @param string $next If you want to show something with the title of the article like a symbol * @param string $sortorder "desc" (default)or "asc" for descending or ascending news. Required if these for next_news() loop are changed. * @param string $sortdirection "date" (default) or "title" for sorting by date or titlelink. Required if these for next_news() loop are changed. * @return string */ function printPrevNewsLink($prev = "« ", $sortorder = 'date', $sortdirection = 'desc') { $article_url = getNextPrevNews("prev", $sortorder, $sortdirection); if (array_key_exists('link', $article_url) && $article_url['link'] != "") { echo $prev . " <a href=\"" . html_encode($article_url['link']) . "\" title=\"" . html_encode(strip_tags($article_url['title'])) . "\">" . $article_url['title'] . "</a>"; } }
include "inc-social.php"; } ?> <?php printNewsExtraContent(); ?> <?php if (!ZP_COMBINEWS) { ?> <div class="news-nav"> <?php $next_article_url = array(getNextPrevNews('next', 'date', 'desc')); if (array_key_exists('link', $next_article_url) && $next_article_url['link'] != "") { echo "<a class=\"button\" href=\"" . html_encode($next_article_url['link']) . "\" title=\"" . html_encode(strip_tags($next_article_url['title'])) . "\">" . $next_article_url['title'] . " »</a> "; } $prev_article_url = array(getNextPrevNews('prev', 'date', 'desc')); if (array_key_exists('link', $prev_article_url) && $prev_article_url['link'] != "") { echo "<a class=\"button\" href=\"" . html_encode($prev_article_url['link']) . "\" title=\"" . html_encode(strip_tags($prev_article_url['title'])) . "\">« " . $prev_article_url['title'] . "</a> "; } ?> </div> <?php } } ?> <h3><?php echo gettext('News Categories'); ?> </h3> <?php printAllNewsCategories('', true, 'side-menu', 'active');