<?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
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);