/** * Prints a list of all albums context sensitive. * Since 1.4.3 this is a wrapper function for the separate functions printAlbumMenuList() and printAlbumMenuJump(). * that was included to remain compatiblility with older installs of this menu. * * Usage: add the following to the php page where you wish to use these menus: * enable this extension on the zenphoto admin plugins tab. * Call the function printAlbumMenu() at the point where you want the menu to appear. * * @param string $option * * "list" for html list, * "list-top" for only the top level albums, * "omit-top" same as list, but the first level of albums is omitted * "list-sub" lists the offspring level of subalbums for the current album * "jump" dropdown menu of all albums(not context sensitive) * * @param bool $showcount true for a image counter or subalbum count in brackets behind the album name, false for no image numbers or leave blank * @param string $css_id insert css id for the main album list, leave empty if you don't use (only list mode) * @param string $css_class_topactive insert css class for the active link in the main album list (only list mode) * @param string $css_class insert css class for the sub album lists (only list mode) * @param string $css_class_active insert css class for the active link in the sub album lists (only list mode) * @param string $indexname insert the name how you want to call the link to the gallery index (insert "" if you don't use it, it is not printed then) * @param int C Set to depth of sublevels that should be shown always. 0 by default. To show all, set to a true! Only valid if option=="list". * @param int $showsubs Set to depth of sublevels that should be shown always. 0 by default. To show all, set to a true! Only valid if option=="list". * @param bool $firstimagelink If set to TRUE and if the album has images the link will point to page of the first image instead the album thumbnail page * @param bool $keeptopactive If set to TRUE the toplevel album entry will stay marked as active if within its subalbums ("list" only) * @param int $limit truncation of display text * @since 1.2 */ function printAlbumMenu($option, $showcount = NULL, $css_id = '', $css_class_topactive = '', $css_class = '', $css_class_active = '', $indexname = "Gallery Index", $showsubs = NULL, $firstimagelink = false, $keeptopactive = false) { if ($option == "jump") { printAlbumMenuJump($showcount, $indexname, $firstimagelink); } else { printAlbumMenuList($option, $showcount, $css_id, $css_class_topactive, $css_class, $css_class_active, $indexname, $showsubs, $firstimagelink, $keeptopactive); } }
<div id="sidemenu"> <?php if (function_exists('printAlbumMenuJump')) { printAlbumMenuJump('count', gettext('Home')); } ?> <?php if ($zpmin_menu && function_exists('printCustomMenu')) { printCustomMenu($zpmin_menu, 'list', 'nav', 'active', '', 'active', true, true, gettext('Home')); } else { ?> <ul id="nav"> <li><a href="<?php echo html_encode(getGalleryIndexURL()); ?> " title="<?php echo 'Home'; ?> "><?php echo 'Home'; ?> </a></li> <li <?php if ($galleryactive) { ?> class="active" <?php } ?> ><a href="<?php echo getCustomPageURL('gallery');
function printBaseAlbumMenuJump($option = "count", $indexname = "Gallery Index", $firstimagelink = false) { $type = getOption('zpbase_selectmenu'); if ($type) { require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/print_album_menu.php'; global $_zp_gallery, $_zp_current_album, $_zp_gallery_page; $albumpath = rewrite_path("/", "/index.php?album="); if (!is_null($_zp_current_album) || $_zp_gallery_page == 'album.php') { $currentfolder = $_zp_current_album->name; } if ($type == 'standard') { ?> <script type="text/javaScript"> // <!-- <![CDATA[ function gotoLink(form) { var OptionIndex=form.ListBoxURL.selectedIndex; parent.location = form.ListBoxURL.options[OptionIndex].value; } // ]]> --> </script> <form> <select name="ListBoxURL" size="1" onchange="gotoLink(this.form);"> <?php } else { ?> <form> <select> <?php } if (getOption('zpbase_galleryishome')) { if ($_zp_gallery_page == "index.php" || $_zp_gallery_page == "album.php") { ?> <option <?php if ($_zp_gallery_page == "index.php") { echo 'selected'; } ?> value="<?php echo html_encode(getGalleryIndexURL()); ?> "><?php echo $indexname; ?> </option> <?php } else { ?> <option selected value=""><?php echo gettext('Select Album...'); ?> </option> <option value="<?php echo html_encode(getGalleryIndexURL()); ?> "><?php echo $indexname; ?> </option> <?php } } else { ?> <option <?php if ($_zp_gallery_page == "index.php") { echo 'selected'; } ?> value="<?php echo html_encode(getGalleryIndexURL()); ?> "><?php echo gettext('Home'); ?> </option> <?php if ($_zp_gallery_page == "gallery.php" || $_zp_gallery_page == "album.php") { ?> <option <?php if ($_zp_gallery_page == "gallery.php") { echo 'selected'; } ?> value="<?php echo getCustomPageURL('gallery'); ?> "><?php echo $indexname; ?> </option> <?php } else { ?> <?php if ($_zp_gallery_page != "index.php") { ?> <option selected value=""><?php echo gettext('Select Album...'); ?> </option><?php } ?> <option value="<?php echo getCustomPageURL('gallery'); ?> "><?php echo $indexname; ?> </option> <?php } } printAlbumMenuJump($option, "", $firstimagelink, NULL, true); ?> </select> </form> <?php } }
/** * Prints a list of all albums context sensitive up to the 4th subalbum level. * Since 1.4.3 this is a wrapper function for the separate functions printAlbumMenuList() and printAlbumMenuJump(). * that was included to remain compatiblility with older installs of this menu. * * Usage: add the following to the php page where you wish to use these menus: * enable this extension on the zenphoto admin plugins tab. * Call the function printAlbumMenu() at the point where you want the menu to appear. * * @param string $option "list" for html list, "list-top" for only the top level albums, "list-sub" for only the subalbums if in one of theme or their toplevel album * @param string $option2 "count" for a image counter in brackets behind the album name, "" = for no image numbers or leave blank * @param string $css_id insert css id for the main album list, leave blank if you don't use (only list mode) * @param string $css_class_topactive insert css class for the active link in the main album list (only list mode) * @param string $css_class insert css class for the sub album lists (only list mode) * @param string $css_class_active insert css class for the active link in the sub album lists (only list mode) * @param string $indexname insert the name how you want to call the link to the gallery index (insert "" if you don't use it, it is not printed then) * @param string $showsubs 'true' to always show the subalbums, 'false' for normal context sensitive behaviour (only list mode) * @return html list or drop down jump menu of the albums * @since 1.2 */ function printAlbumMenu($option, $option2, $css_id = '', $css_class_topactive = '', $css_class = '', $css_class_active = '', $indexname = "Gallery Index", $showsubs = false) { if ($option === "list" or $option === "list-top" or $option === "list-sub") { printAlbumMenuList($option, $option2, $css_id, $css_class_topactive, $css_class, $css_class_active, $indexname, $showsubs); } else { if ($option === "jump") { printAlbumMenuJump($option, $indexname); } } }
<div id="sidebar-padding"> <div class="sidebar-divide"> <h2><?php echo gettext('Welcome'); ?> </h2> <?php printGalleryDesc(true); ?> </div> <?php if (function_exists('printAlbumMenuJump')) { ?> <div class="sidebar-divide"> <?php printAlbumMenuJump('count', gettext('Gallery Index')); ?> </div> <?php } ?> <?php if (getOption('zp_plugin-zenpage') && getOption('zpmas_usenews')) { ?> <div class="latest sidebar-divide"> <?php printLatestNews(1); ?> </div> <?php }