ZenphotoCMS 1.6.6

dprecatedfunctions

Table of Contents

Classes

zpFunctions

Constants

OFFSET_PATH  = 4
Check for use of deprecated functions

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
getPHPFiles()  : string
formatList()  : bool
listUses()  : type
listDBUses()  : bool

Constants

OFFSET_PATH

Check for use of deprecated functions

public mixed OFFSET_PATH = 4
Tags
author

Stephen Billard (sbillard)

Functions

setThemeColumns()

controls the thumbnail layout of themes.

  • This function is obsolete and has no functionality anymore
setThemeColumns() : mixed

Uses the theme options: albums_per_row albums_per_page images_per_row images_per_page

Tags
since
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.

getMimeString()

Returns the mimetype for a suffix

  • Use mimeTypes::getType(m() instead
getMimeString(string $suffix) : string
Parameters
$suffix : string

Suffix without . to get the mimetype for

Tags
since
1.6
Return values
string

newAlbum()

Wrapper instantiation function for albums. Do not instantiate directly

  • Use AlbumBase::newAlbum() instead
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
since
1.6
Return values
Album

isAlbumClass()

Returns true if the object is a zenphoto 'album'

  • Use AlbumBase::siAlbumClass() instead
isAlbumClass([object $album = NULL ]) : bool
Parameters
$album : object = NULL
Tags
since
1.6
Return values
bool

getUrAlbum()

Returns the oldest ancestor of an alubm;

– Use $album->getUrParent() instead

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

an album object

Tags
since
1.6
Return values
object

newImage()

Returns a new "image" object based on the file extension

  • Use Image::newImage() instead
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
since
1.6
Return values
object

isImageClass()

Returns true if the object is a zenphoto 'image'

  • Use Image::isImageClass() instead
isImageClass([object $image = NULL ]) : bool
Parameters
$image : object = NULL
Tags
since
1.6
Return values
bool

search_quote()

encloses search word in quotes if needed

  • Use SearchEngine::getSearchQuote() instead
search_quote(string $word) : string
Parameters
$word : string
Tags
since
1.6
Return values
string

isImageVideo()

Returns video argument of the current Image.

– Use the Image class method isVideo() instead

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

optional image object

Tags
since
1.6
Return values
bool

isImagePhoto()

Returns true if the image is a standard photo type

– Use the Image class method isPhoto() instead

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

optional image object

Tags
since
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.

– Use renameOptionl() instead

replaceOption(string $oldkey, string $newkey) : mixed
Parameters
$oldkey : string

Old option name

$newkey : string

New option name

Tags
since
1.5.1

is_valid_email_zp()

Determines if the input is an e-mail address. Adapted from WordPress.

– Use isValidEmail() instead

is_valid_email_zp(string $input_email) : bool

Name changed to avoid conflicts in WP integrations.

Parameters
$input_email : string

email address?

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

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

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
global

obj $_zp_gallery

getAllAlbums()

Returns a list of all albums decendent from an album

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

getAllAlbums([object $album = NULL ]) : array<string|int, mixed>
Parameters
$album : object = NULL

optional album. If absent the current album is used

Return values
array<string|int, mixed>

printPopularAlbums()

– Use printAlbumStatistisc() instead

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

printLatestAlbums()

– Use printAlbumStatistisc() instead

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

printMostRatedAlbums()

– Use printAlbumStatistisc() instead

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

printTopRatedAlbums()

– Use printAlbumStatistisc() instead

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

printLatestUpdatedAlbums()

– Use printAlbumStatistisc() instead

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

printPopularImages()

– Use printImageStatistisc() instead

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

printTopRatedImages()

– Use printImageStatistisc() instead

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

printMostRatedImages()

– Use printImageStatistisc() instead

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

printLatestImages()

– Use printImageStatistisc() instead

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

printLatestImagesByDate()

– Use printImageStatistisc() instead

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

printLatestImagesByMtime()

– Use printImageStatistisc() instead

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

filterImageQuery()

performs a query and then filters out "illegal" images returning the first "good" image used by the random image functions.

  • There is no direct replacement, use the general object model instead
filterImageQuery(object $result, string $source) : mixed
Parameters
$result : object

query result

$source : string

album object if this is search within the album

getRandomImages()

Returns a randomly selected image from the gallery. (May be NULL if none exists)

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

getRandomImages([bool $daily = false ]) : object
Parameters
$daily : bool = false

set to true and the picture changes only once a day.

Return values
object

getRandomImagesAlbum()

Returns a randomly selected image from the album or its subalbums. (May be NULL if none exists)

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

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.

Return values
object

printRandomImages()

Puts up random image thumbs from the gallery

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

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)

cleanHTML()

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

Use tidyHTML() instead

cleanHTML(string $html) : string
Parameters
$html : string
Tags
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
since
1.5.2
Return values
int

checkPublishDates()

checks if the item has expired

  • Use themeObject::checkScheduledPublishing() instead
checkPublishDates(array<string|int, mixed> $row) : mixed
Parameters
$row : array<string|int, mixed>

database row of the object

Tags
since
1.5.7

getPHPFiles()

getPHPFiles(type $folder, type $exclude) : string
Parameters
$folder : type
$exclude : type
Tags
global

type $files

Return values
string

formatList()

formatList(type $title, type $subject, type $pattern) : bool
Parameters
$title : type
$subject : type
$pattern : type
Tags
global

type $deprecated

Return values
bool

listUses()

listUses(type $files, type $base, type $pattern) : type
Parameters
$files : type
$base : type
$pattern : type
Return values
type

listDBUses()

listDBUses(type $pattern) : bool
Parameters
$pattern : type
Return values
bool

        
On this page

Search results