ZenphotoCMS 1.6.x

deprecated-functions.php

The version number within @deprecated indicates the version these will be removed completely

Tags
deprecated

ZenphotoCMS 1.6

Interfaces, Classes, Traits and Enums

internal_deprecations
Zenphoto general deprecated functions
zpFunctions

Table of Contents

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
deprecated

ZenphotoCMS 2.0 - This function is obsolete and has no functionality anymore

since

ZenphotoCMS 1.6

Computes a normalized images/albums per page and computes the number of images that will fit on the "transitional" page between album thumbs and image thumbs. This function is "internal" and is called from the root index.php script before the theme script is loaded.

Return values
mixed

getMimeString()

Returns the mimetype for a suffix

getMimeString(string $suffix) : string
Parameters
$suffix : string

Suffix without . to get the mimetype for

Tags
deprecated

ZenphotoCMS 2.0 - Use mimeTypes::getType(m() instead

since

ZenphotoCMS 1.6

Return values
string

newAlbum()

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
deprecated

ZenphotoCMS 2.0 - Use AlbumBase::newAlbum() instead

since

ZenphotoCMS 1.6

Return values
Album

isAlbumClass()

Returns true if the object is a zenphoto 'album'

isAlbumClass([object $album = NULL ]) : bool
Parameters
$album : object = NULL
Tags
deprecated

ZenphotoCMS 2.0 - Use AlbumBase::siAlbumClass() instead

since

ZenphotoCMS 1.6

Return values
bool

getUrAlbum()

Returns the oldest ancestor of an alubm;

getUrAlbum(string $album) : object
Parameters
$album : string

an album object

Tags
deprecated

ZenphotoCMS 2.0 – Use $album->getUrAlbum() instead

since

ZenphotoCMS 1.6

Return values
object

newImage()

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
deprecated

ZenphotoCMS 2.0 - Use Image::newImage() instead

since

ZenphotoCMS 1.6

Return values
object

isImageClass()

Returns true if the object is a zenphoto 'image'

isImageClass([object $image = NULL ]) : bool
Parameters
$image : object = NULL
Tags
deprecated

ZenphotoCMS 2.0 - Use Image::isImageClass() instead

since

ZenphotoCMS 1.6

Return values
bool

search_quote()

encloses search word in quotes if needed

search_quote(string $word) : string
Parameters
$word : string
Tags
deprecated

ZenphotoCMS 2.0 - Use SearchEngine::getSearchQuote() instead

since

ZenphotoCMS 1.6

Return values
string

isImageVideo()

Returns video argument of the current Image.

isImageVideo([object $image = NULL ]) : bool
Parameters
$image : object = NULL

optional image object

Tags
deprecated

ZenphotoCMS 2.0 – Use the Image class method isVideo() instead

since

ZenphotoCMS 1.6

Return values
bool

isImagePhoto()

Returns true if the image is a standard photo type

isImagePhoto([object $image = NULL ]) : bool
Parameters
$image : object = NULL

optional image object

Tags
deprecated

ZenphotoCMS 2.0 – Use the Image class method isPhoto() instead

since

ZenphotoCMS 1.6

Return values
bool

replaceOption()

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
deprecated

Zenphoto 2.0 – Use renameOptionl() instead

since

Zenphoto 1.5.1

Return values
mixed

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
deprecated

Zenphoto 2.0 – Use isValidEmail() instead

Return values
bool

genAlbumList()

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
deprecated

Zenphoto 2.0 – Use the gallery class method getAllAlbums() or getAllAlbumsFromDB() instead

global

obj $_zp_gallery

Return values
mixed

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
deprecated

Zenphoto 2.0 – Use the gallery class method getAllAlbums() or getAllAlbumsFromDB() instead

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[, 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
$collection : mixed = false
Tags
deprecated

Zenphoto 2.0 – Use printAlbumStatistisc() instead

Return values
mixed

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
deprecated

Zenphoto 2.0 – Use printAlbumStatistisc() instead

Return values
mixed

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[, 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
$collection : mixed = false
Tags
deprecated

Zenphoto 2.0 – Use printAlbumStatistisc() instead

Return values
mixed

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[, 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
$collection : mixed = false
Tags
deprecated

Zenphoto 2.0 – Use printAlbumStatistisc() instead

Return values
mixed

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
deprecated

Zenphoto 2.0 – Use printAlbumStatistisc() instead

Return values
mixed

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) : 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
Tags
deprecated

Zenphoto 2.0 – Use printImageStatistisc() instead

Return values
mixed

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) : 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
Tags
deprecated

Zenphoto 2.0 – Use printImageStatistisc() instead

Return values
mixed

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) : 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
Tags
deprecated

Zenphoto 2.0 – Use printImageStatistisc() instead

Return values
mixed

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
deprecated

Zenphoto 2.0 – Use printImageStatistisc() instead

Return values
mixed

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
deprecated

Zenphoto 2.0 – Use printImageStatistisc() instead

Return values
mixed

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
deprecated

Zenphoto 2.0 – Use printImageStatistisc() instead

Return values
mixed

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
deprecated

Zenphoto 2.0 - There is no direct replacement, use the general object model instead

Return values
mixed

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
deprecated

Zenphoto 2.0 Use the image_album_statistics plugin function getImageStatistic()with appropiate parameters – For daily use the same plugin's function getPictureOfTheDay()

Return values
object

getRandomImagesAlbum()

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
deprecated

Zenphoto 2.0 Use the image_album_statistic plugin function getImageStatistic() with appropriate parameters – For daily use the same plugin's function getPictureOfTheDay()

Return values
object

printRandomImages()

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
deprecated

Zenphoto 2.0 Use the image_album_statiscic plugin function printImageStatisic()with appropiate parameters. You might need to adjust your theme's CSS.

Return values
mixed

cleanHTML()

fixes unbalanced HTML tags. Used by shortenContent when PHP tidy is not present

cleanHTML(string $html) : string
Parameters
$html : string
Tags
deprecated

Zenphoto 2.0 Use tidyHTML() instead

since
1.5
Return values
string

getTotalImagesIn()

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
deprecated

Zenphoto 2.0

since
1.5.2
Return values
int

checkPublishDates()

checks if the item has expired

checkPublishDates(array<string|int, mixed> $row) : mixed
Parameters
$row : array<string|int, mixed>

database row of the object

Tags
deprecated

Zenphoto 2.0 - Use themeObject::checkScheduledPublishing() instead

since
1.5.7
Return values
mixed

Search results