/**
 * @deprecated
 */
function printNewsImageTags($option = 'links', $preText = NULL, $class = 'taglist', $separator = ', ', $editable = TRUE)
{
    deprecated_function_notify(gettext('Use printTags().'));
    global $_zp_current_zenpage_news;
    if (is_GalleryNewsType()) {
        $singletag = getNewsImageTags();
        $tagstring = implode(', ', $singletag);
        if (empty($tagstring)) {
            $preText = "";
        }
        if (count($singletag) > 0) {
            echo "<ul class=\"" . $class . "\">\n";
            if (!empty($preText)) {
                echo "<li class=\"tags_title\">" . $preText . "</li>";
            }
            $ct = count($singletag);
            foreach ($singletag as $atag) {
                if ($x++ == $ct) {
                    $separator = "";
                }
                if ($option == "links") {
                    $links1 = "<a href=\"" . html_encode(getSearchURL($atag, '', 'tags', 0)) . "\" title=\"" . $atag . "\" rel=\"nofollow\">";
                    $links2 = "</a>";
                }
                echo "\t<li>" . $links1 . html_encode($atag) . $links2 . $separator . "</li>\n";
            }
            echo "</ul>";
            echo "<br clear=\"all\" />\n";
        }
    }
}
Ejemplo n.º 2
0
        printNewsTitleLink();
        echo " <span class='newstype'>[" . getNewsType() . "]</span>";
        ?>
</h3>
				<div class="newsarticlecredit"><span class="newsarticlecredit-left"><?php 
        printNewsDate();
        ?>
 | <?php 
        echo gettext("Comments:");
        ?>
 <?php 
        echo getCommentCount();
        ?>
</span>
<?php 
        if (is_GalleryNewsType()) {
            if (!is_NewsType("album")) {
                echo " | " . gettext("Album:") . "<a href='" . getNewsAlbumURL() . "' title='" . getBareNewsAlbumTitle() . "'> " . getNewsAlbumTitle() . "</a>";
            } else {
                echo "<br />";
            }
        } else {
            printNewsCategories(", ", gettext("Categories: "), "newscategories");
        }
        ?>
</div>
		<?php 
        printNewsContent();
        ?>
		<?php 
        printCodeblock(1);
Ejemplo n.º 3
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);
    }
}
/**
 * Gets the date of the current news article
 *
 * @return string
 */
function getNewsDate()
{
    global $_zp_current_zenpage_news;
    if (!is_null($_zp_current_zenpage_news)) {
        if (is_GalleryNewsType() && ZP_COMBINEWS_SORTORDER == 'mtime') {
            $d = $_zp_current_zenpage_news->get('mtime');
            $d = date('Y-m-d H:i:s', $d);
        } else {
            $d = $_zp_current_zenpage_news->getDateTime();
        }
        return zpFormattedDate(DATE_FORMAT, strtotime($d));
    }
    return false;
}