/** * Prints the author of a page * * @param bool $fullname True if you want to get the full name if set, false if you want the login/screenname * @return string */ function printPageAuthor($fullname = false) { if (getNewsTitle()) { echo html_encode(getPageAuthor($fullname)); } }
</div> </div> </div> <?php $u = 0; while (next_news()) { $dt = strtotime(getNewsDate()); $commentsAllowed = NewsUtil::commentsAllowed(); ?> <div class='news' index="<?php echo $u; ?> " title="<?php echo getNewsTitle(); ?> " titleLink="<?php echo $_zp_current_zenpage_news->getTitleLink(); ?> " previewTitle="<?php echo printNewsTitle(); ?> " commentson="<?php echo $commentsAllowed ? 'true' : 'false'; ?> " commentCount="<?php
} else { echo '>News'; } echo '</a></li>'; ?> </ul> </div> <div id="content"> <?php if (is_NewsArticle()) { // Affichage d'une news particulière ?> <div class="description"> <div class="title"> <h3><?php 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()) {
<div class="news-preview"> <div class="news-preview-title"> <span><?php printNewsTitle(); ?> </span> </div> <div class="news-preview-content"> <?php echo ThemeUtil::clean(getNewsContent(), FALSE, 120, FALSE); ?> </div> </div> </div> <?php ThemeUtil::$script .= 'news.push({' . ' "titleLink": \'' . $_zp_current_zenpage_news->getTitleLink() . '\',' . ' "title": \'' . ThemeUtil::clean(getNewsTitle(), FALSE) . '\',' . ' "content": \'' . ThemeUtil::clean(getNewsContent()) . '\',' . ' "date": ' . zpFormattedDate("{day: %d, month: '%b', year: %Y}", strtotime($_zp_current_zenpage_news->getDateTime())) . ', ' . ' "categories": \'' . ThemeUtil::clean(NewsUtil::printNewsCategories(',', false, false), FALSE) . '\', ' . ' "commentson": ' . (NewsUtil::commentsAllowed() ? "true" : "false") . "," . ' "commentCount": ' . $_zp_current_zenpage_news->getCommentCount() . '}); '; $u++; } ThemeUtil::$script .= $sel; ?> </div> <?php echo isset($prevNext['next']) ? $prevNext['next'] : "<div id='news-nav-next' class='proxy'></div>"; ?> <div id="page-filler" class="opa20"> </div> </div> <div id="workaround-non-xml-comment-crap" style="display: none;"></div>
/** * Prints the RDF trackback url information for external clients to autodiscover. * This code is invisible and within comments on the theme page. * * For theme usage. * */ function printTrackbackRDF() { global $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_current_album, $_zp_current_image; // check if Zenpage is there... if (getOption('zp_plugin_zenpage')) { if (is_NewsArticle()) { $trackback = $this->getTrackbackURL($_zp_current_zenpage_news); $title = getNewsTitle(); $permalink = $this->getPermalinkURL($_zp_current_zenpage_news, $host); } if (is_Pages()) { $trackback = $this->getTrackbackURL($_zp_current_zenpage_page); $title = getPageTitle(); $permalink = $this->getPermalinkURL($_zp_current_zenpage_page); } } if (in_context(ZP_ALBUM)) { $trackback = $this->getTrackbackURL($_zp_current_album); $title = getAlbumTitle(); $permalink = $this->getPermalinkURL($_zp_current_album); } if (in_context(ZP_IMAGE)) { $trackback = $this->getTrackbackURL($_zp_current_image); $title = getImageTitle(); $permalink = $this->getPermalinkURL($_zp_current_image); } echo $this->rdf_autodiscover("", $title, "", $permalink, $trackback, ""); }
/** * Prints a RSS link * * @param string $option type of RSS: "News" feed for all news articles * "Category" for only the news articles of the category that is currently selected * "NewsWithImages" for all news articles and latest images * "Comments" for all news articles and pages * "Comments-news" for comments of only the news article it is called from * "Comments-page" for comments of only the page it is called from * "Comments-all" for comments from all albums, images, news articels and pages * @param string $categorylink The specific category you want a RSS feed from (only 'Category' mode) * @param string $prev text to before before the link * @param string $linktext title of the link * @param string $next text to appear after the link * @param bool $printIcon print an RSS icon beside it? if true, the icon is zp-core/images/rss.png * @param string $class css class * @param string $lang optional to display a feed link for a specific language (currently works for latest images only). Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used. */ function printZenpageRSSLink($option = 'News', $categorylink = '', $prev = '', $linktext = '', $next = '', $printIcon = true, $class = null, $lang = NULL) { global $_zp_current_category; if ($printIcon) { $icon = ' <img src="' . FULLWEBPATH . '/' . ZENFOLDER . '/images/rss.png" alt="RSS Feed" />'; } else { $icon = ''; } if (!is_null($class)) { $class = 'class="' . $class . '"'; } if (empty($lang)) { $lang = getOption("locale"); } if ($option == 'Category') { if (!is_null($categorylink)) { $categorylink = '&category=' . sanitize($categorylink); } elseif (empty($categorylink) and !is_null($_zp_current_category)) { $categorylink = '&category=' . $_zp_current_category->getTitlelink(); } else { $categorylink = ''; } } $linktext = html_encode($linktext); switch ($option) { case "News": if (getOption('RSS_articles')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-news&lang=" . $lang . "\" title=\"" . gettext("News RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "Category": if (getOption('RSS_articles')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-news&lang=" . $lang . $categorylink . "\" title=\"" . gettext("News Category RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "NewsWithImages": if (getOption('RSS_articles')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-news&withimages&lang=" . $lang . "\" title=\"" . gettext("News and Gallery RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "Comments": if (getOption('RSS_article_comments')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-comments&type=zenpage&lang=" . $lang . "\" title=\"" . gettext("Zenpage Comments RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "Comments-news": if (getOption('RSS_article_comments')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-comments&id=" . getNewsID() . "&title=" . urlencode(getNewsTitle()) . "&type=news&lang=" . $lang . "\" title=\"" . gettext("News article comments RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "Comments-page": if (getOption('RSS_article_comments')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-comments&id=" . getPageID() . "&title=" . urlencode(getPageTitle()) . "&type=page&lang=" . $lang . "\" title=\"" . gettext("Page Comments RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "Comments-all": if (getOption('RSS_article_comments')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-comments&type=allcomments&lang=" . $lang . "\" title=\"" . gettext("Page Comments RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; } }