Methods summary
public
Gallery
|
#
__construct( )
Creates an instance of a gallery
Creates an instance of a gallery
Returns
|
public
string
|
#
getTitle( $locale = NULL )
Returns the gallery title
Returns the gallery title
Returns
string
|
public
string
|
#
getBareTitle( string $locale = NULL )
Returns a tag stripped title
Returns a tag stripped title
Parameters
Returns
string
|
public
|
|
public
string
|
#
getDesc( $locale = NULL )
Returns the gallery description
Returns the gallery description
Returns
string
|
public
|
#
setDesc( string $desc )
Sets the gallery description
Sets the gallery description
Parameters
Since
ZenphotoCMS 1.5.8
|
public
type
|
#
getCopyrightNotice( type $locale = null )
Gets the copyright notice
Gets the copyright notice
Parameters
Returns
type
Since
ZenphotoCMS 1.5.8
|
public
|
#
setCopyrightNotice( type $notice )
Sets the copyright notice
Sets the copyright notice
Parameters
Since
ZenphotoCMS 1.5.8
|
public
|
#
getCopyrightRightsholder( )
Gets the copyright site holder
Gets the copyright site holder
Note: This does not fetch an actual field value but with some fallbacks
- 'copyright_site_rightsholder' field
- 'copyright_site_rightsholder_custom' field
- The site master user
Since
ZenphotoCMS 1.5.8
See
getRightsholderCopyrightCustom()
getRightsholderCopyright()
|
public
type
|
#
getCopyrightURL( )
Gets the copyright site url
Returns
type
Since
ZenphotoCMS 1.5.8
|
public
|
#
setCopyrightURL( type $url )
Sets the copyright site url
Sets the copyright site url
Parameters
Since
ZenphotoCMS 1.5.8
|
public
|
#
getPassword( )
Returns the hashed password for guest gallery access
Returns the hashed password for guest gallery access
|
public
|
|
public
string
|
#
getPasswordHint( $locale = NULL )
Returns the hind associated with the gallery password
Returns the hind associated with the gallery password
Returns
string
|
public
|
|
public
|
|
public
|
|
public
string
|
#
getAlbumDir( )
Returns the main albums directory
Returns the main albums directory
Returns
string
|
public
string
|
#
getAlbumSortKey( string $sorttype = null )
Returns the DB field corresponding to the album sort type desired
Returns the DB field corresponding to the album sort type desired
Parameters
- $sorttype
- the desired sort
Returns
string
|
public
|
|
public
|
|
public
|
|
public
|
|
public
array
|
#
getAlbums( integer $page = 0, string $sorttype = null, string $sortdirection = null, boolean $care = true, boolean $mine = NULL )
Get Albums will create our $albums array with a fully populated set of Album
names in the correct order.
Get Albums will create our $albums array with a fully populated set of Album
names in the correct order.
Returns an array of albums (a pages worth if $page is not zero)
Parameters
- $page
- An option parameter that can be used to return a slice of the array.
- $sorttype
- the kind of sort desired
- $sortdirection
- set to a direction to override the default option
- $care
- set to false if the order of the albums does not matter
- $mine
- set true/false to override ownership
Returns
array
|
public
array
|
#
getAllAlbums( obj $albumobj = NULL, integer $rights = UPLOAD_RIGHTS, boolean $includetitles = true )
Gets all albums with the right order as set on the backend.
Gets all albums with the right order as set on the backend.
Note while this is an very accurate result since this is using the filesystem to check
and keeps the individuel sort order settings of each subalbum level it is therefore very slow on large galleries with
thousands of albums.
Use the much faster but less accurate getAllAlbumsFromDB() instead if speed is needed. This is best used for any
albums selector.
Note unless the §rights parameter is set to ALL_ALBUMS_RIGHTS or higher or the user is full admin dynamic albums are excluded.
Parameters
- $albumobj
- Default null for all albums, optional albumobject to get all sublevels of
- $rights
- Rights constant to check the album access by, default UPLOAD_RIGHTS. Set to null to disable rights check
- $includetitles
- If set to true (default) returns an array with the album names as keys and the titles as values, otherwise just an array with the names
Returns
array
Since
Zenphoto 1.5.8 - general functionality moved from the old admin function genAlbumList()
|
public
array
|
#
getAllAlbumsFromDB( boolean $keeplevel_sortorder = false, obj $albumobj = NULL, integer $rights = UPLOAD_RIGHTS, boolean $includetitles = true )
Gets all albums from the database direclty. This is less accurate than getAllAlbums() but much faster on
large sites with thousends of albums especially if $keeplevel_sortorder is kept false.
Note that the filesystem and databse may be out of sync in the moment of fetching the data.
If you need to be sure to cover this use getAllAlbums();
Gets all albums from the database direclty. This is less accurate than getAllAlbums() but much faster on
large sites with thousends of albums especially if $keeplevel_sortorder is kept false.
Note that the filesystem and databse may be out of sync in the moment of fetching the data.
If you need to be sure to cover this use getAllAlbums();
$keeplevel_sortorder is false so the order follows their nesting but the sortorder
of individual sublevels is not kept to archieve greater speed.
Order is simply by folder name instead. Set to true each subalbum level follows its individual sort order setting.
While this is also faster than getAllAlbums() this is significantly slower than the default.
Note unless the §rights parameter is set to ALL_ALBUMS_RIGHTS or higher or the user is full admin dynamic albums are excluded.
Parameters
- $keeplevel_sortorder
- Default false, set to true if the sublevels should sorted by their individual settings (slower)
- $albumobj
- Default null for all albums, optional albumobject to get all sublevels of
- $rights
- Rights constant to check the album access by, default UPLOAD_RIGHTS
- $includetitles
- If set to true (default) returns an array with the album names as keys and the titles as values, otherwise just an array with the names
Returns
array
Since
Zenphoto 1.5.8
|
public
Album
|
#
getAlbum( integer $index )
Returns the a specific album in the array indicated by index.
Takes care of bounds checking, no need to check input.
Returns the a specific album in the array indicated by index.
Takes care of bounds checking, no need to check input.
Parameters
- $index
- the index of the album sought
Returns
|
public
integer
|
#
getNumAlbums( boolean $db = false, boolean $publishedOnly = false )
Returns the total number of TOPLEVEL albums in the gallery (does not include sub-albums)
Returns the total number of TOPLEVEL albums in the gallery (does not include sub-albums)
Parameters
- $db
- whether or not to use the database (includes ALL detected albums) or the directories
- $publishedOnly
- set to true to exclude un-published albums
Returns
integer
|
public
array
|
#
getThemes( )
Populates the theme array and returns it. The theme array contains information about
all the currently available themes.
Populates the theme array and returns it. The theme array contains information about
all the currently available themes.
Returns
array
|
public
string
|
#
getCurrentTheme( )
Returns the foldername of the current theme.
if no theme is set, picks the "first" theme.
Returns the foldername of the current theme.
if no theme is set, picks the "first" theme.
Returns
string
|
public
|
#
setCurrentTheme( string $theme )
Sets the current theme
Parameters
- $theme
- name of the current theme
|
public
integer
|
#
getNumImages( integer $what = 0 )
Returns the number of images in the gallery
Returns the number of images in the gallery
Parameters
- $what
0: all images from the database
1: published images from the database
2: "viewable" images via the object model
Returns
integer
|
public
boolean
|
#
garbageCollect( boolean $cascade = true, boolean $complete = false, integer $restart = '' )
For every album in the gallery, look for its file. Delete from the database
if the file does not exist. Do the same for images. Clean up comments that have
been left orphaned.
For every album in the gallery, look for its file. Delete from the database
if the file does not exist. Do the same for images. Clean up comments that have
been left orphaned.
Returns true if the operation was interrupted because it was taking too long
Parameters
- $cascade
- garbage collect every image and album in the gallery.
- $complete
- garbage collect every image and album in the database - completely cleans the database.
- $restart
- Image ID to restart scan from
Returns
boolean
|
public static
|
#
clearCache( string $cachefolder = NULL )
Cleans out the cache folder
Cleans out the cache folder
Parameters
- $cachefolder
- the sub-folder to clean
|
public
array
|
#
sortAlbumArray( array $parentalbum, string $albums, string $sortkey = '`sort_order`', boolean $sortdirection = NULL, $mine = NULL )
Sort the album array based on either according to the sort key.
Default is to sort on the sort_order field.
Sort the album array based on either according to the sort key.
Default is to sort on the sort_order field.
Returns an array with the albums in the desired sort order
Parameters
- $parentalbum
- $albums array of album names
- $albums
- $sortkey the sorting scheme
- $sortkey
- $sortdirection
- $sortdirection
- $mine set true/false to override ownership
- $mine
Returns
array
Author
Todd Papaioannou (lucky@luckyspin.org)
Since
1.0.0
|
public
integer
|
|
public
|
#
countHit( )
counts visits to the object
counts visits to the object
|
public
|
#
getWebsiteTitle( $locale = NULL )
Title to be used for the home (not Zenphoto gallery) WEBsite
Title to be used for the home (not Zenphoto gallery) WEBsite
|
public
|
|
public
|
#
getWebsiteURL( )
The URL of the home (not Zenphoto gallery) WEBsite
The URL of the home (not Zenphoto gallery) WEBsite
|
public
|
|
public
|
#
getSecurity( )
Option to allow only registered users view the site
Option to allow only registered users view the site
|
public
|
|
public
|
#
getUserLogonField( )
Option to expose the user field on logon forms
Option to expose the user field on logon forms
|
public
|
|
public
|
#
getAlbumUseImagedate( )
Option to update album date from date of new images
Option to update album date from date of new images
|
public
|
|
public
|
#
getThumbSelectImages( )
Option to show images in the thumbnail selector
Option to show images in the thumbnail selector
|
public
|
|
public
|
#
getSecondLevelThumbs( )
Option to show subalbum images in the thumbnail selector
Option to show subalbum images in the thumbnail selector
|
public
|
|
public
|
|
public
|
|
public
|
#
isUnprotectedPage( $page )
Tests if a page is excluded from password protection
Parameters
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
array
|
#
getCodeblock( )
Returns the codeblocks as an serialized array
Returns the codeblocks as an serialized array
Returns
array
|
public
|
#
setCodeblock( $cb )
set the codeblocks as an serialized array
set the codeblocks as an serialized array
|
public
|
#
checkforGuest( unknown_type & $hint = NULL, unknown_type & $show = NULL )
Checks if guest is loggedin for the album
Checks if guest is loggedin for the album
Parameters
|
public
|
#
isProtected( )
returns true if there is any protection on the gallery
|
public
|
|
public
|
|
public
|
|
public
string
|
#
__toString( )
"Magic" function to return a string identifying the object when it is treated as a string
Returns
string
|
public static
|
#
addImageHandler( type $suffix, type $objectName )
registers object handlers for image varients
registers object handlers for image varients
Parameters
|
public static
boolean
|
#
validImage( string $filename )
Returns true if the file is an image
Returns true if the file is an image
Parameters
- $filename
- the name of the target
Returns
boolean
|
public static
boolean
|
#
validImageAlt( string $filename )
Returns true if the file is handled by an image handler plugin object
Returns true if the file is handled by an image handler plugin object
Parameters
Returns
boolean
|
public static
|
#
addAlbumHandler( type $suffix, type $objectName )
registers object handlers for album varients
registers object handlers for album varients
Parameters
|