Esempio n. 1
0
							<?php 
        if (getPrevNewsURL() or getPrevNewsURL()) {
            ?>
<br class="clearall" /><?php 
        }
        ?>
							<h3><?php 
        printNewsTitle();
        ?>
</h3>

							<div class="newsarticlecredit">
								<span class="newsarticlecredit-left">
									<?php 
        $count = @call_user_func('getCommentCount');
        $cat = getNewsCategories();
        printNewsDate();
        if ($count > 0) {
            echo ' | ';
            printf(gettext("Comments: %d"), $count);
        }
        if (!empty($cat)) {
            echo ' | ';
        }
        ?>
								</span>
								<?php 
        if (!empty($cat)) {
            printNewsCategories(", ", gettext("Categories: "), "newscategories");
        }
        ?>
/**
 * Prints the categories of current article as a unordered html list
 *
 * @param string $separator A separator to be shown between the category names if you choose to style the list inline
 * @param string $class The CSS class for styling
 * @return string
 */
function printNewsCategories($separator = '', $before = '', $class = '')
{
    $categories = getNewsCategories();
    $catcount = count($categories);
    if ($catcount != 0) {
        if ($before) {
            echo '<span class="beforetext">' . html_encode($before) . '</span>';
        }
        echo "<ul class=\"{$class}\">\n";
        $count = 0;
        if ($separator) {
            $separator = '<span class="betweentext">' . html_encode($separator) . '</span>';
        }
        foreach ($categories as $cat) {
            $count++;
            $catobj = new ZenpageCategory($cat['titlelink']);
            if ($count >= $catcount) {
                $separator = "";
            }
            echo "<li><a href=\"" . $catobj->getLink() . "\" title=\"" . html_encode($catobj->getTitle()) . "\">" . $catobj->getTitle() . '</a>' . $separator . "</li>\n";
        }
        echo "</ul>\n";
    }
}
Esempio n. 3
0
    echo html_encode(getNewsTitle());
    ?>
</h3>
						<?php 
    if (function_exists('zenFBLike')) {
        zenFBLike();
    }
    ?>
						<div class="date">
							<?php 
    echo gettext('Written by ') . getNewsAuthor() . gettext(' on ') . getNewsDate();
    ?>
						</div>
					</div>
					<?php 
    if (getNewsCategories()) {
        echo '<div class="tagsList">';
        printNewsCategories(", ", gettext("Categories: "), "newslist_categories");
        echo '</div>';
    }
    if (function_exists('printRating')) {
        echo '<div class="clear ratings">';
        printRating();
        echo '</div>';
    }
    ?>
				</div>
				<div id="news">
					<?php 
    printCodeblock(1);
    printNewsContent();
Esempio n. 4
0
 /**
  * Helper function to list tags/categories as keywords separated by comma.
  *
  * @param array $array the array of the tags or categories to list
  */
 private static function getMetaKeywords()
 {
     global $_zp_gallery, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_current_category, $_zp_gallery_page, $_zp_zenpage;
     $words = '';
     if (is_object($_zp_current_album) or is_object($_zp_current_image)) {
         $tags = getTags();
         $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery");
     } else {
         if ($_zp_gallery_page === "index.php") {
             $tags = array_keys(getAllTagsCount(true));
             // get all if no specific item is set
             $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery");
         }
     }
     if (extensionEnabled('zenpage')) {
         if (is_NewsArticle()) {
             $tags = getNewsCategories(getNewsID());
             $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "zenpage");
             $tags = getTags();
             $words = $words . "," . htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery");
         } else {
             if (is_Pages()) {
                 $tags = getTags();
                 $words = htmlmetatags::getMetaAlbumAndImageTags($tags, "gallery");
             } else {
                 if (is_News()) {
                     $tags = $_zp_zenpage->getAllCategories();
                     $words .= htmlmetatags::getMetaAlbumAndImageTags($tags, "zenpage");
                 } else {
                     if (is_NewsCategory()) {
                         $words .= $_zp_current_category->getTitle();
                     }
                 }
             }
         }
     }
     return $words;
 }
Esempio n. 5
0
/**
 * Prints the categories of current article as a unordered html list WITHOUT links
 *
 * @param string $separator A separator to be shown between the category names if you choose to style the list inline
 */
function jqm_printNewsCategories($separator = '', $class = '')
{
    $categories = getNewsCategories();
    $catcount = count($categories);
    if ($catcount != 0) {
        echo "<ul class=\"{$class}\">\n";
        $count = 0;
        foreach ($categories as $cat) {
            $count++;
            $catobj = new ZenpageCategory($cat['titlelink']);
            if ($count >= $catcount) {
                $separator = "";
            }
            echo "<li>" . $catobj->getTitle() . "</li>\n";
        }
        echo "</ul>\n";
    }
}
Esempio n. 6
0
function commonNewsLoop($paged)
{
    $newstypes = array('album' => gettext('album'), 'image' => gettext('image'), 'video' => gettext('video'), 'news' => gettext('news'));
    while (next_news()) {
        $newstypedisplay = gettext('news');
        if (stickyNews()) {
            $newstypedisplay .= ' <small><em>' . gettext('sticky') . '</em></small>';
        }
        ?>
		<div class="newsarticle<?php 
        if (stickyNews()) {
            echo ' sticky';
        }
        ?>
">
			<h3><?php 
        printNewsURL();
        echo " <span class='newstype'>[" . $newstypedisplay . "]</span>";
        ?>
</h3>
			<div class="newsarticlecredit">
				<span class="newsarticlecredit-left">
					<?php 
        $count = @call_user_func('getCommentCount');
        $cat = getNewsCategories();
        printNewsDate();
        if ($count > 0) {
            echo ' | ';
            printf(gettext("Comments: %d"), $count);
        }
        ?>
				</span>
				<?php 
        if (!empty($cat)) {
            echo ' | ';
            printNewsCategories(", ", gettext("Categories: "), "newscategories");
        }
        ?>
			</div> <!-- newsarticlecredit -->
			<?php 
        printCodeblock(1);
        ?>
			<?php 
        printNewsContent();
        ?>
		<?php 
        printCodeblock(2);
        ?>
			<br class="clearall" />
		</div>
		<?php 
    }
    if ($paged) {
        printNewsPageListWithNav(gettext('next »'), gettext('« prev'), true, 'pagelist', true);
    }
}
Esempio n. 7
0
 static function printNewsCategories($separator = '', $link = true, $print = true)
 {
     $text = '';
     $categories = getNewsCategories();
     $catcount = count($categories);
     if ($catcount != 0) {
         if (is_NewsType("news")) {
             $count = 0;
             foreach ($categories as $cat) {
                 $count++;
                 $catname = get_language_string($cat['cat_name']);
                 if ($count >= $catcount) {
                     $separator = "";
                 } else {
                     $separator = ", ";
                 }
                 $url = getNewsCategoryURL($cat['cat_link']);
                 $text .= ($link ? "<a href='{$url}'>" : "") . $catname . ($link ? "</a>" : "") . $separator;
             }
         }
     }
     if ($print) {
         echo $text;
     }
     return $text;
 }
Esempio n. 8
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);
    }
}
/**
 * Prints the categories of current article as a unordered html list
 *
 * @param string $separator A separator to be shown between the category names if you choose to style the list inline
 * @param string $class The CSS class for styling
 * @return string
 */
function printNewsCategories($separator = '', $before = '', $class = '')
{
    $categories = getNewsCategories();
    $catcount = count($categories);
    if ($catcount != 0) {
        if (is_NewsType("news")) {
            echo $before . "<ul class=\"{$class}\">\n";
            $count = 0;
            foreach ($categories as $cat) {
                $count++;
                $catobj = new ZenpageCategory($cat['titlelink']);
                if ($count >= $catcount) {
                    $separator = "";
                }
                echo "<li><a href=\"" . getNewsCategoryURL($catobj->getTitlelink()) . "\" title=\"" . html_encode($catobj->getTitle()) . "\">" . $catobj->getTitle() . '</a>' . html_encode($separator) . "</li>\n";
            }
            echo "</ul>\n";
        }
    }
}
Esempio n. 10
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 
    }
}
Esempio n. 11
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);
        ?>
			</div>
		</div>
<?php 
    }
}