本文整理汇总了PHP中getNumNews函数的典型用法代码示例。如果您正苦于以下问题:PHP getNumNews函数的具体用法?PHP getNumNews怎么用?PHP getNumNews使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getNumNews函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printZDSearchShowMoreLink
/**
* Prints the "Show more results link" for search results for Zenpage items
*
* @param string $option "news" or "pages"
* @param int $number_to_show how many search results should be shown initially
*/
function printZDSearchShowMoreLink($option, $number_to_show)
{
$option = strtolower($option);
$number_to_show = sanitize_numeric($number_to_show);
switch ($option) {
case "news":
$num = getNumNews();
break;
case "pages":
$num = getNumPages();
break;
}
if ($num > $number_to_show) {
?>
<a class="<?php
echo $option;
?>
_showmore"href="javascript:toggleExtraElements('<?php
echo $option;
?>
',true);"><?php
echo gettext('Show more results');
?>
</a>
<a class="<?php
echo $option;
?>
_showless" style="display: none;" href="javascript:toggleExtraElements('<?php
echo $option;
?>
',false);"><?php
echo gettext('Show fewer results');
?>
</a>
<?php
}
}
示例2: zp_apply_filter
zp_apply_filter('theme_body_open');
?>
<div id="main">
<div id="header">
<h1><?php
printGalleryTitle();
?>
</h1>
<?php
$zenpage = extensionEnabled('zenpage');
$numimages = getNumImages();
$numalbums = getNumAlbums();
$total = $numimages + $numalbums;
if ($zenpage && !isArchive()) {
$numpages = getNumPages();
$numnews = getNumNews();
$total = $total + $numnews + $numpages;
} else {
$numpages = $numnews = 0;
}
if ($total == 0) {
$_zp_current_search->clearSearchWords();
}
if (getOption('Allow_search')) {
$categorylist = $_zp_current_search->getCategoryList();
if (is_array($categorylist)) {
$catlist = array('news' => $categorylist, 'albums' => '0', 'images' => '0', 'pages' => '0');
printSearchForm(NULL, 'search', NULL, gettext('Search category'), NULL, NULL, $catlist);
} else {
$albumlist = $_zp_current_search->getAlbumList();
if (is_array($albumlist)) {
示例3: gettext
<h2><?php
echo gettext("Archive view");
?>
</h2>
<div id="archive">
<h3><?php
echo gettext('Gallery archive');
?>
</h3>
<?php
printAllDates();
?>
<hr />
<?php
if (extensionEnabled('zenpage') && getNumNews(true)) {
?>
<h3><?php
echo gettext('News archive');
?>
</h3>
<?php
printNewsArchive("archive");
?>
<hr />
<?php
}
?>
<h3><?php
echo gettext('Popular Tags');
示例4: printRSSLink
<?php
}
?>
<div id="foot-left">
<?php
if (extensionEnabled('rss') && (getOption('RSS_album_image') || $_zenpage_enabled && getOption('RSS_articles'))) {
?>
<div id="rsslinks">
<?php
$rss = false;
if (getOption('RSS_album_image')) {
printRSSLink('Gallery', '', gettext('Latest images'), '', false, 'rss');
$rss = true;
}
if ($_zenpage_enabled && getOption('RSS_articles') && getNumNews(true)) {
if ($rss) {
$separ = ' | ';
} else {
$separ = '';
}
printRSSLink('News', $separ, gettext('Latest news'), '', false, 'rss');
}
?>
<script type="text/javascript">
//<![CDATA[
$('.rss').prepend('<img alt="RSS Feed" src="<?php
echo $_zp_themeroot;
?>
/images/rss.png"> ');
//]]>
示例5: rem_context
<?php
// force UTF-8 Ø
rem_context(ZP_ALBUM | ZP_IMAGE);
if (function_exists('printCustomMenu') && ($menu = getOption('effervescence_menu'))) {
?>
<div class="menu">
<?php
printCustomMenu($menu, 'list', '', "menu-active", "submenu", "menu-active", 2);
?>
</div>
<?php
} else {
// "standard zenpage sidebar menus
if (extensionEnabled('zenpage') && ZP_NEWS_ENABLED) {
if (getNumNews(true)) {
?>
<div class="menu">
<h3><?php
echo gettext("News articles");
?>
</h3>
<?php
printAllNewsCategories(gettext("All news"), true, "", "menu-active", true, "submenu", "menu-active");
?>
<div class="menu_rule"></div>
</div>
<?php
}
}
?>
示例6: html_encode
}
?>
>
<a href="<?php
echo html_encode(getGalleryIndexURL());
?>
" title="<?php
echo $hometext;
?>
"><?php
echo $hometext;
?>
</a>
</li>
<?php
if ($zenpage && getNumNews(true) > 0 && ZP_NEWS_ENABLED) {
?>
<li>
<a <?php
if ($_zp_gallery_page == "news.php" && is_null($_zp_current_category)) {
?>
class="active" <?php
}
?>
href="<?php
echo getNewsIndexURL();
?>
"><?php
echo gettext('News');
?>
</a>
示例7: gettext
?>
<div id="sidebar">
<div class="sidebar-block">
<h3><?php
echo gettext('Page Menu');
?>
</h3>
<?php
printPageMenu('list', 'sidebar-page-menu', 'top-active', 'sub-list', 'sub-active', null, true, true, 25);
?>
</div>
<?php
if (getOption('zpbase_usenews') && getNumNews(true) > 0) {
?>
<div class="sidebar-block news-cats">
<h3><?php
echo gettext('News Categories');
?>
</h3>
<?php
printAllNewsCategories($newsname, true, '', 'menu-active', true, 'submenu', 'menu-active', 'list', true, 25);
?>
</div>
<?php
}
?>
<?php
示例8: printCustomPageURL
class="active" <?php
}
?>
>
<?php
printCustomPageURL(gettext('Gallery'), "gallery");
?>
</li>
<?php
}
?>
<?php
if (function_exists('getNewsIndexURL') && getOption('zpbase_usenews')) {
?>
<?php
if (getNumNews(true) > 0) {
?>
<li <?php
if ($_zp_gallery_page == "news.php") {
?>
class="active" <?php
}
?>
>
<a href="<?php
echo getNewsIndexURL();
?>
"><?php
echo $newsname;
?>
</a>
示例9: gettext
?>
<div class="<?php
echo $col1;
?>
">
<h3><?php
echo gettext('Home');
?>
</h3>
<div><?php
printGalleryDesc();
?>
</div>
</div>
<?php
if ($_zenpage_enabled && getNumNews() > 0) {
?>
<div class="span5">
<h3><?php
echo gettext('Latest news');
?>
</h3>
<?php
printLatestNews(1, '', true, true, 200, false);
?>
</div>
<?php
}
?>
</div>
示例10: printAllDates
</h5>
<div class="archive-cols">
<?php
printAllDates('archive', 'year', 'month');
?>
</div>
</div>
<?php
}
?>
<?php
if ($zenpage && ZP_NEWS_ENABLED) {
?>
<?php
if (getNumNews(true) > 0 && getOption('libratus_date_news')) {
?>
<div class="block archive">
<h5><?php
echo gettext('News Archive');
?>
</h5>
<div class="archive-cols">
<?php
printNewsArchive('archive', 'year', 'month');
?>
</div>
</div>
<?php
}
}
示例11: printAllDates
?>
</h3>
<div class="archive-cols">
<?php
printAllDates('archive', 'year', 'month');
?>
</div>
</div>
<?php
}
?>
<?php
if ($zenpage && getOption('zpbase_usenews')) {
?>
<?php
if (getNumNews(true) > 0 && getOption('zpbase_date_news')) {
?>
<div class="block archive">
<h3><?php
echo gettext('News Archive');
?>
</h3>
<div class="archive-cols">
<?php
printNewsArchive('archive', 'year', 'month');
?>
</div>
</div>
<?php
}
}
示例12: gettext
?>
</div>
<?php
}
}
// custom menu check end
?>
<div class="menu">
<h3><?php
echo gettext("Archive");
?>
</h3>
<ul>
<?php
if (extensionEnabled('Zenpage') && ($news = getNumNews('true'))) {
$archivelinktext = gettext("Gallery And News");
} else {
$archivelinktext = gettext("Gallery");
}
if ($_zp_gallery_page == "archive.php") {
echo "<li class='menu-active'>" . $archivelinktext . "</li>";
} else {
echo "<li>";
printCustomPageURL($archivelinktext, "archive");
echo "</li>";
}
?>
</ul>
</div>
示例13: getTotalResults
function getTotalResults()
{
return $this->getNumAlbums() + $this->getNumImages() + getNumNews();
}
示例14: gettext
if (extensionEnabled('rss')) {
if (getOption('RSS_items_albums') || getOption('RSS_zenpage_items')) {
?>
<div id="rsslinks">
<span><?php
echo gettext('Subscribe: ');
?>
</span>
<?php
if (in_context(ZP_ALBUM) && getOption('RSS_album_image')) {
printRSSLink("Collection", "", gettext('This Album'), " | ", false, "rsslink");
}
if (getOption('RSS_items_albums')) {
printRSSLink("Gallery", "", gettext('Gallery Images'), "", false, "rsslink");
}
if (function_exists('getBarePageTitle') && getOption('RSS_zenpage_items') && getNumNews(true)) {
printRSSLink("News", ' | ', gettext('News'), '', false);
}
?>
</div>
<br />
<?php
}
}
if (function_exists('printLanguageSelector')) {
printLanguageSelector("langselector");
}
?>
</div>
</div>
<?php
示例15: rem_context
<?php
// force UTF-8 Ø
rem_context(ZP_ALBUM | ZP_IMAGE);
$archivlinktext = gettext('Gallery');
if (extensionEnabled('zenpage')) {
if ($news = getNumNews(true)) {
$archivlinktext = gettext('Gallery and News');
}
$pages = getNumPages(true);
} else {
$news = $pages = NULL;
}
if (function_exists('printCustomMenu') && ($menu = getOption('effervescence_menu'))) {
?>
<div class="menu">
<?php
printCustomMenu($menu, 'list', '', "menu-active", "submenu", "menu-active", 2);
?>
</div>
<?php
} else {
// "standard zenpage sidebar menus
if ($news) {
?>
<div class="menu">
<h3><?php
echo gettext("News articles");
?>
</h3>
<?php