本文整理汇总了PHP中getAlbumDate函数的典型用法代码示例。如果您正苦于以下问题:PHP getAlbumDate函数的具体用法?PHP getAlbumDate怎么用?PHP getAlbumDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAlbumDate函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: html_encode
<a title="<?php
echo html_encode(getAlbumDesc());
?>
" href="<?php
echo htmlspecialchars(getAlbumURL());
?>
">
<img src="<?php
echo getCustomAlbumThumb(298, NULL, NULL, 298, 178, NULL, NULL, false);
?>
" alt="<?php
echo html_encode(getAlbumTitle() . ' (' . getAlbumDate(getOption('date_format')) . ')');
?>
" />
<span><?php
echo getAlbumTitle() . '<br />(' . getAlbumDate(getOption('date_format')) . ')';
?>
</span>
</a>
</li>
<?php
}
?>
</ul>
</div>
<div id="rightbox">
<div id="login">
<?php
if (!zp_loggedin() && function_exists('printUserLogin_out')) {
printUserLogin_out();
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:index.php
示例2: getHTMLMetaData
/**
* Prints html meta data to be used in the <head> section of a page
*
*/
static function getHTMLMetaData()
{
global $_zp_gallery, $_zp_galley_page, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority, $_zp_conf_vars, $_myFavorites, $htmlmetatags_need_cache, $_zp_page;
zp_register_filter('image_processor_uri', 'htmlmetatags::ipURI');
$host = sanitize("http://" . $_SERVER['HTTP_HOST']);
$url = $host . getRequestURI();
// Convert locale shorttag to allowed html meta format
$locale = str_replace("_", "-", getUserLocale());
$canonicalurl = '';
// generate page title, get date
$pagetitle = "";
// for gallery index setup below switch
$date = strftime(DATE_FORMAT);
// if we don't have a item date use current date
$desc = getBareGalleryDesc();
$thumb = '';
if (getOption('htmlmeta_sitelogo')) {
$thumb = getOption('htmlmeta_sitelogo');
}
if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
$ogimage_width = getOption('htmlmeta_ogimage_width');
$ogimage_height = getOption('htmlmeta_ogimage_height');
if (empty($ogimage_width)) {
$ogimage_width = 1280;
}
if (empty($ogimage_height)) {
$ogimage_height = 900;
}
}
$type = 'article';
switch ($_zp_gallery_page) {
case 'index.php':
$desc = getBareGalleryDesc();
//$canonicalurl = $host . getGalleryIndexURL();
$canonicalurl = $host . getPageNumURL($_zp_page);
$type = 'website';
break;
case 'album.php':
$pagetitle = getBareAlbumTitle() . " - ";
$date = getAlbumDate();
$desc = getBareAlbumDesc();
$canonicalurl = $host . getPageNumURL($_zp_page);
if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
$thumbimg = $_zp_current_album->getAlbumThumbImage();
getMaxSpaceContainer($ogimage_width, $ogimage_height, $thumbimg, false);
$thumb = $host . html_encode(pathurlencode($thumbimg->getCustomImage(NULL, $ogimage_width, $ogimage_height, NULL, NULL, NULL, NULL, false, NULL)));
}
break;
case 'image.php':
$pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - ";
$date = getImageDate();
$desc = getBareImageDesc();
$canonicalurl = $host . getImageURL();
if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
$thumb = $host . html_encode(pathurlencode(getCustomSizedImageMaxSpace($ogimage_width, $ogimage_height)));
}
break;
case 'news.php':
if (function_exists("is_NewsArticle")) {
if (is_NewsArticle()) {
$pagetitle = getBareNewsTitle() . " - ";
$date = getNewsDate();
$desc = trim(getBare(getNewsContent()));
$canonicalurl = $host . $_zp_current_zenpage_news->getLink();
} else {
if (is_NewsCategory()) {
$pagetitle = $_zp_current_category->getTitlelink() . " - ";
$date = strftime(DATE_FORMAT);
$desc = trim(getBare($_zp_current_category->getDesc()));
$canonicalurl = $host . $_zp_current_category->getLink();
$type = 'category';
} else {
$pagetitle = gettext('News') . " - ";
$desc = '';
$canonicalurl = $host . getNewsIndexURL();
$type = 'website';
}
}
if ($_zp_page != 1) {
$canonicalurl .= '/' . $_zp_page;
}
}
break;
case 'pages.php':
$pagetitle = getBarePageTitle() . " - ";
$date = getPageDate();
$desc = trim(getBare(getPageContent()));
$canonicalurl = $host . $_zp_current_zenpage_page->getLink();
break;
default:
// for all other possible static custom pages
$custompage = stripSuffix($_zp_gallery_page);
$standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required'));
if (is_object($_myFavorites)) {
$standard['favorites'] = gettext('My favorites');
}
//.........这里部分代码省略.........
开发者ID:rb26,项目名称:zenphoto,代码行数:101,代码来源:html_meta_tags.php
示例3: getCustomAlbumThumb
<img src="<?php
echo getCustomAlbumThumb(150, NULL, NULL, 150, 150, NULL, NULL, false);
?>
" alt="<?php
echo html_encode(getAlbumTitle() . ' (' . getAlbumDate(getOption('date_format')) . ')');
?>
" />
</a>
</div>
<div class="album">
<div class="gras"><?php
echo getAlbumTitle();
?>
</div>
<div class="italic"><small><?php
echo '(' . getAlbumDate(getOption('date_format')) . ')';
?>
</small></div>
<div><?php
echo getAlbumDesc();
?>
</div>
</div>
</li>
<?php
}
?>
<?php
while (next_image()) {
?>
<li>
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:album.php
示例4: printAlbumDate
/**
* Prints the date of the current album
*
* @param string $before Insert here the text to be printed before the date.
* @param string $format Format string for the date formatting
*/
function printAlbumDate($before = '', $format = NULL)
{
global $_zp_current_album;
if (is_null($format)) {
$format = DATE_FORMAT;
}
$date = getAlbumDate($format);
if ($date) {
if ($before) {
$date = '<span class="beforetext">' . $before . '</span>' . $date;
}
}
echo html_encodeTagged($date);
}
开发者ID:IliyanGochev,项目名称:zenphoto,代码行数:20,代码来源:template-functions.php
示例5: getAlbumTitle
echo getAlbumTitle();
?>
">
<?php
printAlbumThumbImage(getAlbumTitle());
?>
<span class="num"><?php
echo getNumImages();
?>
</span>
<strong class="title"><?php
printAlbumTitle();
?>
</strong>
<?php
getAlbumDate("Date Taken: ");
?>
<span class="desc"><?php
printAlbumDescAlt();
?>
</span>
</a>
<?php
}
?>
</div>
<div id="images">
<?php
while (next_image()) {
?>
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:album.php
示例6: getNumAlbums
}
?>
">
<?php
if (getNumAlbums() > 0) {
echo getNumAlbums() . ' ' . gettext('subalbums');
}
?>
<?php
if (getNumImages() > 0) {
echo getNumImages() . ' ' . gettext('images');
}
?>
</li>
<?php
if (strlen(getAlbumDate()) > 0) {
?>
<li class="date"><?php
printAlbumDate('');
?>
</li><?php
}
?>
<?php
if (strlen(getAlbumDesc()) > 0) {
?>
<li class="desc"><?php
echo shortenContent(getAlbumDesc(), 150, '...');
?>
</li><?php
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:album.php
示例7: gettext
?>
" title="<?php
echo gettext('View album:');
?>
<?php
echo getBareAlbumTitle();
?>
"><?php
printCustomAlbumThumbImage(getBareAlbumTitle(), NULL, 238, 100, 238, 100);
?>
</a>
<h4><a href="<?php
echo htmlspecialchars(getAlbumURL());
?>
" title="<?php
echo getBareAlbumTitle() . ' (' . getAlbumDate() . ') - ' . getAlbumDesc();
?>
"><?php
echo shortenContent(getBareAlbumTitle(), 30, '...');
?>
</a></h4>
</li>
<?php
$x++;
}
?>
</ul>
</div>
</div>
</div>
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:album.php
示例8: getHTMLMetaData
/**
* Prints html meta data to be used in the <head> section of a page
*
*/
static function getHTMLMetaData()
{
global $_zp_gallery, $_zp_page, $_zp_current_album, $_zp_current_image, $_zp_current_search, $_zp_current_article, $_zp_current_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority, $_zp_conf_vars, $_myFavorites;
$host = sanitize("http://" . $_SERVER['HTTP_HOST']);
$url = $host . getRequestURI();
// Convert locale shorttag to allowed html meta format
$locale_ = getUserLocale();
$locale = zpFunctions::getLanguageText($locale_, '-');
$canonicalurl = '';
// generate page title, get date
$pagetitle = "";
// for gallery index setup below switch
$date = strftime(DATE_FORMAT);
// if we don't have a item date use current date
$desc = getBareGalleryDesc();
$thumb = '';
if (getOption('htmlmeta_sitelogo')) {
$thumb = getOption('htmlmeta_sitelogo');
}
if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
$ogimage_width = getOption('htmlmeta_ogimage_width');
$ogimage_height = getOption('htmlmeta_ogimage_height');
if (empty($ogimage_width)) {
$ogimage_width = 1280;
}
if (empty($ogimage_height)) {
$ogimage_height = 900;
}
$twittercard_type = 'summary';
}
$type = 'article';
switch ($_zp_gallery_page) {
case 'index.php':
$desc = getBareGalleryDesc();
$canonicalurl = $host . $_zp_gallery->getLink($_zp_page);
$type = 'website';
break;
case 'album.php':
case 'favorites.php':
$pagetitle = getBareAlbumTitle() . " - ";
$date = getAlbumDate();
$desc = getBareAlbumDesc();
$canonicalurl = $host . $_zp_current_album->getLink($_zp_page);
if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
$thumbimg = $_zp_current_album->getAlbumThumbImage();
getMaxSpaceContainer($ogimage_width, $ogimage_height, $thumbimg, false);
$thumb = $host . html_encode(pathurlencode($thumbimg->getCustomImage(NULL, $ogimage_width, $ogimage_height, NULL, NULL, NULL, NULL, false, NULL)));
$twittercard_type = 'summary_large_image';
}
break;
case 'image.php':
$pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - ";
$date = getImageDate();
$desc = getBareImageDesc();
$canonicalurl = $host . $_zp_current_image->getLink();
if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
$thumb = $host . html_encode(pathurlencode(getCustomSizedImageMaxSpace($ogimage_width, $ogimage_height)));
$twittercard_type = 'summary_large_image';
}
break;
case 'news.php':
if (function_exists("is_NewsArticle")) {
if (is_NewsArticle()) {
$pagetitle = getBareNewsTitle() . " - ";
$date = getNewsDate();
$desc = trim(getBare(getNewsContent()));
$canonicalurl = $host . $_zp_current_article->getLink();
} else {
if (is_NewsCategory()) {
$pagetitle = $_zp_current_category->getTitlelink() . " - ";
$date = strftime(DATE_FORMAT);
$desc = trim(getBare($_zp_current_category->getDesc()));
$canonicalurl = $host . $_zp_current_category->getLink($_zp_page);
$type = 'category';
} else {
$pagetitle = gettext('News') . " - ";
$desc = '';
$canonicalurl = $host . getNewsPathNav($_zp_page);
$type = 'website';
}
}
}
break;
case 'pages.php':
$pagetitle = getBarePageTitle() . " - ";
$date = getPageDate();
$desc = trim(getBare(getPageContent()));
$canonicalurl = $host . $_zp_current_page->getLink();
break;
default:
// for all other possible static custom pages
$custompage = stripSuffix($_zp_gallery_page);
$standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required'));
if (is_object($_myFavorites)) {
$standard['favorites'] = gettext('My favorites');
}
//.........这里部分代码省略.........
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:101,代码来源:html_meta_tags.php
示例9: getAlbumTitle
?>
</ul>
<div class="data">
<?php
if (getAlbumTitle()) {
echo '<div class="c"><h4 class="box title">' . getAlbumTitle() . '</h4></div>';
}
?>
<?php
if (getAlbumDesc()) {
echo '<div class="c"><div class="box desc">' . getAlbumDesc() . '</div></div>';
}
?>
<?php
if (getAlbumDate()) {
echo '<div class="c"><small class="box date">' . getAlbumDate('%d.%m.%y %H:%M') . '</small></div>';
}
?>
</div>
</div>
<?php
include_once 'footer.php';
?>
</div>
<?php
include_once 'analytics.php';
?>
<?php
zp_apply_filter('theme_body_close');
if (extensionEnabled('colorbox_js') && zp_has_filter('theme_head', 'colorbox::css')) {
开发者ID:kokyandrei,项目名称:Unsupported,代码行数:31,代码来源:album.php
示例10: getHTMLMetaData
/**
* Prints html meta data to be used in the <head> section of a page
*
*/
function getHTMLMetaData()
{
global $_zp_gallery, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority;
$url = sanitize("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
// Convert locale shorttag to allowed html meta format
$locale = getOption("locale");
$locale = strtr($locale, "_", "-");
// generate page title, get date
$pagetitle = "";
$date = strftime(DATE_FORMAT);
// if we don't have a item date use current date
$desc = getBareGalleryDesc();
if (is_object($_zp_current_image) and is_object($_zp_current_album)) {
$pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - ";
$date = getImageDate();
$desc = getBareImageDesc();
}
if (is_object($_zp_current_album) and !is_object($_zp_current_image)) {
$pagetitle = getBareAlbumTitle() . " - ";
$date = getAlbumDate();
$desc = getBareAlbumDesc();
}
if (function_exists("is_NewsArticle")) {
if (is_NewsArticle()) {
$pagetitle = getBareNewsTitle() . " - ";
$date = getNewsDate();
$desc = strip_tags(getNewsContent());
} else {
if (is_NewsCategory()) {
$pagetitle = $_zp_current_category->getTitlelink() . " - ";
$date = strftime(DATE_FORMAT);
$desc = "";
} else {
if (is_Pages()) {
$pagetitle = getBarePageTitle() . " - ";
$date = getPageDate();
$desc = strip_tags(getPageContent());
}
}
}
}
// shorten desc to the allowed 200 characters if necesssary.
if (strlen($desc) > 200) {
$desc = substr($desc, 0, 200);
}
$pagetitle = $pagetitle . getBareGalleryTitle();
// get master admin
$admin = $_zp_authority->getAnAdmin(array('`user`=' => $_zp_authority->master_user, '`valid`=' => 1));
$author = $admin->getName();
$meta = '';
if (getOption('htmlmeta_http-equiv-language')) {
$meta .= '<meta http-equiv="language" content="' . $locale . '" />' . "\n";
}
if (getOption('htmlmeta_name-language')) {
$meta .= '<meta name="language" content="' . $locale . '" />' . "\n";
}
if (getOption('htmlmeta_name-content-language')) {
$meta .= '<meta name="content-language" content="' . $locale . '" />' . "\n";
}
if (getOption('htmlmeta_http-equiv-imagetoolbar')) {
$meta .= '<meta http-equiv="imagetoolbar" content="false" />' . "\n";
}
if (getOption('htmlmeta_http-equiv-cache-control')) {
$meta .= '<meta http-equiv="cache-control" content="' . getOption("htmlmeta_cache_control") . '" />' . "\n";
}
if (getOption('htmlmeta_http-equiv-pragma')) {
$meta .= '<meta http-equiv="pragma" content="' . getOption("htmlmeta_pragma") . '" />' . "\n";
}
if (getOption('htmlmeta_http-equiv-content-style-type')) {
$meta .= '<meta http-equiv="Content-Style-Type" content="text/css" />' . "\n";
}
if (getOption('htmlmeta_name-title')) {
$meta .= '<meta name="title" content="' . $pagetitle . '" />' . "\n";
}
if (getOption('htmlmeta_name-keywords')) {
$meta .= '<meta name="keywords" content="' . getMetaKeywords() . '" />' . "\n";
}
if (getOption('htmlmeta_name-description')) {
$meta .= '<meta name="description" content="' . $desc . '" />' . "\n";
}
if (getOption('htmlmeta_name-page-topic')) {
$meta .= '<meta name="page-topic" content="' . $desc . '" />' . "\n";
}
if (getOption('htmlmeta_name-robots')) {
$meta .= '<meta name="robots" content="' . getOption("htmlmeta_robots") . '" />' . "\n";
}
if (getOption('htmlmeta_name-publisher')) {
$meta .= '<meta name="publisher" content="' . FULLWEBPATH . '" />' . "\n";
}
if (getOption('htmlmeta_name-creator')) {
$meta .= '<meta name="creator" content="' . FULLWEBPATH . '" />' . "\n";
}
if (getOption('htmlmeta_name-author')) {
$meta .= '<meta name="author" content="' . $author . '" />' . "\n";
}
if (getOption('htmlmeta_name-copyright')) {
//.........这里部分代码省略.........
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:101,代码来源:html_meta_tags.php
示例11: checkIfNew
/**
* A little helper function that checks if an image or album is to be considered 'new' within the time range set in relation to getImageDate()/getAlbumDate()
* Returns true or false.
*
* @param string $mode What to check "image" or "album".
* @param integer $timerange The time range the item should be considered new. Default is 604800 (unix time seconds = ca. 7 days)
* @return bool
*/
function checkIfNew($mode = "image", $timerange = 604800)
{
$currentdate = date("U");
switch ($mode) {
case "image":
$itemdate = getImageDate("%s");
break;
case "album":
$itemdate = getAlbumDate("%s");
break;
}
$newcheck = $currentdate - $itemdate;
if ($newcheck < $timerange) {
return TRUE;
} else {
return FALSE;
}
}
开发者ID:andrewfandrew,项目名称:ferdinand-miranda,代码行数:26,代码来源:image_album_statistics.php
示例12: printCustomAlbumThumbImage
printCustomAlbumThumbImage(getAnnotatedAlbumTitle(), NULL, 376, 140, 376, 140, NULL, null, NULL, NULL);
?>
</a>
<span class="title">
<?php
echo getAnnotatedAlbumTitle();
?>
<span class="italic">
[<?php
printf(ngettext('%u image', '%u images', getNumImages()), getNumImages());
?>
]
</span><br />
<?php
echo getAlbumDate("(%d/%m/%Y)");
?>
</span>
</li>
<?php
}
?>
</ul>
<div class="l_clear"></div>
<ul class="album">
<?php
while (next_image()) {
?>
<li class="grid_5">
<a href="<?php
echo html_encode(getImageURL());
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:search.php
示例13: printAlbumDate
/**
* Prints the date of the current album and makes it editable in place if applicable
*
* @param string $before Insert here the text to be printed before the date.
* @param string $nonemessage Insert here the text to be printed if there is no date.
* @param string $format Format string for the date formatting
* @param bool $editable when true, enables AJAX editing in place
* @param string $editclass CSS class applied to element if editable
* @param mixed $messageIfEmpty Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.
* @author Ozh
*/
function printAlbumDate($before = '', $nonemessage = '', $format = null, $editable = false, $editclass = '', $messageIfEmpty = true)
{
if (is_null($format)) {
$format = DATE_FORMAT;
}
$date = getAlbumDate($format);
if ($date) {
$date = $before . $date;
} else {
$date = '';
if ($nonemessage != '') {
$messageIfEmpty = $nonemessage;
} elseif ($messageIfEmpty === true) {
$messageIfEmpty = gettext('(No date...)');
}
}
printEditable('album', 'date', $editable, $editclass, $messageIfEmpty, false, $date);
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:29,代码来源:template-functions.php
注:本文中的getAlbumDate函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论