$objMiniMenu->add('Delete', 'index.php?action=albums&subaction=delete&' . $objAlbum->getIDPair()); } /* Moving the album. */ if (!$objAlbum->isNew() && $objAlbum->canEdit($objUser)) { $objMiniMenu->add('Move', 'index.php?action=albums&subaction=move&' . $objAlbum->getIDPair()); } /* Creating an album/sub album. */ if ($objUser && $objAlbum->isNew()) { $objMiniMenu->add('Create Album', 'index.php?action=albums&subaction=edit'); } else { if ($objUser && $objAlbum->canCreateSubalbum($objUser)) { $objMiniMenu->add('Create Sub-album', 'index.php?action=albums&subaction=edit&album_album_id=' . $objAlbum->get('id')); } } /* Posting a picture. */ if ($objAlbum->canPostPicture($objUser)) { $objMiniMenu->add('Post Picture', 'index.php?action=upload&' . $objAlbum->getIDPair()); } if ($objUser) { $objMiniMenu->add('Mark All as Seen', 'index.php?action=albums&subaction=seen&' . $objAlbum->getIDPair()); } $objTemplate->setText('PAGETITLE', 'Albums' . ($objAlbum->get('id') == 0 ? '' : " -- " . $objAlbum->get('name'))); /* Get the array of sub albums. */ $arrSubAlbums = $objAlbum->getSubAlbums($objUser); /* This script allows the albums to be expanded/hidden. */ $objTemplate->setText('SCRIPT', clsAlbum::getSubAlbumScript()); $objTemplate->setText('SCRIPT', clsAlbum::getAllAlbumScript($arrSubAlbums)); /* Display the caption */ if (strlen($objAlbum->get('caption'))) { print "<span class='albumcaption'>" . bbcode_format($objAlbum->get('caption')) . "</span><hr>"; }