/**
 * Prints the current select news date (year-month) or formatted
 *
 * @param string $before What you want to print before the archive if using in a breadcrumb navigation for example
 * @param string $mode "formatted" for a formatted date or "plain" for the pure year-month (for example "2008-09") archive date
 * @param string $format If $mode="formatted" how the date should be printed (see PHP's strftime() function for the requirements)
 * @return string
 */
function printCurrentNewsArchive($before = '', $mode = 'formatted', $format = '%B %Y')
{
    if ($date = getCurrentNewsArchive($mode, $format)) {
        if ($before) {
            echo '<span class="beforetext">' . html_encode($before) . '</span>';
        }
        echo html_encode($date);
    }
}
Пример #2
0
					<?php 
} else {
    ?>
					<div id="post">
						<?php 
    if ($_zp_current_category) {
        ?>
						<h1><?php 
        printCurrentNewsCategory('');
        ?>
</h1>
						<?php 
    }
    ?>
						<?php 
    if (getCurrentNewsArchive()) {
        ?>
						<h1><?php 
        printCurrentNewsArchive();
        ?>
</h1>
						<?php 
    }
    ?>
						<?php 
    if (strlen(getNewsCategoryDesc()) > 0) {
        ?>
						<div><?php 
        echo getNewsCategoryDesc();
        ?>
</div><br />
Пример #3
0
 case 'pages.php':
     $zpmin_metatitle = getBarePageTitle() . ' | ';
     $zpmin_metadesc = strip_tags(truncate_string(getPageContent(), 150, '...'));
     $cbscript = true;
     break;
 case 'news.php':
     if (is_NewsArticle()) {
         $zpmin_metatitle = gettext('News') . ' | ' . getBareNewsTitle() . ' | ';
         $zpmin_metadesc = strip_tags(truncate_string(getNewsContent(), 150, '...'));
     } else {
         if ($_zp_current_category) {
             $zpmin_metatitle = gettext('News') . ' | ' . $_zp_current_category->getTitle() . ' | ';
             $zpmin_metadesc = strip_tags(truncate_string(getNewsCategoryDesc(), 150, '...'));
         } else {
             if (getCurrentNewsArchive()) {
                 $zpmin_metatitle = gettext('News') . ' | ' . getCurrentNewsArchive() . ' | ';
             } else {
                 $zpmin_metatitle = gettext('News') . ' | ';
             }
         }
     }
     $cbscript = true;
     break;
 case 'slideshow.php':
     $zpmin_metatitle = getBareAlbumTitle() . ' | ' . gettext('Slideshow') . ' | ';
     if (!function_exists('printGslideshow')) {
         printSlideShowJS();
         echo '<link rel="stylesheet" href="' . $_zp_themeroot . '/css/slideshow.css" type="text/css" />';
     }
     $showsearch = false;
     $zpmin_social = false;
Пример #4
0
     break;
 case 'pages.php':
     $zpfocus_metatitle = getBarePageTitle() . ' | ' . getBareGalleryTitle();
     $zpfocus_metadesc = strip_tags(shortenContent(getPageContent(), 150, '...'));
     break;
 case 'news.php':
     if (is_NewsArticle()) {
         $zpfocus_metatitle = gettext('News') . ' | ' . getBareNewsTitle() . ' | ' . getBareGalleryTitle();
         $zpfocus_metadesc = strip_tags(shortenContent(getNewsContent(), 150, '...'));
     } else {
         if ($_zp_current_category) {
             $zpfocus_metatitle = gettext('News') . ' | ' . $_zp_current_category->getTitle() . ' | ' . getBareGalleryTitle();
             $zpfocus_metadesc = strip_tags(shortenContent(getNewsCategoryDesc(), 150, '...'));
         } else {
             if (getCurrentNewsArchive()) {
                 $zpfocus_metatitle = gettext('News') . ' | ' . getCurrentNewsArchive() . ' | ' . getBareGalleryTitle();
                 $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
             } else {
                 $zpfocus_metatitle = gettext('News') . ' | ' . getBareGalleryTitle();
                 $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
             }
         }
     }
     break;
 case 'contact.php':
     $zpfocus_metatitle = gettext('Contact') . ' | ' . getBareGalleryTitle();
     $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
     break;
 case 'login.php':
     $zpfocus_metatitle = gettext('Login') . ' | ' . getBareGalleryTitle();
     $zpfocus_metadesc = shortenContent(getBareGalleryDesc(), 150, '...');
/**
 * Prints the current select news date (year-month) or formatted
 *
 * @param string $before What you want to print before the archive if using in a breadcrumb navigation for example
 * @param string $mode "formatted" for a formatted date or "plain" for the pure year-month (for example "2008-09") archive date
 * @param string $format If $mode="formatted" how the date should be printed (see PHP's strftime() function for the requirements)
 * @return string
 */
function printCurrentNewsArchive($before = '', $mode = 'formatted', $format = '%B %Y')
{
    if ($date = getCurrentNewsArchive($mode, $format)) {
        echo $before . html_encode($date);
    }
}
Пример #6
0
 case 'news.php':
     $rss_option = 'News';
     $rss_title = gettext('RSS News');
     if (is_NewsArticle()) {
         $zpbase_metadesc = strip_tags(truncate_string(getNewsContent(), 150, '...'));
         $objectclass = str_replace(" ", "", getBareNewsTitle()) . '-' . $_zp_current_zenpage_news->getID();
     } else {
         if ($_zp_current_category) {
             $zpbase_metadesc = strip_tags(truncate_string(getNewsCategoryDesc(), 150, '...'));
             $objectclass = str_replace(" ", "", html_encode($_zp_current_category->getTitle())) . '-news';
             $rss_option = 'Category';
             $rss_title = gettext('RSS News Category');
         } else {
             if (getCurrentNewsArchive()) {
                 $zpbase_metadesc = getCurrentNewsArchive() . ' ' . gettext('News Archive') . '... ' . truncate_string(getBareGalleryDesc(), 130, '...');
                 $objectclass = str_replace(" ", "", getCurrentNewsArchive()) . '-news';
             } else {
                 $zpbase_metadesc = gettext('News') . '... ' . truncate_string(getBareGalleryDesc(), 130, '...');
                 $objectclass = 'news-index';
             }
         }
     }
     break;
 case 'contact.php':
     $zpbase_metadesc = gettext('Contact') . '... ' . truncate_string(getBareGalleryDesc(), 130, '...');
     $objectclass = 'contact-page';
     break;
 case 'login.php':
     $zpbase_metadesc = gettext('Login') . '... ' . truncate_string(getBareGalleryDesc(), 130, '...');
     $objectclass = 'login-page';
     break;