本文整理匯總了PHP中Gallery::addAlbumHandler方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gallery::addAlbumHandler方法的具體用法?PHP Gallery::addAlbumHandler怎麽用?PHP Gallery::addAlbumHandler使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Gallery
的用法示例。
在下文中一共展示了Gallery::addAlbumHandler方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: define
<?php
/**
* Album Class
* @package classes
*/
// force UTF-8 Ø
define('IMAGE_SORT_DIRECTION', getOption('image_sortdirection'));
define('IMAGE_SORT_TYPE', getOption('image_sorttype'));
Gallery::addAlbumHandler('alb', 'dynamicAlbum');
/**
* Wrapper instantiation function for albums. Do not instantiate directly
* @param string $folder8 the name of the folder (inernal character set)
* @param bool $cache true if the album should be fetched from the cache
* @param bool $quiet true to supress error messages
* @return Album
*/
function newAlbum($folder8, $cache = true, $quiet = false)
{
global $_zp_albumHandlers;
$suffix = getSuffix($folder8);
if (!$suffix || !array_key_exists($suffix, $_zp_albumHandlers) || is_dir(ALBUM_FOLDER_SERVERPATH . internalToFilesystem($folder8))) {
return new Album($folder8, $cache, $quiet);
} else {
return new $_zp_albumHandlers[$suffix]($folder8, $cache, $quiet);
}
}
/**
* Returns true if the object is a zenphoto 'album'
*
* @param object $album
示例2: toolbox
return NULL;
}
static function toolbox($zf)
{
global $_zp_gallery_page;
if (zp_loggedin(ALBUM_RIGHTS)) {
if ($_zp_gallery_page == 'favorites.php') {
?>
<li>
<a href="<?php
echo WEBPATH . '/' . FAVORITESALBUM_FOLDER;
?>
admin-album.php?title=<?php
echo @$_GET['instance'];
?>
" title="<?php
echo gettext('Create an album from favorites');
?>
"><?php
echo gettext('Create Album');
?>
</a>
</li>
<?php
}
}
return $zf;
}
}
Gallery::addAlbumHandler('fav', 'favoritesAlbum');
zp_register_filter('admin_toolbox_global', 'favoritesAlbum::toolbox', 20);