/**
 * Prints the read more link or if using CombiNews feature also the link to the image.php gallery page as a full html link
 *
 * @param string $readmore The readmore text to be shown for the full news article link. If empty the option setting is used.
 * @return string
 * @deprecated
 */
function printNewsReadMoreLink($readmore = '')
{
    deprecated_function_notify(gettext('Functionality is now included in getNewsContent(), printNewsContent() and getContentShorten() to properly cover custom shortening via TinyMCE <pagebreak>.'), E_USER_NOTICE);
    $readmore = getNewsReadMore($readmore);
    if (!empty($readmore)) {
        if (is_NewsType("news")) {
            $newsurl = getNewsURL(getNewsTitleLink());
        } else {
            $newsurl = html_encode(getNewsTitleLink());
        }
        echo "<a href='" . $newsurl . "' title=\"" . getBareNewsTitle() . "\">" . html_encode($readmore) . "</a>";
    }
}
Beispiel #2
0
/**
 * Displays a list of all news in zenphoto
 *
 */
function newsListDisplay()
{
    while (next_news()) {
        ?>
		<div class="newslist_article">
			<div class="newslist_title">
				<span class="italic date_news"><?php 
        printNewsDate();
        ?>
</span>
				<h4><?php 
        printNewsURL();
        ?>
</h4>
				<div class="newslist_detail">
					<div class="italic newslist_type">
						<?php 
        $cat = getNewsCategories();
        if (!empty($cat)) {
            printNewsCategories(", ", gettext("Categories: "), "newslist_categories");
        }
        ?>
					</div>
				</div>
			</div>
			<div class="newslist_content">
				<?php 
        printCodeblock(1);
        ?>
				<?php 
        printNewsContent();
        ?>
				<?php 
        printCodeblock(2);
        ?>
				<?php 
        if (getNewsReadMore()) {
            ?>
					<p class="italic newslist_readmore">
						<?php 
            $readmore = getNewsReadMore($readmore);
            if (!empty($readmore)) {
                $newsurl = getNewsURL();
                echo "<a href='" . $newsurl . "' title=\"" . getBareNewsTitle() . "\">" . html_encode($readmore) . "</a>";
            }
            ?>
					</p>
				<?php 
        }
        ?>
			</div>
		</div>
		<?php 
    }
}