deprecated-functions.php
The version number within @deprecated indicates the version these will be removed completely
Tags
Table of Contents
Classes
- internal_deprecations
- Zenphoto general deprecated functions
- zpFunctions
Functions
- setThemeColumns() : mixed
- controls the thumbnail layout of themes.
- getMimeString() : string
- Returns the mimetype for a suffix
- newAlbum() : Album
- Wrapper instantiation function for albums. Do not instantiate directly
- isAlbumClass() : bool
- Returns true if the object is a zenphoto 'album'
- getUrAlbum() : object
- Returns the oldest ancestor of an alubm;
- newImage() : object
- Returns a new "image" object based on the file extension
- isImageClass() : bool
- Returns true if the object is a zenphoto 'image'
- search_quote() : string
- encloses search word in quotes if needed
- isImageVideo() : bool
- Returns video argument of the current Image.
- isImagePhoto() : bool
- Returns true if the image is a standard photo type
- replaceOption() : mixed
- Replaces/renames an option. If the old option exits, it creates the new option with the old option's value as the default unless the new option has already been set otherwise. Independently it always deletes the old option.
- is_valid_email_zp() : bool
- Determines if the input is an e-mail address. Adapted from WordPress.
- genAlbumList() : mixed
- Populatest $list with an one dimensional list with album name and title of all albums or the subalbums of a specific album
- getAllAlbums() : array<string|int, mixed>
- Returns a list of all albums decendent from an album
- printPopularAlbums() : mixed
- printLatestAlbums() : mixed
- printMostRatedAlbums() : mixed
- printTopRatedAlbums() : mixed
- printLatestUpdatedAlbums() : mixed
- printPopularImages() : mixed
- printTopRatedImages() : mixed
- printMostRatedImages() : mixed
- printLatestImages() : mixed
- printLatestImagesByDate() : mixed
- printLatestImagesByMtime() : mixed
- filterImageQuery() : mixed
- performs a query and then filters out "illegal" images returning the first "good" image used by the random image functions.
- getRandomImages() : object
- Returns a randomly selected image from the gallery. (May be NULL if none exists)
- getRandomImagesAlbum() : object
- Returns a randomly selected image from the album or its subalbums. (May be NULL if none exists)
- printRandomImages() : mixed
- Puts up random image thumbs from the gallery
- cleanHTML() : string
- fixes unbalanced HTML tags. Used by shortenContent when PHP tidy is not present
- getTotalImagesIn() : int
- Returns the count of all the images in the album and any subalbums
- checkPublishDates() : mixed
- checks if the item has expired
Functions
setThemeColumns()
controls the thumbnail layout of themes.
setThemeColumns() : mixed
Uses the theme options: albums_per_row albums_per_page images_per_row images_per_page
Tags
getMimeString()
Returns the mimetype for a suffix
getMimeString(string $suffix) : string
Parameters
- $suffix : string
-
Suffix without . to get the mimetype for
Tags
Return values
stringnewAlbum()
Wrapper instantiation function for albums. Do not instantiate directly
newAlbum(string $folder8[, bool $cache = true ][, bool $quiet = false ]) : Album
Parameters
- $folder8 : string
-
the name of the folder (inernal character set)
- $cache : bool = true
-
true if the album should be fetched from the cache
- $quiet : bool = false
-
true to supress error messages
Tags
Return values
AlbumisAlbumClass()
Returns true if the object is a zenphoto 'album'
isAlbumClass([object $album = NULL ]) : bool
Parameters
- $album : object = NULL
Tags
Return values
boolgetUrAlbum()
Returns the oldest ancestor of an alubm;
getUrAlbum(string $album) : object
Parameters
- $album : string
-
an album object
Tags
Return values
objectnewImage()
Returns a new "image" object based on the file extension
newImage(object $album, string $filename[, bool $quiet = false ]) : object
Parameters
- $album : object
-
the owner album
- $filename : string
-
the filename
- $quiet : bool = false
-
set true to supress error messages (used by loadimage)
Tags
Return values
objectisImageClass()
Returns true if the object is a zenphoto 'image'
isImageClass([object $image = NULL ]) : bool
Parameters
- $image : object = NULL
Tags
Return values
boolsearch_quote()
encloses search word in quotes if needed
search_quote(string $word) : string
Parameters
- $word : string
Tags
Return values
stringisImageVideo()
Returns video argument of the current Image.
isImageVideo([object $image = NULL ]) : bool
Parameters
- $image : object = NULL
-
optional image object
Tags
Return values
boolisImagePhoto()
Returns true if the image is a standard photo type
isImagePhoto([object $image = NULL ]) : bool
Parameters
- $image : object = NULL
-
optional image object
Tags
Return values
boolreplaceOption()
Replaces/renames an option. If the old option exits, it creates the new option with the old option's value as the default unless the new option has already been set otherwise. Independently it always deletes the old option.
replaceOption(string $oldkey, string $newkey) : mixed
Parameters
- $oldkey : string
-
Old option name
- $newkey : string
-
New option name
Tags
is_valid_email_zp()
Determines if the input is an e-mail address. Adapted from WordPress.
is_valid_email_zp(string $input_email) : bool
Name changed to avoid conflicts in WP integrations.
Parameters
- $input_email : string
-
email address?
Tags
Return values
boolgenAlbumList()
Populatest $list with an one dimensional list with album name and title of all albums or the subalbums of a specific album
genAlbumList(array<string|int, mixed> &$list[, obj $curAlbum = NULL ][, int $rights = UPLOAD_RIGHTS ]) : mixed
Parameters
- $list : array<string|int, mixed>
-
The array to fill with the album list
- $curAlbum : obj = NULL
-
Optional object of the album to start with
- $rights : int = UPLOAD_RIGHTS
-
Rights constant to filter album access by.
Tags
getAllAlbums()
Returns a list of all albums decendent from an album
getAllAlbums([object $album = NULL ]) : array<string|int, mixed>
Parameters
- $album : object = NULL
-
optional album. If absent the current album is used
Tags
Return values
array<string|int, mixed>printPopularAlbums()
printPopularAlbums([mixed $number = 5 ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = 'hitcounter' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $albumfolder = '' ][, mixed $firstimglink = false ][, mixed $threshold = 0 ][, mixed $collection = false ]) : mixed
Parameters
- $number : mixed = 5
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = 'hitcounter'
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $albumfolder : mixed = ''
- $firstimglink : mixed = false
- $threshold : mixed = 0
- $collection : mixed = false
Tags
printLatestAlbums()
printLatestAlbums([mixed $number = 5 ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = '' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $albumfolder = '' ][, mixed $firstimglink = false ][, mixed $collection = false ]) : mixed
Parameters
- $number : mixed = 5
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = ''
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $albumfolder : mixed = ''
- $firstimglink : mixed = false
- $collection : mixed = false
Tags
printMostRatedAlbums()
printMostRatedAlbums([mixed $number = 5 ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = '' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $albumfolder = '' ][, mixed $firstimglink = false ][, mixed $threshold = 0 ][, mixed $collection = false ]) : mixed
Parameters
- $number : mixed = 5
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = ''
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $albumfolder : mixed = ''
- $firstimglink : mixed = false
- $threshold : mixed = 0
- $collection : mixed = false
Tags
printTopRatedAlbums()
printTopRatedAlbums([mixed $number = 5 ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = '' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $albumfolder = '' ][, mixed $firstimglink = false ][, mixed $threshold = 0 ][, mixed $collection = false ]) : mixed
Parameters
- $number : mixed = 5
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = ''
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $albumfolder : mixed = ''
- $firstimglink : mixed = false
- $threshold : mixed = 0
- $collection : mixed = false
Tags
printLatestUpdatedAlbums()
printLatestUpdatedAlbums([mixed $number = 5 ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = '' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $albumfolder = '' ][, mixed $firstimglink = false ][, mixed $collection = false ]) : mixed
Parameters
- $number : mixed = 5
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = ''
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $albumfolder : mixed = ''
- $firstimglink : mixed = false
- $collection : mixed = false
Tags
printPopularImages()
printPopularImages([mixed $number = 5 ][, mixed $albumfolder = '' ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = '' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $collection = false ][, mixed $fullimagelink = false ][, mixed $threshold = 0 ]) : mixed
Parameters
- $number : mixed = 5
- $albumfolder : mixed = ''
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = ''
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $collection : mixed = false
- $fullimagelink : mixed = false
- $threshold : mixed = 0
Tags
printTopRatedImages()
printTopRatedImages([mixed $number = 5 ][, mixed $albumfolder = "" ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = '' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $collection = false ][, mixed $fullimagelink = false ][, mixed $threshold = 0 ]) : mixed
Parameters
- $number : mixed = 5
- $albumfolder : mixed = ""
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = ''
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $collection : mixed = false
- $fullimagelink : mixed = false
- $threshold : mixed = 0
Tags
printMostRatedImages()
printMostRatedImages([mixed $number = 5 ][, mixed $albumfolder = '' ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = '' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $collection = false ][, mixed $fullimagelink = false ][, mixed $threshold = 0 ]) : mixed
Parameters
- $number : mixed = 5
- $albumfolder : mixed = ''
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = ''
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $collection : mixed = false
- $fullimagelink : mixed = false
- $threshold : mixed = 0
Tags
printLatestImages()
printLatestImages([mixed $number = 5 ][, mixed $albumfolder = '' ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = '' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $collection = false ][, mixed $fullimagelink = false ]) : mixed
Parameters
- $number : mixed = 5
- $albumfolder : mixed = ''
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = ''
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $collection : mixed = false
- $fullimagelink : mixed = false
Tags
printLatestImagesByDate()
printLatestImagesByDate([mixed $number = 5 ][, mixed $albumfolder = '' ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = '' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $collection = false ][, mixed $fullimagelink = false ]) : mixed
Parameters
- $number : mixed = 5
- $albumfolder : mixed = ''
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = ''
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $collection : mixed = false
- $fullimagelink : mixed = false
Tags
printLatestImagesByMtime()
printLatestImagesByMtime([mixed $number = 5 ][, mixed $albumfolder = '' ][, mixed $showtitle = false ][, mixed $showdate = false ][, mixed $showdesc = false ][, mixed $desclength = 40 ][, mixed $showstatistic = '' ][, mixed $width = NULL ][, mixed $height = NULL ][, mixed $crop = NULL ][, mixed $collection = false ][, mixed $fullimagelink = false ]) : mixed
Parameters
- $number : mixed = 5
- $albumfolder : mixed = ''
- $showtitle : mixed = false
- $showdate : mixed = false
- $showdesc : mixed = false
- $desclength : mixed = 40
- $showstatistic : mixed = ''
- $width : mixed = NULL
- $height : mixed = NULL
- $crop : mixed = NULL
- $collection : mixed = false
- $fullimagelink : mixed = false
Tags
filterImageQuery()
performs a query and then filters out "illegal" images returning the first "good" image used by the random image functions.
filterImageQuery(object $result, string $source) : mixed
Parameters
- $result : object
-
query result
- $source : string
-
album object if this is search within the album
Tags
getRandomImages()
Returns a randomly selected image from the gallery. (May be NULL if none exists)
getRandomImages([bool $daily = false ]) : object
Parameters
- $daily : bool = false
-
set to true and the picture changes only once a day.
Tags
Return values
objectgetRandomImagesAlbum()
Returns a randomly selected image from the album or its subalbums. (May be NULL if none exists)
getRandomImagesAlbum([mixed $rootAlbum = NULL ][, bool $daily = false ]) : object
Parameters
- $rootAlbum : mixed = NULL
-
optional album object/folder from which to get the image.
- $daily : bool = false
-
set to true to change picture only once a day.
Tags
Return values
objectprintRandomImages()
Puts up random image thumbs from the gallery
printRandomImages([int $number = 5 ][, string $class = null ][, string $option = 'all' ][, mixed $rootAlbum = '' ][, int $width = NULL ][, int $height = NULL ][, bool $crop = NULL ][, bool $fullimagelink = false ]) : mixed
Parameters
- $number : int = 5
-
how many images
- $class : string = null
-
optional class
- $option : string = 'all'
-
what you want selected: all for all images, album for selected ones from an album
- $rootAlbum : mixed = ''
-
optional album object/folder from which to get the image.
- $width : int = NULL
-
the width/cropwidth of the thumb if crop=true else $width is longest size.
- $height : int = NULL
-
the height/cropheight of the thumb if crop=true else not used
- $crop : bool = NULL
-
'true' (default) if the thumb should be cropped, 'false' if not
- $fullimagelink : bool = false
-
'false' (default) for the image page link , 'true' for the unprotected full image link (to use Colorbox for example)
Tags
cleanHTML()
fixes unbalanced HTML tags. Used by shortenContent when PHP tidy is not present
cleanHTML(string $html) : string
Parameters
- $html : string
Tags
Return values
stringgetTotalImagesIn()
Returns the count of all the images in the album and any subalbums
getTotalImagesIn(object $album) : int
Parameters
- $album : object
-
The album whose image count you want
Tags
Return values
intcheckPublishDates()
checks if the item has expired
checkPublishDates(array<string|int, mixed> $row) : mixed
Parameters
- $row : array<string|int, mixed>
-
database row of the object