Procedural File: print_album_menu.php
Source Location: /zp-extensions/print_album_menu.php
Page Details
| Author: | Malte Müller (acrylian), Stephen Billard (sbillard) |
Constants
ALBUM_MENU_COUNT [line 16]
ALBUM_MENU_COUNT = getOption('print_album_menu_count')
|
|
ALBUM_MENU_SHOWSUBS [line 17]
ALBUM_MENU_SHOWSUBS = getOption('print_album_menu_showsubs')
|
|
Functions
checkSelectedAlbum [line 373]
A printAlbumMenu() helper function for the jump menu mode of printAlbumMenu() that only checks which the current album so that the entry in the in the dropdown jump menu can be selected Not for standalone use.
Parameters:
|
string |
$checkalbum: |
The album folder name to check |
|
string |
$option: |
"index" for index level, "album" for album level |
API Tags:
| Return: | returns nothing or "selected" |
string checkSelectedAlbum(
string $checkalbum, string $option
)
|
|
getFirstImageOfAlbum [line 401]
Returns the link of the first image in $albumobj
Parameters:
|
object |
$albumobj: |
The object of the album to use |
void getFirstImageOfAlbum(
object $albumobj
)
|
|
printAlbumMenu [line 101]
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.
Parameters:
|
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) |
|
bool |
$showcount: |
true for a image counter or subalbum count in brackets behind the album name, false for no image numbers or leave blank |
|
string |
$css_id: |
insert css id for the main album list, leave empty if you don't use (only list mode) |
|
string |
$css_class_topactive: |
insert css class for the active link in the main album list (only list mode) |
|
string |
$css_class: |
insert css class for the sub album lists (only list mode) |
|
string |
$css_class_active: |
insert css class for the active link in the sub album lists (only list mode) |
|
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) |
|
int |
$showsubs: |
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". |
|
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 |
|
bool |
$keeptopactive: |
If set to TRUE the toplevel album entry will stay marked as active if within its subalbums ("list" only) |
|
int |
$limit: |
truncation of display text |
Information Tags:
void printAlbumMenu(
string $option, [bool $showcount = NULL], [string $css_id = ''], [string $css_class_topactive = ''], [string $css_class = ''], [string $css_class_active = ''], [string $indexname = "Gallery Index"], [int $showsubs = NULL], [bool $firstimagelink = false], [bool $keeptopactive = false], int $limit
)
|
|
printAlbumMenuJump [line 292]
Prints a dropdown menu of all albums(not context sensitive) Is used by the wrapper function printAlbumMenu() if the options "jump" is choosen. For standalone use, too.
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 printAlbumMenuJump() at the point where you want the menu to appear.
Parameters:
|
string |
$option: |
"count" for a image counter in brackets behind the album name, "" = for no image numbers |
|
string |
$indexname: |
insert the name (default "Gallery Index") how you want to call the link to the gallery index, insert "" if you don't use it, it is not printed then. |
|
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 |
void printAlbumMenuJump(
[string $option = "count"], [string $indexname = "Gallery Index"], [bool $firstimagelink = false]
)
|
|
printAlbumMenuJumpAlbum [line 335]
Handles a single album level for printAlbumMenuJump
Parameters:
|
array |
$albums: |
list of album names |
|
string |
$showcount: |
see printAlbumMenuJump |
|
string |
$albumpath: |
path of the page album |
|
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 |
|
int |
$level: |
current level |
|
|
$option: |
|
void printAlbumMenuJumpAlbum(
array $albums, $option, string $albumpath, bool $firstimagelink, [int $level = 1], string $showcount
)
|
|
printAlbumMenuList [line 135]
Prints a nested html list of all albums context sensitive.
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 printAlbumMenuList() at the point where you want the menu to appear.
Parameters:
|
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 |
|
bool |
$showcount: |
true for a image counter in brackets behind the album name, false for no image numbers or leave empty |
|
string |
$css_id: |
insert css id for the main album list, leave empty if you don't use (only list mode) |
|
string |
$css_id_active: |
insert css class for the active link in the main album list (only list mode) |
|
string |
$css_class: |
insert css class for the sub album lists (only list mode) |
|
string |
$css_class_active: |
insert css class for the active link in the sub album lists (only list mode) |
|
string |
$indexname: |
insert the name (default "Gallery Index") how you want to call the link to the gallery index, insert "" if you don't use it, it is not printed then. |
|
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". |
|
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 |
|
bool |
$keeptopactive: |
If set to TRUE the toplevel album entry will stay marked as active if within its subalbums ("list" only) |
|
bool |
$startlist: |
set to true to output the UL tab (false automatically if you use 'omit-top' or 'list-sub') |
|
int |
$limit: |
truncation of display text |
|
|
$css_class_topactive: |
|
API Tags:
| Return: | list of the albums |
html printAlbumMenuList(
string $option, [bool $showcount = NULL], [string $css_id = ''], [ $css_class_topactive = ''], [string $css_class = ''], [string $css_class_active = ''], [string $indexname = "Gallery Index"], [int $showsubs = NULL], [bool $firstimagelink = false], [bool $keeptopactive = false], [bool $startlist = true], [int $limit = NULL], string $css_id_active
)
|
|
printAlbumMenuListAlbum [line 192]
Handles an album for printAlbumMenuList
Parameters:
|
array |
$albums: |
albums array |
|
string |
$path: |
for createAlbumMenuLink |
|
string |
$folder: |
|
|
string |
$option: |
see printAlbumMenuList |
|
string |
$showcount: |
see printAlbumMenuList |
|
int |
$showsubs: |
see printAlbumMenuList |
|
string |
$css_class: |
see printAlbumMenuList |
|
string |
$css_class_topactive: |
see printAlbumMenuList |
|
string |
$css_class_active: |
see printAlbumMenuList |
|
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 |
|
bool |
$keeptopactive: |
If set to TRUE the toplevel album entry will stay marked as active if within its subalbums ("list" only) |
|
int |
$limit: |
truncation of display text |
void printAlbumMenuListAlbum(
array $albums, string $path, string $folder, string $option, string $showcount, int $showsubs, string $css_class, string $css_class_topactive, string $css_class_active, bool $firstimagelink, bool $keeptopactive, [int $limit = NULL]
)
|
|
|
|