Пример #1
0
        printf(gettext('Pages (%s)'), $numpages);
        printZDSearchShowMoreLink("pages", $number_to_show);
        while (next_page()) {
            $c++;
            printZDToggleClass('pages', $c, $number_to_show);
            printPageTitlelink();
            shortenContent(strip_tags(getPageContent()), 80, getOption("zenpage_textshorten_indicator"));
        }
    }
    if ($numnews > 0) {
        $number_to_show = 5;
        $c = 0;
        printf(gettext('Articles (%s)'), $numnews);
        printZDSearchShowMoreLink("news", $number_to_show);
        while (next_news()) {
            printNewsTitleLink();
            echo shortenContent(strip_tags(getNewsContent()), 80, getOption("zenpage_textshorten_indicator"));
        }
    }
}
if (getOption('search_no_albums')) {
    if (!getOption('search_no_images') && $numpages + $numnews > 0) {
        printf(gettext('Images (%s)'), $numimages);
    }
} else {
    if (getOption('search_no_images')) {
        if ($numpages + $numnews > 0) {
            printf(gettext('Albums (%s)'), $numalbums);
        }
    } else {
        printf(gettext('Albums (%1$s) & Images (%2$s)'), $numalbums, $numimages);
Пример #2
0
function commonNewsLoop($paged)
{
    $newstypes = array('album' => gettext('album'), 'image' => gettext('image'), 'video' => gettext('video'), 'news' => gettext('news'));
    while (next_news()) {
        $newstype = getNewsType();
        $newstypedisplay = $newstypes[$newstype];
        if (stickyNews()) {
            $newstypedisplay .= ' <small><em>' . gettext('sticky') . '</em></small>';
        }
        ?>
		<div class="newsarticle<?php 
        if (stickyNews()) {
            echo ' sticky';
        }
        ?>
">
			<h3><?php 
        printNewsTitleLink();
        echo " <span class='newstype'>[" . $newstypedisplay . "]</span>";
        ?>
</h3>
			<div class="newsarticlecredit">
				<span class="newsarticlecredit-left">
					<?php 
        $count = getCommentCount();
        $cat = getNewsCategories();
        printNewsDate();
        if ($count > 0) {
            echo ' | ';
            printf(gettext("Comments: %d"), $count);
        }
        ?>
				</span>
				<?php 
        if (is_GalleryNewsType()) {
            echo ' | ' . gettext("Album:") . " <a href='" . getNewsAlbumURL() . "' title='" . getBareNewsAlbumTitle() . "'>" . getNewsAlbumTitle() . "</a>";
        } else {
            if (!empty($cat) && !in_context(ZP_ZENPAGE_NEWS_CATEGORY)) {
                echo ' | ';
                printNewsCategories(", ", gettext("Categories: "), "newscategories");
            }
        }
        ?>
			</div> <!-- newsarticlecredit -->
			<br clear="all" />
			<?php 
        printCodeblock(1);
        ?>
			<?php 
        printNewsContent();
        ?>
			<?php 
        printCodeblock(2);
        ?>
			<br clear="all" />
			</div>
	<?php 
    }
    if ($paged) {
        printNewsPageListWithNav(gettext('next &raquo;'), gettext('&laquo; prev'), true, 'pagelist', true);
    }
}