ZenphotoCMS 1.6.3

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)

deprecated
2.0

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
2.0
  • This function is obsolete and has no functionality anymore
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

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

Suffix without . to get the mimetype for

Tags
deprecated
2.0
  • Use mimeTypes::getType(m() instead
since
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
2.0
  • Use AlbumBase::newAlbum() instead
since
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
2.0
  • Use AlbumBase::siAlbumClass() instead
since
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
2.0

– Use $album->getUrParent() instead

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

search_quote()

encloses search word in quotes if needed

search_quote(string $word) : string
Parameters
$word : string
Tags
deprecated
2.0
  • Use SearchEngine::getSearchQuote() instead
since
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
2.0

– Use the Image class method isVideo() instead

since
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
2.0

– Use the Image class method isPhoto() instead

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.

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

Old option name

$newkey : string

New option name

Tags
deprecated
2.0

– Use renameOptionl() instead

since
1.5.1

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
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
2.0

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

global

obj $_zp_gallery

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
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 = 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
deprecated
2.0

– Use printAlbumStatistisc() instead

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
2.0

– Use printAlbumStatistisc() instead

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
deprecated
2.0

– Use printAlbumStatistisc() instead

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
deprecated
2.0

– Use printAlbumStatistisc() instead

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
2.0

– Use printAlbumStatistisc() instead

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
deprecated
2.0

– Use printImageStatistisc() instead

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
deprecated
2.0

– Use printImageStatistisc() instead

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
deprecated
2.0

– Use printImageStatistisc() instead

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
2.0

– Use printImageStatistisc() instead

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
2.0

– Use printImageStatistisc() instead

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
2.0

– Use printImageStatistisc() instead

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
2.0
  • There is no direct replacement, use the general object model instead

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
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
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
2.0

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

cleanHTML()

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

cleanHTML(string $html) : string
Parameters
$html : string
Tags
deprecated
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
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
2.0
  • Use themeObject::checkScheduledPublishing() instead
since
1.5.7

getPHPFiles()

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

type $files

Return values
string

formatList()

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

type $deprecated

Return values
bool

listUses()

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

listDBUses()

listDBUses(type $pattern) : bool
Parameters
$pattern : type
Tags
deprecated
2.0
Return values
bool

        
On this page

Search results