ZenphotoCMS 1.6.2

API Documentation

Table of Contents

Namespaces

Composer
Detection
Psr
PHPMailer

Interfaces

elFinderSessionInterface
elFinder - file manager for web.

Classes

_zp_captcha
Standins for when no captcha is enabled
_zp_HTML_cache
stand-in for when there is no HTML cache plugin enabled
Administrator
This is a simple class so that we have a convienient "handle" for manipulating Administrators.
Zenphoto_Administrator
This is a simple class so that we have a convienient "handle" for manipulating Administrators.
Album
Album Class
AlbumBase
Album Base Class
Authority
Provides the methods used for user authorization and management store an instantiation of this class in `$_zp_authority`.
Zenphoto_Authority
Provides the methods used for user authorization and management store an instantiation of this class in `$_zp_authority`.
backupRestore
Class for creating and restoring database backups.
dbBase
Database base class if no supported database is configured in PHP
dbMySQLi
Database core class for the MySQLi library
dbPDO_MySQL
Database core class for the PDO::MySQL library
dynamicAlbum
Dynamic Album Class for "saved searches"
external_auth
Root class for external authorizaton plugins
feed
Base feed class from which all others descend.
Gallery
Gallery Class
graphicsBase
Base class that kicks in if neither GD or Imagick are available for image handling Provides basic check method to see what library is available
graphicsGD
class for image handling using the GD library
graphicsImagick
Class for image handling using the Imagick library
graphicsOptions
Option class for graphics handlers
Image
Image Class
maintenanceMode
Maintenance mode utility class based on the former site_upgrade plugin
MediaObject
Root class for images and albums
mimeTypes
Library for mimetypes
PersistentObject
Persistent Object Class
SearchEngine
search class
ThemeObject
The basic ThemeObject class. Extends PersistentObject, is extended by various Theme related objects.
Transientimage
Transient image class
userDataExport
Class for exporting possible privacy related user data
zpMutex
Zenphoto Mutex class
utf8
UTF-8 friendly replacement functions - v0.2 Copyright (C) 2004-2006 Niels Leenheer & Andy Matsubara
ZipStream
setup
setup support class
setupMutex
Zenphoto Mutex class
admin_approval
auto_backup
Option handler class
bxslider
Plugin option handling class
cachemanager_internal_deprecations
cacheManager
Standard options interface
AnyFile_Options
Option class for textobjects objects
AnyFile
Core class for handling "non-image" files
TextObject
Core class for handling "non-image" files
TextObject_Options
Option class for textobjects objects
getid3_lib
getID3
getid3_handler
getid3_exception
getid3_flv
AMFStream
AMFReader
AVCSequenceParameterSetReader
getid3_mpeg
getid3_quicktime
getid3_swf
getid3_aac
getid3_mp3
getid3_apetag
getid3_id3v1
getid3_id3v2
getid3_lyrics3
VideoObject_Options
Option class for video objects
Video
Image Class
pseudoPlayer
WEBdocs_Options
Option class for textobjects objects
WEBdocs
Core class for handling "non-image" files
cloneZenphoto
colorbox
Comment
Comment Class
comment_form
fieldExtender
This is the root class for use by plugins to extend the Zenphoto database table fields. The administrative tabs for the objects will have input items for these new fields. They will be placed in the proximate location of the "custom data" field on the page.
JSMin
jsmin.php - PHP implementation of Douglas Crockford's JSMin.
JSMin_UnterminatedStringException
JSMin_UnterminatedCommentException
JSMin_UnterminatedRegExpException
OAuthExcept
OAuthConsumer
OAuthToken
OAuthSignatureMethod
A class for implementing a Signature Method See section 9 ("Signing Requests") in the spec
OAuthSignatureMethod_HMAC_SHA1
The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104] where the Signature Base String is the text and the key is the concatenated values (each first encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&' character (ASCII code 38) even if empty.
OAuthSignatureMethod_PLAINTEXT
The PLAINTEXT method does not provide any security protection and SHOULD only be used over a secure channel such as HTTPS. It does not use the Signature Base String.
OAuthSignatureMethod_RSA_SHA1
The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a verified way to the Service Provider, in a manner which is beyond the scope of this specification.
OAuthRequest
OAuthServer
OAuthDataStore
OAuthUtil
contactformOptions
Plugin option handling class
cookieConsent
crop_image
defaultCodeblocks
internal_deprecations
Zenphoto general deprecated functions
zpFunctions
deprecated_functions
DownloadList
Plugin option handling class
AlbumZip
dynamic_locale
elFinderEditor
Abstract class of editor plugins.
elFinderEditorOnlineConvert
Abstract class of editor plugins.
elFinderEditorZipArchive
Abstract class of editor plugins.
elFinderEditorZohoOffice
Abstract class of editor plugins.
elFinderConnector
Default elFinder connector
elFinderVolumeFlysystemGoogleDriveCache
elFinderVolumeFlysystemGoogleDriveNetmount
elFinderPlugin
elFinder Plugin Abstract
elFinderSession
elFinder - file manager for web.
elFinderVolumeBox
Simple elFinder driver for BoxDrive Box.com API v2.0.
elFinderVolumeDriver
Base class for elFinder volume.
elFinderVolumeDropbox
Simple elFinder driver for FTP
elFinderVolumeDropbox2
Simple elFinder driver for Dropbox kunalvarma05/dropbox-php-sdk:0.1.5 or above.
elFinderVolumeFTP
Simple elFinder driver for FTP
elFinderVolumeGoogleDrive
Simple elFinder driver for GoogleDrive google-api-php-client-2.x or above.
elFinderVolumeGroup
elFinder driver for Volume Group.
RecursiveCallbackFilterIterator
elFinderVolumeLocalFileSystem
elFinder driver for local filesystem.
elFinderVolumeMySQL
Simple elFinder driver for MySQL.
elFinderVolumeOneDrive
Simple elFinder driver for OneDrive onedrive api v5.0.
elFinderVolumeSFTPphpseclib
Simple elFinder driver for SFTP using phpseclib 1
elFinderVolumeTrash
elFinder driver for trash bin at local filesystem.
elFinderVolumeTrashMySQL
elFinder driver for trash bin at MySQL Database
elFinderLibGdBmp
elFinderPluginAutoResize
elFinder Plugin AutoResize Auto resize on file upload.
elFinderPluginAutoRotate
elFinder Plugin AutoRotate Auto rotation on file upload of JPEG file by EXIF Orientation.
elFinderPluginNormalizer
elFinder Plugin Normalizer UTF-8 Normalizer of file-name and file-path etc.
elFinderPluginSanitizer
elFinder Plugin Sanitizer Sanitizer of file-name and file-path etc.
elFinderPluginWatermark
elFinder Plugin Watermark Print watermark on file upload.
elFinderPluginWinRemoveTailDots
This class describes elFinder plugin window remove tail dots.
elFinder_options
Option handler class
email_new_user
exampleMacros
favorites
This is the class declaration
favoritesOptions
flag_thumbnail
Plugin option handling class
Combi
Zenpage root classes
galleryArticles
Standard options interface
Googlemaps
CodeIgniter Google Maps API V3 Class
GoogleMap
googleMap
CI_load
CI_jsmin
codeIgniter_kludge
hitcounter
Plugin option handling class
htmlmetatags
securityheadersOptions
Options handler for http_security_headers plugin
securityHeaders
Static class to generate the headers as set on the plugin options
ipBlocker
Option handler class
jplayer_options
jPlayer
lazyloadOptions
Options for the lazyload plugin
lazyload
Filter HTML to add JS lazyloading using the script lazysizes
matomoStats
menu_manager
option handler
MergedRSSOptions
MergedRSS
ComposerAutoloaderInitd5350eb3a139c07c29d30a628169cbde
mobileTheme
mobile
Child class of MobileDetect. isMobile() and isTablet()
multipleLayoutOptions
Plugin option handling class
openStreetMapOptions
openStreetMap
The class for all OSM map related functionality
pagedthumbsOptions
Plugin option handling class
pagedThumbsNav
zp_PHPMailer
Option handler class
print_album_menu
Plugin option handling class
publishContent
quota_manager
Option handler class
jquery_rating
Option handler class
reCaptcha
Standins for when no captcha is enabled
redirectorOptions
redirector plugin options
redirector
redirection handler class
register_user
Plugin class
rewriteRules
rewriteTokens
rss_options
RSS
Base feed class from which all others descend.
scriptlessSocialsharingOptions
scriptlessSocialsharing
Static class wrapper
search_statistics
Option handler class
security_logger
Option handler class
seo_locale
null_seo
Option handler class
zenphoto_seo
Option handler class
show_not_loggedin
zpSimpleSpam
This implements the standard SpamFilter class for the Simple spam filter.
sitemapOptions
Plugin option handling class
sitemap
Sitemap class
cycle
Plugin option handling class
staticHTMLCacheOptions
static_html_cache
tagsuggest
themeSwitcher
tinymce4Options
Plugin option handling class
tinyURL
zpTrivialSpam
This implements the standard SpamFilter class for the none spam filter.
UploadHandler
UploadHandlerZP
jQuery File Upload Plugin PHP Class based on the https://github.com/blueimp/jQuery-File-Upload
uploaderjQueryOptions
user_expiry
Option handler class
user_groups
user_logout_options
Plugin option handling class
userAddressFields
This is the root class for use by plugins to extend the Zenphoto database table fields. The administrative tabs for the objects will have input items for these new fields. They will be placed in the proximate location of the "custom data" field on the page.
Zenpage
Zenpage root classes
ZenpageCategory
zenpage news category class
ZenpageItems
Base class from which Zenpage news articles and pages derive
ZenpageNews
zenpage news class
ZenpagePage
zenpage page class
ZenpageRoot
Base class from which all Zenpage classes derive
Zenpage_internal_deprecations
These are the Zenpage functions which have been deprecated
zenpagecms
zenphoto_org_news
zenphotoDonate

Constants

ACK_DISPLAY_ERRORS  = 2
ADMIN_IMAGES_STEP  = 5
ADMIN_PLUGIN  = 4096
Defines the bitmask for load order priority of admin plugins
ADMIN_RIGHTS  = 1
ALBUM_FOLDER_EMPTY  = \getAlbumFolder('')
ALBUM_FOLDER_SERVERPATH  = \getAlbumFolder(\SERVERPATH)
ALBUM_FOLDER_WEBPATH  = \getAlbumFolder(\WEBPATH)
ALBUM_MENU_COUNT  = \getOption('print_album_menu_count')
ALBUM_MENU_SHOWSUBS  = \getOption('print_album_menu_showsubs')
ALBUMFOLDER  = 'albums'
Defines the name of the albums folder
ALL_ALBUMS_RIGHTS  = \VIEW_ALL_RIGHTS
ALL_NEWS_RIGHTS  = \VIEW_ALL_RIGHTS
ALL_PAGES_RIGHTS  = \VIEW_ALL_RIGHTS
BACKUPFOLDER  = 'backup'
Defines the name of the backup folder
BASEPATH  = true
CACHE_HASH_LENGTH  = \strlen(\sha1(\strval(\HASH_SEED)))
CACHEFOLDER  = 'cache'
Defines the name of the image cache folder
CASE_INSENSITIVE  = \file_exists(\dirname(__FILE__) . '/VERSION.PHP')
Defines if the server file system is case insensitive
CHMOD_VALUE  = \fileperms(\dirname(__FILE__)) & 0666
CLASS_PLUGIN  = 8192
Defines the bitmask for load order priority of class plugins
COMMENT_BODY_REQUIRED  = 16
COMMENT_DATACONFIRMATION  = 64
COMMENT_EMAIL_REQUIRED  = 1
COMMENT_NAME_REQUIRED  = 2
COMMENT_SEND_EMAIL  = 32
COMMENT_WEB_REQUIRED  = 4
COMMENTS_PER_PAGE  = \max(1, \getOption('comment_form_comments_per_page'))
COMMON_FOLDER  = \PLUGIN_FOLDER . '/common'
Defines the name of the shared "common" folder within/for core extensions
CONFIGFILE  = 'zenphoto.cfg.php'
Defines the name of the config file
COOKIE_PATH  = \WEBPATH
COOKIE_PERSISTENCE  = $persistence
CUSTOM_OPTION_PREFIX  = '_ZP_CUSTOM_'
DATA_FOLDER  = 'zp-data'
Defines the name of the zp-data folder outside the core folder
DATA_MOD  = \fileperms(\SERVERPATH . '/' . \DATA_FOLDER . '/' . \CONFIGFILE) & 0777
DATABASE_DESIRED_VERSION  = '5.7.0'
DATABASE_DESIRED_VERSION  = '0.0.0'
DATABASE_MARIADB_DESIRED_VERSION  = '10.1.0'
DATABASE_MARIADB_DESIRED_VERSION  = '0.0.0'
DATABASE_MARIADB_MIN_VERSION  = '5.5.0'
DATABASE_MARIADB_MIN_VERSION  = '0.0.0'
DATABASE_MIN_VERSION  = '5.5.3'
DATABASE_MIN_VERSION  = '0.0.0'
DATABASE_PREFIX  = $mysql_prefix
DATABASE_SOFTWARE  = $_zp_conf_vars['db_software']
DATABASE_SOFTWARE  = 'Database setup'
DATE_FORMAT  = \strval(\trim($date_format . ' ' . $time_format))
DEBUG_404  = isset($_zp_conf_vars['debug_404']) && $_zp_conf_vars['debug_404'] || \TEST_RELEASE
set to true to log 404 error processing debug information.
DEBUG_ERROR  = isset($_zp_conf_vars['debug_error']) && $_zp_conf_vars['debug_error'] || \TEST_RELEASE
set to true to supplies the calling sequence with zp_error messages
DEBUG_EXIF  = isset($_zp_conf_vars['debug_exif']) && $_zp_conf_vars['debug_exif']
set to true to log start/finish of exif processing. Useful to find problematic images.
DEBUG_FILTERS  = isset($_zp_conf_vars['debug_filters']) && $_zp_conf_vars['debug_filters']
set to true to log filter application sequence.
DEBUG_IMAGE  = isset($_zp_conf_vars['debug_image']) && $_zp_conf_vars['debug_image']
set to true to log image processing debug information.
DEBUG_IMAGE_ERR  = isset($_zp_conf_vars['debug_image_err']) && $_zp_conf_vars['debug_image_err'] || \TEST_RELEASE
set to true to flag image processing errors.
DEBUG_LOCALE  = isset($_zp_conf_vars['debug_locale']) && $_zp_conf_vars['debug_locale']
used for examining language selection problems
DEBUG_LOG_SIZE  = \getOption('debug_log_size')
DEBUG_LOGIN  = isset($_zp_conf_vars['debug_login']) && $_zp_conf_vars['debug_login']
set to true to log admin saves and login attempts
DEBUG_PLUGINS  = isset($_zp_conf_vars['debug_plugins']) && $_zp_conf_vars['debug_plugins']
set to true to log plugin load sequence.
EDITOR_SANITIZE_LEVEL  = 1
EDITOR_SANITIZE_LEVEL  = 4
ELFINDER_PHP_ROOT_PATH  = \dirname(__FILE__)
ENT_SUBSTITUTE  = \defined('ENT_IGNORE') ? \ENT_IGNORE : 8
EXACT_TAG_MATCH  = \getOption('exact_tag_match')
EXPLAIN_SELECTS  = isset($_zp_conf_vars['explain_selects']) && $_zp_conf_vars['explain_selects']
set to true to log the "EXPLAIN" of SELECT queries in the debug log
FEATURE_PLUGIN  = 2048
Defines the bitmask for load order priority of feature plugins
FILE_MOD  = \CHMOD_VALUE & 0666
FILESYSTEM_CHARSET  = $data
FILESYSTEM_CHARSET  = 'UTF-8'
FOLDER_MOD  = \CHMOD_VALUE | 0311
FULLIMAGE_WATERMARK  = \getOption('fullsizeimage_watermark')
FULLWEBPATH  = \SERVER_HTTP_HOST . \WEBPATH
GALLERY_SECURITY  = @$data['gallery_security']
GALLERY_SESSION  = @$data['album_session']
GD_FREETYPE  = (bool) $this->info['FreeType']
GD_FREETYPE_SAMPLE  = 'The quick brown fox jumps over the lazy dog'
GD_FREETYPE_SAMPLE_CHARS  = strlen('GD_FREETYPE_SAMPLE')
GETID3_FLV_TAG_AUDIO  = 8
GETID3_FLV_TAG_META  = 18
GETID3_FLV_TAG_VIDEO  = 9
GETID3_FLV_VIDEO_H263  = 2
GETID3_FLV_VIDEO_H264  = 7
GETID3_FLV_VIDEO_SCREEN  = 3
GETID3_FLV_VIDEO_SCREENV2  = 6
GETID3_FLV_VIDEO_VP6FLV  = 4
GETID3_FLV_VIDEO_VP6FLV_ALPHA  = 5
GETID3_HELPERAPPSDIR  = $helperappsdir . DIRECTORY_SEPARATOR
GETID3_INCLUDEPATH  = \dirname(__FILE__) . \DIRECTORY_SEPARATOR
GETID3_INCLUDEPATH  = \SERVERPATH . '/' . \ZENFOLDER . '/' . \PLUGIN_FOLDER . '/class-video/getid3/'
GETID3_LIBXML_OPTIONS  = \LIBXML_NOENT | \LIBXML_NONET | \LIBXML_NOWARNING
GETID3_OS_ISWINDOWS  = \stripos(\PHP_OS, 'WIN') === 0
GETID3_TEMP_DIR  = $temp_dir
GOOGLE_SITEMAP  = \getOption('sitemap_google')
GRAPHICS_LIBRARY  = $_zp_cachefile_suffix['Library']
H264_AVC_SEQUENCE_HEADER  = 0
H264_PROFILE_BASELINE  = 66
H264_PROFILE_EXTENDED  = 88
H264_PROFILE_HIGH  = 100
H264_PROFILE_HIGH10  = 110
H264_PROFILE_HIGH422  = 122
H264_PROFILE_HIGH444  = 144
H264_PROFILE_HIGH444_PREDICTIVE  = 244
H264_PROFILE_MAIN  = 77
HASH_SEED  = \getOption('extra_auth_hash_text')
HTACCESS_VERSION  = '1.4.12'
IM_SUFFIX  = \getOption('mod_rewrite_image_suffix')
IMAGE_CACHE_SUFFIX  = \getOption('image_cache_suffix')
IMAGE_SORT_DIRECTION  = \getOption('image_sortdirection')
IMAGE_SORT_TYPE  = \getOption('image_sorttype')
IMAGE_WATERMARK  = \getOption('fullimage_watermark')
IMAGEMAGICK_REQUIRED_VERSION  = '6.3.8'
IMAGICK_REQUIRED_VERSION  = '3.0.0'
IP_TIED_COOKIES  = \getOption('IP_tied_cookies')
LIST_RIGHTS  = \NO_RIGHTS
LOCAL_CHARSET  = $data
LOCAL_CHARSET  = 'UTF-8'
LOCALE_TYPE  = 0
LOGS_MOD  = \DATA_MOD
MANAGED_OBJECT_RIGHTS_EDIT  = 1
MANAGED_OBJECT_RIGHTS_UPLOAD  = 2
MANAGED_OBJECT_RIGHTS_VIEW  = 4
MAX_SIZE  = \getOption('image_max_size')
MEMBERS_ONLY_COMMENTS  = \getOption('comment_form_members_only')
MENU_TRUNCATE_INDICATOR  = \getOption('menu_truncate_indicator')
MENU_TRUNCATE_STRING  = \getOption('menu_truncate_string')
METATAG_LOCALE_TYPE  = 0
MOD_REWRITE  = \getOption('mod_rewrite')
MUTEX_FOLDER  = '.mutex'
Defines the mutex folder
NEWS_POSITION_NORMAL  = 0
NEWS_POSITION_STICK_TO_TOP  = 9
NEWS_POSITION_STICKY  = 1
NO_WATERMARK  = '!'
OBJECT_CACHE_DEPTH  = 150
OFFSET_PATH  = 1
used in sorting the images within and album
OFFSET_PATH  = 1
This script is used to create dynamic albums from a search.
OFFSET_PATH  = 1
admin-edit.php editing of albums.
OFFSET_PATH  = 1
user_groups log--tabs
OFFSET_PATH  = 1
provides the Options tab of admin
OFFSET_PATH  = 1
provides the Plugins tab of admin
OFFSET_PATH  = 2
This template is used to reload metadata from images. Running it will process the entire gallery, supplying an album name (ex: loadAlbums.php?album=newalbum) will only process the album named.
OFFSET_PATH  = 1
provides the TAGS tab of admin
OFFSET_PATH  = 1
Theme file editor
OFFSET_PATH  = 1
provides the Themes tab of admin
OFFSET_PATH  = 1
OFFSET_PATH  = 1
provides the Upload tab of admin
OFFSET_PATH  = 1
provides the Options tab of admin
OFFSET_PATH  = 1
admin.php is the main script for administrative functions.
OFFSET_PATH  = 1
OFFSET_PATH  = 1
OFFSET_PATH  = 0
OFFSET_PATH  = 2
OFFSET_PATH  = 1
OFFSET_PATH  = 2
OFFSET_PATH  = 2
OFFSET_PATH  = 2
Used for changing permissions on a mass basis
OFFSET_PATH  = 2
Used for setting theme/plugin default options
OFFSET_PATH  = 2
Used for setting theme/plugin default options
OFFSET_PATH  = 3
OFFSET_PATH  = 3
Database quick reference
OFFSET_PATH  = 3
Detailed Gallery Statistics
OFFSET_PATH  = 3
Displays which HTTP headers your site sends
OFFSET_PATH  = 3
Displays locale information of the system
OFFSET_PATH  = 3
Maintenance mode utility based on the former site_upgrade plugin
OFFSET_PATH  = 3
Displays the PHP configuration information
OFFSET_PATH  = 3
Use this utility to reset your album thumbnails to either "random" or from an ordered field query
OFFSET_PATH  = 3
GDPR data export tool
OFFSET_PATH  = 3
This template is used to generate cache images. Running it will process the entire gallery, supplying an album name (ex: loadAlbums.php?album=newalbum) will only process the album named.
OFFSET_PATH  = 3
This template is used to generate cache images. Running it will process the entire gallery, supplying an album name (ex: loadAlbums.php?album=newalbum) will only process the album named.
OFFSET_PATH  = 4
Zenphoto site cloner
OFFSET_PATH  = 4
OFFSET_PATH  = 1
provides the Comments tab of admin
OFFSET_PATH  = 3
OFFSET_PATH  = 4
Check for use of deprecated functions
OFFSET_PATH  = 3
Detailed Gallery Statistics
OFFSET_PATH  = 3
OFFSET_PATH  = 3
OFFSET_PATH  = 3
The Matomo statistis page if widgets are defined
OFFSET_PATH  = 4
OFFSET_PATH  = 4
OFFSET_PATH  = 3
OFFSET_PATH  = 4
OFFSET_PATH  = 3
OFFSET_PATH  = 3
This is the "rewrite rules" tab
OFFSET_PATH  = 4
Collects and analyzes searches
OFFSET_PATH  = 3
OFFSET_PATH  = 3
Sitemap Tools
OFFSET_PATH  = 3
OFFSET_PATH  = 3
OFFSET_PATH  = 3
OFFSET_PATH  = 3
OFFSET_PATH  = 4
user_groups plugin--tabs
OFFSET_PATH  = 4
user_groups plugin--tabs
OFFSET_PATH  = 3
OFFSET_PATH  = 4
zenpage admin-categories.php
OFFSET_PATH  = 4
zenpage admin-edit.php
OFFSET_PATH  = 4
zenpage admin-news-articles.php
OFFSET_PATH  = 4
zenpage admin-pages.php
OPEN_IMAGE_CACHE  = !\getOption('protected_image_cache')
OPTION_TYPE_CHECKBOX  = 1
OPTION_TYPE_CHECKBOX_ARRAY  = 6
OPTION_TYPE_CHECKBOX_UL  = 7
OPTION_TYPE_CLEARTEXT  = 9
OPTION_TYPE_COLOR_PICKER  = 8
OPTION_TYPE_CUSTOM  = 2
OPTION_TYPE_NOTE  = 10
OPTION_TYPE_PASSWORD  = 11
OPTION_TYPE_RADIO  = 4
OPTION_TYPE_RICHTEXT  = 12
OPTION_TYPE_SELECTOR  = 5
OPTION_TYPE_TEXTAREA  = 3
OPTION_TYPE_TEXTBOX  = 0
Generates the HTML for custom options (e.g. theme options, plugin options, etc.) Note: option names may not contain '.', '+', nor '%' as PHP POST handling will replace these with an underscore.
PHP_INT_MAX  = 2147483647
PHP_INT_MIN  = ~PHP_INT_MAX
PLUGIN_FOLDER  = 'zp-extensions'
Defines the name of the core extensions folder
PLUGIN_PRIORITY  = 1023
Defines the bitmask for load order priority of standard plugins
PLUGINS_PER_PAGE  = \max(1, \getOption('plugins_per_page'))
PLUGINS_PER_PAGE  = \max(1, \getOption('plugins_per_page'))
PRIMARY_INSTALLATION  = true
PROTOCOL  = 'http'
PROTOCOL  = 'http'
RECORD_LIMIT  = 5
SAFE_MODE  = \false
SAFE_MODE_ALBUM_SEP  = ''
SEARCH_CACHE_DURATION  = \getOption('search_cache_duration')
SEARCH_DURATION  = 3000
SEO_FULLWEBPATH  = \FULLWEBPATH
SEO_FULLWEBPATH  = \seo_locale::localePath(\true)
SEO_WEBPATH  = \WEBPATH
SEO_WEBPATH  = \seo_locale::localePath()
SERVER_HTTP_HOST  = \PROTOCOL . "://" . $_SERVER['HTTP_HOST']
SERVER_PROTOCOL  = 'http'
SERVERCACHE  = \SERVERPATH . '/' . \CACHEFOLDER
SERVERPATH  = $const_serverpath
SERVERPATH  = $_zp_setup_serverpath
SERVERPATH  = $_zp_setup_serverpath
SETUPLOG  = $_zp_setup_serverpath . '/' . \DATA_FOLDER . '/setup.log'
SITE_LOCALE  = 'en_US'
SITEMAP_CHUNK  = \getOption('sitemap_processing_chunk')
SITEMAP_LOCALE_TYPE  = 0
SORT_FLAG_CASE  = 0
Defines sort flag case
SORT_NATURAL  = 0
Defines if sorting should be natural order
STATIC_CACHE_FOLDER  = "cache_html"
Defines the name of the html cache folder
SYMLINK  = \function_exists('symlink') && \strpos(@\ini_get("suhosin.executor.func.blacklist"), 'symlink') === \false
Defines if symlinks are supported on the server
TEST_RELEASE  = isset($_zp_conf_vars['test_release']) && $_zp_conf_vars['test_release'] || \preg_match('~-[^RC]~', \ZENPHOTO_VERSION)
Enables test release mode, supports the markRelease plugin
TEXT_INPUT_SIZE  = 48
TEXT_INPUT_SIZE_SHORT  = 30
TEXTAREA_COLUMNS  = 50
TEXTAREA_COLUMNS_SHORT  = 32
THEME_PLUGIN  = 1024
Defines the bitmask for load order priority of theme plugins
THEMEFOLDER  = 'themes'
Defines the name of the themes folder
THUMB_WATERMARK  = \getOption('Image_watermark')
UPLOAD_ERR_BLOCKED  = -2
UPLOAD_ERR_QUOTA  = -1
Initialize globals for Admin
UPLOAD_FOLDER  = 'uploaded'
Defines name of the non albums upload folder
USE_CAPTCHA  = 8
USER_PLUGIN_FOLDER  = 'plugins'
Defines the user 3rd party plugin folder outside the Zenphoto core folder
USER_RIGHTS  = \NO_RIGHTS
USERS_PER_PAGE  = \max(1, \getOption('users_per_page'))
USERS_PER_PAGE  = \max(1, \getOption('users_per_page'))
UTF8_IMAGE_URI  = \getOption('UTF8_image_URI')
UTILITIES_FOLDER  = 'utilities'
Defines the name of the core utlitlites folder
VIEW_ALL_RIGHTS  = \ALL_ALBUMS_RIGHTS | \ALL_PAGES_RIGHTS | \ALL_NEWS_RIGHTS
VIEW_FULLIMAGE_RIGHTS  = \NO_RIGHTS
VIEW_GALLERY_RIGHTS  = \NO_RIGHTS
VIEW_SEARCH_RIGHTS  = \NO_RIGHTS
WATERMARK_FULL  = 4
WATERMARK_IMAGE  = 1
WATERMARK_THUMB  = 2
WEBPATH  = $const_webpath
WEBPATH  = $const_webpath
ZENFOLDER  = 'zp-core'
Defines the name of the Zenphoto core folder (zp-core)
ZENPAGE_COMBINEWS  = \false
Some global variable setup
ZENPHOTO_LOCALE  = \setMainDomain()
ZENPHOTO_VERSION  = '1.6.2'
Defines the Zenphoto version
ZP_ALBUM  = 2
ZP_ALBUM_LINKED  = 64
ZP_ARTICLES_PER_PAGE  = \getOption("zenpage_articles_per_page") >= 1 ? \getOption("zenpage_articles_per_page") : 1
ZP_COMBINEWS  = \false
ZP_COMMENT  = 8
ZP_IMAGE  = 4
ZP_IMAGE_LINKED  = 128
ZP_INDEX  = 1
ZP_LAST_MODIFIED  = \gmdate('D, d M Y H:i:s') . ' GMT'
Defines the date of the current session for use as a last modified date within the page header()
ZP_NEWS_ENABLED  = \false
ZP_PAGES_ENABLED  = \false
ZP_READ_MORE  = \getOption("zenpage_read_more")
ZP_SEARCH  = 16
ZP_SEARCH_LINKED  = 32
ZP_SHORTEN_LENGTH  = \getOption('zenpage_text_length')
ZP_SHORTENINDICATOR  = $shortenindicator = \getOption('zenpage_textshorten_indicator')
ZP_ZENPAGE_NEWS_ARTICLE  = 512
ZP_ZENPAGE_NEWS_CATEGORY  = 1024
ZP_ZENPAGE_NEWS_DATE  = 2048
ZP_ZENPAGE_NEWS_PAGE  = 256
ZP_ZENPAGE_PAGE  = 4096
ZP_ZENPAGE_SINGLE  = 8192

Functions

printAdminFooter()  : mixed
Print the footer <div> for the bottom of all admin pages.
datepickerJS()  : mixed
printAdminHeader()  : mixed
Print the header for all admin pages. Starts at <DOCTYPE> but does not include the </head> tag, in case there is a need to add something further.
printSortableHead()  : mixed
printLogoAndLinks()  : mixed
Print the html required to display the ZP logo and links in the top section of the admin page.
printTabs()  : mixed
Print the nav tabs for the admin section. We determine which tab should be highlighted from the $_GET['page']. If none is set, we default to "home".
getSubtabs()  : mixed
printSubtabs()  : mixed
setAlbumSubtabs()  : mixed
handleDeprecatedMenuGlobals()  : mixed
Roughly fixes outdated usages of old admin "tab" globals and joins them with the actual globals.
checked()  : mixed
Used for checkbox and radiobox form elements to compare the $checked value with the $current.
customOptions()  : mixed
processCustomOptionSave()  : mixed
standardThemeOptions()  : mixed
Set defaults for standard theme options incase the theme has not done so
postIndexEncode()  : mixed
Encodes for use as a $_POST index
postIndexDecode()  : string
Decodes encoded $_POST index
generateRadiobuttonsFromArray()  : mixed
Prints radio buttons from an array
generateUnorderedListFromArray()  : mixed
Creates the body of an unordered list with checkbox label/input fields (scrollable sortables)
tagSelector()  : mixed
Creates an unordered checklist of the tags
printAlbumEditForm()  : mixed
emits the html for editing album information called in edit album and mass edit
printAlbumButtons()  : mixed
puts out the maintenance buttons for an album
printAlbumLegend()  : mixed
printAlbumEditRow()  : mixed
puts out a row in the edit album table
processAlbumEdit()  : string
processes the post from the above
processImageEdit()  : mixed
Process the image edit form posted
adminPageNav()  : mixed
print_language_string_list()  : mixed
Generates an editable list of language strings
process_language_string_save()  : string
process the post of a language string form
getTagOrder()  : int
Returns the desired tagsort order (0 for alphabetic, 1 for most used)
unzip()  : mixed
Unzips an image archive
is_zip()  : bool
Checks for a zip file
isolate()  : string
Extracts and returns a 'statement' from a PHP script so that it may be 'evaled'
listDirectoryFiles()  : array<string|int, mixed>
Return an array of files from a directory and sub directories
themeIsEditable()  : bool
Check if a theme is editable (ie not a bundled theme)
zenPhotoTheme()  : mixed
copyThemeDirectory()  : bool|string
Copy a theme directory to create a new custom theme
deleteThemeDirectory()  : bool
Deletes a theme
currentRelativeURL()  : string
Return URL of current admin page
getParentAlbumsAdmin()  : array<string|int, mixed>
Returns an array of the names of the parents of the current album.
getAlbumBreadcrumbAdmin()  : mixed
removeParentAlbumNames()  : string
Removes the parent album name so that we can print a album breadcrumb with them
printAdminRightsTable()  : mixed
Outputs the rights checkbox table for admin
printManagedObjects()  : mixed
Creates the managed album table for Admin
processRights()  : bit
processes the post of administrator rights
processManagedObjects()  : mixed
getCheckboxState()  : int
Returns the value of a checkbox form item
standardScripts()  : array<string|int, mixed>
Returns an array of "standard" theme scripts. This list is normally used to exclude these scripts form various option seletors.
getWatermarks()  : array<string|int, mixed>
Returns a merged list of available watermarks
processOrder()  : array<string|int, mixed>
Processes the serialized array from tree sort.
postAlbumSort()  : mixed
POST handler for album tree sorts
printNestedAlbumsList()  : bool
Prints the sortable nested albums list returns true if nesting levels exceede the database container
printEditDropdown()  : mixed
Prints the dropdown menu for the nesting level depth for the album sorting
processEditSelection()  : mixed
printBulkActions()  : mixed
Edit tab bulk actions drop-down
bulkActionRedirect()  : mixed
common redirector for bulk action handling return
bulkTags()  : array<string|int, mixed>
Process the bulk tags
processAlbumBulkActions()  : mixed
Processes the check box bulk actions for albums
processImageBulkActions()  : mixed
Handles Image bulk actions
processCommentBulkActions()  : mixed
Processes the check box bulk actions for comments
codeblocktabsJS()  : mixed
Codeblock tabs JavaScript code
printCodeblockEdit()  : mixed
prints codeblock edit boxes
processCodeblockSave()  : string
handles saveing of codeblock edits
admin_securityChecks()  : mixed
Standard admin pages checks
minDiff()  : mixed
getPageSelector "diff" function
fullText()  : string
getPageSelector "diff" function
dateDiff()  : string
getPageSelector "diff" function
getPageSelector()  : array<string|int, mixed>
returns a selector list based on the "names" of the list items
printPageSelector()  : mixed
unQuote()  : mixed
Strips off quotes from the strng
admin_album_list()  : string
Returns an option list of administrators who can own albums or images
getLogTabs()  : array<string|int, mixed>
Returns an array with the logtabs array, the default log tab and an array of log files to the default (current) log tab (for use in the logfile selector)
getDefaultLogTabs()  : array<string|int, mixed>
Gets an array log tab names and localized (gettexted) log titles
getLogFiles()  : array<string|int, mixed>
Gets a nested array with the log type (tab name) and corresponding log files
printLogSelector()  : mixed
Prints the selector for logfiles of the current log tab
getPluginTabs()  : mixed
Figures out which plugin tabs to display
getAdminThumb()  : string
Gets the URL of the adminthumb
getAdminThumbHTML()  : string
Returns the full HTML element of an admin thumb Applies the filters 'adminthumb_html'
printAdminThumb()  : string
Prints an admin thumb
processCredentials()  : mixed
handles save of user/password
consolidatedEditMessages()  : mixed
getThemeFiles()  : array<string|int, mixed>
returns an array of the theme scripts not in the exclude array
checkAlbumParentid()  : mixed
Checks for bad parentIDs from old move/copy bug
clonedFrom()  : mixed
checkAlbumimagesort()  : string
Make sure the albumimagesort is only an allowed value. Otherwise returns nothing.
printLastChangeInfo()  : mixed
Prints the last change date and last change user notice on backend edit pages Also for albums it prints the updateddate
getSortByOptions()  : array<string|int, mixed>
Returns the option array for the sort by selectors for gallery, albums and images
getSortByStatusOptions()  : array<string|int, mixed>
Returns an array of the status order options for all items
checkSchedulePublishingNotes()  : bool
Helper to check if notes are to be printed (only needed because of the inconvenient legacy table based layout on image edit pages)
printScheduledPublishingNotes()  : mixed
Prints various notes regarding the scheduled publishing status for single edit pages
printStatusNotes()  : mixed
Prints various notes regarding the scheduled publishing status for single edit pages
getStatusNote()  : string
Gets a specific predefined status note for an object (if available) Note: The notes are not status dependend!
getStatusNotes()  : array<string|int, mixed>
Gets an array of all predefined status notes
getStatusNotesByContext()  : array<string|int, mixed>
Gets an array with all status notes that apply to $obj currently
getStatusIcons()  : array<string|int, mixed>
Gets an key => value array of all available object status icons as full <img> elements
getStatusIcon()  : string
Gets the icon img element for a specific status icon
printPublishIconLinkGallery()  : mixed
Prints the publish icon link to change the status on the album and thumb image list
getPublishIcon()  : string
Returns the publish icon for the current status
printPublished()  : string
Prints the scheduled publishing date for items if set. Also prints the date for Zenpage news articles and pages
printExpired()  : string
Prints the expiration or expired date for items
printProtectedIcon()  : mixed
Prints the protected icon if the object is password protected on an edit list
isIncompatibleExtension()  : bool|string
Checks plugin and theme definition for $plugin_disable / $theme_description['disable'] so plugins/themes are deaktivated respectively cannot be activated if they don't match conditions/requirements. See the plugin/theme documentation for info how to define these.
processExtensionVariable()  : string|bool
Processes a plugin or theme definition variable.
printSelectorWithCustomField()  : mixed
Prints a selector (select list) with a custom text field from the values parameter. The following array entries will be created automatically:
getZenpagePagesOptionsArray()  : mixed
Gets an array of Zenpage pages ready for using with selector, radioboxes and checkbox lists
printZenpagePageSelector()  : mixed
Prints an select list option for Zenpage pages
getAdminstratorsOptionsArray()  : type
Gets an array of administrators ready for using with selector, radioboxes and checkbox lists
printUserSelector()  : mixed
Prints an select list option for users
isTextFile()  : type
Helper for the theme editor
getSubalbumImages()  : type
Updates the $_zp_admin_imagelist global used on dynamic album editing
markUpdated()  : mixed
Updates $_zp_admin_user_updated on user editing
printImageRotationSelector()  : mixed
Prints the image EXIF rotation/flipping selector
printDatetimeFormatSelector()  : mixed
Prints option selectors for date and time formats
getDatetimeFormatlistForSelector()  : array<string|int, mixed>
Helper functions for printDatetimeFormatSelector() ot create the format lists for the selector, not intended to be used standalone
db_connect()  : true
Connect to the database server and select the database.
query()  : results
The main query function. Runs the SQL on the connection and handles errors.
query_single_row()  : results
Runs a SQL query and returns an associative array of the first row.
query_full_array()  : results
Runs a SQL query and returns an array of associative arrays of every row returned.
db_quote()  : string
mysqli_real_escape_string standin that insures the DB connection is passed.
db_insert_id()  : mixed
returns the insert id of the last database insert
db_fetch_assoc()  : mixed
Fetch a result row as an associative array
db_error()  : mixed
Returns the text of the error message from previous operation
db_affected_rows()  : mixed
Get number of affected rows in previous operation
db_fetch_row()  : mixed
Get a result row as an enumerated array
db_num_rows()  : mixed
Get number of rows in result
db_close()  : mixed
Closes the database
db_software()  : mixed
report the software of the database
db_create()  : mixed
create the database
db_permissions()  : mixed
Returns user's permissions on the database
db_setSQLmode()  : mixed
Sets the SQL session mode to empty
db_getSQLmode()  : mixed
Queries the SQL session mode
db_collation()  : mixed
db_create_table()  : mixed
db_table_update()  : mixed
db_show()  : mixed
db_list_fields()  : mixed
db_truncate_table()  : mixed
db_LIKE_escape()  : mixed
db_free_result()  : mixed
prefix()  : prefixed
Prefix a table name with a user-defined string to avoid conflicts.
getWhereClause()  : contructed
Constructs a WHERE clause ("WHERE uniqueid1='uniquevalue1' AND uniqueid2='uniquevalue2' ...") from an array (map) of variables and their values which identifies a unique record in the database table.
getSetClause()  : contructed
Constructs a SET clause ("SET uniqueid1='uniquevalue1', uniqueid2='uniquevalue2' ...") from an array (map) of variables and their values which identifies a unique record in the database table. Used to 'move' records. Note: does not check anything.
db_name()  : mixed
returns the connected database name
db_count()  : int
Counts entries in a db table
db_getServerInfo()  : string
Returns the server info
db_getClientInfo()  : string
Returns the client info
db_getVersion()  : int
Gets the plain version number
zp_imageGet()  : mixed
zp_imageOutput()  : mixed
zp_createImage()  : mixed
zp_imageFill()  : mixed
zp_imageColorTransparent()  : mixed
zp_copyCanvas()  : mixed
zp_resampleImage()  : mixed
zp_imageUnsharpMask()  : mixed
zp_imageResizeAlpha()  : mixed
zp_imageCanRotate()  : mixed
zp_rotateImage()  : mixed
zp_imageDims()  : mixed
zp_imageIPTC()  : mixed
zp_imageWidth()  : mixed
zp_imageHeight()  : mixed
zp_imageMerge()  : mixed
zp_imageGray()  : mixed
zp_imageKill()  : mixed
zp_colorAllocate()  : mixed
zp_writeString()  : mixed
zp_drawRectangle()  : mixed
zp_graphicsLibInfo()  : mixed
zp_getFonts()  : mixed
zp_imageLoadFont()  : mixed
zp_imageFontWidth()  : mixed
zp_imageFontHeight()  : mixed
imageBlurGD()  : mixed
zp_imageFromString()  : mixed
js_encode()  : string
encodes a pre-sanitized string to be used as a Javascript parameter
getOption()  : mixed
Get a option stored in the database.
setOption()  : mixed
Stores an option value.
setOptionDefault()  : mixed
Sets the default value of an option.
loadLocalOptions()  : mixed
Loads option table with album/theme options
renameOption()  : 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.
purgeOption()  : mixed
Deletes an option from the database
getOptionList()  : array<string|int, mixed>
Retuns the option array
hasDynamicAlbumSuffix()  : bool
Returns true if the file has the dynamic album suffix
isHandledAlbum()  : string
checks if there is a file with the prefix and one of the handled suffixes. Returns the found suffix
rewrite_get_album_image()  : mixed
Handles the special cases of album/image[rewrite_suffix]
getImageCacheFilename()  : string
Returns the path of an image for uses in caching it NOTE: character set if for the filesystem
makeSpecialImageName()  : array<string|int, mixed>
Returns an i.php "image name" for an image not within the albums structure
getWatermarkParam()  : int
Returns the watermark image to pass to i.php
getImageCachePostfix()  : string
Returns the crop/sizing string to postfix to a cache image
getImageParameters()  : array<string|int, mixed>
Validates and edits image size/cropping parameters
getImageProcessorURI()  : string
forms the i.php parameter list for an image.
getImageArgs()  : array<string|int, mixed>
Extract the image parameters from the input variables
getImageProcessorURIFromCacheName()  : array<string|int, mixed>
Extracts the image processor URI from an existing cache filename
getImageURI()  : string
Returns an URI to the image:
extractImageExifOrientation()  : int
Extracts integer value (1-9) from the exifOrientation value stored (e.g. '7: 90 deg CCW Mirrored') in the database for images
getImageFlipRotate()  : bool|array<string|int, mixed>
Returns an array with two indexes "rotate" (= degree to rotate) and "flip" ("horizontal" or "vertical") or false if nothing applies
getAllowedTags()  : mixed
Returns an array of html tags allowed
rewrite_path()  : string
Returns either the rewrite path or the plain, non-mod_rewrite path based on the mod_rewrite option.
parse_query()  : mixed
parses a query string WITHOUT url decoding it!
build_query()  : string
createsa query string from the array passed
build_url()  : string
Builds a url from parts
pathurlencode()  : string
rawurlencode function that is path-safe (does not encode /)
getAlbumFolder()  : string
Returns the fully qualified path to the album folders
getBackupFolder()  : string
Returns the fully qualified path to the backup folder
getRootFolder()  : string
Returns the fully qualified path to the root albums or backup folder
switchLog()  : mixed
Rolls a log over if it has grown too large.
debugLog()  : mixed
Write output to the debug log Use this for debugging when echo statements would come before headers are sent or would create havoc in the HTML.
instrument()  : mixed
Tool to log execution times of script bits
parse_size()  : mixed
Parses a byte size from a size value (eg: 100M) for comparison.
getAlbumArray()  : mixed
getAlbumArray - returns an array of folder names corresponding to the given album string.
imgSrcURI()  : string
Returns an img src URI encoded based on the OS of the server
getSuffix()  : string
Returns the suffix of a file name
stripSuffix()  : string
returns a file name sans the suffix
getAlbumInherited()  : string
returns the non-empty value of $field from the album or one of its parents
themeSetup()  : string
primitive theme setup for image handling scripts
accessAllAlbums()  : mixed
Checks access for the album root
getWatermarkPath()  : string
Returns the path to a watermark
secureServer()  : bool
Checks to see if access was through a secure protocol
getRequestURI()  : string
Returns the script requesting URI.
safe_glob()  : mixed
Provide an alternative to glob which does not return filenames with accented charactes in them
checkInstall()  : mixed
Check to see if the setup script needs to be run
exitZP()  : mixed
Call when terminating a script.
installSignature()  : array<string|int, mixed>
Computes the "installation signature" of the Zenphoto install
zp_session_start()  : mixed
Starts a zenphoto session (perhaps a secure one)
zp_session_destroy()  : mixed
Ends a zenphoto session if there is one and clear the session cookie
getDefaultRewriteTokens()  : array<string|int, mixed>
Reads the core default rewrite token define array from the config template file `zenphoto_cfg.txt`.
addMissingDefaultRewriteTokens()  : mixed
Adds missing individual default rewrite tokens to $_zp_conf_vars['special_pages']
curlRequest()  : bool
Sends a simple cURL request to the $uri specified.
generateImageCacheFile()  : mixed
Sends a cURL request to i.php to generate the image requested without printing it.
httpsRedirect()  : mixed
Checks if protocol not https and redirects if https required
redirectURL()  : mixed
General url redirection handler using header()
sanitizeRedirect()  : string
Sanitizes a "redirect" post to always be within the site
callUserFunction()  : mixed
Wrapper to call a plugin or otherwise possibly undefined function or method to avoid themes breaking if the plugin is not active
deprecationNotice()  : mixed
Logs a deprecated notice including traces in the debuglog
convertStrftimeFormat()  : string
Basic conversion for a (deprecated) strftime() date format string
hasPrimaryScripts()  : mixed
Returns true if the install is not a "clone"
zpErrorHandler()  : void|bool
Traps errors and insures thy are logged.
filesystemToInternal()  : string
Converts a file system filename to UTF-8 for zenphoto internal storage
internalToFilesystem()  : string
Converts a Zenphoto Internal filename string to one compatible with the file system
sanitize_path()  : string
Takes user input meant to be used within a path to a file or folder and removes anything that could be insecure or malicious, or result in duplicate representations for the same physical file.
sanitize_numeric()  : int
Checks if the input is numeric, rounds if so, otherwise returns false.
sanitize_script()  : string
removes script tags
sanitize()  : string
Make strings generally clean. Takes an input string and cleans out null-bytes, and optionally use KSES library to prevent XSS attacks and other malicious user input.
ksesProcess()  : string
Internal "helper" function to apply the tag removal
getBare()  : type
Cleans tags and some content.
sanitize_string()  : string
returns a sanitized string for the sanitize function
zp_error()  : mixed
triggers an error
html_decode()  : mixed
html_encode()  : string
encodes a pre-sanitized string to be used in an HTML text-only field (value, alt, title, etc.)
html_encodeTagged()  : string
HTML encodes the non-metatag part of the string.
html_pathurlencode()  : string
Convenience wrapper of html_encode(pathurlencode($url)) Primarily intended for use with img src URLs
mkdir_recursive()  : bool
Makes directory recursively, returns TRUE if exists or was created sucessfuly.
debugLogBacktrace()  : mixed
Logs the calling stack
debugLogVar()  : mixed
Records a Var to the debug log
zp_getCookie()  : mixed
Returns the value of a cookie from either the cookies or from $_SESSION[]
zp_cookieEncode()  : mixed
Encodes a cookie value tying it to the user IP
zp_setCookie()  : mixed
Sets a cookie both in the browser cookies and in $_SESSION[]
zp_clearCookie()  : mixed
Clears a cookie
getSerializedArray()  : array<string|int, mixed>
if $string is an serialzied array it is unserialized otherwise an appropriate array is returned
updateConfigItem()  : mixed
Updates an item in the configuration file
storeConfig()  : mixed
backs-up and updates the Zenphoto configuration file
zpRewriteURL()  : string
Creates a "REWRITE" url given the query parameters that represent the link
fix_path_redirect()  : mixed
Checks to see if the current URL is a query string url when mod_rewrite is active.
zp_load_page()  : mixed
zp_load_gallery()  : mixed
initializes the gallery.
zp_load_search()  : mixed
Loads the search object.
zp_load_album()  : the
zp_load_album - loads the album given by the folder name $folder into the global context, and sets the context appropriately.
zp_load_image()  : the
zp_load_image - loads the image given by the $folder and $filename into the global context, and sets the context appropriately.
load_zenpage_pages()  : object
Loads a zenpage pages page Sets up $_zp_current_zenpage_page and returns it as the function result.
load_zenpage_news()  : object
Loads a zenpage news article Sets up $_zp_current_zenpage_news and returns it as the function result.
zp_load_request()  : bool
Figures out what is being accessed and calls the appropriate load function
prepareIndexPage()  : string
sets up for loading the index page
prepareAlbumPage()  : mixed
sets up for loading an album page
prepareImagePage()  : string
sets up for loading an image page
prepareCustomPage()  : string
sets up for loading p=page pages
redirectionHandler()  : mixed
Handles redirections via filter hook "redirection_handler".
zp_register_filter()  : mixed
Registers a filtering function Filtering functions are used to post process zenphoto elements or to trigger functions when a filter occur
zp_filter_unique_id()  : string
Build Unique ID for storage and retrieval.
zp_apply_filter()  : mixed
Performs a filtering operation on a zenphoto element or event.
zp_remove_filter()  : bool
Removes a function from a specified filter hook.
zp_has_filter()  : int|bool
Check if any filter has been registered for a hook.
get_filterScript()  : string
returns a list of scripts that have attached to the hook
zp_filter_slot()  : mixed
Returns the position of the function in the hook queue
getLanguageArray()  : mixed
functions-i18n.php -- support functions for internationalization
generateLanguageList()  : array<string|int, mixed>
Returns an array of available language locales.
setMainDomain()  : mixed
Sets the locale, etc. to the zenphoto domain details.
gettext_th()  : string
Gettext replacement function for separate translations of third party themes.
ngettext_th()  : string
ngettext replacement function for separate translations of third party themes.
gettext_pl()  : string
Gettext replacement function for separate translations of third party plugins within the root plugins folder.
ngettext_pl()  : string
ngettext replacement function for separate translations of third party plugins within the root plugins folder.
i18nSetLocale()  : string
Wrapper function for setLocale() so that all the proper permutations are used Returns the result from the setLocale call
setupDomain()  : mixed
Sets the translation domain and type for optional theme or plugin based translations
setupCurrentLocale()  : mixed
Setup code for gettext translation Returns the result of the setlocale call
getLangAttributeLocale()  : string
Converts underscore locales like "en_US" to valid IANA/BCP 47 hyphen locales like "en-US" Needed for example in JS or HTML "lang" attributes.
parseHttpAcceptLanguage()  : array<string|int, mixed>
This function will parse a given HTTP Accepted language instruction (or retrieve it from $_SERVER if not provided) and will return a sorted array. For example, it will parse fr;en-us;q=0.8
validateLocale()  : mixed
checks a "supplied" locale against the valid locales.
getUserLocale()  : mixed
Returns a saved (or posted) locale. Posted locales are stored as a cookie.
get_language_string()  : string
Returns the sring for the current language from a serialized set of language strings Defaults to the string for the current locale, the en_US string, or the first string which ever is present
getTimezones()  : unknown
Returns a list of timezones
timezoneDiff()  : int
Returns the difference between the server timez one and the local (users) time zone
getAllTranslations()  : mixed
returns a serialized "multilingual array" of translations Used for setting default options with multi-lingual strings.
getLanguageSubdomains()  : mixed
creates an SEO language prefix list
getLanguageText()  : string
Returns a canonical language name string for the location
getSystemLocales()  : array<string|int, mixed>
Gets all locales suppported on the current server as a multidimensional array
getLanguageDisplayName()  : string
Returns the real language name to the locale passed.
printLangAttribute()  : mixed
Prints the lang="" attribute for the main <html> element.
getFormattedLocaleDate()  : string
Returns a locale aware - e.g. translated day and month names - formatted date. Requires the PHP intl extension to work properly Otherwise returns standard formatted date.
imageError()  : mixed
imageDebug()  : mixed
Prints debug information from the arguments to i.php.
propSizes()  : array<string|int, mixed>
Calculates proprotional width and height Used internally by cacheImage
iptc_make_tag()  : mixed
iptc_make_tag() function by Thies C. Arntzen
cacheImage()  : mixed
Creates the cache folder version of the image, including watermarking
getImageRotation()  : array<string|int, mixed>|false
Determines the rotation of the image by looking at EXIF information.
addWatermark()  : resource|object
Adds a watermark to a resized image. If no watermark is set it just returns the image
isGDImage()  : bool
Checks if an processed image is a GD library image
reconfigureAction()  : mixed
Executes the configuration change code
checkSignature()  : type
Checks details of configuration change
signatureChange()  : string
Notification handler for configuration change
addReconfigureNote()  : mixed
Adds the reconfigure notification via filters
printReconfigureNote()  : mixed
prints HTML for the configuration change notification
getReconfigureNote()  : array<string|int, mixed>
Gets data for the configuration change notification
printReconfigureError()  : mixed
Prints an error page on the frontend if a mandatory reconfigure issue occurred but the visitor is not loggedin with appropiate rights.
debuglogReconfigureNote()  : mixed
Adds debuglog entries about the reconfigure note
ignoreSetupRunRequest()  : mixed
If setup request a run because of a signature change this refreshes the signature on full admin user request so it is ignored until the next signature change.
isSetupProtected()  : array<string|int, mixed>
Checks if setup files are protected. Returns array of the protected files or empty array
unprotectSetupFiles()  : mixed
Unprotectes setup files
protectSetupFiles()  : mixed
Protects setup files
reconfigureCSS()  : mixed
CSS for the configuration change notification
rewriteHandler()  : mixed
"Rewrite" handling for Zenphoto
getRules()  : mixed
parseAllowedTags()  : array<string|int, mixed>
parses the allowed HTML tags for use by htmLawed
checkObjectsThumb()  : string
Search for a thumbnail for the image
truncate_string()  : string
Returns a truncated string
tidyHTML()  : string
Fixes unbalanced HTML tags. Uses the library htmlawed or if available the native PHP extension tidy
shortenContent()  : string
Returns truncated html formatted content
lookupSortKey()  : string
Returns a sort field part for querying Note: $sorttype may be a comma separated list of field names. If so, these are peckmarked and returned otherwise unchanged.
zpFormattedDate()  : string
Returns a formatted date for output
getDatetimeObject()  : object
Returns a datetime object
getStandardDateFormats()  : array<string|int, mixed>
Returns an array with datetime (keys) and ICU dateformat (values) strings
myts_date()  : string
Simple SQL timestamp formatting function.
zp_mail()  : string
Send an mail to the mailing list. We also attempt to intercept any form injection attacks by slime ball spammers. Returns error message if send failure.
sortByMultilingual()  : array<string|int, mixed>
Sorts the results of a DB search by the current locale string for $field
checkAlbumPassword()  : bool
Checks to see access is allowed to an album Returns true if access is allowed.
getPluginFiles()  : array<string|int, mixed>
Returns a consolidated list of plugins The array structure is key=plugin name, value=plugin path
getPlugin()  : string
Returns the fully qualified file name of the plugin file.
getEnabledPlugins()  : array<string|int, mixed>
Returns an array of the currently enabled plugins
extensionEnabled()  : bool
Returns if a plugin is enabled
enableExtension()  : mixed
Enables a plugin
disableExtension()  : mixed
Disables an extension
getManagedAlbumList()  : array<string|int, mixed>
Populates and returns the $_zp_admin_album_list array
populateManagedObjectsList()  : array<string|int, mixed>
Returns a list of album names managed by $id
getAllSubAlbumIDs()  : array<string|int, mixed>
Returns an array of album ids whose parent is the folder
handleSearchParms()  : mixed
recovers search parameters from stored cookie, clears the cookie
galleryAlbumsPerPage()  : int
Returns the number of album thumbs that go on a gallery page
setupTheme()  : string
Returns the theme folder If there is an album theme, loads the theme options.
getAllTagsUnique()  : array<string|int, mixed>
Returns an array of unique tag names
getAllTagsCount()  : array<string|int, mixed>
Returns an array indexed by 'tag' with the element value the count of the tag
getTagCountByAccess()  : int
Checks if a tag is assigned at all and if it can be viewed by the current visitor and returns the corrected count Helper function used optionally within getAllTagsCount() and getAllTagsUnique()
storeTags()  : mixed
Stores tags for an object
readTags()  : unknown
Retrieves the tags for an object Returns them in an array
generateListFromArray()  : mixed
Creates the body of a select list
generateListFromFiles()  : mixed
Generates a selection list from files found on disk
generateAttributesFromArray()  : string
Helper to generate attributename="attributevalue" for HTML elements based on an array consisting of key => value pairs
getLinkHTML()  : mixed
printLinkHTML()  : mixed
General link printing function
shuffle_assoc()  : bool
shuffles an array maintaining the keys
sortByKey()  : mixed
sorts the found albums (images) by the required key(s)
sortMultiArray()  : array<string|int, mixed>
multidimensional array column sort
sortArray()  : bool
General one dimensional array sorting function. Key/value associations are preserved.
getNotViewableAlbums()  : array<string|int, mixed>
Returns a list of album IDs that the current viewer is not allowed to see
getNotViewableImages()  : array<string|int, mixed>
Returns a list of image IDs that the current viewer is not allowed to see
isValidURL()  : bool
Checks to see if a URL is valid
safe_fnmatch()  : bool
pattern match function Works with characters with diacritical marks where the PHP one does not.
isValidEmail()  : bool
Returns true if the mail address passed is valid.
zp_image_types()  : string
returns a list of comment record 'types' for "images"
dircopy()  : the
Copies a directory recursively
byteConvert()  : string
Returns a byte size from a size value (eg: 100M).
dateTimeConvert()  : mixed
Converts a datetime to connoical form
get_context()  : mixed
set_context()  : mixed
in_context()  : mixed
add_context()  : mixed
rem_context()  : mixed
save_context()  : mixed
restore_context()  : mixed
zp_handle_password()  : mixed
checks password posting
zp_handle_password_single()  : bool
Handles a passwort
getOptionFromDB()  : mixed
Gets an option directly from the database.
setThemeOption()  : mixed
Set options local to theme and/or album
replaceThemeOption()  : 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.
purgeThemeOption()  : mixed
Deletes an theme option for a specific or the current theme from the database
purgeThemeOptionTotal()  : mixed
Deletes a theme option for all themes present or not
setThemeOptionDefault()  : mixed
Used to set default values for theme specific options
getThemeOption()  : mixed
Returns the value of a theme option
getUserIP()  : string
Returns the viewer's IP address Deals with transparent proxies
getAnonymIP()  : string
Anonymizing of IP addresses
seoFriendly()  : string
Strips out and/or replaces characters from the string that are not "soe" friendly
seoFriendlyJS()  : mixed
emit the javascript seojs() function
is_connected()  : bool
Returns true if there is an internet connection
debug404()  : mixed
produce debugging information on 404 errors
XSRFdefender()  : mixed
Checks for Cross Site Request Forgeries
getXSRFToken()  : mixed
returns an XSRF token
XSRFToken()  : mixed
Emits a "hidden" input for the XSRF token
cron_starter()  : mixed
Starts a sechedule script run
zp_loggedin()  : bool
Check if logged in (with specific rights) Returns a true value if there is a user logged on with the required rights
read_exif_data_protected()  : array<string|int, mixed>
Provides an error protected read of image EXIF/IPTC data
getLanguageFlag()  : string
fetches the path to the flag image
getItemByID()  : mixed
Gets an item object by id
reveal()  : mixed
uses down and up arrow links to show and hide sections of HTML
applyMacros()  : string
Deals with the [macro parameters] substitutions
getMacros()  : mixed
getNestedAlbumList()  : array<string|int, mixed>
generates a nested list of albums for the album tab sorting Returns an array of "albums" each element contains: 'name' which is the folder name 'sort_order' which is an array of the sort order set
setexifvars()  : mixed
initializes the $_zp_exifvars array display state
removeDir()  : bool
Recursively clears and removes a folder
tagURLs()  : mixed
inserts location independent WEB path tags in place of site path tags
unTagURLs()  : string
reverses tagURLs()
updateImageProcessorLink()  : string
Searches out i.php image links and replaces them with cache links if image is cached
pluginDebug()  : mixed
removeTrailingSlash()  : string
Removes a trailing slash from a string if one exists, otherwise just returns the string Used primarily within date and tag searches and news date archive results
getDataUsageNotice()  : array<string|int, mixed>
Returns an array the data privacy policy page and the data usage confirmation text as defined on Options > Security array( 'notice' => '<The defined text>', 'url' => '<url to the define page either custom page url or Zenpage page>', 'linktext' => '<The defined text>' )
printDataUsageNotice()  : mixed
Prints the data privacy policy page and the data usage confirmation text as defined on Options > Security If there is no page defined it only prints the default text.
getCookieInfoData()  : array<string|int, mixed>
Returns an array with predefined info about general cookies set by the system and/or plugins
getCookieInfoHTML()  : string
Returns a definition list with predefined info about general cookies set by the system and/or plugins as a string
printCookieInfo()  : mixed
Prints a definition list with predefined info about general cookies set by the system and/or plugins
getCookieInfoMacro()  : array<string|int, mixed>
Registers the content macro(s)
intel2Moto()  : array<string|int, mixed>
Converts from Intel to Motorola endien. Just reverses the bytes (assumes hex is passed in)
lookup_tag()  : string
Looks up the name of the tag
lookup_type()  : string
Looks up the datatype
validSize()  : type
truncates unreasonable read data requests.
unRational()  : string
processes a irrational number
rational()  : type
processes a rational number
formatData()  : type
Formats Data for the data type
formatExposure()  : type
read_entry()  : type
Reads one standard IFD entry
read_exif_data_raw()  : int
Pass in a file and this reads the EXIF data
ConvertToFraction()  : type
Converts a floating point number into a simple fraction.
get35mmEquivFocalLength()  : int
Calculates the 35mm-equivalent focal length from the reported sensor resolution
lookup_Canon_tag()  : string
Looks up the name of the tag for the MakerNote (Depends on Manufacturer)
formatCanonData()  : type
Formats Data for the data type
parseCanon()  : type
Cannon Special data section Useful:
lookup_Fujifilm_tag()  : string
Looks up the name of the tag for the MakerNote (Depends on Manufacturer)
formatFujifilmData()  : type
Formats Data for the data type
parseFujifilm()  : mixed
Fujifilm Special data section
lookup_GPS_tag()  : string
Looks up the name of the tag
formatGPSData()  : type
Formats Data for the data type
parseGPS()  : type
GPS Special data section
lookup_Nikon_tag()  : string
Looks up the name of the tag for the MakerNote (Depends on Manufacturer)
formatNikonData()  : mixed
parseNikon()  : mixed
Nikon Special data section
lookup_Olympus_tag()  : string
Looks up the name of the tag for the MakerNote (Depends on Manufacturer)
formatOlympusData()  : type
Formats Data for the data type
parseOlympus()  : bool
Olympus Special data section // - Updated by Zenphoto for new header tag in E-410/E-510/E-3 cameras. 2/24/2008
lookup_Panasonic_tag()  : string
Looks up the name of the tag for the MakerNote (Depends on Manufacturer)
formatPanasonicData()  : type
Formats Data for the data type
parsePanasonic()  : mixed
Panasonic Special data section
lookup_Sanyo_tag()  : string
Looks up the name of the tag for the MakerNote (Depends on Manufacturer)
formatSanyoData()  : type
Formats Data for the data type
parseSanyo()  : mixed
Sanyo Special data section
rc4()  : mixed
encryption support functions
bindtextdomain()  : mixed
Dummy routines so zenphoto will run on servers that do not have PHP getttext support.
bind_textdomain_codeset()  : mixed
textdomain()  : mixed
gettext()  : mixed
ngettext()  : mixed
dgettext()  : mixed
dngettext()  : mixed
kses()  : type
This function makes sure that only the allowed HTML element names, attribute names and attribute values plus only sane HTML entities will occur in $string. You have to remove any slashes from PHP's magic quotes before you call this function.
kses_hook()  : mixed
You add any kses hooks here.
kses_version()  : mixed
This function returns kses' version number.
kses_split()  : mixed
This function searches for HTML tags, no matter how malformed. It also matches stray ">" characters.
kses_split2()  : string
This function does a lot of work. It rejects some very malformed things like <:::>. It returns an empty string, if the element isn't allowed (look ma, no strip_tags()!). Otherwise it splits the tag into an element and an attribute list.
kses_attr()  : type
This function removes all attributes, if none are allowed for this element.
kses_hair()  : type
This function does a lot of work. It parses an attribute list into an array with attribute data, and tries to do the right thing even if it gets weird input. It will add quotes around attribute values that don't have any quotes or apostrophes around them, to make it easier to produce HTML code that will conform to W3C's HTML specification. It will also remove bad URL protocols from attribute values.
kses_check_attr_val()  : bool
This function performs different checks for attribute values. The currently implemented checks are "maxlen", "minlen", "maxval", "minval" and "valueless" with even more checks to come soon.
kses_bad_protocol()  : type
This function removes all non-allowed protocols from the beginning of $string. It ignores whitespace and the case of the letters, and it does understand HTML entities. It does its work in a while loop, so it won't be fooled by a string like "javascript:javascript:alert(57)".
kses_no_null()  : type
This function removes any NULL characters in $string.
kses_stripslashes()  : type
This function changes the character sequence \" to just " It leaves all other slashes alone. It's really weird, but the quoting from preg_replace(//e) seems to require this.
kses_array_lc()  : mixed
This function goes through an array, and changes the keys to all lower case.
kses_js_entities()  : type
This function removes the HTML JavaScript entities found in early versions of Netscape 4.
kses_html_error()  : type
This function deals with parsing errors in kses_hair(). The general plan is to remove everything to and including some whitespace, but it deals with quotes and apostrophes as well.
kses_bad_protocol_once()  : type
This function searches for URL protocols at the beginning of $string, while handling whitespace and HTML entities.
kses_bad_protocol_once2()  : string
This function processes URL protocols, checks to see if they're in the white- list or not, and returns different data depending on the answer.
kses_normalize_entities()  : type
This function normalizes HTML entities. It will convert "AT&T" to the correct "AT&amp;T", "&#00058;" to "&#58;", "&#XYZZY;" to "&amp;#XYZZY;" and so on.
kses_normalize_entities2()  : type
This function helps kses_normalize_entities() to only accept 16 bit values and nothing more for &#number; entities.
kses_decode_entities()  : type
This function decodes numeric HTML entities (&#65; and &#x41;). It doesn't do anything with other entities like &auml;, but we don't need them in the URL protocol whitelisting system anyway.
mb_strtolower()  : mixed
mb_strtoupper()  : mixed
mb_strlen()  : mixed
mb_substr()  : mixed
mb_strrpos()  : mixed
mb_strpos()  : mixed
mb_substr_count()  : mixed
processCommentBlock()  : mixed
getOption()  : mixed
setOption()  : mixed
setOptionDefault()  : mixed
debugLog()  : mixed
getRequestURI()  : mixed
getVersion()  : mixed
Returns the zenphoto version string
printVersion()  : mixed
Prints the zenphoto version string
printZenJavascripts()  : mixed
Print any Javascript required by zenphoto.
adminToolbox()  : mixed
Prints the clickable drop down toolbox on any theme page with generic admin helpers
getGalleryTitle()  : string
Returns the raw title of the gallery.
getBareGalleryTitle()  : string
Returns a text-only title of the gallery.
printGalleryTitle()  : mixed
Prints the title of the gallery.
printBareGalleryTitle()  : mixed
getHeadTitle()  : mixed
Function to create the page title to be used within the html <head> <title></title> element.
printHeadTitle()  : mixed
Function to print the html <title>title</title> within the <head> of a html page based on the current theme page Usefull if you use one header.php for the header of all theme pages instead of individual ones on the theme pages It prints the title and site name including the <title> tag in reversed breadcrumb order: <title><title of current page> | <parent item if present> | <gallery title></title> It supports standard gallery pages as well a custom and Zenpage news articles, categories and pages.
getGalleryDesc()  : string
Returns the raw description of the gallery.
getBareGalleryDesc()  : string
Returns a text-only description of the gallery.
printGalleryDesc()  : mixed
Prints the description of the gallery.
printBareGalleryDesc()  : mixed
getParentSiteTitle()  : string
Returns the name of the parent website as set by the "Website Title" option on the gallery options tab. Use this if Zenphoto is only a part of your website.
getParentSiteURL()  : string
Returns the URL of the main website as set by the "Website URL" option on the gallery options tab. Use this if Zenphoto is only a part of your website.
getMainSiteName()  : string
getMainSiteURL()  : string
getGalleryIndexURL()  : string
Returns the URL of the main gallery index page. If a custom index page is set this returns that page.
getStandardGalleryIndexURL()  : string
Returns the url to the standard gallery index.php page
getCustomGalleryIndexURL()  : string
Gets the custom gallery index url if one is set, otherwise false
getCustomGalleryIndexPage()  : string
Returns the name to the individual custom gallery index page name if set, otherwise returns generic custom gallery page "gallery.php" that is widely supported by themes If you need to check if there is an indovidual custom_index_page set use `getOption('custom_index_page')` or `getCustomGalleryIndexURL()`
printGalleryIndexURL()  : mixed
If a custom gallery index page is set this first prints a link to the actual site index (home page = index.php) followed by the gallery index page link. Otherwise just the gallery index link
getSiteHomeURL()  : string
Returns the home page link (WEBPATH) to the Zenphoto theme index.php page Use in breadcrumbs if the theme uses a custom gallery index page so the gallery is not the site's home page
printSiteHomeURL()  : mixed
Prints the home page link (WEBPATH with trailing slash) to a Zenphoto theme index.php page Use in breadcrumbs if the theme uses a custom gallery index page so the gallery is not the site's home page
printPrivacyPageLink()  : mixed
If the privacy page url option is set this prints a link to it
getNumAlbums()  : int
Returns the number of albums.
getCurrentTheme()  : string
Returns the name of the currently active theme
next_album()  : bool
WHILE next_album(): context switches to Album.
getCurrentPage()  : int
Returns the number of the current page without printing it.
getAllAccessibleAlbums()  : mixed
Gets an array of the album ids of all accessible albums (publich or user dependend)
getTotalPages()  : int
Returns the number of pages for the current object
getPageNumURL()  : int
Returns the URL of the page number passed as a parameter
hasNextPage()  : bool
Returns true if there is a next page
getNextPageURL()  : string
Returns the URL of the next page. Use within If or while loops for pagination.
printNextPageURL()  : mixed
Prints the URL of the next page.
hasPrevPage()  : bool
Returns TRUE if there is a previous page. Use within If or while loops for pagination.
getPrevPageURL()  : string
Returns the URL of the previous page.
printPrevPageURL()  : mixed
Returns the URL of the previous page.
printPageNav()  : mixed
Prints a page navigation including previous and next page links
printPageList()  : mixed
Prints a list of all pages.
getPageNavList()  : mixed
returns a page nav list.
printPageListWithNav()  : mixed
Prints a full page navigation including previous and next page links with a list of all pages in between.
makeAlbumCurrent()  : mixed
Sets the album passed as the current album
getAlbumTitle()  : string
Returns the raw title of the current album.
getBareAlbumTitle()  : string
Returns a text-only title of the current album.
getAnnotatedAlbumTitle()  : string
Returns an album title taged with of Not visible or password protected status
printAnnotatedAlbumTitle()  : mixed
printAlbumTitle()  : mixed
Prints an encapsulated title of the current album.
printBareAlbumTitle()  : mixed
albumNumber()  : int
Gets the 'n' for n of m albums
getParentAlbums()  : array<string|int, mixed>
Returns an array of the names of the parents of the current album.
getAlbumBreadcrumb()  : array<string|int, mixed>
returns the breadcrumb item for the current images's album
printAlbumBreadcrumb()  : mixed
prints the breadcrumb item for the current images's album
printSearchBreadcrumb()  : mixed
Prints the "breadcrumb" for a search page if the search was for a data range, the breadcrumb is "Archive" otherwise it is "Search"
getParentBreadcrumb()  : array<string|int, mixed>
returns the breadcrumb navigation for album, gallery and image view.
printParentBreadcrumb()  : mixed
Prints the breadcrumb navigation for album, gallery and image view.
printHomeLink()  : mixed
Prints a link to the 'main website', not the Zenphoto site home page! Only prints the link if the url is not empty and does not point back the gallery page
getAlbumDate()  : string
Returns the formatted date field of the album
printAlbumDate()  : mixed
Prints the date of the current album
getAlbumLocation()  : string
Returns the Location of the album.
printAlbumLocation()  : mixed
Prints the location of the album
getAlbumDesc()  : string
Returns the raw description of the current album.
getBareAlbumDesc()  : string
Returns a text-only description of the current album.
printAlbumDesc()  : mixed
Prints description of the current album
printBareAlbumDesc()  : mixed
getAlbumCustomData()  : string
Returns the custom_data field of the current album
printAlbumCustomData()  : mixed
Prints the custom_data field of the current album.
getAlbumData()  : string
A composit for getting album data
printAlbumData()  : mixed
Prints arbitrary data from the album object
getAlbumPage()  : int
Returns the album page number of the current image
getAlbumURL()  : string
Returns the album link url of the current album.
printAlbumURL()  : mixed
Prints the album link url of the current album.
getAlbumThumb()  : string
Returns the name of the defined album thumbnail image.
getPasswordProtectImage()  : string
Returns an <img> element of the password protect thumb substitute
getPasswordProtectedImage()  : string
Gets the URL to the password protected images
printPasswordProtectedImage()  : mixed
Prints an image element with the password protected image.
printAlbumThumbImage()  : mixed
Prints the album thumbnail image.
getCustomAlbumThumb()  : string
Returns a link to a custom sized thumbnail of the current album
printCustomAlbumThumbImage()  : string
Prints a link to a custom sized thumbnail of the current album
getMaxSpaceContainer()  : mixed
Called by ***MaxSpace functions to compute the parameters to be passed to xxCustomyyy functions.
getCustomAlbumThumbMaxSpace()  : string
Returns a link to a un-cropped custom sized version of the current album thumb within the given height and width dimensions.
printCustomAlbumThumbMaxSpace()  : mixed
Prints a un-cropped custom sized album thumb within the given height and width dimensions.
getNextAlbum()  : object
Returns the next album
getNextAlbumURL()  : string
Get the URL of the next album in the gallery.
getPrevAlbum()  : object
Returns the previous album
getPrevAlbumURL()  : string
Get the URL of the previous album in the gallery.
isImagePage()  : bool
Returns true if this page has image thumbs on it
isAlbumPage()  : bool
Returns true if this page has album thumbs on it
getNumImages()  : int
Returns the number of images in the album.
getFirstPageImages()  : type
next_image()  : bool
Returns the next image on a page.
makeImageCurrent()  : mixed
Sets the image passed as the current image
getImageTitle()  : string
Returns the raw title of the current image.
getBareImageTitle()  : string
Returns a text-only title of the current image.
getAnnotatedImageTitle()  : string
Returns the image title taged with not visible annotation.
printAnnotatedImageTitle()  : mixed
printImageTitle()  : mixed
Prints title of the current image
printBareImageTitle()  : mixed
imageNumber()  : int
Returns the 'n' of n of m images
getImageDate()  : string
Returns the image date of the current image in yyyy-mm-dd hh:mm:ss format.
printImageDate()  : mixed
Prints the date of the current album
getImageLocation()  : string
Returns the Location field of the current image
getImageCity()  : string
Returns the City field of the current image
getImageState()  : string
Returns the State field of the current image
getImageCountry()  : string
Returns the Country field of the current image
getImageDesc()  : string
Returns the raw description of the current image.
getBareImageDesc()  : string
Returns a text-only description of the current image.
printImageDesc()  : mixed
Prints the description of the current image.
printBareImageDesc()  : mixed
getImageData()  : string
A composit for getting image data
getImageCustomData()  : string
Returns the custom_data field of the current image
printImageCustomData()  : string
Prints the custom_data field of the current image.
printImageData()  : mixed
Prints arbitrary data from the image object
getFullImageFilesize()  : int
Returns the file size of the full original image
hasNextImage()  : bool
True if there is a next image
hasPrevImage()  : bool
True if there is a previous image
getNextImageURL()  : string
Returns the url of the next image.
getPrevImageURL()  : string
Returns the url of the previous image.
getPrevImageThumb()  : string
Returns the thumbnail of the previous image.
getNextImageThumb()  : string
Returns the thumbnail of the next image.
getImageURL()  : string
Returns the url of the current image.
printImageURL()  : mixed
Prints the link to the current image.
getImageMetaData()  : array<string|int, mixed>
Returns the Metadata infromation from the current image
printImageMetadata()  : mixed
Prints the Metadata data of the current image
getSizeCustomImage()  : array<string|int, mixed>
Returns an array with the height & width
getSizeDefaultImage()  : array<string|int, mixed>
Returns an array [width, height] of the default-sized image.
getSizeFullImage()  : array<string|int, mixed>
Returns an array [width, height] of the original image.
getDefaultWidth()  : int
The width of the default-sized image (in printDefaultSizedImage)
getDefaultHeight()  : int
Returns the height of the default-sized image (in printDefaultSizedImage)
getFullWidth()  : int
Returns the width of the original image
getFullHeight()  : int
Returns the height of the original image
isLandscape()  : bool
Returns true if the image is landscape-oriented (width is greater than height) or - kept here for backwards compatibility - square (equal widht and height)
getDefaultSizedImage()  : string
Returns the url to the default sized image.
printDefaultSizedImage()  : mixed
Show video player with video loaded or display the image.
getImageThumb()  : string
Returns the url to the thumbnail of the current image.
printImageThumb()  : mixed
getSizeDefaultThumb()  : aray
Gets the width and height of a default thumb for the <img> tag height/width
getFullImageURL()  : string
Returns the url to original image.
getUnprotectedImageURL()  : string
Returns the "raw" url to the image in the albums folder
getProtectedImageURL()  : string
Returns an url to the password protected/watermarked current image
getSizedImageURL()  : mixed
Returns a link to the current image custom sized to $size
getCustomImageURL()  : string
Returns the url to the image with the dimensions you define with this function.
printCustomSizedImage()  : mixed
Print normal video or custom sized images.
getCustomSizedImageMaxSpace()  : string
Returns a link to a un-cropped custom sized version of the current image within the given height and width dimensions.
getCustomSizedImageThumbMaxSpace()  : string
Returns a link to a un-cropped custom sized version of the current image within the given height and width dimensions.
printCustomSizedImageThumbMaxSpace()  : mixed
Creates image thumbnails which will fit un-cropped within the width & height parameters given
printCustomSizedImageMaxSpace()  : mixed
Print normal video or un-cropped within the given height and width dimensions. Use for sized images or thumbnails in an album.
printSizedImageURL()  : mixed
Prints link to an image of specific size
getTags()  : string
Returns a list of tags for context of the page called where called
printTags()  : mixed
Prints a list of tags, editable by admin
printAllTagsAs()  : mixed
Either prints all of the galleries tgs as a UL list or a cloud
getAllDates()  : array<string|int, mixed>
Retrieves a list of all unique years & months from the images in the gallery
printAllDates()  : mixed
Prints a compendum of dates and links to a search page that will show results of the date
getCustomPageURL()  : string
Produces the url to a custom page (e.g. one that is not album.php, image.php, or index.php)
printCustomPageURL()  : mixed
Prints the url to a custom page (e.g. one that is not album.php, image.php, or index.php)
isArchive()  : bool
tests if a search page is an "archive" page
getSearchURL()  : string
Returns a search URL
printSearchForm()  : mixed
Prints the search form
getSearchWords()  : string
Returns the a sanitized version of the search string
getSearchDate()  : string
Returns the date of the search
checkForGuest()  : string
returns the auth type of a guest login
checkAccess()  : bool
Checks to see if a password is needed
getPageRedirect()  : string
Returns a redirection link for the password form
printPasswordForm()  : mixed
Prints the album password form
printZenphotoLink()  : mixed
prints the zenphoto logo and link
exposeZenPhotoInformations()  : mixed
Expose some informations in a HTML comment
getCodeblock()  : string
Gets the content of a codeblock for an image, album or Zenpage newsarticle or page.
printCodeblock()  : string
Prints the content of a codeblock for an image, album or Zenpage newsarticle or page.
checkPageValidity()  : bool
Checks for URL page out-of-bounds for "standard" themes Note: This function assumes that an "index" page will display albums and the pagination be determined by them. Any other "index" page strategy needs to be handled by the theme itself.
print404status()  : mixed
getOwnerAuthor()  : bool
Gets current item's owner (gallery images and albums) or author (Zenpage articles and pages)
printOwnerAuthor()  : mixed
Prints current item's owner (gallery images and albums) or author (Zenpage articles and pages)
getOwnerAuthorURL()  : type
Returns the search url for items the current item's owner (gallery) or author (Zenpage) is assigned to
printOwnerAuthorURL()  : mixed
Prints the link to the search engine for results of all items the current item's owner (gallery) or author (Zenpage) is assigned to
getUserURL()  : string|null
Returns a an url for the search engine for results of all items the user with $username is assigned to either as owner (gallery) or author (Zenpage) Note there is no check if the user name is actually a vaild user account name, owner or author! Use the *OwerAuthor() function for that instead
printUserURL()  : mixed
Prints the link to the search engine for results of all items $username is assigned to either as owner (gallery) or author (Zenpage) Note there is no check if the user name is actually a vaild user account name, owner or author! Use the *OwerAuthor() function for that instead
printCopyrightNotice()  : mixed
Display the site or image copyright notice if defined and display is enabled
printGalleryCopyrightNotice()  : mixed
Display the site copyright notice if defined and display is enabled
printImageCopyrightNotice()  : mixed
Display the image copyright notice if defined and display iss enabled
getCurrentPageAppendix()  : string
Gets the current page number if it is larger than 1 for use on paginated pages for SEO reason to avoid duplicate titles
printCurrentPageAppendix()  : mixed
Prints the current page number if it is larger than 1 for use on paginated pages for SEO reason to avoid duplicate titles
gallerystats_filesize_r()  : mixed
printBarGraph()  : mixed
Prints a table with a bar graph of the values.
printThumbNav()  : mixed
Prints the jQuery bxslider HTML setup to be replaced by JS
checkForUpdate()  : string
Searches the zenphoto.org home page for the current zenphoto download locates the version number of the download and compares it to the version we are running.
admin_showupdate()  : mixed
Displays the "new version available" message on admin pages
get_AnyFile_suffixes()  : mixed
comment_form_PaginationJS()  : mixed
comment_form_visualEditor()  : mixed
comment_form_print10Most()  : mixed
Admin overview summary
getCommentAddress()  : array<string|int, mixed>
Processes the post of an address
getCommentErrors()  : string
Returns an error message if a comment posting was not accepted
printCommentErrors()  : mixed
Tool to output an error message if a comment posting was not accepted
comment_form_addComment()  : object
Generic comment adding routine. Called by album objects or image objects to add comments.
commentFormUseCaptcha()  : bool
Use see if a captcha should be displayed
comment_form_postcomment()  : mixed
checks if comments are allowed and then processes them if so
comment_form_handle_comment()  : null|bool
Handles the POSTing of a comment
getCommentAuthorName()  : string
Returns the comment author's name
getCommentAuthorEmail()  : string
Returns the comment author's email
getCommentAuthorSite()  : string
Returns the comment author's website
getCommentAuthorLink()  : mixed
Prints a link to the author
printCommentAuthorLink()  : mixed
Prints a link to the author
getCommentDateTime()  : string
Returns a formatted date and time for the comment.
getCommentBody()  : string
Returns the body of the current comment
printEditCommentLink()  : mixed
Creates a link to the admin comment edit page for the current comment
getLatestComments()  : mixed
Gets latest comments for images, albums, news and pages
printLatestComments()  : mixed
Prints latest comments for images, albums, news and pages
getCommentCount()  : int
Retuns the count of comments on the current image
next_comment()  : bool
Iterate through comments; use the ZP_COMMENT context.
getCommentStored()  : array<string|int, mixed>
Returns the data from the last comment posted
commentReply()  : string
Takes a comment and makes the body of an email.
commentsAllowed()  : bool
Returns true if all the right conditions are set to allow comments for the $type
getComments()  : array<string|int, mixed>
Gets an array of comments for the current admin
fetchComments()  : array<string|int, mixed>
Gets an array of comments for the current admin
printCommentForm()  : mixed
Prints a form for posting comments
getField()  : string
Retrieves the post field if it exists
printContactForm()  : mixed
Prints the mail contact form, handles checks and the mail sending. It uses Zenphoto's check for valid e-mail address and website URL and also supports CAPTCHA.
showOrNotShowField()  : bool
Helper function that checks if a field should be shown ("required" or "show") or omitted ("ommitt").
checkRequiredField()  : string
Helper function that checks if the field is a required one. If it returns '*" to be appended to the field name as an indicator.
printContactFormMacro()  : type
Buffers the contact form print out so it can be passed to its content macro
getContactFormMacros()  : array<string|int, mixed>
Registers the content macro(s)
defaultCodeblocks_codebox()  : mixed
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
printBarGraph()  : mixed
Prints a table with a bar graph of the values.
printdownloadList()  : mixed
Prints the actual download list included all subfolders and files
getdownloadList()  : array<string|int, mixed>
Gets the actual download list included all subfolders and files
getDownloadURL()  : mixed
Gets the download url for a file
printDownloadURL()  : mixed
Prints a download link for a file, depending on the plugin options including the downloadcount and filesize
printFullImageDownloadURL()  : mixed
Prints the dwnload url link for a full image
printDownloadAlbumZipURL()  : mixed
Prints a download link for an album zip of the current album (therefore to be used only on album.php/image.php).
printLanguageSelector()  : mixed
prints a form for selecting a locale The POST handling is by getUserLocale() called in functions.php
elFinderAutoloader()  : mixed
access()  : bool|null
Simple function to demonstrate how to control file access using "accessControl" callback.
accessImage()  : mixed
accessAlbums()  : mixed
imagecreatefrombmp()  : mixed
elFinder_admin_tabs()  : mixed
elFinder_tinymce()  : mixed
printAddToFavorites()  : mixed
getFavoritesURL()  : mixed
printFavoritesURL()  : mixed
Prints links to the favorites "albums"
log_message()  : mixed
get_instance()  : mixed
omsAdditions()  : mixed
getGeoCoord()  : mixed
$returns coordinate informations for an image
addGeoCoord()  : mixed
Add a point to a map object
getImageGeodata()  : mixed
Gathers the data for an image
getAlbumGeodata()  : mixed
Gathers the map data for an album
printGoogleMap()  : mixed
Output the google map
getHitcounter()  : string
returns the hitcounter for the current page or for the object passed
getTotalHitcounter()  : int
Gets the total hitcounter sum of one or several items
getAlbumStatistic()  : array<string|int, mixed>
Returns a array of album objects of album statistic accordingly to $option
printAlbumStatistic()  : mixed
Prints album statistic according to $option as an unordered HTML list A css id is attached by default named '$option_album'
printAlbumStatisticItem()  : mixed
A helper function that only prints a item of the loop within printAlbumStatistic() Not for standalone use.
getImageStatistic()  : array<string|int, mixed>
Returns a array of image objects of image statistic according to $option
printImageStatistic()  : string
Prints image statistic according to $option as an unordered HTML list A css id is attached by default named accordingly'$option'
checkIfNew()  : bool
A little helper function that checks if an image or album is to be considered 'new' within the time range set in relation to getImageDate()/getAlbumDate() Returns true or false.
getNumAllSubalbums()  : bool
Gets the number of all subalbums of all subalbum levels of either the current album or $albumobj
getPictureOfTheDay()  : object|nill
Returns an randomly selected image objecet from the gallery per day.
getjPlayerSkins()  : mixed
Gets the skin names and css files
getjPlayerSkinCSS()  : mixed
Gets the css files for a skin. Helper function for getjPlayerSkins().
printjPlayerPlaylist()  : mixed
macro_admin_tabs()  : mixed
macroList_show()  : mixed
markRelease_button()  : mixed
updateItemsSortorder()  : mixed
Updates the sortorder of the pages list in the database
printItemsListTable()  : mixed
Prints the table part of a single page item for the sortable pages list
printItemsList()  : bool
Prints the sortable pages list returns true if nesting levels exceede the database container
printItemEditLink()  : mixed
Prints the link to the edit page of a menu item. For gallery and Zenpage items it links to their normal edit pages, for custom pages and custom links to menu specific edit page.
printItemStatusDropdown()  : mixed
Prints the item status selector to choose if all items or only hidden or visible should be listed
getMenuSetSelector()  : mixed
returns the menu set selector
publishItem()  : mixed
Sets a menu item to published/visible
addSubalbumMenus()  : mixed
adds (sub)albums to menu base with their gallery sorting order intact
addalbumsToDatabase()  : int
Adds albums to the menu set. Returns the next sort order base
addPagesToDatabase()  : int
Adds Zenpage pages to the menu set
addCategoriesToDatabase()  : mixed
Adds Zenpage news categories to the menu set
addItem()  : array<string|int, mixed>
Adds an menu item set via POST
updateMenuItem()  : mixed
Updates a menu item (custom link, custom page only) set via POST
deleteItem()  : mixed
Deletes a menu item set via GET
printAlbumsSelector()  : string
Prints all albums of the Zenphoto gallery as a partial drop down menu (<option></option> parts).
printZenpagePagesSelector()  : string
Prints all available pages in Zenpage
printZenpageNewsCategorySelector()  : string
Prints all available articles or categories in Zenpage
printCustomPageSelector()  : string
Prints the selector for custom pages
unpublishedZenphotoItemCheck()  : string
checks if a album or image is un-published and returns a '*'
processMenuBulkActions()  : mixed
Processes the check box bulk actions
menu_admin_toolbox_global()  : mixed
Add menu to the admin toolbox
menu_tabs()  : unknown
Adds menu manager to admin tabs
getMenuItems()  : array<string|int, mixed>
Gets the menu items
getItem()  : array<string|int, mixed>
Gets a menu item by its id
checkChosenMenuset()  : string
Checks which menu set is chosen via $_GET. If none is explicity chosen the "default" one (create initially) is used.
checkChosenItemStatus()  : string
Checks if the menu item is set visible or not
getItemTitleAndURL()  : array<string|int, mixed>
Gets the title, url and name of a menu item
getMenuVisibility()  : string
Gets the menu visibility
inventMenuItem()  : int|array<string|int, mixed>|string
"invents" a menu item for the current page (for when one does not exist) Adds the item to the current menuset and modifies its "parent" as needed
getCurrentMenuItem()  : int|array<string|int, mixed>|string
Returns the data of the current menu item
getMenumanagerPredicessor()  : string
Returns the link to the predicessor of the current menu item
printMenumanagerPrevLink()  : mixed
Prints the previous link of the current menu item
getMenumanagerSuccessor()  : string
Returns the successor link of the current menu item
printMenumanagerNextLink()  : mixed
Gets the link to the next menu item
printMenuemanagerPageListWithNav()  : mixed
Prints a list of all pages.
printMenuemanagerPageList()  : mixed
Prints a full page navigation including previous and next page links with a list of all pages in between.
getParentMenuItems()  : array<string|int, mixed>|false
Gets the parent menu items of the current menu item. Returns the array of the items or false.
printMenumanagerBreadcrumb()  : mixed
Prints the breadcrumbs of the current page
getMenuFromLink()  : array<string|int, mixed>
Returns the menu item corresponding to $link
submenuOf()  : bool
Returns true if the current menu item is a sub item of $link
createMenuIfNotExists()  : mixed
Creates a menu set from the items passed. But only if the menu set does not already exist
getMenuItemChilds()  : array<string|int, mixed>|false
Gets the direct child menu items of the current menu item. Returns the array of the items or false.
isCurrentitemParent()  : bool
Checks if the item $item is a parent item of the current item
isPublicMenuItem()  : bool
Checks if the actual object the menu item represents is actually public
printCustomMenu()  : string
Prints a context sensitive menu of all pages as a unordered html list
getSelectedLayout()  : string|false
Gets the selected layout page for this item. Returns false if nothing is selected.
checkParentLayouts()  : array<string|int, mixed>|false
Checks if there is a layout inherited from a parent items (album, page or category) and returns it. Returns false otherwise.
checkLayoutUseForImages()  : array<string|int, mixed>|false
Gets the selected layout page for images if the album option to use the equivalent of their album layout is seleted.
layoutSelector()  : string
returns the layout selector for an object.
layoutSelector_album()  : string
returns the layout selectors for an album.
getLayoutSelector()  : string
Worker function for creating layout selectors. Returns the HTML
getLayout()  : string
Gets the select layout page and returns it to the load_theme_script filter
saveLayoutSelection()  : string
Saves the layout page assignment via filter on the backend
saveZenphotoLayoutSelection()  : string
Saves the layout page assignment via filter on the backend for images and albums
deleteLayoutSelection()  : bool
processes object removals if they have been assigned layouts
copyLayoutSelection()  : mixed
Copies the layout selection
printOpenStreetMap()  : mixed
Template function wrapper for the openStreetMap class to show a map with geodata markers for the current image or collected the images of an album.
printPagedThumbsNav()  : mixed
Prints a paged thumbnail navigation to be used on a theme's image.php, independent of the album.php's thumbs loop
zenphoto_PHPMailer()  : mixed
printAlbumMenu()  : mixed
Prints a list of all albums context sensitive.
printAlbumMenuList()  : html
Prints a nested html list of all albums context sensitive.
printAlbumMenuListAlbum()  : mixed
Handles an album for printAlbumMenuList
printAlbumMenuJump()  : mixed
Prints a dropdown menu of all albums(not context sensitive) Is used by the wrapper function printAlbumMenu() if the options "jump" is choosen. For standalone use, too.
checkSelectedAlbum()  : string
A printAlbumMenu() helper function for the jump menu mode of printAlbumMenu() that only checks which the current album so that the entry in the in the dropdown jump menu can be selected Not for standalone use.
unpublishSubalbums()  : mixed
printRating()  : mixed
Prints the rating star form and the current rating Insert this function call in the page script where you want the star ratings to appear.
getRating()  : float
Returns the current rating of an object
printRegistrationForm()  : mixed
Parses the verification and registration if they have occurred places the user registration form
printRegisterURL()  : mixed
prints the link to the register user page
getRelatedItems()  : mixed
createRelatedItemsResultArray()  : mixed
Helper function for getRelatedItems() only.
printRelatedItems()  : mixed
Prints the x related articles based on a tag search
rulesList()  : type
getRSSLink()  : mixed
Prints a RSS link for if (class_exists('RSS')) printRSSLink() and if (class_exists('RSS')) printRSSHeaderLink()
printRSSLink()  : mixed
Prints an RSS link
printRSSHeaderLink()  : mixed
Prints the RSS link for use in the HTML HEAD
executeRSS()  : mixed
seo_cleanup_button()  : mixed
getE()  : mixed
cleanAlbum()  : mixed
checkFolder()  : mixed
printSlideShowLink()  : mixed
Prints a link to call the slideshow (not shown if there are no images in the album) To be used on album.php and image.php A CSS id names 'slideshowlink' is attached to the link so it can be directly styled.
printSlideShow()  : mixed
Prints the slideshow using the {@link http://http://www.malsup.com/jquery/cycle2/ jQuery plugin Cycle2 }
getAllTagsFromAlbum()  : array<string|int, mixed>
Prints a tag cloud list of the tags in one album and optionally its subalbums. Returns FALSE if no value.
getAllTagsFromZenpage()  : mixed
Gets all tags used by either all Zenpage news articles or pages.
printAllTagsFromZenpage()  : mixed
Prints a tag cloud list of the tags used by either all Zenpage news articles or pages.
printAllTagsFromAlbum()  : mixed
Prints a tag cloud list of the tags in one album and optionally its subalbums.
printAllTags()  : mixed
Prints a tag cloud list of the tags in one album and optionally its subalbums. Base function to printAllTagsFromAlbum().
getAllTagsFromAlbum_multi_unique()  : array<string|int, mixed>
Removes duplicate entries in multi dimensional array.
tagSuggestJS_admin()  : mixed
tagSuggestJS_frontend()  : mixed
tagSuggestJS()  : mixed
printFullAlbumsList()  : string
Prints all albums of the Zenphoto gallery as a partial drop down menu (<option></option> parts).
printSubLevelAlbums()  : string
Recursive helper function for printFullAlbumsList() to get all sub albums of each top level album
unpublishedZenphotoItemCheck()  : string
checks if a album or image is un-published and returns a '*'
shortentitle()  : string
shortens a string, truncate_string() was not exact enough.
printImageslist()  : string
Prints the images and/or albums as thumbnails of the selected album
getImageType()  : string
Returns the object "type" of the "image".
printNewsArticlesList()  : string
Prints all available articles in Zenpage
checkAlbumForImages()  : bool
Checks if an album has images for display on the form
showZenphotoOptions()  : bool
Checks if the full Zenphoto include form options should be shown
printTinyPageNav()  : string
Prints the page navigation for albums or Zenpage news articles
printZenpageItems()  : string
Prints the Zenpage items as a partial dropdown (pages, news articles, categories)
printAllNestedList()  : string
Prints all available pages or categories in Zenpage
unpublishedZenpageItemCheck()  : string
checks if a news article or page is un-published and/or protected and returns a '*'
setTinyZenpageLocale()  : mixed
Set the locale for gettext translation of this plugin. Somehow ZenPhoto's setupDomain() does not work here.
printTinyZenpageCategorySelector()  : mixed
Prints the dropdown menu for the category selector for the news articles list
tinymce4ConfigJS()  : mixed
getTinyMCE4ConfigFiles()  : mixed
upload_head()  : mixed
upload_extra()  : mixed
upload_form()  : mixed
httpUploadHandler()  : mixed
httpUploadHandler_admin_tabs()  : mixed
jQueryUpload_headers()  : mixed
jQueryUpload_head()  : mixed
upload_head()  : mixed
upload_extra()  : mixed
upload_form()  : mixed
jQueryUploadHandler()  : mixed
jQueryUploadHandler_admin_tabs()  : mixed
printUserLogin_out()  : mixed
Prints the logout link if the user is logged in.
user_mailing_list_button()  : mixed
getExpiryDatePost()  : string
Retrieves posted expiry date and checks it against the current date/time Returns the posted date if it is in the future Returns NULL if the date is past
processTags()  : mixed
processes the taglist save
updatePage()  : object
Updates or adds a page and returns the object of that page
deletePage()  : mixed
Deletes a page (and also if existing its subpages) from the database
printPagesListTable()  : mixed
Prints the table part of a single page item for the sortable pages list
updateArticle()  : object
Updates or adds a news article and returns the object of that article
deleteArticle()  : mixed
Deletes an news article from the database
printArticleCategories()  : mixed
Print the categories of a news article for the news articles list
printPageArticleTags()  : mixed
Print the categories of a news article for the news articles list
printCategorySelection()  : mixed
Prints the checkboxes to select and/or show the category of an news article on the edit or add page
printArticleDatesDropdown()  : mixed
Prints the dropdown menu for the date archive selector for the news articles list
getNewsAdminOption()  : array<string|int, mixed>
Compiles an option parameter list
getNewsAdminOptionPath()  : string
Creates the admin paths for news articles if you use the dropdowns on the admin news article list together
printUnpublishedDropdown()  : mixed
Prints the dropdown menu for the published/un-publishd selector for the news articles list
printSortOrderDropdown()  : mixed
Prints the dropdown menu for the sortorder selector for the news articles list
printCategoryDropdown()  : mixed
Prints the dropdown menu for the category selector for the news articles list
printArticlesPerPageDropdown()  : mixed
Prints the dropdown menu for the articles per page selector for the news articles list
printAuthorDropdown()  : mixed
Prints the dropdown menu all authors that currently are authors of news articles
updateCategory()  : mixed
Updates or adds a category
deleteCategory()  : mixed
Deletes a category (and also if existing its subpages) from the database
printCategoryListSortableTable()  : string
Prints the list entry of a single category for the sortable list
printCategoryCheckboxListEntry()  : mixed
Prints the checkboxes to select and/or show the category of an news article on the edit or add page
printNestedItemsList()  : string
Prints the nested list for pages and categories
updateItemSortorder()  : array<string|int, mixed>
Updates the sortorder of the items list in the database
checkForEmptyTitle()  : string
Checks if no title has been provide for items on new item creation
zenpagePublish()  : string
Publishes a page or news article
skipScheduledPublishing()  : string
Skips the scheduled future publishing by setting the date of a page or article to the current date to publish it immediately or the expiration handling by setting the expiredate to null.
checkHitcounterDisplay()  : string
Checks if there are hitcounts and if they are displayed behind the news article, page or category title
getNewsPagesStatistic()  : mixed
returns an array of how many pages, articles, categories and news or pages comments we got.
printPagesStatistic()  : mixed
printNewsStatistic()  : mixed
printCategoriesStatistic()  : mixed
zenpageJSCSS()  : mixed
Prints the links to JavaScript and CSS files zenpage needs.
printZenpageIconLegend()  : mixed
authorSelector()  : mixed
Prints a dropdown to select the author of a page or news article (Admin rights users only)
printPublishIconLink()  : mixed
Prints the publish/un-published/scheduled publishing icon with a link for the pages and news articles list.
checkIfChecked()  : mixed
Checks if a checkbox is selected and checks it if.
checkIfLockedPage()  : bool
Checks if the current logged in admin user is the author that locked the page/article.
checkIfLockedNews()  : bool
Checks if the current logged in admin user is the author that locked the article.
is_AdminEditPage()  : bool
Checks if the current admin-edit.php page is called for news articles or for pages.
processZenpageBulkActions()  : mixed
Processes the check box bulk actions
zenpageBulkActionMessage()  : mixed
createTitlelink()  : type
Creates the titlelink from the title passed.
checkTitlelinkDuplicate()  : bool
Checks if a title link of this itemtype already exists
addDateToTitlelink()  : string
Append or prepends a date string to a titlelink as defined.
getNewsIndexURL()  : string
Returns the full path of the news index page
getNewsArchiveURL()  : string
Returns the full path of the news archive page
RSS_Tags()  : mixed
RSS_Channel()  : mixed
RSS_Retrieve()  : mixed
printNews()  : mixed
zenphoto_sendmail()  : mixed

Constants

ACK_DISPLAY_ERRORS

public mixed ACK_DISPLAY_ERRORS = 2

ADMIN_IMAGES_STEP

public mixed ADMIN_IMAGES_STEP = 5

ADMIN_PLUGIN

Defines the bitmask for load order priority of admin plugins

public mixed ADMIN_PLUGIN = 4096

ALBUM_FOLDER_EMPTY

public mixed ALBUM_FOLDER_EMPTY = \getAlbumFolder('')

ALBUM_FOLDER_SERVERPATH

public mixed ALBUM_FOLDER_SERVERPATH = \getAlbumFolder(\SERVERPATH)

ALBUM_FOLDER_WEBPATH

public mixed ALBUM_FOLDER_WEBPATH = \getAlbumFolder(\WEBPATH)

ALBUM_MENU_COUNT

public mixed ALBUM_MENU_COUNT = \getOption('print_album_menu_count')

ALBUM_MENU_SHOWSUBS

public mixed ALBUM_MENU_SHOWSUBS = \getOption('print_album_menu_showsubs')

ALBUMFOLDER

Defines the name of the albums folder

public mixed ALBUMFOLDER = 'albums'

ALL_ALBUMS_RIGHTS

public mixed ALL_ALBUMS_RIGHTS = \VIEW_ALL_RIGHTS

ALL_NEWS_RIGHTS

public mixed ALL_NEWS_RIGHTS = \VIEW_ALL_RIGHTS

ALL_PAGES_RIGHTS

public mixed ALL_PAGES_RIGHTS = \VIEW_ALL_RIGHTS

BACKUPFOLDER

Defines the name of the backup folder

public mixed BACKUPFOLDER = 'backup'

CACHE_HASH_LENGTH

public mixed CACHE_HASH_LENGTH = \strlen(\sha1(\strval(\HASH_SEED)))

CACHEFOLDER

Defines the name of the image cache folder

public mixed CACHEFOLDER = 'cache'

CASE_INSENSITIVE

Defines if the server file system is case insensitive

public mixed CASE_INSENSITIVE = \file_exists(\dirname(__FILE__) . '/VERSION.PHP')

CHMOD_VALUE

public mixed CHMOD_VALUE = \fileperms(\dirname(__FILE__)) & 0666

CLASS_PLUGIN

Defines the bitmask for load order priority of class plugins

public mixed CLASS_PLUGIN = 8192

COMMENT_BODY_REQUIRED

public mixed COMMENT_BODY_REQUIRED = 16

COMMENT_DATACONFIRMATION

public mixed COMMENT_DATACONFIRMATION = 64

COMMENT_EMAIL_REQUIRED

public mixed COMMENT_EMAIL_REQUIRED = 1

COMMENT_NAME_REQUIRED

public mixed COMMENT_NAME_REQUIRED = 2

COMMENT_SEND_EMAIL

public mixed COMMENT_SEND_EMAIL = 32

COMMENT_WEB_REQUIRED

public mixed COMMENT_WEB_REQUIRED = 4

COMMENTS_PER_PAGE

public mixed COMMENTS_PER_PAGE = \max(1, \getOption('comment_form_comments_per_page'))

COMMON_FOLDER

Defines the name of the shared "common" folder within/for core extensions

public mixed COMMON_FOLDER = \PLUGIN_FOLDER . '/common'

CONFIGFILE

Defines the name of the config file

public mixed CONFIGFILE = 'zenphoto.cfg.php'

CUSTOM_OPTION_PREFIX

public mixed CUSTOM_OPTION_PREFIX = '_ZP_CUSTOM_'

DATA_FOLDER

Defines the name of the zp-data folder outside the core folder

public mixed DATA_FOLDER = 'zp-data'

DATA_MOD

public mixed DATA_MOD = \fileperms(\SERVERPATH . '/' . \DATA_FOLDER . '/' . \CONFIGFILE) & 0777

DATABASE_DESIRED_VERSION

public mixed DATABASE_DESIRED_VERSION = '5.7.0'

DATABASE_DESIRED_VERSION

public mixed DATABASE_DESIRED_VERSION = '0.0.0'

DATABASE_MARIADB_DESIRED_VERSION

public mixed DATABASE_MARIADB_DESIRED_VERSION = '10.1.0'

DATABASE_MARIADB_DESIRED_VERSION

public mixed DATABASE_MARIADB_DESIRED_VERSION = '0.0.0'

DATABASE_MARIADB_MIN_VERSION

public mixed DATABASE_MARIADB_MIN_VERSION = '5.5.0'

DATABASE_MARIADB_MIN_VERSION

public mixed DATABASE_MARIADB_MIN_VERSION = '0.0.0'

DATABASE_MIN_VERSION

public mixed DATABASE_MIN_VERSION = '0.0.0'

DATABASE_SOFTWARE

public mixed DATABASE_SOFTWARE = $_zp_conf_vars['db_software']

DATABASE_SOFTWARE

public mixed DATABASE_SOFTWARE = 'Database setup'

DATE_FORMAT

public mixed DATE_FORMAT = \strval(\trim($date_format . ' ' . $time_format))

DEBUG_404

set to true to log 404 error processing debug information.

public mixed DEBUG_404 = isset($_zp_conf_vars['debug_404']) && $_zp_conf_vars['debug_404'] || \TEST_RELEASE

DEBUG_ERROR

set to true to supplies the calling sequence with zp_error messages

public mixed DEBUG_ERROR = isset($_zp_conf_vars['debug_error']) && $_zp_conf_vars['debug_error'] || \TEST_RELEASE

DEBUG_EXIF

set to true to log start/finish of exif processing. Useful to find problematic images.

public mixed DEBUG_EXIF = isset($_zp_conf_vars['debug_exif']) && $_zp_conf_vars['debug_exif']

DEBUG_FILTERS

set to true to log filter application sequence.

public mixed DEBUG_FILTERS = isset($_zp_conf_vars['debug_filters']) && $_zp_conf_vars['debug_filters']

DEBUG_IMAGE

set to true to log image processing debug information.

public mixed DEBUG_IMAGE = isset($_zp_conf_vars['debug_image']) && $_zp_conf_vars['debug_image']

DEBUG_IMAGE_ERR

set to true to flag image processing errors.

public mixed DEBUG_IMAGE_ERR = isset($_zp_conf_vars['debug_image_err']) && $_zp_conf_vars['debug_image_err'] || \TEST_RELEASE

DEBUG_LOCALE

used for examining language selection problems

public mixed DEBUG_LOCALE = isset($_zp_conf_vars['debug_locale']) && $_zp_conf_vars['debug_locale']

DEBUG_LOG_SIZE

public mixed DEBUG_LOG_SIZE = \getOption('debug_log_size')

DEBUG_LOGIN

set to true to log admin saves and login attempts

public mixed DEBUG_LOGIN = isset($_zp_conf_vars['debug_login']) && $_zp_conf_vars['debug_login']

DEBUG_PLUGINS

set to true to log plugin load sequence.

public mixed DEBUG_PLUGINS = isset($_zp_conf_vars['debug_plugins']) && $_zp_conf_vars['debug_plugins']

EDITOR_SANITIZE_LEVEL

public mixed EDITOR_SANITIZE_LEVEL = 4

ELFINDER_PHP_ROOT_PATH

public mixed ELFINDER_PHP_ROOT_PATH = \dirname(__FILE__)

ENT_SUBSTITUTE

public mixed ENT_SUBSTITUTE = \defined('ENT_IGNORE') ? \ENT_IGNORE : 8

EXPLAIN_SELECTS

set to true to log the "EXPLAIN" of SELECT queries in the debug log

public mixed EXPLAIN_SELECTS = isset($_zp_conf_vars['explain_selects']) && $_zp_conf_vars['explain_selects']

FEATURE_PLUGIN

Defines the bitmask for load order priority of feature plugins

public mixed FEATURE_PLUGIN = 2048

FULLIMAGE_WATERMARK

public mixed FULLIMAGE_WATERMARK = \getOption('fullsizeimage_watermark')

FULLWEBPATH

public mixed FULLWEBPATH = \SERVER_HTTP_HOST . \WEBPATH
public mixed GALLERY_SECURITY = @$data['gallery_security']
public mixed GALLERY_SESSION = @$data['album_session']

GD_FREETYPE_SAMPLE

public mixed GD_FREETYPE_SAMPLE = 'The quick brown fox jumps over the lazy dog'

GD_FREETYPE_SAMPLE_CHARS

public mixed GD_FREETYPE_SAMPLE_CHARS = strlen('GD_FREETYPE_SAMPLE')

GETID3_HELPERAPPSDIR

public mixed GETID3_HELPERAPPSDIR = $helperappsdir . DIRECTORY_SEPARATOR

GETID3_INCLUDEPATH

public mixed GETID3_INCLUDEPATH = \dirname(__FILE__) . \DIRECTORY_SEPARATOR

GETID3_INCLUDEPATH

public mixed GETID3_INCLUDEPATH = \SERVERPATH . '/' . \ZENFOLDER . '/' . \PLUGIN_FOLDER . '/class-video/getid3/'

GETID3_LIBXML_OPTIONS

public mixed GETID3_LIBXML_OPTIONS = \LIBXML_NOENT | \LIBXML_NONET | \LIBXML_NOWARNING

GETID3_OS_ISWINDOWS

public mixed GETID3_OS_ISWINDOWS = \stripos(\PHP_OS, 'WIN') === 0

GETID3_TEMP_DIR

public mixed GETID3_TEMP_DIR = $temp_dir

GOOGLE_SITEMAP

public mixed GOOGLE_SITEMAP = \getOption('sitemap_google')

GRAPHICS_LIBRARY

public mixed GRAPHICS_LIBRARY = $_zp_cachefile_suffix['Library']

HASH_SEED

public mixed HASH_SEED = \getOption('extra_auth_hash_text')

HTACCESS_VERSION

public mixed HTACCESS_VERSION = '1.4.12'

IM_SUFFIX

public mixed IM_SUFFIX = \getOption('mod_rewrite_image_suffix')

IMAGE_CACHE_SUFFIX

public mixed IMAGE_CACHE_SUFFIX = \getOption('image_cache_suffix')

IMAGE_SORT_DIRECTION

public mixed IMAGE_SORT_DIRECTION = \getOption('image_sortdirection')

IMAGE_WATERMARK

public mixed IMAGE_WATERMARK = \getOption('fullimage_watermark')

IMAGEMAGICK_REQUIRED_VERSION

public mixed IMAGEMAGICK_REQUIRED_VERSION = '6.3.8'

IMAGICK_REQUIRED_VERSION

public mixed IMAGICK_REQUIRED_VERSION = '3.0.0'

IP_TIED_COOKIES

public mixed IP_TIED_COOKIES = \getOption('IP_tied_cookies')

LIST_RIGHTS

public mixed LIST_RIGHTS = \NO_RIGHTS

MANAGED_OBJECT_RIGHTS_EDIT

public mixed MANAGED_OBJECT_RIGHTS_EDIT = 1

MANAGED_OBJECT_RIGHTS_UPLOAD

public mixed MANAGED_OBJECT_RIGHTS_UPLOAD = 2

MANAGED_OBJECT_RIGHTS_VIEW

public mixed MANAGED_OBJECT_RIGHTS_VIEW = 4

MEMBERS_ONLY_COMMENTS

public mixed MEMBERS_ONLY_COMMENTS = \getOption('comment_form_members_only')

MENU_TRUNCATE_INDICATOR

public mixed MENU_TRUNCATE_INDICATOR = \getOption('menu_truncate_indicator')

MENU_TRUNCATE_STRING

public mixed MENU_TRUNCATE_STRING = \getOption('menu_truncate_string')

OFFSET_PATH

used in sorting the images within and album

public mixed OFFSET_PATH = 1

OFFSET_PATH

This script is used to create dynamic albums from a search.

public mixed OFFSET_PATH = 1

OFFSET_PATH

admin-edit.php editing of albums.

public mixed OFFSET_PATH = 1

OFFSET_PATH

user_groups log--tabs

public mixed OFFSET_PATH = 1
Tags
author

Stephen Billard (sbillard)

OFFSET_PATH

provides the Options tab of admin

public mixed OFFSET_PATH = 1

OFFSET_PATH

provides the Plugins tab of admin

public mixed OFFSET_PATH = 1

OFFSET_PATH

This template is used to reload metadata from images. Running it will process the entire gallery, supplying an album name (ex: loadAlbums.php?album=newalbum) will only process the album named.

public mixed OFFSET_PATH = 2

OFFSET_PATH

provides the TAGS tab of admin

public mixed OFFSET_PATH = 1

OFFSET_PATH

provides the Themes tab of admin

public mixed OFFSET_PATH = 1

OFFSET_PATH

provides the Upload tab of admin

public mixed OFFSET_PATH = 1

OFFSET_PATH

provides the Options tab of admin

public mixed OFFSET_PATH = 1

OFFSET_PATH

admin.php is the main script for administrative functions.

public mixed OFFSET_PATH = 1

OFFSET_PATH

public mixed OFFSET_PATH = 2

OFFSET_PATH

public mixed OFFSET_PATH = 1

OFFSET_PATH

public mixed OFFSET_PATH = 2

OFFSET_PATH

Used for setting theme/plugin default options

public mixed OFFSET_PATH = 2

OFFSET_PATH

Used for setting theme/plugin default options

public mixed OFFSET_PATH = 2

OFFSET_PATH

Detailed Gallery Statistics

public mixed OFFSET_PATH = 3

This plugin shows statistical graphs and info about your gallery's images and albums

OFFSET_PATH

Displays which HTTP headers your site sends

public mixed OFFSET_PATH = 3
Tags
author

Malte Müller (acrylian>

OFFSET_PATH

Displays locale information of the system

public mixed OFFSET_PATH = 3

OFFSET_PATH

Maintenance mode utility based on the former site_upgrade plugin

public mixed OFFSET_PATH = 3
Tags
author

Stephen Billard (sbillard), adapted by Malte Müller (acrylian)

OFFSET_PATH

Displays the PHP configuration information

public mixed OFFSET_PATH = 3
Tags
author

Stephen Billard (sbillard)

OFFSET_PATH

Use this utility to reset your album thumbnails to either "random" or from an ordered field query

public mixed OFFSET_PATH = 3

OFFSET_PATH

GDPR data export tool

public mixed OFFSET_PATH = 3
Tags
author

Malte Müller (acrylian)

OFFSET_PATH

This template is used to generate cache images. Running it will process the entire gallery, supplying an album name (ex: loadAlbums.php?album=newalbum) will only process the album named.

public mixed OFFSET_PATH = 3

Passing clear=on will purge the designated cache before generating cache images

OFFSET_PATH

This template is used to generate cache images. Running it will process the entire gallery, supplying an album name (ex: loadAlbums.php?album=newalbum) will only process the album named.

public mixed OFFSET_PATH = 3

Passing clear=on will purge the designated cache before generating cache images

OFFSET_PATH

Zenphoto site cloner

public mixed OFFSET_PATH = 4

OFFSET_PATH

provides the Comments tab of admin

public mixed OFFSET_PATH = 1

OFFSET_PATH

Check for use of deprecated functions

public mixed OFFSET_PATH = 4
Tags
author

Stephen Billard (sbillard)

deprecated
2.0

OFFSET_PATH

Detailed Gallery Statistics

public mixed OFFSET_PATH = 3

This plugin shows statistical graphs and info about your gallery's images and albums

This plugin is dependent on the css of the gallery_statistics utility plugin!

OFFSET_PATH

public mixed OFFSET_PATH = 3

OFFSET_PATH

The Matomo statistis page if widgets are defined

public mixed OFFSET_PATH = 3

OFFSET_PATH

public mixed OFFSET_PATH = 4

OFFSET_PATH

public mixed OFFSET_PATH = 3

OFFSET_PATH

This is the "rewrite rules" tab

public mixed OFFSET_PATH = 3

OFFSET_PATH

Collects and analyzes searches

public mixed OFFSET_PATH = 4
Tags
author

Stephen Billard (sbillard)

OFFSET_PATH

public mixed OFFSET_PATH = 3

OFFSET_PATH

user_groups plugin--tabs

public mixed OFFSET_PATH = 4
Tags
author

Stephen Billard (sbillard)

OFFSET_PATH

user_groups plugin--tabs

public mixed OFFSET_PATH = 4
Tags
author

Stephen Billard (sbillard)

OFFSET_PATH

zenpage admin-categories.php

public mixed OFFSET_PATH = 4
Tags
author

Malte Müller (acrylian)

OFFSET_PATH

zenpage admin-edit.php

public mixed OFFSET_PATH = 4
Tags
author

Malte Müller (acrylian)

OFFSET_PATH

zenpage admin-news-articles.php

public mixed OFFSET_PATH = 4
Tags
author

Malte Müller (acrylian)

OFFSET_PATH

zenpage admin-pages.php

public mixed OFFSET_PATH = 4
Tags
author

Malte Müller (acrylian)

OPEN_IMAGE_CACHE

public mixed OPEN_IMAGE_CACHE = !\getOption('protected_image_cache')

OPTION_TYPE_CHECKBOX_ARRAY

public mixed OPTION_TYPE_CHECKBOX_ARRAY = 6

OPTION_TYPE_TEXTBOX

Generates the HTML for custom options (e.g. theme options, plugin options, etc.) Note: option names may not contain '.', '+', nor '%' as PHP POST handling will replace these with an underscore.

public mixed OPTION_TYPE_TEXTBOX = 0

PHP_INT_MIN

public mixed PHP_INT_MIN = ~PHP_INT_MAX

PLUGIN_FOLDER

Defines the name of the core extensions folder

public mixed PLUGIN_FOLDER = 'zp-extensions'

PLUGIN_PRIORITY

Defines the bitmask for load order priority of standard plugins

public mixed PLUGIN_PRIORITY = 1023

PLUGINS_PER_PAGE

public mixed PLUGINS_PER_PAGE = \max(1, \getOption('plugins_per_page'))

PLUGINS_PER_PAGE

public mixed PLUGINS_PER_PAGE = \max(1, \getOption('plugins_per_page'))

SEARCH_CACHE_DURATION

public mixed SEARCH_CACHE_DURATION = \getOption('search_cache_duration')

SEO_FULLWEBPATH

public mixed SEO_FULLWEBPATH = \seo_locale::localePath(\true)

SEO_WEBPATH

public mixed SEO_WEBPATH = \seo_locale::localePath()

SERVER_HTTP_HOST

public mixed SERVER_HTTP_HOST = \PROTOCOL . "://" . $_SERVER['HTTP_HOST']

SERVERCACHE

public mixed SERVERCACHE = \SERVERPATH . '/' . \CACHEFOLDER

SERVERPATH

public mixed SERVERPATH = $_zp_setup_serverpath

SETUPLOG

public mixed SETUPLOG = $_zp_setup_serverpath . '/' . \DATA_FOLDER . '/setup.log'

SITEMAP_CHUNK

public mixed SITEMAP_CHUNK = \getOption('sitemap_processing_chunk')

SORT_NATURAL

Defines if sorting should be natural order

public mixed SORT_NATURAL = 0

STATIC_CACHE_FOLDER

Defines the name of the html cache folder

public mixed STATIC_CACHE_FOLDER = "cache_html"

Defines if symlinks are supported on the server

public mixed SYMLINK = \function_exists('symlink') && \strpos(@\ini_get("suhosin.executor.func.blacklist"), 'symlink') === \false

TEST_RELEASE

Enables test release mode, supports the markRelease plugin

public mixed TEST_RELEASE = isset($_zp_conf_vars['test_release']) && $_zp_conf_vars['test_release'] || \preg_match('~-[^RC]~', \ZENPHOTO_VERSION)

THEME_PLUGIN

Defines the bitmask for load order priority of theme plugins

public mixed THEME_PLUGIN = 1024

THEMEFOLDER

Defines the name of the themes folder

public mixed THEMEFOLDER = 'themes'

THUMB_WATERMARK

public mixed THUMB_WATERMARK = \getOption('Image_watermark')

UPLOAD_ERR_QUOTA

Initialize globals for Admin

public mixed UPLOAD_ERR_QUOTA = -1

UPLOAD_FOLDER

Defines name of the non albums upload folder

public mixed UPLOAD_FOLDER = 'uploaded'

USER_PLUGIN_FOLDER

Defines the user 3rd party plugin folder outside the Zenphoto core folder

public mixed USER_PLUGIN_FOLDER = 'plugins'

USER_RIGHTS

public mixed USER_RIGHTS = \NO_RIGHTS

USERS_PER_PAGE

public mixed USERS_PER_PAGE = \max(1, \getOption('users_per_page'))

USERS_PER_PAGE

public mixed USERS_PER_PAGE = \max(1, \getOption('users_per_page'))

UTF8_IMAGE_URI

public mixed UTF8_IMAGE_URI = \getOption('UTF8_image_URI')

UTILITIES_FOLDER

Defines the name of the core utlitlites folder

public mixed UTILITIES_FOLDER = 'utilities'

VIEW_ALL_RIGHTS

public mixed VIEW_ALL_RIGHTS = \ALL_ALBUMS_RIGHTS | \ALL_PAGES_RIGHTS | \ALL_NEWS_RIGHTS

VIEW_FULLIMAGE_RIGHTS

public mixed VIEW_FULLIMAGE_RIGHTS = \NO_RIGHTS
public mixed VIEW_GALLERY_RIGHTS = \NO_RIGHTS

VIEW_SEARCH_RIGHTS

public mixed VIEW_SEARCH_RIGHTS = \NO_RIGHTS

ZENFOLDER

Defines the name of the Zenphoto core folder (zp-core)

public mixed ZENFOLDER = 'zp-core'

ZENPAGE_COMBINEWS

Some global variable setup

public mixed ZENPAGE_COMBINEWS = \false

ZENPHOTO_LOCALE

public mixed ZENPHOTO_LOCALE = \setMainDomain()

ZENPHOTO_VERSION

Defines the Zenphoto version

public mixed ZENPHOTO_VERSION = '1.6.2'

ZP_ARTICLES_PER_PAGE

public mixed ZP_ARTICLES_PER_PAGE = \getOption("zenpage_articles_per_page") >= 1 ? \getOption("zenpage_articles_per_page") : 1

ZP_LAST_MODIFIED

Defines the date of the current session for use as a last modified date within the page header()

public mixed ZP_LAST_MODIFIED = \gmdate('D, d M Y H:i:s') . ' GMT'

ZP_NEWS_ENABLED

public mixed ZP_NEWS_ENABLED = \false

ZP_PAGES_ENABLED

public mixed ZP_PAGES_ENABLED = \false

ZP_READ_MORE

public mixed ZP_READ_MORE = \getOption("zenpage_read_more")

ZP_SHORTEN_LENGTH

public mixed ZP_SHORTEN_LENGTH = \getOption('zenpage_text_length')

ZP_SHORTENINDICATOR

public mixed ZP_SHORTENINDICATOR = $shortenindicator = \getOption('zenpage_textshorten_indicator')

ZP_ZENPAGE_NEWS_CATEGORY

public mixed ZP_ZENPAGE_NEWS_CATEGORY = 1024

Functions

printAdminFooter()

Print the footer <div> for the bottom of all admin pages.

printAdminFooter([string $addl = '' ]) : mixed
Parameters
$addl : string = ''

additional text to output on the footer.

Tags
author

Todd Papaioannou (lucky@luckyspin.org)

since
1.0.0

printAdminHeader()

Print the header for all admin pages. Starts at <DOCTYPE> but does not include the </head> tag, in case there is a need to add something further.

printAdminHeader(string $tab[, string $subtab = NULL ]) : mixed
Parameters
$tab : string

the album page

$subtab : string = NULL

the sub-tab if any

Print the html required to display the ZP logo and links in the top section of the admin page.

printLogoAndLinks() : mixed
Tags
author

Todd Papaioannou (lucky@luckyspin.org)

since
1.0.0

printTabs()

Print the nav tabs for the admin section. We determine which tab should be highlighted from the $_GET['page']. If none is set, we default to "home".

printTabs() : mixed
Tags
author

Todd Papaioannou (lucky@luckyspin.org)

since
1.0.0

setAlbumSubtabs()

setAlbumSubtabs(mixed $album) : mixed
Parameters
$album : mixed

handleDeprecatedMenuGlobals()

Roughly fixes outdated usages of old admin "tab" globals and joins them with the actual globals.

handleDeprecatedMenuGlobals() : mixed

and also throws deprecation notices about this.

Tags
since
1.6
global

type $_zp_admin_menu

global

type $_zp_admin_current_page

global

type $_zp_admin_current_subpage

global

type $_zp_admin_menu

global

type $_zp_admin_current_subpage

global

type $_zp_admin_subtab

checked()

Used for checkbox and radiobox form elements to compare the $checked value with the $current.

checked(mixed $checked, mixed $current) : mixed

Echos the attribute checked="checked

Parameters
$checked : mixed
$current : mixed

customOptions()

customOptions(mixed $optionHandler[, mixed $indent = "" ][, mixed $album = NULL ][, mixed $showhide = false ][, mixed $supportedOptions = NULL ][, mixed $theme = false ][, mixed $initial = 'none' ][, mixed $extension = NULL ]) : mixed
Parameters
$optionHandler : mixed
$indent : mixed = ""
$album : mixed = NULL
$showhide : mixed = false
$supportedOptions : mixed = NULL
$theme : mixed = false
$initial : mixed = 'none'
$extension : mixed = NULL

processCustomOptionSave()

processCustomOptionSave(mixed $returntab[, mixed $themename = NULL ][, mixed $themealbum = NULL ]) : mixed
Parameters
$returntab : mixed
$themename : mixed = NULL
$themealbum : mixed = NULL

standardThemeOptions()

Set defaults for standard theme options incase the theme has not done so

standardThemeOptions(string $theme, mixed $album) : mixed
Parameters
$theme : string
$album : mixed

postIndexEncode()

Encodes for use as a $_POST index

postIndexEncode(string $str) : mixed
Parameters
$str : string

postIndexDecode()

Decodes encoded $_POST index

postIndexDecode(string $str) : string
Parameters
$str : string
Return values
string

generateRadiobuttonsFromArray()

Prints radio buttons from an array

generateRadiobuttonsFromArray(string $currentvalue, string $list, string $option[, bool $behind = false ][, mixed $class = 'checkboxlabel' ][, mixed $disabled = NULL ]) : mixed
Parameters
$currentvalue : string

The current selected value

$list : string

the array of the list items form is localtext => buttonvalue

$option : string

the name of the option for the input field name

$behind : bool = false

set true to have the "text" before the button

$class : mixed = 'checkboxlabel'
$disabled : mixed = NULL

generateUnorderedListFromArray()

Creates the body of an unordered list with checkbox label/input fields (scrollable sortables)

generateUnorderedListFromArray(array<string|int, mixed> $currentValue, array<string|int, mixed> $list, string $prefix, string $alterrights, bool $sort, bool $localize[, string $class = NULL ][, mixed $extra = NULL ]) : mixed
Parameters
$currentValue : array<string|int, mixed>

list of items to be flagged as checked

$list : array<string|int, mixed>

the elements of the select list

$prefix : string

prefix of the input item

$alterrights : string

are the items changable.

$sort : bool

true for sorted list

$localize : bool

true if the list local key is text for the item

$class : string = NULL

optional class for items

$extra : mixed = NULL

tagSelector()

Creates an unordered checklist of the tags

tagSelector(object $that, string $postit[, bool $showCounts = false ][, mixed $mostused = false ][, mixed $addnew = true ][, mixed $resizeable = false ][, mixed $class = 'checkTagsAuto' ]) : mixed
Parameters
$that : object

Object for which to get the tags

$postit : string

prefix to prepend for posting

$showCounts : bool = false

set to true to get tag count displayed

$mostused : mixed = false
$addnew : mixed = true
$resizeable : mixed = false
$class : mixed = 'checkTagsAuto'

printAlbumEditForm()

emits the html for editing album information called in edit album and mass edit

printAlbumEditForm(string $index, object $album[, bool $buttons = true ]) : mixed
Parameters
$index : string

the index of the entry in mass edit or '0' if single album

$album : object

the album object

$buttons : bool = true

set true for "apply" buttons

Tags
since
1.1.3

printAlbumButtons()

puts out the maintenance buttons for an album

printAlbumButtons(object $album) : mixed
Parameters
$album : object

is the album being emitted

printAlbumEditRow()

puts out a row in the edit album table

printAlbumEditRow(object $album, bool $show_thumb, object $owner) : mixed
Parameters
$album : object

is the album being emitted

$show_thumb : bool

set to false to show thumb standin image rather than album thumb

$owner : object

the parent album (or NULL for gallery)

processAlbumEdit()

processes the post from the above

processAlbumEdit(int $index, object $album, string &$redirectto) : string
Parameters
$index : int

the index of the entry in mass edit or 0 if single album

$album : object

the album object

$redirectto : string

used to redirect page refresh on move/copy/rename

Tags
since
1.1.3
Return values
string

error flag if passwords don't match

processImageEdit()

Process the image edit form posted

processImageEdit(obj $image, type $index[, bool $massedit = true ]) : mixed
Parameters
$image : obj

Image object

$index : type

Index of the image if within the images list or 0 if single image edit

$massedit : bool = true

Whether editing single image (false) or multiple images at once (true). Note: to determine whether to process additional fields in single image edit mode.

adminPageNav()

adminPageNav(mixed $pagenum, mixed $totalpages, mixed $adminpage, mixed $parms[, mixed $tab = '' ]) : mixed
Parameters
$pagenum : mixed
$totalpages : mixed
$adminpage : mixed
$parms : mixed
$tab : mixed = ''

print_language_string_list()

Generates an editable list of language strings

print_language_string_list(string $dbstring, string $name[, bool $textbox = false ][, string $locale = NULL ][, string $edit = '' ][, int $wide = TEXT_INPUT_SIZE ][, string $ulclass = 'language_string_list' ][, int $rows = 6 ]) : mixed
Parameters
$dbstring : string

either a serialized languag string array or a single string

$name : string

the prefix for the label, id, and name tags

$textbox : bool = false

set to true for a textbox rather than a text field

$locale : string = NULL

optional locale of the translation desired

$edit : string = ''

optional class

$wide : int = TEXT_INPUT_SIZE

column size. true or false for the standard or short sizes. Or pass a column size

$ulclass : string = 'language_string_list'

set to the class for the UL element

$rows : int = 6

set to the number of rows to show.

process_language_string_save()

process the post of a language string form

process_language_string_save(string $name[,  $sanitize_level = 3 ]) : string
Parameters
$name : string

the prefix for the label, id, and name tags

$sanitize_level : = 3

the type of sanitization required

Return values
string

getTagOrder()

Returns the desired tagsort order (0 for alphabetic, 1 for most used)

getTagOrder() : int
Return values
int

unzip()

Unzips an image archive

unzip(file $file, string $dir) : mixed
Parameters
$file : file

the archive

$dir : string

where the images go

is_zip()

Checks for a zip file

is_zip(string $filename) : bool
Parameters
$filename : string

name of the file

Return values
bool

isolate()

Extracts and returns a 'statement' from a PHP script so that it may be 'evaled'

isolate(string $target, string $str) : string
Parameters
$target : string

the assignment variable to match on

$str : string

the PHP script

Return values
string

themeIsEditable()

Check if a theme is editable (ie not a bundled theme)

themeIsEditable( $theme) : bool
Parameters
$theme :

theme to check

Tags
since
1.3
Return values
bool

zenPhotoTheme()

zenPhotoTheme(mixed $theme) : mixed
Parameters
$theme : mixed

copyThemeDirectory()

Copy a theme directory to create a new custom theme

copyThemeDirectory( $source,  $target, mixed $newname) : bool|string
Parameters
$source :

source directory

$target :

target directory

$newname : mixed
Tags
author

Ozh

since
1.3
Return values
bool|string

either true or an error message

deleteThemeDirectory()

Deletes a theme

deleteThemeDirectory(string $source) : bool
Parameters
$source : string

Full serverpath of the theme

Return values
bool

currentRelativeURL()

Return URL of current admin page

currentRelativeURL() : string
Tags
author

Ozh

since
1.3
Return values
string

current URL

getParentAlbumsAdmin()

Returns an array of the names of the parents of the current album.

getParentAlbumsAdmin(object $album) : array<string|int, mixed>
Parameters
$album : object

optional album object to use inseted of the current album

Return values
array<string|int, mixed>

getAlbumBreadcrumbAdmin()

getAlbumBreadcrumbAdmin(mixed $album) : mixed
Parameters
$album : mixed

removeParentAlbumNames()

Removes the parent album name so that we can print a album breadcrumb with them

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

Object of the album

Return values
string

printAdminRightsTable()

Outputs the rights checkbox table for admin

printAdminRightsTable( $id, string $background, string $alterrights, bit $rights) : mixed
Parameters
$id :

int record id for the save

$background : string

background color

$alterrights : string

are the items changable

$rights : bit

rights of the admin

printManagedObjects()

Creates the managed album table for Admin

printManagedObjects(string $type, array<string|int, mixed> $objlist, string $alterrights, object $userobj, mixed $prefix_id, string $kind, mixed $flag) : mixed
Parameters
$type : string

the kind of list

$objlist : array<string|int, mixed>

list of objects

$alterrights : string

are the items changable

$userobj : object

the user

$prefix_id : mixed
$kind : string

user, group, or template

$flag : mixed

processRights()

processes the post of administrator rights

processRights(int $i) : bit
Parameters
$i : int

the admin row number

Return values
bit

processManagedObjects()

processManagedObjects(mixed $i, mixed &$rights) : mixed
Parameters
$i : mixed
$rights : mixed

getCheckboxState()

Returns the value of a checkbox form item

getCheckboxState(string $id) : int
Parameters
$id : string

the $_REQUEST index

Return values
int

(0 or 1)

standardScripts()

Returns an array of "standard" theme scripts. This list is normally used to exclude these scripts form various option seletors.

standardScripts() : array<string|int, mixed>
Return values
array<string|int, mixed>

getWatermarks()

Returns a merged list of available watermarks

getWatermarks() : array<string|int, mixed>
Return values
array<string|int, mixed>

processOrder()

Processes the serialized array from tree sort.

processOrder( $orderstr) : array<string|int, mixed>

Returns an array in the form [$id=>array(sort orders), $id=>array(sort orders),...]

Parameters
$orderstr :

the serialzied tree sort order

Return values
array<string|int, mixed>

postAlbumSort()

POST handler for album tree sorts

postAlbumSort(int $parentid) : mixed
Parameters
$parentid : int

id of owning album

printNestedAlbumsList()

Prints the sortable nested albums list returns true if nesting levels exceede the database container

printNestedAlbumsList(mixed $albums, bool $show_thumb, object $owner) : bool
Parameters
$albums : mixed
$show_thumb : bool

set false to use thumb standin image.

$owner : object

the album object of the owner or NULL for the gallery

Return values
bool

printEditDropdown()

Prints the dropdown menu for the nesting level depth for the album sorting

printEditDropdown(mixed $subtab, mixed $nestinglevels, mixed $nesting) : mixed
Parameters
$subtab : mixed
$nestinglevels : mixed
$nesting : mixed

processEditSelection()

processEditSelection(mixed $subtab) : mixed
Parameters
$subtab : mixed

printBulkActions()

Edit tab bulk actions drop-down

printBulkActions(array<string|int, mixed> $checkarray[, bool $checkAll = false ]) : mixed
Parameters
$checkarray : array<string|int, mixed>

the list of actions

$checkAll : bool = false

set true to include check all box

bulkActionRedirect()

common redirector for bulk action handling return

bulkActionRedirect(string $action) : mixed
Parameters
$action : string

bulkTags()

Process the bulk tags

bulkTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

processAlbumBulkActions()

Processes the check box bulk actions for albums

processAlbumBulkActions() : mixed

processImageBulkActions()

Handles Image bulk actions

processImageBulkActions( $album) : mixed
Parameters
$album :

processCommentBulkActions()

Processes the check box bulk actions for comments

processCommentBulkActions() : mixed

codeblocktabsJS()

Codeblock tabs JavaScript code

codeblocktabsJS() : mixed

printCodeblockEdit()

prints codeblock edit boxes

printCodeblockEdit(object $obj, int $id) : mixed
Parameters
$obj : object
$id : int

processCodeblockSave()

handles saveing of codeblock edits

processCodeblockSave(int $id) : string
Parameters
$id : int
Return values
string

admin_securityChecks()

Standard admin pages checks

admin_securityChecks(bit $rights, mixed $return) : mixed
Parameters
$rights : bit
$return : mixed

minDiff()

getPageSelector "diff" function

minDiff(string $string1, string2 $string2) : mixed

returns the shortest string difference

Parameters
$string1 : string
$string2 : string2

fullText()

getPageSelector "diff" function

fullText(string $string1, string $string2) : string

Used when you want getPgeSelector to show the full text of the items

Parameters
$string1 : string
$string2 : string
Return values
string

dateDiff()

getPageSelector "diff" function

dateDiff(string $date1, string $date2) : string

returns the shortest "date" difference

Parameters
$date1 : string
$date2 : string
Return values
string

getPageSelector()

returns a selector list based on the "names" of the list items

getPageSelector(array<string|int, mixed> $list, int $itmes_per_page[, string $diff = 'fullText' ]) : array<string|int, mixed>
Parameters
$list : array<string|int, mixed>
$itmes_per_page : int
$diff : string = 'fullText'

"fullText" for the complete names "minDiff" for a truncated string showing just the unique characters of the names "dateDiff" it the "names" are really dates.

Return values
array<string|int, mixed>

printPageSelector()

printPageSelector(mixed $pagenumber, mixed $rangeset, mixed $script, mixed $queryParams) : mixed
Parameters
$pagenumber : mixed
$rangeset : mixed
$script : mixed
$queryParams : mixed

unQuote()

Strips off quotes from the strng

unQuote( $string) : mixed
Parameters
$string :

admin_album_list()

Returns an option list of administrators who can own albums or images

admin_album_list(string $owner) : string
Parameters
$owner : string
Return values
string

getLogTabs()

Returns an array with the logtabs array, the default log tab and an array of log files to the default (current) log tab (for use in the logfile selector)

getLogTabs() : array<string|int, mixed>
Tags
since
1.6.1
  • Reworked for displaying only tabs for log types
Return values
array<string|int, mixed>

getDefaultLogTabs()

Gets an array log tab names and localized (gettexted) log titles

getDefaultLogTabs() : array<string|int, mixed>
Tags
since
1.6.1
Return values
array<string|int, mixed>

getLogFiles()

Gets a nested array with the log type (tab name) and corresponding log files

getLogFiles() : array<string|int, mixed>
Tags
since
1.6.1
Return values
array<string|int, mixed>

printLogSelector()

Prints the selector for logfiles of the current log tab

printLogSelector([string $currentlogtab = '' ][, string $currentlogfile = '' ][, array<string|int, mixed> $logfiles = array() ]) : mixed
Parameters
$currentlogtab : string = ''

Current log tab

$currentlogfile : string = ''

Current log file selected

$logfiles : array<string|int, mixed> = array()

Array of logfiles

Tags
since
1.6.1

getPluginTabs()

Figures out which plugin tabs to display

getPluginTabs() : mixed

getAdminThumb()

Gets the URL of the adminthumb

getAdminThumb(mixed $imageobj[, string $size = 'small' ]) : string
Parameters
$imageobj : mixed
$size : string = 'small'

Adminthumb sizeame: 'large', 'small', 'large-uncropped', 'small-uncropped'

Return values
string

getAdminThumbHTML()

Returns the full HTML element of an admin thumb Applies the filters 'adminthumb_html'

getAdminThumbHTML(obj $imageobj[, string $size = 'small' ][, string $class = null ][, string $id = null ][, string $alt = null ][, string $title = null ]) : string
Parameters
$imageobj : obj

The image object

$size : string = 'small'

Adminthumb sizeame: 'large', 'small', 'large-uncropped', 'small-uncropped'

$class : string = null

Class name(s) to attach

$id : string = null

ID to attach

$alt : string = null

Alt attribute

$title : string = null

Title attribute

Tags
since
1.5.8
Return values
string

printAdminThumb()

Prints an admin thumb

printAdminThumb(obj $imageobj[, string $size = 'small' ][, string $class = null ][, string $id = null ][, string $alt = null ][, string $title = null ]) : string
Parameters
$imageobj : obj

The image object

$size : string = 'small'

Adminthumb sizeame: 'large', 'small', 'large-uncropped', 'small-uncropped'

$class : string = null

Class name(s) to attach

$id : string = null

ID to attach

$alt : string = null

Alt attribute

$title : string = null

Title attribute

Tags
since
1.5.8
Return values
string

processCredentials()

handles save of user/password

processCredentials(object $object[, mixed $suffix = '' ]) : mixed
Parameters
$object : object
$suffix : mixed = ''

consolidatedEditMessages()

consolidatedEditMessages(mixed $subtab) : mixed
Parameters
$subtab : mixed

getThemeFiles()

returns an array of the theme scripts not in the exclude array

getThemeFiles(array<string|int, mixed> $exclude) : array<string|int, mixed>
Parameters
$exclude : array<string|int, mixed>

those scripts to ignore

Return values
array<string|int, mixed>

checkAlbumParentid()

Checks for bad parentIDs from old move/copy bug

checkAlbumParentid(unknown_type $albumname, unknown_type $id, mixed $recorder) : mixed
Parameters
$albumname : unknown_type
$id : unknown_type
$recorder : mixed

checkAlbumimagesort()

Make sure the albumimagesort is only an allowed value. Otherwise returns nothing.

checkAlbumimagesort(string $val[, string $type = 'albumimagesort' ]) : string
Parameters
$val : string
$type : string = 'albumimagesort'

'albumimagesort' or 'albumimagesort_status'

Return values
string

printLastChangeInfo()

Prints the last change date and last change user notice on backend edit pages Also for albums it prints the updateddate

printLastChangeInfo(obj $obj) : mixed
Parameters
$obj : obj

Object of any item type

Tags
since
1.5.2

getSortByOptions()

Returns the option array for the sort by selectors for gallery, albums and images

getSortByOptions(string $type) : array<string|int, mixed>
Parameters
$type : string

"albums" (also for gallery), "albums-dynamic", 'images' "image-edit" (the images edit tab backend only ordering) "pages" and "news" for Zenpage items

Tags
since
1.5.5

Replaces the global $_zp_sortby

Return values
array<string|int, mixed>

getSortByStatusOptions()

Returns an array of the status order options for all items

getSortByStatusOptions() : array<string|int, mixed>
Tags
since
1.5.5

Replaces the global $_zp_sortby_status

Return values
array<string|int, mixed>

checkSchedulePublishingNotes()

Helper to check if notes are to be printed (only needed because of the inconvenient legacy table based layout on image edit pages)

checkSchedulePublishingNotes(obj $obj) : bool
Parameters
$obj : obj

Image, album, news article or page object

Tags
since
1.5.7
Return values
bool

printScheduledPublishingNotes()

Prints various notes regarding the scheduled publishing status for single edit pages

printScheduledPublishingNotes(obj $obj) : mixed
Parameters
$obj : obj

Image, album, news article or page object

Tags
since
1.5.7
deprecated
2.0
  • Use printStatusNotes() instead

printStatusNotes()

Prints various notes regarding the scheduled publishing status for single edit pages

printStatusNotes(obj $obj) : mixed
Parameters
$obj : obj

Image, album, news article, new category or page object

Tags
since
1.6.1

Replaces printScheduledPublishingNotes()

getStatusNote()

Gets a specific predefined status note for an object (if available) Note: The notes are not status dependend!

getStatusNote([string $name = '' ]) : string
Parameters
$name : string = ''

Name of the note

Return values
string

getStatusNotes()

Gets an array of all predefined status notes

getStatusNotes() : array<string|int, mixed>
Tags
since
1.6.1
Return values
array<string|int, mixed>

getStatusNotesByContext()

Gets an array with all status notes that apply to $obj currently

getStatusNotesByContext(string $obj) : array<string|int, mixed>
Parameters
$obj : string
Tags
since
1.6.1
Return values
array<string|int, mixed>

getStatusIcons()

Gets an key => value array of all available object status icons as full <img> elements

getStatusIcons() : array<string|int, mixed>
Tags
since
1.6.1
Return values
array<string|int, mixed>

getStatusIcon()

Gets the icon img element for a specific status icon

getStatusIcon([string $name = '' ]) : string
Parameters
$name : string = ''

(Internal) Name of the icon

Tags
since
1.6.1
Return values
string

printPublishIconLinkGallery()

Prints the publish icon link to change the status on the album and thumb image list

printPublishIconLinkGallery(object $obj[, bool $enableedit = false ][, string $owner = null ]) : mixed
Parameters
$obj : object

Image or album object

$enableedit : bool = false

true if allowed to use

$owner : string = null

User name of the owner

Tags
since
1.5.7

getPublishIcon()

Returns the publish icon for the current status

getPublishIcon(obj $obj) : string
Parameters
$obj : obj

Object of the page or news article to check

Tags
since
1.6.1
Return values
string

printPublished()

Prints the scheduled publishing date for items if set. Also prints the date for Zenpage news articles and pages

printPublished(string $obj) : string
Parameters
$obj : string

image, albun, news article or page object

Tags
since
1.5.7

moved from Zenpage plugin to generel admin functions

Return values
string

printExpired()

Prints the expiration or expired date for items

printExpired(string $obj) : string
Parameters
$obj : string

image, albun, news article or page object

Tags
since
1.5.7

moved from Zenpage plugin to generel admin functions

Return values
string

printProtectedIcon()

Prints the protected icon if the object is password protected on an edit list

printProtectedIcon(obj $obj) : mixed
Parameters
$obj : obj
Tags
since
1.6.1

isIncompatibleExtension()

Checks plugin and theme definition for $plugin_disable / $theme_description['disable'] so plugins/themes are deaktivated respectively cannot be activated if they don't match conditions/requirements. See the plugin/theme documentation for info how to define these.

isIncompatibleExtension(string|array<string|int, mixed> $disable) : bool|string

Returns either the message why incompatible or false if not.

Parameters
$disable : string|array<string|int, mixed>

One string or serveral as an array. Not false means incompatible

Tags
since
1.5.8
Return values
bool|string

processExtensionVariable()

Processes a plugin or theme definition variable.

processExtensionVariable(string|array<string|int, mixed> $var) : string|bool

If a string or boolean it is returned as it is. If it is an array each entry is enclosed with an HTML paragraph and returned as a string

Parameters
$var : string|array<string|int, mixed>

A plugin or theme definition variable

Tags
since
1.5.8
Return values
string|bool

printSelectorWithCustomField()

Prints a selector (select list) with a custom text field from the values parameter. The following array entries will be created automatically:

printSelectorWithCustomField(string $optionname[, array<string|int, mixed> $list = array() ][, string $optionlabel = null ][, string $optionname_customfield = null ][, string $optionlabel_customfield = nulll ][, bool $is_galleryoption = false ]) : mixed
  • gettext('Custom') = 'custom'

If "custom" is selected the custom text field will be shown.

Parameters
$optionname : string

The option name of the select list

$list : array<string|int, mixed> = array()

Key value array where key is the display value (gettext generally)

$optionlabel : string = null

The label text for the select list

$optionname_customfield : string = null

The option name of the custom field

$optionlabel_customfield : string = nulll

THe label text for the custom field

$is_galleryoption : bool = false

Set to true if this is a special gallery class option

Tags
since
1.5.8
global

obj $_zp_gallery Gallery object

getZenpagePagesOptionsArray()

Gets an array of Zenpage pages ready for using with selector, radioboxes and checkbox lists

getZenpagePagesOptionsArray([bool $published = false ]) : mixed
Parameters
$published : bool = false

true for only published, default false for all.

Tags
since
1.5.8

printZenpagePageSelector()

Prints an select list option for Zenpage pages

printZenpagePageSelector(string $optionname[, string $optionname_custom = null ][, bool $published = false ][, bool $is_galleryoption = false ]) : mixed

it additionally prints a text field for a custom page URL.

Parameters
$optionname : string

Name of the option, sued for the selector and the current selection

$optionname_custom : string = null

If defined this will be used for the custom url option, if null (default) the option name will be used with "_custom" appended

$published : bool = false

If the pages should include only published ones

$is_galleryoption : bool = false

Set to true if this is a special gallery class option

Tags
since
1.5.8

getAdminstratorsOptionsArray()

Gets an array of administrators ready for using with selector, radioboxes and checkbox lists

getAdminstratorsOptionsArray([string $type = 'users' ]) : type
Parameters
$type : string = 'users'

'users', 'groups', 'allusers'

Tags
since
1.5.8
global

object $_zp_authority

Return values
type

printUserSelector()

Prints an select list option for users

printUserSelector(string $optionname, string $optionname_custom[, bool $type = 'users' ][, bool $is_galleryoption = false ]) : mixed

it additionally prints a text field for a custom name

Parameters
$optionname : string

Name of the option, sued for the selector and the current selection

$optionname_custom : string

If defined this will be used for the custom url option, if null (default) the option name will be used with "_custom" appended

$type : bool = 'users'

'users', 'groups', 'allusers'

$is_galleryoption : bool = false

Set to true if this is a special gallery class option

Tags
since
1.5.8

isTextFile()

Helper for the theme editor

isTextFile(type $file) : type
Parameters
$file : type
Return values
type

getSubalbumImages()

Updates the $_zp_admin_imagelist global used on dynamic album editing

getSubalbumImages(type $folder) : type
Parameters
$folder : type
Tags
global

string $_zp_admin_imagelist

global

obj $_zp_gallery

Return values
type

markUpdated()

Updates $_zp_admin_user_updated on user editing

markUpdated() : mixed
Tags
global

boolean $_zp_admin_user_updated

printImageRotationSelector()

Prints the image EXIF rotation/flipping selector

printImageRotationSelector(obj $imageobj, int $currentimage) : mixed
Parameters
$imageobj : obj

Object of the current image

$currentimage : int

ID of the current image

Tags
since
1.6.1

printDatetimeFormatSelector()

Prints option selectors for date and time formats

printDatetimeFormatSelector() : mixed
Tags
since
1.6.1

getDatetimeFormatlistForSelector()

Helper functions for printDatetimeFormatSelector() ot create the format lists for the selector, not intended to be used standalone

getDatetimeFormatlistForSelector([array<string|int, mixed> $formats = array() ][, bool $use_localized_date = false ]) : array<string|int, mixed>
Parameters
$formats : array<string|int, mixed> = array()

Array as created by array_keys(getStandardDateFormats($type);

$use_localized_date : bool = false

Default false, set to true to use localized datees

Tags
since
1.6.1
Return values
array<string|int, mixed>

db_connect()

Connect to the database server and select the database.

db_connect(array<string|int, mixed> $config[, bool $errorstop = true ]) : true
Parameters
$config : array<string|int, mixed>

the db configuration parameters

$errorstop : bool = true

set to false to omit error messages

Tags
deprecated
2.0

Use the global object $_zp_db and the class method connect() instead.

since
1.6
Return values
true

if successful connection

query()

The main query function. Runs the SQL on the connection and handles errors.

query(string $sql[, bool $errorstop = true ]) : results
Parameters
$sql : string

sql code

$errorstop : bool = true

set to false to supress the error message

Tags
since
0.6
since
1.6
deprecated
2.0

Use the global object $_zp_db and the class method of the same name instead.

Return values
results

of the sql statements

query_single_row()

Runs a SQL query and returns an associative array of the first row.

query_single_row(string $sql[, bool $errorstop = true ]) : results

Doesn't handle multiple rows, so this should only be used for unique entries.

Parameters
$sql : string

sql code

$errorstop : bool = true

set to false to supress the error message

Tags
since
0.6
since
1.6
deprecated
2.0

Use the global object $_zp_db and the class method querySingleRow() instead.

Return values
results

of the sql statements

query_full_array()

Runs a SQL query and returns an array of associative arrays of every row returned.

query_full_array(string $sql[, bool $errorstop = true ][, string $key = NULL ]) : results
Parameters
$sql : string

sql code

$errorstop : bool = true

set to false to supress the error message

$key : string = NULL

optional array index key

Tags
since
0.6
since
1.6
deprecated
2.0

Use the global object $_zp_db and the class method queryFullArray() instead.

Return values
results

of the sql statements

db_quote()

mysqli_real_escape_string standin that insures the DB connection is passed.

db_quote(string $string[, mixed $addquotes = true ]) : string
Parameters
$string : string
$addquotes : mixed = true
Tags
deprecated
2.0

Use the global object $_zp_db and the class method quote() instead.

since
1.6
Return values
string

db_insert_id()

returns the insert id of the last database insert

db_insert_id() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method insertID() instead.

since
1.6

db_fetch_assoc()

Fetch a result row as an associative array

db_fetch_assoc(mixed $resource) : mixed
Parameters
$resource : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method fetchAssoc() instead.

since
1.6

db_error()

Returns the text of the error message from previous operation

db_error() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method getError() instead.

since
1.6

db_affected_rows()

Get number of affected rows in previous operation

db_affected_rows() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method getAffectedRows() instead.

since
1.6

db_fetch_row()

Get a result row as an enumerated array

db_fetch_row(mixed $result) : mixed
Parameters
$result : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method fetchRow() instead.

since
1.6

db_num_rows()

Get number of rows in result

db_num_rows(mixed $result) : mixed
Parameters
$result : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method getNumRows() instead.

since
1.6

db_close()

Closes the database

db_close() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method close() instead.

since
1.6

db_software()

report the software of the database

db_software() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method getSoftware() instead.

since
1.6

db_create()

create the database

db_create() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method create() instead

since
1.6

db_permissions()

Returns user's permissions on the database

db_permissions() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method getPermissions() instead.

since
1.6

db_setSQLmode()

Sets the SQL session mode to empty

db_setSQLmode() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method setSQLmode() instead.

since
1.6

db_getSQLmode()

Queries the SQL session mode

db_getSQLmode() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method getSQLmode() instead.

since
1.6

db_collation()

db_collation() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method getCollation() instead.

since
1.6

db_create_table()

db_create_table(mixed $sql) : mixed
Parameters
$sql : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method createTable() instead.

since
1.6

db_table_update()

db_table_update(mixed $sql) : mixed
Parameters
$sql : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method tableUpdate() instead.

since
1.6

db_show()

db_show(mixed $what[, mixed $aux = '' ]) : mixed
Parameters
$what : mixed
$aux : mixed = ''
Tags
deprecated
2.0

Use the global object $_zp_db and the class method show() instead.

since
1.6

db_list_fields()

db_list_fields(mixed $table) : mixed
Parameters
$table : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method listFields() instead.

since
1.6

db_truncate_table()

db_truncate_table(mixed $table) : mixed
Parameters
$table : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method truncateTable() instead.

since
1.6

db_LIKE_escape()

db_LIKE_escape(mixed $str) : mixed
Parameters
$str : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method likeEscape() instead.

since
1.6

db_free_result()

db_free_result(mixed $result) : mixed
Parameters
$result : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method freeResult() instead.

since
1.6

prefix()

Prefix a table name with a user-defined string to avoid conflicts.

prefix([string $tablename = NULL ]) : prefixed

This MUST be used in all database queries.

Parameters
$tablename : string = NULL

name of the table

Tags
deprecated
2.0

Use the global object $_zp_db and the class method of the same name instead.

since
1.6
Return values
prefixed

table name

getWhereClause()

Constructs a WHERE clause ("WHERE uniqueid1='uniquevalue1' AND uniqueid2='uniquevalue2' ...") from an array (map) of variables and their values which identifies a unique record in the database table.

getWhereClause(string $unique_set) : contructed
Parameters
$unique_set : string

what to add to the WHERE clause

Tags
deprecated
2.0

Use the global object $_zp_db and the class method of the same name instead

since
1.6
Return values
contructed

WHERE cleause

getSetClause()

Constructs a SET clause ("SET uniqueid1='uniquevalue1', uniqueid2='uniquevalue2' ...") from an array (map) of variables and their values which identifies a unique record in the database table. Used to 'move' records. Note: does not check anything.

getSetClause(string $new_unique_set) : contructed
Parameters
$new_unique_set : string

what to add to the SET clause

Tags
since
0.6
since
1.6
deprecated
2.0

Use the global object $_zp_db and the class method of the same name instead

Return values
contructed

SET cleause

db_name()

returns the connected database name

db_name() : mixed
Tags
deprecated
2.0

Use the global object $_zp_db and the class method getDBName() instead.

since
1.6

db_count()

Counts entries in a db table

db_count(string $table[, string $clause = NULL ][, string $field = "id" ]) : int
Parameters
$table : string

Table name

$clause : string = NULL

Where clause for the count query

$field : string = "id"

Which fields to count (default: id)

Tags
deprecated
2.0

Use the global object $_zp_db and the class method count() instead.

since
1.6
Return values
int

db_getServerInfo()

Returns the server info

db_getServerInfo() : string
Tags
since
1.5.7
deprecated
2.0

Use the global object $_zp_db and the class method getServerInfo() instead.

Return values
string

db_getClientInfo()

Returns the client info

db_getClientInfo() : string
Tags
since
1.5.7
deprecated
2.0

Use the global object $_zp_db and the class method getClientInfo() instead.

Return values
string

db_getVersion()

Gets the plain version number

db_getVersion() : int
Tags
since
1.5.8
deprecate

ZenphotoCMS 2.0 Use the global object $_zp_db and the class method getVersion() instead.

Return values
int

zp_imageGet()

zp_imageGet(mixed $imgfile) : mixed
Parameters
$imgfile : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageOutput()

zp_imageOutput(mixed $im, mixed $type[, mixed $filename = NULL ][, mixed $qual = 75 ]) : mixed
Parameters
$im : mixed
$type : mixed
$filename : mixed = NULL
$qual : mixed = 75
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_createImage()

zp_createImage(mixed $w, mixed $h) : mixed
Parameters
$w : mixed
$h : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageFill()

zp_imageFill(mixed $image, mixed $x, mixed $y, mixed $color) : mixed
Parameters
$image : mixed
$x : mixed
$y : mixed
$color : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageColorTransparent()

zp_imageColorTransparent(mixed $image, mixed $color) : mixed
Parameters
$image : mixed
$color : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_copyCanvas()

zp_copyCanvas(mixed $imgCanvas, mixed $img, mixed $dest_x, mixed $dest_y, mixed $src_x, mixed $src_y, mixed $w, mixed $h) : mixed
Parameters
$imgCanvas : mixed
$img : mixed
$dest_x : mixed
$dest_y : mixed
$src_x : mixed
$src_y : mixed
$w : mixed
$h : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_resampleImage()

zp_resampleImage(mixed $dst_image, mixed $src_image, mixed $dst_x, mixed $dst_y, mixed $src_x, mixed $src_y, mixed $dst_w, mixed $dst_h, mixed $src_w, mixed $src_h) : mixed
Parameters
$dst_image : mixed
$src_image : mixed
$dst_x : mixed
$dst_y : mixed
$src_x : mixed
$src_y : mixed
$dst_w : mixed
$dst_h : mixed
$src_w : mixed
$src_h : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageUnsharpMask()

zp_imageUnsharpMask(mixed $img, mixed $amount, mixed $radius, mixed $threshold) : mixed
Parameters
$img : mixed
$amount : mixed
$radius : mixed
$threshold : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageResizeAlpha()

zp_imageResizeAlpha(mixed &$src, mixed $w, mixed $h) : mixed
Parameters
$src : mixed
$w : mixed
$h : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageCanRotate()

zp_imageCanRotate() : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_rotateImage()

zp_rotateImage(mixed $im, mixed $rotate) : mixed
Parameters
$im : mixed
$rotate : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageDims()

zp_imageDims(mixed $filename) : mixed
Parameters
$filename : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageIPTC()

zp_imageIPTC(mixed $filename) : mixed
Parameters
$filename : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageWidth()

zp_imageWidth(mixed $im) : mixed
Parameters
$im : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageHeight()

zp_imageHeight(mixed $im) : mixed
Parameters
$im : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead

since
1.6.

zp_imageMerge()

zp_imageMerge(mixed $dst_im, mixed $src_im, mixed $dst_x, mixed $dst_y, mixed $src_x, mixed $src_y, mixed $src_w, mixed $src_h, mixed $pct) : mixed
Parameters
$dst_im : mixed
$src_im : mixed
$dst_x : mixed
$dst_y : mixed
$src_x : mixed
$src_y : mixed
$src_w : mixed
$src_h : mixed
$pct : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageGray()

zp_imageGray(mixed $image) : mixed
Parameters
$image : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageKill()

zp_imageKill(mixed $im) : mixed
Parameters
$im : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_colorAllocate()

zp_colorAllocate(mixed $image, mixed $red, mixed $green, mixed $blue) : mixed
Parameters
$image : mixed
$red : mixed
$green : mixed
$blue : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_writeString()

zp_writeString(mixed $image, mixed $font, mixed $x, mixed $y, mixed $string, mixed $color) : mixed
Parameters
$image : mixed
$font : mixed
$x : mixed
$y : mixed
$string : mixed
$color : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_drawRectangle()

zp_drawRectangle(mixed $image, mixed $x1, mixed $y1, mixed $x2, mixed $y2, mixed $color) : mixed
Parameters
$image : mixed
$x1 : mixed
$y1 : mixed
$x2 : mixed
$y2 : mixed
$color : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_graphicsLibInfo()

zp_graphicsLibInfo() : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_getFonts()

zp_getFonts() : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageLoadFont()

zp_imageLoadFont([mixed $font = NULL ][, mixed $size = 18 ]) : mixed
Parameters
$font : mixed = NULL
$size : mixed = 18
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageFontWidth()

zp_imageFontWidth(mixed $font) : mixed
Parameters
$font : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageFontHeight()

zp_imageFontHeight(mixed $font) : mixed
Parameters
$font : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

imageBlurGD()

imageBlurGD(mixed $imgCanvas, mixed $imgCanvas2, mixed $radius, mixed $w, mixed $h) : mixed
Parameters
$imgCanvas : mixed
$imgCanvas2 : mixed
$radius : mixed
$w : mixed
$h : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

zp_imageFromString()

zp_imageFromString(mixed $string) : mixed
Parameters
$string : mixed
Tags
deprecated
2.0

Use the global object $zp_graphics and the class method with the same name (but without the "zp" prefix) instead.

since
1.6

js_encode()

encodes a pre-sanitized string to be used as a Javascript parameter

js_encode(string $this_string) : string
Parameters
$this_string : string
Return values
string

getOption()

Get a option stored in the database.

getOption(string $key) : mixed

This function reads the options only once, in order to improve performance.

Parameters
$key : string

the name of the option.

setOption()

Stores an option value.

setOption(string $key, mixed $value[, bool $persistent = true ][, string $creator = NULL ]) : mixed
Parameters
$key : string

name of the option.

$value : mixed

new value of the option.

$persistent : bool = true

set to false if the option is stored in memory only. Otherwise it is preserved in the database

$creator : string = NULL

name of the creator the option belongs to. Normally NULL for backend core options. "zp-core/zp-extensions/.php" for official plugin and /plugins/.php for user plugin options

setOptionDefault()

Sets the default value of an option.

setOptionDefault(string $key, mixed $default) : mixed

If the option has never been set it is set to the value passed

Parameters
$key : string

the option name

$default : mixed

the value to be used as the default

loadLocalOptions()

Loads option table with album/theme options

loadLocalOptions(int $albumid, string $theme) : mixed
Parameters
$albumid : int
$theme : string

renameOption()

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.

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

Old option name

$newkey : string

New option name

Tags
since
1.5.1
since
1.5.8
  • renamed from replaceOption() to renameOption()

purgeOption()

Deletes an option from the database

purgeOption(string $key) : mixed
Parameters
$key : string
Tags
global

array $_zp_options

getOptionList()

Retuns the option array

getOptionList() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasDynamicAlbumSuffix()

Returns true if the file has the dynamic album suffix

hasDynamicAlbumSuffix(string $path) : bool
Parameters
$path : string
Return values
bool

isHandledAlbum()

checks if there is a file with the prefix and one of the handled suffixes. Returns the found suffix

isHandledAlbum(string $path) : string
Parameters
$path : string

SERVER path to be tested

Return values
string

rewrite_get_album_image()

Handles the special cases of album/image[rewrite_suffix]

rewrite_get_album_image(string $albumvar, string $imagevar) : mixed

Separates the image part from the album if it is an image reference Strips off the mod_rewrite_suffix if present Handles dynamic album names that do not have the .alb suffix appended

Parameters
$albumvar : string

$_GET index for "albums"

$imagevar : string

$_GET index for "images"

getImageCacheFilename()

Returns the path of an image for uses in caching it NOTE: character set if for the filesystem

getImageCacheFilename(mixed $album8, mixed $image8, array<string|int, mixed> $args) : string
Parameters
$album8 : mixed
$image8 : mixed
$args : array<string|int, mixed>

cropping arguments

Return values
string

makeSpecialImageName()

Returns an i.php "image name" for an image not within the albums structure

makeSpecialImageName(string $image) : array<string|int, mixed>
Parameters
$image : string

Path to the image

Return values
array<string|int, mixed>

getWatermarkParam()

Returns the watermark image to pass to i.php

getWatermarkParam(object $image, int $use) : int

Note: this should be used for "real" images only since thumbnail handling for Video and TextObjects is special and the "album" thumbnail is not appropriate for the "default" images for those

Parameters
$image : object

image object in question

$use : int

what the watermark use is

Return values
int

getImageCachePostfix()

Returns the crop/sizing string to postfix to a cache image

getImageCachePostfix(array<string|int, mixed> $args) : string
Parameters
$args : array<string|int, mixed>

cropping arguments

Return values
string

getImageParameters()

Validates and edits image size/cropping parameters

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

cropping arguments

$album : mixed = NULL
Return values
array<string|int, mixed>

getImageProcessorURI()

forms the i.php parameter list for an image.

getImageProcessorURI(array<string|int, mixed> $args, string $album, string $image) : string
Parameters
$args : array<string|int, mixed>
$album : string

the album name

$image : string

the image name

Return values
string

getImageArgs()

Extract the image parameters from the input variables

getImageArgs(array<string|int, mixed> $set) : array<string|int, mixed>
Parameters
$set : array<string|int, mixed>
Return values
array<string|int, mixed>

getImageProcessorURIFromCacheName()

Extracts the image processor URI from an existing cache filename

getImageProcessorURIFromCacheName(string $match, array<string|int, mixed> $watermarks) : array<string|int, mixed>
Parameters
$match : string
$watermarks : array<string|int, mixed>
Tags
since
1.5.1

Moved from cacheManager/functions.php

Return values
array<string|int, mixed>

getImageURI()

Returns an URI to the image:

getImageURI(array<string|int, mixed> $args, string $album, string $image, mixed $mtime) : string

If the image is not cached, the uri will be to the image processor If the image is cached then the uri will depend on the site option for cache serving. If the site is set for open cache the uri will point to the cached image. If the site is set for protected cache the uri will point to the image processor (which will serve the image from the cache.) NOTE: this latter implies added overhead for each and every image fetch!

Parameters
$args : array<string|int, mixed>
$album : string

the album name

$image : string

the image name

$mtime : mixed
Return values
string

extractImageExifOrientation()

Extracts integer value (1-9) from the exifOrientation value stored (e.g. '7: 90 deg CCW Mirrored') in the database for images

extractImageExifOrientation([string $exiforientation = '' ]) : int

Returns 0 if not a string.

Parameters
$exiforientation : string = ''

String value as stored in the db (e.g. '7: 90 deg CCW Mirrored')

Tags
since
1.6.1
Return values
int

getImageFlipRotate()

Returns an array with two indexes "rotate" (= degree to rotate) and "flip" ("horizontal" or "vertical") or false if nothing applies

getImageFlipRotate(mixed $rotation) : bool|array<string|int, mixed>
Parameters
$rotation : mixed
Tags
since
1.6.1
Return values
bool|array<string|int, mixed>

getAllowedTags()

Returns an array of html tags allowed

getAllowedTags(string $which) : mixed
Parameters
$which : string

either 'allowed_tags' or 'style_tags' depending on which is wanted.

rewrite_path()

Returns either the rewrite path or the plain, non-mod_rewrite path based on the mod_rewrite option.

rewrite_path(string $rewrite, string $plain[, bool $webpath = NULL ]) : string

The given paths can start /with or without a slash, it doesn't matter.

IDEA: this function could be used to specially escape items in the rewrite chain, like the # character (a bug in mod_rewrite).

This is here because it's used in both template-functions.php and in the classes.

Parameters
$rewrite : string

is the path to return if rewrite is enabled. (eg: "/myalbum")

$plain : string

is the path if rewrite is disabled (eg: "/?album=myalbum")

$webpath : bool = NULL

host path to be prefixed. If "false" is passed you will get a localized "WEBPATH"

Return values
string

parse_query()

parses a query string WITHOUT url decoding it!

parse_query(string $str) : mixed
Parameters
$str : string

build_query()

createsa query string from the array passed

build_query(array<string|int, mixed> $parts) : string
Parameters
$parts : array<string|int, mixed>
Return values
string

build_url()

Builds a url from parts

build_url(array<string|int, mixed> $parts) : string
Parameters
$parts : array<string|int, mixed>
Return values
string

pathurlencode()

rawurlencode function that is path-safe (does not encode /)

pathurlencode(string $path) : string
Parameters
$path : string

URL

Return values
string

getAlbumFolder()

Returns the fully qualified path to the album folders

getAlbumFolder([string $root = SERVERPATH ]) : string
Parameters
$root : string = SERVERPATH

the base from whence the path dereives

Return values
string

getBackupFolder()

Returns the fully qualified path to the backup folder

getBackupFolder([string $root = SERVERPATH ]) : string
Parameters
$root : string = SERVERPATH

the base from whence the path dereives

Tags
since
1.6
Return values
string

getRootFolder()

Returns the fully qualified path to the root albums or backup folder

getRootFolder([string $folder = 'albumfolder' ][, string $root = SERVERPATH ]) : string
Parameters
$folder : string = 'albumfolder'

The folder path to get: "albumfolder" or "backupfolder"

$root : string = SERVERPATH

the base from whence the path dereives

Tags
since
1.6
Return values
string

switchLog()

Rolls a log over if it has grown too large.

switchLog(string $log) : mixed
Parameters
$log : string

debugLog()

Write output to the debug log Use this for debugging when echo statements would come before headers are sent or would create havoc in the HTML.

debugLog(string|array<string|int, mixed>|object $message[, bool $reset = false ][, string $logname = 'debug' ]) : mixed

Creates (or adds to) a file named debug.log which is located in the zenphoto core folder

Parameters
$message : string|array<string|int, mixed>|object

the debug information. This can also be an array or object. For detailed info about the content use debuglogVar().

$reset : bool = false

set to true to reset the log to zero before writing the message

$logname : string = 'debug'

Optional custom log name to log to, default "debug"

instrument()

Tool to log execution times of script bits

instrument(string $point) : mixed
Parameters
$point : string

location identifier

parse_size()

Parses a byte size from a size value (eg: 100M) for comparison.

parse_size(mixed $size) : mixed
Parameters
$size : mixed

getAlbumArray()

getAlbumArray - returns an array of folder names corresponding to the given album string.

getAlbumArray(string $albumstring[, string $includepaths = false ]) : mixed
Parameters
$albumstring : string

is the path to the album as a string. Ex: album/subalbum/my-album

$includepaths : string = false

is a boolean whether or not to include the full path to the album in each item of the array. Ex: when $includepaths==false, the above array would be ['album', 'subalbum', 'my-album'], and with $includepaths==true, ['album', 'album/subalbum', 'album/subalbum/my-album'] @return array

imgSrcURI()

Returns an img src URI encoded based on the OS of the server

imgSrcURI(string $uri) : string
Parameters
$uri : string

uri in FILESYSTEM_CHARSET encoding

Return values
string

getSuffix()

Returns the suffix of a file name

getSuffix(string $filename) : string
Parameters
$filename : string
Return values
string

stripSuffix()

returns a file name sans the suffix

stripSuffix(string $filename) : string
Parameters
$filename : string
Return values
string

getAlbumInherited()

returns the non-empty value of $field from the album or one of its parents

getAlbumInherited(string $folder, string $field, int &$id) : string
Parameters
$folder : string

the album name

$field : string

the desired field name

$id : int

will be set to the album id of the album which has the non-empty field

Return values
string

themeSetup()

primitive theme setup for image handling scripts

themeSetup(string $album) : string

we need to conserve memory so loading the classes is out of the question.

Parameters
$album : string
Return values
string

accessAllAlbums()

Checks access for the album root

accessAllAlbums(bit $action) : mixed
Parameters
$action : bit

what the caller wants to do

getWatermarkPath()

Returns the path to a watermark

getWatermarkPath(string $wm) : string
Parameters
$wm : string

watermark name

Return values
string

secureServer()

Checks to see if access was through a secure protocol

secureServer() : bool
Tags
since
1.5.1

Extended/adapted from WordPress' is_ssl() function: https://developer.wordpress.org/reference/functions/is_ssl/

Return values
bool

getRequestURI()

Returns the script requesting URI.

getRequestURI() : string

Uses $_SERVER[REQUEST_URI] if it exists, otherwise it concocts the URI from $_SERVER[SCRIPT_NAME] and $_SERVER[QUERY_STRING]

Return values
string

safe_glob()

Provide an alternative to glob which does not return filenames with accented charactes in them

safe_glob(string $pattern[, bit $flags = 0 ]) : mixed

NOTE: this function ignores "hidden" files whose name starts with a period!

Parameters
$pattern : string

the 'pattern' for matching files

$flags : bit = 0

glob 'flags'

checkInstall()

Check to see if the setup script needs to be run

checkInstall() : mixed

exitZP()

Call when terminating a script.

exitZP() : mixed

Closes the database to be sure that we do not build up outstanding connections

installSignature()

Computes the "installation signature" of the Zenphoto install

installSignature() : array<string|int, mixed>
Return values
array<string|int, mixed>

zp_session_start()

Starts a zenphoto session (perhaps a secure one)

zp_session_start() : mixed

zp_session_destroy()

Ends a zenphoto session if there is one and clear the session cookie

zp_session_destroy() : mixed

getDefaultRewriteTokens()

Reads the core default rewrite token define array from the config template file `zenphoto_cfg.txt`.

getDefaultRewriteTokens([string $token = null ]) : array<string|int, mixed>

Used primarily in case it is missing from the current config file as silent fallback and within the rewriteToken plugin

Parameters
$token : string = null

The token to get, e.g. "gallery". If the token is not existing or NULL the whole definition array is returned

Return values
array<string|int, mixed>

addMissingDefaultRewriteTokens()

Adds missing individual default rewrite tokens to $_zp_conf_vars['special_pages']

addMissingDefaultRewriteTokens() : mixed
Tags
global

array $_zp_conf_vars

curlRequest()

Sends a simple cURL request to the $uri specified.

curlRequest(string $uri[, array<string|int, mixed> $options = array() ]) : bool
Parameters
$uri : string

The uri to send the request to. Sets curl_setopt($ch, CURLOPT_URL, $uri);

$options : array<string|int, mixed> = array()

An array of cURL options to set (uri is set via the separate parameter) Default is if nothing is set: array( CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 2000 ) See http://php.net/manual/en/function.curl-setopt.php for more info

Return values
bool

generateImageCacheFile()

Sends a cURL request to i.php to generate the image requested without printing it.

generateImageCacheFile(string $imageuri) : mixed

Returns the uri to the cache version of the image on success or false. It also returns false if cURL is not available.

Parameters
$imageuri : string

The image processor uri to this image

httpsRedirect()

Checks if protocol not https and redirects if https required

httpsRedirect([string $type = 'backend' ]) : mixed
Parameters
$type : string = 'backend'

Tpye to redirect "backend" (default) or "frontend"

redirectURL()

General url redirection handler using header()

redirectURL(string $url[, string $statuscode = null ][, bool $allowexternal = false ]) : mixed
Parameters
$url : string

A full qualified url

$statuscode : string = null

Default null (no status header). Enter the status header code to send. Currently supported: 200, 301, 302, 401, 403, 404 (more may be added if needed later on) If you need custom headers not supported just set to null and add them separately before calling this function.

$allowexternal : bool = false

True to allow redirections outside of the current domain (does not cover subdomains!). Default false.

Tags
since
1.5.2

sanitizeRedirect()

Sanitizes a "redirect" post to always be within the site

sanitizeRedirect(string $redirectTo) : string
Parameters
$redirectTo : string
Return values
string

callUserFunction()

Wrapper to call a plugin or otherwise possibly undefined function or method to avoid themes breaking if the plugin is not active

callUserFunction(string|array<string|int, mixed> $function[, array<string|int, mixed> $parameter = array() ]) : mixed

Follows PHP's native call_user_func_array() but tries to catch invalid calls

Note: Invalid static calls to non static class methods cannot be catched unless the native PHP extension Reflection is available.

Parameters
$function : string|array<string|int, mixed>

A function name, static class method calls like classname::methodname, an array with a class name and static method name or a cass object and a non static class name

$parameter : array<string|int, mixed> = array()

Parameters of the function/method as one dimensional array

Tags
since
1.6

deprecationNotice()

Logs a deprecated notice including traces in the debuglog

deprecationNotice(string $use[, bool|string $parameter = false ]) : mixed
Parameters
$use : string

Additional message, e.g. what to use instead

$parameter : bool|string = false

Set to true if this should notify about deprecated parameter usage (default false), You can also set the name of the parameter if you want to notify about a specific parameter change only

Tags
since
1.6
  • based on deprecated_functions::notify() from the deprecated_functions plugin written by sbillard

convertStrftimeFormat()

Basic conversion for a (deprecated) strftime() date format string

convertStrftimeFormat([string $format = '' ]) : string

Returns a date format string compatible with date() / the DateTime class

Note: There are two exceptions that return a non date format string value because there is no equivalent

  • %X => 'locale_preferreddate_time' -'%x' => 'locale_preferreddate_notime'

zpFormattedDate() can handle these internally

Parameters
$format : string = ''

strftime() date format string

Tags
since
1.6
Return values
string

hasPrimaryScripts()

Returns true if the install is not a "clone"

hasPrimaryScripts() : mixed

zpErrorHandler()

Traps errors and insures thy are logged.

zpErrorHandler(int $errno[, string $errstr = '' ][, string $errfile = '' ][, string $errline = '' ]) : void|bool
Parameters
$errno : int
$errstr : string = ''
$errfile : string = ''
$errline : string = ''
Return values
void|bool

filesystemToInternal()

Converts a file system filename to UTF-8 for zenphoto internal storage

filesystemToInternal(string $filename) : string
Parameters
$filename : string

the file name to convert

Return values
string

internalToFilesystem()

Converts a Zenphoto Internal filename string to one compatible with the file system

internalToFilesystem(string $filename) : string
Parameters
$filename : string

the file name to convert

Return values
string

sanitize_path()

Takes user input meant to be used within a path to a file or folder and removes anything that could be insecure or malicious, or result in duplicate representations for the same physical file.

sanitize_path(string $filename) : string

This function is used primarily for album names. NOTE: The initial and trailing slashes are removed!!!

Returns the sanitized path

Parameters
$filename : string

is the path text to filter.

Return values
string

sanitize_numeric()

Checks if the input is numeric, rounds if so, otherwise returns false.

sanitize_numeric(mixed $num) : int
Parameters
$num : mixed

the number to be sanitized

Return values
int

sanitize_script()

removes script tags

sanitize_script(string $text) : string
Parameters
$text : string
Return values
string

sanitize()

Make strings generally clean. Takes an input string and cleans out null-bytes, and optionally use KSES library to prevent XSS attacks and other malicious user input.

sanitize(string $input_string[, string $sanitize_level = 3 ]) : string
Parameters
$input_string : string

is a string that needs cleaning.

$sanitize_level : string = 3

is a number between 0 and 3 that describes the type of sanitizing to perform on $input_string. 0 - Basic sanitation. Only strips null bytes. Not recommended for submitted form data. 1 - User specified. (User defined code is allowed. Used for descriptions and comments.) 2 - Text style/formatting. (Text style codes allowed. Used for titles.) 3 - Full sanitation. (Default. No code allowed. Used for text only fields)

Return values
string

the sanitized string.

ksesProcess()

Internal "helper" function to apply the tag removal

ksesProcess(string $input_string, array<string|int, mixed> $allowed_tags) : string
Parameters
$input_string : string
$allowed_tags : array<string|int, mixed>
Return values
string

getBare()

Cleans tags and some content.

getBare(type $content) : type
Parameters
$content : type
Return values
type

sanitize_string()

returns a sanitized string for the sanitize function

sanitize_string(mixed $input, string $sanitize_level) : string
Parameters
$input : mixed
$sanitize_level : string

See sanitize()

Return values
string

the sanitized string.

zp_error()

triggers an error

zp_error(string $message[, mixed $fatal = E_USER_ERROR ]) : mixed
Parameters
$message : string
$fatal : mixed = E_USER_ERROR

html_decode()

html_decode(mixed $string) : mixed
Parameters
$string : mixed

html_encode()

encodes a pre-sanitized string to be used in an HTML text-only field (value, alt, title, etc.)

html_encode(string $str) : string
Parameters
$str : string
Return values
string

html_encodeTagged()

HTML encodes the non-metatag part of the string.

html_encodeTagged(string $original[, bool $allowScript = true ]) : string
Parameters
$original : string

string to be encoded

$allowScript : bool = true

set to false to prevent pass-through of script tags.

Return values
string

html_pathurlencode()

Convenience wrapper of html_encode(pathurlencode($url)) Primarily intended for use with img src URLs

html_pathurlencode(string $url) : string
Parameters
$url : string
Tags
since
1.5.8
Return values
string

mkdir_recursive()

Makes directory recursively, returns TRUE if exists or was created sucessfuly.

mkdir_recursive(string $pathname, mixed $mode) : bool

Note: PHP5 includes a recursive parameter to mkdir, but it apparently does not does not traverse symlinks!

Parameters
$pathname : string

The directory path to be created.

$mode : mixed
Return values
bool

TRUE if exists or made or FALSE on failure.

debugLogBacktrace()

Logs the calling stack

debugLogBacktrace(string $message[, int $omit = 0 ][, string $logname = 'debug' ]) : mixed
Parameters
$message : string

Message to prefix the backtrace

$omit : int = 0
$logname : string = 'debug'

Optional custom log name to log to, default "debug"

debugLogVar()

Records a Var to the debug log

debugLogVar(string $message[, mixed $var = '' ][, string $logname = 'debug' ]) : mixed
Parameters
$message : string

message to insert in log [optional]

$var : mixed = ''

the variable to record

$logname : string = 'debug'

Optional custom log name to log to, default "debug"

zp_getCookie()

Returns the value of a cookie from either the cookies or from $_SESSION[]

zp_getCookie(string $name) : mixed
Parameters
$name : string

the name of the cookie

zp_cookieEncode()

Encodes a cookie value tying it to the user IP

zp_cookieEncode( $value) : mixed
Parameters
$value :

zp_setCookie()

Sets a cookie both in the browser cookies and in $_SESSION[]

zp_setCookie(string $name, string $value[, timestamp $time = NULL ][, string $path = NULL ][, bool $secure = false ][, bool $httponly = false ]) : mixed
Parameters
$name : string

The 'cookie' name

$value : string

The value to be stored

$time : timestamp = NULL

The time delta until the cookie expires

$path : string = NULL

The path on the server in which the cookie will be available on

$secure : bool = false

true if secure cookie

$httponly : bool = false

true if access to this cookie should only be allowed via http (e.g. no access to JS etc.). Requires browser support though.

zp_clearCookie()

Clears a cookie

zp_clearCookie(string $name[, string $path = NULl ][, bool $secure = false ][, bool $httponly = false ]) : mixed
Parameters
$name : string

The 'cookie' name

$path : string = NULl

The path on the server in which the cookie will be available on

$secure : bool = false

true if secure cookie

$httponly : bool = false

true if access to this cookie should only be allowed via http (e.g. no access to JS etc.). Requires browser support though.

getSerializedArray()

if $string is an serialzied array it is unserialized otherwise an appropriate array is returned

getSerializedArray(string $string[, bool $disallow_classes = false ]) : array<string|int, mixed>
Parameters
$string : string
$disallow_classes : bool = false

Default false, if set to true the unserializing disallows classes. Set to true if using this on user submitted $_GET/$_POST/$_REQUEST data

Return values
array<string|int, mixed>

updateConfigItem()

Updates an item in the configuration file

updateConfigItem(unknown_type $item, unknown_type $value, mixed $zp_cfg[, unknown_type $quote = true ]) : mixed
Parameters
$item : unknown_type
$value : unknown_type
$zp_cfg : mixed
$quote : unknown_type = true

storeConfig()

backs-up and updates the Zenphoto configuration file

storeConfig(string $zp_cfg) : mixed
Parameters
$zp_cfg : string

zpRewriteURL()

Creates a "REWRITE" url given the query parameters that represent the link

zpRewriteURL(type $query) : string
Parameters
$query : type
Return values
string

fix_path_redirect()

Checks to see if the current URL is a query string url when mod_rewrite is active.

fix_path_redirect() : mixed

If so it will redirects to the rewritten URL with a 301 Moved Permanently.

zp_load_page()

zp_load_page([mixed $pagenum = NULL ]) : mixed
Parameters
$pagenum : mixed = NULL

zp_load_album()

zp_load_album - loads the album given by the folder name $folder into the global context, and sets the context appropriately.

zp_load_album( $folder[, mixed $force_nocache = false ]) : the
Parameters
$folder :

the folder name of the album to load. Ex: 'testalbum', 'test/subalbum', etc.

$force_nocache : mixed = false
Return values
the

loaded album object on success, or (===false) on failure.

zp_load_image()

zp_load_image - loads the image given by the $folder and $filename into the global context, and sets the context appropriately.

zp_load_image( $folder,  $filename) : the
Parameters
$folder :

is the folder name of the album this image is in. Ex: 'testalbum'

$filename :

is the filename of the image to load.

Return values
the

loaded album object on success, or (===false) on failure.

load_zenpage_pages()

Loads a zenpage pages page Sets up $_zp_current_zenpage_page and returns it as the function result.

load_zenpage_pages( $titlelink) : object
Parameters
$titlelink :

the titlelink of a zenpage page to setup a page object directly. Used for custom page scripts based on a zenpage page.

Return values
object

load_zenpage_news()

Loads a zenpage news article Sets up $_zp_current_zenpage_news and returns it as the function result.

load_zenpage_news(array<string|int, mixed> $request) : object
Parameters
$request : array<string|int, mixed>

an array with one member: the key is "date", "category", or "title" and specifies what you want loaded. The value is the date or title of the article wanted

Return values
object

zp_load_request()

Figures out what is being accessed and calls the appropriate load function

zp_load_request() : bool
Return values
bool

prepareIndexPage()

sets up for loading the index page

prepareIndexPage() : string
Return values
string

prepareImagePage()

sets up for loading an image page

prepareImagePage() : string
Return values
string

prepareCustomPage()

sets up for loading p=page pages

prepareCustomPage() : string
Return values
string

redirectionHandler()

Handles redirections via filter hook "redirection_handler".

redirectionHandler() : mixed

It is meant to perform redirections of pages that have been removed or renamed.

Tags
since
1.5.2

zp_register_filter()

Registers a filtering function Filtering functions are used to post process zenphoto elements or to trigger functions when a filter occur

zp_register_filter(string $hook, callable $function_name[, int $priority = NULL ]) : mixed

Typical use:

	zp_register_filter('some_hook', 'function_handler_for_hook');

global array $_zp_filters Storage for all of the filters

Parameters
$hook : string

the name of the zenphoto element to be filtered

$function_name : callable

the name of the function that is to be called.

$priority : int = NULL

optional. Used to specify the order in which the functions associated with a particular action are executed (default=5, higher=earlier execution, and functions with the same priority are executed in the order in which they were added to the filter)

zp_filter_unique_id()

Build Unique ID for storage and retrieval.

zp_filter_unique_id(string $hook, string|array<string|int, mixed> $function, int|bool $priority) : string

Simply using a function name is not enough, as several functions can have the same name when they are enclosed in classes.

global array $_zp_filters storage for all of the filters

Parameters
$hook : string

hook to which the function is attached

$function : string|array<string|int, mixed>

used for creating unique id

$priority : int|bool

used in counting how many hooks were applied. If === false and $function is an object reference, we return the unique id only if it already has one, false otherwise.

Return values
string

unique ID for usage as array key

zp_apply_filter()

Performs a filtering operation on a zenphoto element or event.

zp_apply_filter(string $hook[, mixed $value = '' ]) : mixed

This function is called for each zenphoto element which supports plugin filtering. It is called after any zenphoto specific actions are completed and before the element is used.

Typical use:

	1) Modify a variable if a function is attached to hook 'zp_hook'
	$zp_var = "default value";
	$zp_var = zp_apply_filter( 'zp_hook', $zp_var );

	2) Trigger functions is attached to event 'zp_event'
	zp_apply_filter( 'zp_event' );

Returns an element which may have been filtered by a filter.

global array $_zp_filters storage for all of the filters

Parameters
$hook : string

the name of the zenphoto element

$value : mixed = ''

the value of the element before filtering

zp_remove_filter()

Removes a function from a specified filter hook.

zp_remove_filter(string $hook, callable $function_to_remove[, int $priority = NULL ][, int $accepted_args = 1 ]) : bool

This function removes a function attached to a specified filter hook. This method can be used to remove default functions attached to a specific filter hook and possibly replace them with a substitute.

To be removed the $function_to_remove and $priority arguments must match when the hook was added.

global array $_zp_filters storage for all of the filters

Parameters
$hook : string

The filter hook to which the function to be removed is hooked.

$function_to_remove : callable

The name of the function which should be removed.

$priority : int = NULL

optional. The priority of the function. If not supplied we will get it from zp_has_filter

$accepted_args : int = 1

optional. The number of arguments the function accpets (default: 1).

Return values
bool

Whether the function was registered as a filter before it was removed.

zp_has_filter()

Check if any filter has been registered for a hook.

zp_has_filter(string $hook[, callable $function_to_check = false ]) : int|bool

global array $_zp_filters storage for all of the filters

Parameters
$hook : string

The name of the filter hook.

$function_to_check : callable = false

optional. If specified, return the priority of that function on this hook or false if not attached.

Return values
int|bool

Optionally returns the priority on that hook for the specified function.

get_filterScript()

returns a list of scripts that have attached to the hook

get_filterScript(string $hook) : string
Parameters
$hook : string
Return values
string

zp_filter_slot()

Returns the position of the function in the hook queue

zp_filter_slot( $hook,  $function) : mixed
Parameters
$hook :
$function :

getLanguageArray()

functions-i18n.php -- support functions for internationalization

getLanguageArray() : mixed

generateLanguageList()

Returns an array of available language locales.

generateLanguageList([mixed $all = false ]) : array<string|int, mixed>
Parameters
$all : mixed = false
Return values
array<string|int, mixed>

setMainDomain()

Sets the locale, etc. to the zenphoto domain details.

setMainDomain() : mixed

Returns the result of setupCurrentLocale()

gettext_th()

Gettext replacement function for separate translations of third party themes.

gettext_th(string $string[, string $theme = Null ]) : string
Parameters
$string : string

The string to be translated

$theme : string = Null

The name of the plugin. Only required for strings on the 'theme_description.php' file like the general theme description. If the theme is the current theme the function sets it automatically.

Return values
string

ngettext_th()

ngettext replacement function for separate translations of third party themes.

ngettext_th(string $msgid1, string $msgid2, int $n[, string $theme = NULL ]) : string
Parameters
$msgid1 : string
$msgid2 : string
$n : int
$theme : string = NULL
Return values
string

gettext_pl()

Gettext replacement function for separate translations of third party plugins within the root plugins folder.

gettext_pl(string $string, string $plugin) : string
Parameters
$string : string

The string to be translated

$plugin : string

The name of the plugin. Required.

Return values
string

ngettext_pl()

ngettext replacement function for separate translations of third party plugins within the root plugins folder.

ngettext_pl(string $msgid1, string $msgid2, int $n, string $plugin) : string
Parameters
$msgid1 : string
$msgid2 : string
$n : int
$plugin : string
Return values
string

i18nSetLocale()

Wrapper function for setLocale() so that all the proper permutations are used Returns the result from the setLocale call

i18nSetLocale( $locale) : string
Parameters
$locale :

the local desired

Return values
string

setupDomain()

Sets the translation domain and type for optional theme or plugin based translations

setupDomain([mixed $domain = NULL ][,  $type = NULL ]) : mixed
Parameters
$domain : mixed = NULL
$type : = NULL

NULL (Zenphoto main translation), "theme" or "plugin"

setupCurrentLocale()

Setup code for gettext translation Returns the result of the setlocale call

setupCurrentLocale([string $override = NULL ]) : mixed
Parameters
$override : string = NULL

force locale to this

getLangAttributeLocale()

Converts underscore locales like "en_US" to valid IANA/BCP 47 hyphen locales like "en-US" Needed for example in JS or HTML "lang" attributes.

getLangAttributeLocale([string $locale = NULL ]) : string
Parameters
$locale : string = NULL

a locale like "en_US", if empty the current locale is used

Tags
since
1.5.7
Return values
string

parseHttpAcceptLanguage()

This function will parse a given HTTP Accepted language instruction (or retrieve it from $_SERVER if not provided) and will return a sorted array. For example, it will parse fr;en-us;q=0.8

parseHttpAcceptLanguage([string $str = NULL ]) : array<string|int, mixed>

Thanks to Fredbird.org for this code.

Parameters
$str : string = NULL

optional language string

Return values
array<string|int, mixed>

validateLocale()

checks a "supplied" locale against the valid locales.

validateLocale(string $userlocale, mixed $source) : mixed

Returns a valid locale if one exists else returns NULL

Parameters
$userlocale : string
$source : mixed

getUserLocale()

Returns a saved (or posted) locale. Posted locales are stored as a cookie.

getUserLocale() : mixed

Sets the 'locale' option to the result (non-persistent)

get_language_string()

Returns the sring for the current language from a serialized set of language strings Defaults to the string for the current locale, the en_US string, or the first string which ever is present

get_language_string(string $dbstring[, string $locale = NULL ]) : string
Parameters
$dbstring : string

either a serialized languag string array or a single string

$locale : string = NULL

optional locale of the translation desired

Return values
string

getTimezones()

Returns a list of timezones

getTimezones() : unknown
Return values
unknown

timezoneDiff()

Returns the difference between the server timez one and the local (users) time zone

timezoneDiff(string $server, string $local) : int
Parameters
$server : string
$local : string
Return values
int

getAllTranslations()

returns a serialized "multilingual array" of translations Used for setting default options with multi-lingual strings.

getAllTranslations(string $text) : mixed
Parameters
$text : string

to be translated

getLanguageSubdomains()

creates an SEO language prefix list

getLanguageSubdomains() : mixed

getLanguageText()

Returns a canonical language name string for the location

getLanguageText([string $loc = NULL ][, mixed $separator = NULL ]) : string
Parameters
$loc : string = NULL

the location. If NULL use the current cookie

$separator : mixed = NULL
Return values
string

getSystemLocales()

Gets all locales suppported on the current server as a multidimensional array

getSystemLocales([bool $plainarray = false ]) : array<string|int, mixed>
Parameters
$plainarray : bool = false

Default false for a multidimensial array grouped by locale base. Set to true to generate a single dimensional array with all locales.

Tags
author

Stephen Billard (sbillard), Malte Müller (acrylian) - adapted from the old former unsupported tool list_locales.php

since
1.5.2
Return values
array<string|int, mixed>

getLanguageDisplayName()

Returns the real language name to the locale passed.

getLanguageDisplayName(string $locale) : string

If available it will use the native PHP Locale class. It returns the name in the language/locale currently set. Otherwise the far more limited internal Zenphoto catalogue stored in getLanguageArray() will be used.

Parameters
$locale : string

A vaild locale.

Tags
since
1.5.2
Return values
string

printLangAttribute()

Prints the lang="" attribute for the main <html> element.

printLangAttribute([string $locale = null ]) : mixed
Parameters
$locale : string = null

Default null so the current locale is used. Or a locale like "en_US" which will get the underscores replaced by hyphens to be valid

Tags
since
1.5.7

getFormattedLocaleDate()

Returns a locale aware - e.g. translated day and month names - formatted date. Requires the PHP intl extension to work properly Otherwise returns standard formatted date.

getFormattedLocaleDate([string $format = 'Y-m-dd' ][, string|int $datetime = '' ]) : string
Parameters
$format : string = 'Y-m-dd'

An ICU dateformat string or one of the custom formats 'locale_preferreddate_time' and 'locale_preferreddate_notime'

$datetime : string|int = ''

A date() compatible string or a timestamp. If empty "now" is used

Tags
since
1.6
since
1.6.1

Parameter value requirements changed

Return values
string

imageError()

imageError(string $status_text, string $errormessage[, string $errorimg = 'err-imagegeneral.png' ][, string $image = '' ][, string $album = '' ][, string $newfilename = '' ]) : mixed
Parameters
$status_text : string
$errormessage : string

the error message to print if $_GET['debug'] is set.

$errorimg : string = 'err-imagegeneral.png'

the filename of the error image to display for production. Defaults to 'err-imagegeneral.png'. Images should be located in /zp-core/images_errors .

$image : string = ''
$album : string = ''
$newfilename : string = ''
Tags
global

string $newfilename

global

string $album

global

string $image

imageDebug()

Prints debug information from the arguments to i.php.

imageDebug(string $album, string $image, array<string|int, mixed> $args, string $imgfile) : mixed
Parameters
$album : string

alubm name

$image : string

image name

$args : array<string|int, mixed>

size/crop arguments

$imgfile : string

the filename of the image

propSizes()

Calculates proprotional width and height Used internally by cacheImage

propSizes(int $size, int $width, int $height, int $w, int $h, int $thumb, int $image_use_side, int $dim) : array<string|int, mixed>

Returns array containing the new width and height

Parameters
$size : int
$width : int
$height : int
$w : int
$h : int
$thumb : int
$image_use_side : int
$dim : int
Return values
array<string|int, mixed>

iptc_make_tag()

iptc_make_tag() function by Thies C. Arntzen

iptc_make_tag( $rec,  $data,  $value) : mixed
Parameters
$rec :
$data :
$value :

cacheImage()

Creates the cache folder version of the image, including watermarking

cacheImage(string $newfilename, string $imgfile, array<string|int, mixed> $args[, bool $allow_watermark = false ][, string $theme = null ][, string $album = null ]) : mixed
Parameters
$newfilename : string

the name of the file when it is in the cache

$imgfile : string

the image name

$args : array<string|int, mixed>

the cropping arguments

$allow_watermark : bool = false

set to true if image may be watermarked

$theme : string = null

the current theme

$album : string = null

the album containing the image

getImageRotation()

Determines the rotation of the image by looking at EXIF information.

getImageRotation(string $imgfile) : array<string|int, mixed>|false

Returns an array with two indexes "rotate" (= degree to rotate) and "flip" ("horizontal" or "vertical") or false if nothing applies

Parameters
$imgfile : string

the image name

Tags
since
1.6.1

Return values changed from string|false to array|false

Return values
array<string|int, mixed>|false

addWatermark()

Adds a watermark to a resized image. If no watermark is set it just returns the image

addWatermark(resource|object $newim, string $watermark_image[, string $imgfile = null ]) : resource|object
Parameters
$newim : resource|object

GD image resource or Imagick object

$watermark_image : string

The path to the watermark to use

$imgfile : string = null

Path to the image being processed (optionally for debugging only)

Tags
since
1.5.3
  • consolidated from cacheImage() and full-image.php
Return values
resource|object

isGDImage()

Checks if an processed image is a GD library image

isGDImage(mixed $image) : bool
Parameters
$image : mixed

And Image resource (PHP < 8) or GDImage object (PHP 8+)

Tags
since
1.6
Return values
bool

reconfigureAction()

Executes the configuration change code

reconfigureAction(int $mandatory) : mixed
Parameters
$mandatory : int

0-3 0 means signature change where 1 means setup must autorun assuming a fresh install

checkSignature()

Checks details of configuration change

checkSignature(bool $auto) : type
Parameters
$auto : bool
Tags
global

type $_zp_mutex

global

type $_zp_db

Return values
type

signatureChange()

Notification handler for configuration change

signatureChange([string $tab = NULL ][, string $subtab = NULL ]) : string
Parameters
$tab : string = NULL
$subtab : string = NULL
Return values
string

addReconfigureNote()

Adds the reconfigure notification via filters

addReconfigureNote() : mixed
Tags
since
1.5.8
  • renamed from reconfigureNote()

printReconfigureNote()

prints HTML for the configuration change notification

printReconfigureNote(array<string|int, mixed> $diff, type $needs, type $mandatory) : mixed
Parameters
$diff : array<string|int, mixed>
$needs : type
$mandatory : type
Tags
since
1.5.8
  • renamed from reconfigureNote()

getReconfigureNote()

Gets data for the configuration change notification

getReconfigureNote(array<string|int, mixed> $diff, type $needs, type $mandatory) : array<string|int, mixed>

Also adds entries to the debuglog.

Parameters
$diff : array<string|int, mixed>
$needs : type
$mandatory : type
Tags
since
1.5.8
Return values
array<string|int, mixed>

printReconfigureError()

Prints an error page on the frontend if a mandatory reconfigure issue occurred but the visitor is not loggedin with appropiate rights.

printReconfigureError(mixed $mandatory) : mixed
Parameters
$mandatory : mixed

debuglogReconfigureNote()

Adds debuglog entries about the reconfigure note

debuglogReconfigureNote(array<string|int, mixed> $notice) : mixed
Parameters
$notice : array<string|int, mixed>

reconfigure notice array as returned by getReconfigureNote()

ignoreSetupRunRequest()

If setup request a run because of a signature change this refreshes the signature on full admin user request so it is ignored until the next signature change.

ignoreSetupRunRequest() : mixed
Tags
since
1.5.8

isSetupProtected()

Checks if setup files are protected. Returns array of the protected files or empty array

isSetupProtected() : array<string|int, mixed>
Return values
array<string|int, mixed>

rewriteHandler()

"Rewrite" handling for Zenphoto

rewriteHandler() : mixed

The basic rules are found in the rewrite-rules.txt file. Additional rules can be provided by plugins. But for the plugin to load in time for the rules to be seen it must be either a CLASS_PLUGIN or a FEATURE_PLUGIN. Plugins add rules by inserting them into the $_zp_conf_vars['special_pages'] array. Each "rule" is an array of three elements: define, rewrite, and (optionally) rule.

Elemments which have a define and no rule are processed by rewrite rules in the rewrite-rules.txt file and the define is used internally to Zenphoto to reference the rewrite text when building links.

Elements with a rule defined are processed after Search, Pages, and News rewrite rules and before Image and album rewrite rules. The tag %REWRITE% in the rule is replaced with the rewrite text before processing the rule. Thus rewrite is the token that should appear in the acutal URL.

It makes no sense to have an element without either a define or a rule as nothing will happen.

At present all rules are presumed to to stop processing the rule set. Historically that is what all our rules have done, but I suppose we could change that. The "R" flag may be used to cause a header status to be sent. However, we do not redirect back to index.php, so the "R" flag is only useful if the target is a different script.

parseAllowedTags()

parses the allowed HTML tags for use by htmLawed

parseAllowedTags(string &$source) : array<string|int, mixed>
Parameters
$source : string

by name, contains the string with the tag options

Tags
since
1.1.3
Return values
array<string|int, mixed>

the allowed_tags array.

checkObjectsThumb()

Search for a thumbnail for the image

checkObjectsThumb( $localpath) : string
Parameters
$localpath :

local path of the image

Return values
string

truncate_string()

Returns a truncated string

truncate_string(string $string, int $length[, string $elipsis = '...' ]) : string
Parameters
$string : string

souirce string

$length : int

how long it should be

$elipsis : string = '...'

the text to tack on indicating shortening

Return values
string

tidyHTML()

Fixes unbalanced HTML tags. Uses the library htmlawed or if available the native PHP extension tidy

tidyHTML(string $html) : string
Parameters
$html : string
Return values
string

shortenContent()

Returns truncated html formatted content

shortenContent(string $articlecontent, int $shorten, string $shortenindicator[, bool $forceindicator = false ]) : string
Parameters
$articlecontent : string

the source string

$shorten : int

new size

$shortenindicator : string
$forceindicator : bool = false

set to true to include the indicator no matter what

Return values
string

lookupSortKey()

Returns a sort field part for querying Note: $sorttype may be a comma separated list of field names. If so, these are peckmarked and returned otherwise unchanged.

lookupSortKey(string $sorttype, string $default, string $table) : string
Parameters
$sorttype : string

the 'Display" name of the sort

$default : string

the default if $sorttype is empty

$table : string

the database table being used.

Return values
string

zpFormattedDate()

Returns a formatted date for output

zpFormattedDate([string $format = '' ][, string|int $datetime = '' ][, bool $localized_date = null ]) : string
Parameters
$format : string = ''

A datetime compatible format string. Leave empty to use the option value. NOTE: If $localize_date = true you need to provide an ICU dateformat string instead of a datetime format string unless you pass the DATE_FORMAT constant using one of the standard formats. You can then also submit these custom formats 'locale_preferreddate_time' and 'locale_preferreddate_notime'

$datetime : string|int = ''

the date to be formatted. Can be a date string or a timestamp.

$localized_date : bool = null

Default null to use the related option setting. Set to true to use localized dates. PHP intl extension required

Return values
string

getDatetimeObject()

Returns a datetime object

getDatetimeObject([string|int $datetime = '' ]) : object
Parameters
$datetime : string|int = ''

the date to be output. Can be a date string or a timestamp. If empty "now" is used

Tags
since
1.6.1
Return values
object

getStandardDateFormats()

Returns an array with datetime (keys) and ICU dateformat (values) strings

getStandardDateFormats([string $type = "datetime" ]) : array<string|int, mixed>
Parameters
$type : string = "datetime"

"date" for date formats without time, "time" for time formats, "datetime" for both combined

Tags
since
1.6.1
Return values
array<string|int, mixed>

myts_date()

Simple SQL timestamp formatting function.

myts_date(string $format, int $mytimestamp) : string
Parameters
$format : string

formatting template

$mytimestamp : int

timestamp

Return values
string

zp_mail()

Send an mail to the mailing list. We also attempt to intercept any form injection attacks by slime ball spammers. Returns error message if send failure.

zp_mail(string $subject, string $message[, array<string|int, mixed> $email_list = NULL ][, array<string|int, mixed> $cc_addresses = NULL ][, array<string|int, mixed> $bcc_addresses = NULL ][, string $replyTo = NULL ]) : string
Parameters
$subject : string

The subject of the email.

$message : string

The message contents of the email.

$email_list : array<string|int, mixed> = NULL

a list of email addresses to send to

$cc_addresses : array<string|int, mixed> = NULL

a list of addresses to send copies to.

$bcc_addresses : array<string|int, mixed> = NULL

a list of addresses to send blind copies to.

$replyTo : string = NULL

reply-to address

Tags
author

Todd Papaioannou (lucky@luckyspin.org)

since
1.0.0
Return values
string

sortByMultilingual()

Sorts the results of a DB search by the current locale string for $field

sortByMultilingual(array<string|int, mixed> $dbresult, string $field, bool $descending) : array<string|int, mixed>
Parameters
$dbresult : array<string|int, mixed>

the result of the DB query

$field : string

the field name to sort on

$descending : bool

the direction of the sort

Return values
array<string|int, mixed>

the sorted result

checkAlbumPassword()

Checks to see access is allowed to an album Returns true if access is allowed.

checkAlbumPassword(string $album[, string &$hint = NULL ]) : bool

There is no password dialog--you must have already had authorization via a cookie.

Parameters
$album : string

album object or name of the album

$hint : string = NULL

becomes populated with the password hint.

Return values
bool

getPluginFiles()

Returns a consolidated list of plugins The array structure is key=plugin name, value=plugin path

getPluginFiles(string $pattern[, string $folder = '' ][, bool $stripsuffix = true ]) : array<string|int, mixed>
Parameters
$pattern : string

File system wildcard matching pattern to limit the search

$folder : string = ''

subfolder within the plugin folders to search

$stripsuffix : bool = true

set to true to remove the suffix from the key name in the array

Return values
array<string|int, mixed>

getPlugin()

Returns the fully qualified file name of the plugin file.

getPlugin(string $plugin[, bool $inTheme = false ][, bool $webpath = false ]) : string

Note: order of selection is: 1-theme folder file (if $inTheme is set) 2-user plugin folder file 3-zp-extensions file first file found is used

Parameters
$plugin : string

is the name of the plugin file, typically something.php

$inTheme : bool = false

tells where to find the plugin. true means look in the current theme false means look in the zp-core/plugins folder.

$webpath : bool = false

return a WEBPATH rather than a SERVERPATH

Return values
string

getEnabledPlugins()

Returns an array of the currently enabled plugins

getEnabledPlugins() : array<string|int, mixed>
Return values
array<string|int, mixed>

extensionEnabled()

Returns if a plugin is enabled

extensionEnabled(string $extension) : bool
Parameters
$extension : string
Return values
bool

enableExtension()

Enables a plugin

enableExtension(string $extension, int $priority[, bool $persistent = true ]) : mixed
Parameters
$extension : string
$priority : int
$persistent : bool = true

disableExtension()

Disables an extension

disableExtension(string $extension[, bool $persistent = true ]) : mixed
Parameters
$extension : string
$persistent : bool = true
Tags
since
1.5.2

getManagedAlbumList()

Populates and returns the $_zp_admin_album_list array

getManagedAlbumList() : array<string|int, mixed>
Return values
array<string|int, mixed>

populateManagedObjectsList()

Returns a list of album names managed by $id

populateManagedObjectsList(string $type, int $id[, bool $rights = false ]) : array<string|int, mixed>
Parameters
$type : string

which kind of object

$id : int

admin ID

$rights : bool = false

set true for album sub-rights

Return values
array<string|int, mixed>

getAllSubAlbumIDs()

Returns an array of album ids whose parent is the folder

getAllSubAlbumIDs([string $albumfolder = '' ]) : array<string|int, mixed>
Parameters
$albumfolder : string = ''

folder name if you want a album different >>from the current album

Return values
array<string|int, mixed>

handleSearchParms()

recovers search parameters from stored cookie, clears the cookie

handleSearchParms(string $what[, string $album = NULL ][, string $image = NULL ]) : mixed
Parameters
$what : string

the page type

$album : string = NULL

Name of the album

$image : string = NULL

Name of the image

galleryAlbumsPerPage()

Returns the number of album thumbs that go on a gallery page

galleryAlbumsPerPage() : int
Return values
int

setupTheme()

Returns the theme folder If there is an album theme, loads the theme options.

setupTheme([object $album = NULL ]) : string
Parameters
$album : object = NULL

album object if override desired

Return values
string

getAllTagsUnique()

Returns an array of unique tag names

getAllTagsUnique([bool $checkaccess = false ]) : array<string|int, mixed>
Parameters
$checkaccess : bool = false

Set to true if you wish to exclude tags that are assigned to items (or are not assigned at all) the visitor is not allowed to see Beware that this may cause overhead on large sites. Usage of the static_html_cache plugin is strongely recommended.

Return values
array<string|int, mixed>

getAllTagsCount()

Returns an array indexed by 'tag' with the element value the count of the tag

getAllTagsCount([bool $exclude_unassigned = false ][, bool $checkaccess = false ]) : array<string|int, mixed>
Parameters
$exclude_unassigned : bool = false

Set to true if you wish to exclude tags that are not assigne to any item

$checkaccess : bool = false

Set to true if you wish to exclude tags that are assigned to items (or are not assigned at all) the visitor is not allowed to see If set to true it overrides the $exclude_unassigned parameter. Beware that this may cause overhead on large sites. Usage of the static_html_cache plugin is strongely recommended.

Return values
array<string|int, mixed>

getTagCountByAccess()

Checks if a tag is assigned at all and if it can be viewed by the current visitor and returns the corrected count Helper function used optionally within getAllTagsCount() and getAllTagsUnique()

getTagCountByAccess(array<string|int, mixed> $tag) : int
Parameters
$tag : array<string|int, mixed>

Array representing a tag containing at least its name and id

Tags
global

obj $_zp_zenpage

Return values
int

storeTags()

Stores tags for an object

storeTags(array<string|int, mixed> $tags, int $id, string $tbl) : mixed
Parameters
$tags : array<string|int, mixed>

the tag values

$id : int

the record id of the album/image

$tbl : string

database table of the object

readTags()

Retrieves the tags for an object Returns them in an array

readTags(int $id, string $tbl) : unknown
Parameters
$id : int

the record id of the album/image

$tbl : string

'albums' or 'images', etc.

Return values
unknown

generateListFromArray()

Creates the body of a select list

generateListFromArray(array<string|int, mixed> $currentValue, array<string|int, mixed> $list, bool $descending, bool $localize) : mixed
Parameters
$currentValue : array<string|int, mixed>

list of items to be flagged as checked

$list : array<string|int, mixed>

the elements of the select list

$descending : bool

set true for a ascending order sort. Set to null to keep the array as it is passed.

$localize : bool

set true if the keys as description should be listed instead of the plain values

generateListFromFiles()

Generates a selection list from files found on disk

generateListFromFiles(strig $currentValue, string $root, string $suffix[, bool $descending = false ]) : mixed
Parameters
$currentValue : strig

the current value of the selector

$root : string

directory path to search

$suffix : string

suffix to select for

$descending : bool = false

set true to get a reverse order sort. Set to null to keep the array as it is passed.

generateAttributesFromArray()

Helper to generate attributename="attributevalue" for HTML elements based on an array consisting of key => value pairs

generateAttributesFromArray([array<string|int, mixed> $attributes = array() ][, array<string|int, mixed> $exclude = array() ]) : string

Returns a string with with prependend space to directly use with an HTML element.

Note: There is no check if these attributes are valid. Also values are not html_encoded as that could break for example JS event handlers. Do this in your attribute definition array as needed. Attributes with an empty value are skipped except the alt attribute or known boolean attributes (see in function definition)

Parameters
$attributes : array<string|int, mixed> = array()

key => value pairs of element attribute name and value. e.g. array('class' => 'someclass', 'id' => 'someid');

$exclude : array<string|int, mixed> = array()

Names of attributes to exclude (in case already set otherwise)

Tags
since
1.5.8
Return values
string

getLinkHTML()

getLinkHTML(string $url, string $text[, string $title = NULL ][, string $class = NULL ][, string $id = NULL ][, array<string|int, mixed> $extra_attr = array() ]) : mixed
Parameters
$url : string

The link URL

$text : string

The text to go with the link

$title : string = NULL

Text for the title tag

$class : string = NULL

optional class

$id : string = NULL

optional id

$extra_attr : array<string|int, mixed> = array()

Additional attributes as array of key => value pairs

printLinkHTML()

General link printing function

printLinkHTML(string $url, string $text[, string $title = NULL ][, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$url : string

The link URL

$text : string

The text to go with the link

$title : string = NULL

Text for the title tag

$class : string = NULL

optional class

$id : string = NULL

optional id

shuffle_assoc()

shuffles an array maintaining the keys

shuffle_assoc(array<string|int, mixed> &$array) : bool
Parameters
$array : array<string|int, mixed>
Return values
bool

sortByKey()

sorts the found albums (images) by the required key(s)

sortByKey(array<string|int, mixed> $results, string $sortkey, string $order) : mixed

NB: this sort is sensitive to the key(s) chosen and makes the appropriate sorts based on same. Some multi-key sorts will not make any sense and will give unexpected results. Most notably any that contain the keys "title" or "desc" as these require multi-lingual sorts.

Parameters
$results : array<string|int, mixed>
$sortkey : string
$order : string

sortMultiArray()

multidimensional array column sort

sortMultiArray(array<string|int, mixed> $array, mixed $index[, string $descending = false ][, bool $natsort = true ][, bool $case_sensitive = false ][, bool $preservekeys = false ][, array<string|int, mixed> $remove_criteria = array() ]) : array<string|int, mixed>

If the system's PHP has the native intl extension and its Collator class available the sorting is locale aware (true natural order) and always case sensitive if $natsort is set to true

Parameters
$array : array<string|int, mixed>

The multidimensional array to be sorted

$index : mixed

Which key(s) should be sorted by

$descending : string = false

true for descending sortorder

$natsort : bool = true

If natural order should be used. If available sorting will be locale aware.

$case_sensitive : bool = false

If the sort should be case sensitive. Note if $natsort is true and locale aware sorting is available sorting is always case sensitive

$preservekeys : bool = false

Default false,

$remove_criteria : array<string|int, mixed> = array()

Array of indices to remove.

Tags
author

redoc (http://codingforums.com/showthread.php?t=71904)

Return values
array<string|int, mixed>

sortArray()

General one dimensional array sorting function. Key/value associations are preserved.

sortArray(array<string|int, mixed> &$array[, string $descending = false ][, bool $natsort = true ][, bool $case_sensitive = false ]) : bool

If the system's PHP has the native intl extension and its Collator class available and $natsort is set to true the sorting is locale sensitive (true natural order).

The function follows native PHP array sorting functions (natcasesort() etc.) and uses the array by reference and returns true or false on success or failure.

Parameters
$array : array<string|int, mixed>

The array to sort. The array is passed by reference

$descending : string = false

true for descending sorts (default false)

$natsort : bool = true

If natural order should be used (default true). If available sorting will be locale sensitive.

$case_sensitive : bool = false

If the sort should be case sensitive (default false). Note if $natsort is true and locale aware sorting is available sorting is always case sensitive

Tags
since
1.5.8
Return values
bool

getNotViewableAlbums()

Returns a list of album IDs that the current viewer is not allowed to see

getNotViewableAlbums() : array<string|int, mixed>
Return values
array<string|int, mixed>

getNotViewableImages()

Returns a list of image IDs that the current viewer is not allowed to see

getNotViewableImages() : array<string|int, mixed>
Return values
array<string|int, mixed>

isValidURL()

Checks to see if a URL is valid

isValidURL(string $url) : bool
Parameters
$url : string

the URL being checked

Return values
bool

safe_fnmatch()

pattern match function Works with characters with diacritical marks where the PHP one does not.

safe_fnmatch(string $pattern, string $string) : bool
Parameters
$pattern : string

pattern

$string : string

haystack

Return values
bool

isValidEmail()

Returns true if the mail address passed is valid.

isValidEmail(string $email) : bool

It uses PHP's internal filter_var functions to validate the syntax but not the existence.

Parameters
$email : string

An email address

Tags
since
1.5.2
Return values
bool

zp_image_types()

returns a list of comment record 'types' for "images"

zp_image_types(string $quote) : string
Parameters
$quote : string

quotation mark to use

Return values
string

dircopy()

Copies a directory recursively

dircopy(string $srcdir, string $dstdir) : the
Parameters
$srcdir : string

the source directory.

$dstdir : string

the destination directory.

Return values
the

total number of files copied.

byteConvert()

Returns a byte size from a size value (eg: 100M).

byteConvert(int $bytes) : string
Parameters
$bytes : int
Return values
string

dateTimeConvert()

Converts a datetime to connoical form

dateTimeConvert(string $datetime[, bool $raw = false ]) : mixed
Parameters
$datetime : string

input date/time string

$raw : bool = false

set to true to return the timestamp otherwise you get a string

set_context()

set_context(mixed $context) : mixed
Parameters
$context : mixed

in_context()

in_context(mixed $context) : mixed
Parameters
$context : mixed

add_context()

add_context(mixed $context) : mixed
Parameters
$context : mixed

rem_context()

rem_context(mixed $context) : mixed
Parameters
$context : mixed

restore_context()

restore_context() : mixed

zp_handle_password()

checks password posting

zp_handle_password([string $authType = NULL ][, mixed $check_auth = NULL ][, mixed $check_user = NULL ]) : mixed
Parameters
$authType : string = NULL

override of athorization type

$check_auth : mixed = NULL
$check_user : mixed = NULL

zp_handle_password_single()

Handles a passwort

zp_handle_password_single([string $authType = NULL ][, string $check_auth = NULL ][, string $check_user = NULL ]) : bool
Parameters
$authType : string = NULL

override of authorization type

$check_auth : string = NULL

Password

$check_user : string = NULL

User

Return values
bool

getOptionFromDB()

Gets an option directly from the database.

getOptionFromDB(string $key) : mixed
Parameters
$key : string

setThemeOption()

Set options local to theme and/or album

setThemeOption(string $key, string $value, object $album, string $theme[, bool $default = false ]) : mixed
Parameters
$key : string
$value : string
$album : object
$theme : string

default theme

$default : bool = false

set to true for setting default theme options (does not set the option if it already exists)

replaceThemeOption()

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.

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

Old option name

$newkey : string

New option name

Tags
since
1.5.1

purgeThemeOption()

Deletes an theme option for a specific or the current theme from the database

purgeThemeOption(string $key[, mixed $album = NULL ][, mixed $theme = NULL ][, mixed $allthemes = false ]) : mixed
Parameters
$key : string
$album : mixed = NULL
$theme : mixed = NULL
$allthemes : mixed = false
Tags
global

array $_zp_options

since
1.5.1

purgeThemeOptionTotal()

Deletes a theme option for all themes present or not

purgeThemeOptionTotal(string $key) : mixed
Parameters
$key : string
Tags
since
1.6
global

obj $_zp_db

setThemeOptionDefault()

Used to set default values for theme specific options

setThemeOptionDefault(string $key, mixed $value) : mixed
Parameters
$key : string
$value : mixed

getThemeOption()

Returns the value of a theme option

getThemeOption(string $option[, object $album = NULL ][, string $theme = NULL ]) : mixed
Parameters
$option : string

option key

$album : object = NULL
$theme : string = NULL

default theme name

getUserIP()

Returns the viewer's IP address Deals with transparent proxies

getUserIP([bool $anonymize = null ]) : string
Parameters
$anonymize : bool = null

If null (default) the backend option setting is used. Override with anonymize levels

  • 0 (No anonymizing)
  • 1 (Last fourth anonymized)
  • 2 (Last half anonymized)
  • 3 (Last three fourths anonymized)
  • 4 (Full anonymization, no IP stored)
Return values
string

getAnonymIP()

Anonymizing of IP addresses

getAnonymIP(mixed $ip[, bool $anonymize = null ]) : string
Parameters
$ip : mixed
$anonymize : bool = null

If null (default) the backend option setting is used. Override with anonymize levels

  • 0 (No anonymizing)
  • 1 (Last fourth anonymized)
  • 2 (Last half anonymized)
  • 3 (Last three fourths anonymized)
  • 4 (Full anonymization, no IP stored)
Return values
string

seoFriendly()

Strips out and/or replaces characters from the string that are not "soe" friendly

seoFriendly(string $string) : string
Parameters
$string : string
Return values
string

seoFriendlyJS()

emit the javascript seojs() function

seoFriendlyJS() : mixed

is_connected()

Returns true if there is an internet connection

is_connected([string $host = 'www.zenphoto.org' ]) : bool
Parameters
$host : string = 'www.zenphoto.org'

optional host name to test

Return values
bool

debug404()

produce debugging information on 404 errors

debug404(string $album, string $image, string $theme) : mixed
Parameters
$album : string
$image : string
$theme : string

XSRFdefender()

Checks for Cross Site Request Forgeries

XSRFdefender(string $action) : mixed
Parameters
$action : string

getXSRFToken()

returns an XSRF token

getXSRFToken(string $action) : mixed
Parameters
$action : string

XSRFToken()

Emits a "hidden" input for the XSRF token

XSRFToken(string $action) : mixed
Parameters
$action : string

cron_starter()

Starts a sechedule script run

cron_starter(string $script, array<string|int, mixed> $params, mixed $offsetPath[, bool $inline = false ]) : mixed
Parameters
$script : string

The script file to load

$params : array<string|int, mixed>

"POST" parameters

$offsetPath : mixed
$inline : bool = false

set to true to run the task "in-line". Set false run asynchronously

zp_loggedin()

Check if logged in (with specific rights) Returns a true value if there is a user logged on with the required rights

zp_loggedin([bit $rights = ALL_RIGHTS ]) : bool
Parameters
$rights : bit = ALL_RIGHTS

rights required by the caller

Return values
bool

read_exif_data_protected()

Provides an error protected read of image EXIF/IPTC data

read_exif_data_protected(string $path) : array<string|int, mixed>
Parameters
$path : string

image path

Return values
array<string|int, mixed>

getLanguageFlag()

fetches the path to the flag image

getLanguageFlag(string $lang) : string
Parameters
$lang : string

whose flag

Return values
string

getItemByID()

Gets an item object by id

getItemByID(string $table, int $id) : mixed
Parameters
$table : string

database table to search

$id : int

id of the item to get

reveal()

uses down and up arrow links to show and hide sections of HTML

reveal(string $content[, bool $visible = false ]) : mixed
Parameters
$content : string

the id of the html section to be revealed

$visible : bool = false

true if the content is initially visible

applyMacros()

Deals with the [macro parameters] substitutions

applyMacros(string $text) : string

See the macroList plugin for details

Parameters
$text : string
Return values
string

getNestedAlbumList()

generates a nested list of albums for the album tab sorting Returns an array of "albums" each element contains: 'name' which is the folder name 'sort_order' which is an array of the sort order set

getNestedAlbumList( $subalbum,  $levels[,  $checkalbumrights = true ][,  $level = array() ]) : array<string|int, mixed>
Parameters
$subalbum :

root level album (NULL is the gallery)

$levels :

how far to nest

$checkalbumrights : = true

TRUE (Default) for album rights for backend usage, FALSE to skip for frontend usage

$level : = array()

internal for keeping the sort order elements

Return values
array<string|int, mixed>

setexifvars()

initializes the $_zp_exifvars array display state

setexifvars() : mixed

removeDir()

Recursively clears and removes a folder

removeDir(string $path[, mixed $within = false ]) : bool
Parameters
$path : string
$within : mixed = false
Return values
bool

tagURLs()

inserts location independent WEB path tags in place of site path tags

tagURLs(string $text) : mixed
Parameters
$text : string

unTagURLs()

reverses tagURLs()

unTagURLs(string|array<string|int, mixed> $text) : string
Parameters
$text : string|array<string|int, mixed>
Return values
string

Searches out i.php image links and replaces them with cache links if image is cached

updateImageProcessorLink(string $text) : string
Parameters
$text : string
Return values
string

pluginDebug()

pluginDebug(mixed $extension, mixed $priority, mixed $start) : mixed
Parameters
$extension : mixed
$priority : mixed
$start : mixed

removeTrailingSlash()

Removes a trailing slash from a string if one exists, otherwise just returns the string Used primarily within date and tag searches and news date archive results

removeTrailingSlash(string $string) : string
Parameters
$string : string
Tags
since
1.4.12
Return values
string

getDataUsageNotice()

Returns an array the data privacy policy page and the data usage confirmation text as defined on Options > Security array( 'notice' => '<The defined text>', 'url' => '<url to the define page either custom page url or Zenpage page>', 'linktext' => '<The defined text>' )

getDataUsageNotice() : array<string|int, mixed>
Tags
since
1.5
Return values
array<string|int, mixed>

printDataUsageNotice()

Prints the data privacy policy page and the data usage confirmation text as defined on Options > Security If there is no page defined it only prints the default text.

printDataUsageNotice() : mixed
Tags
since
1.5

getCookieInfoData()

Returns an array with predefined info about general cookies set by the system and/or plugins

getCookieInfoData([string $section = null ]) : array<string|int, mixed>
Parameters
$section : string = null

Name of the section to get: 'authentication', 'search', 'admin', 'cookie', 'various' or null (default) for the full array

Tags
since
1.5.8
Return values
array<string|int, mixed>

getCookieInfoHTML()

Returns a definition list with predefined info about general cookies set by the system and/or plugins as a string

getCookieInfoHTML([string $section = null ][, string $sectionheadline = 'h2' ]) : string
Parameters
$section : string = null

Name of the section to get: 'authentication', 'search', 'admin', 'cookie', 'various' or null (default) for the full array

$sectionheadline : string = 'h2'

Add h2 to h6 to print as the section headline, h2 default.

Tags
since
1.5.8
Return values
string

printCookieInfo()

Prints a definition list with predefined info about general cookies set by the system and/or plugins

printCookieInfo([string $section = null ][, string $sectionheadline = 'h2' ]) : mixed
Parameters
$section : string = null

Name of the section to get: 'authentication', 'search', 'admin', 'cookie', 'various' or null (default) for the full array

$sectionheadline : string = 'h2'

Add h2 to h6 to print as the section headline, h2 default.

Tags
since
1.5.8

getCookieInfoMacro()

Registers the content macro(s)

getCookieInfoMacro(array<string|int, mixed> $macros) : array<string|int, mixed>
Parameters
$macros : array<string|int, mixed>

Passes through the array of already registered

Return values
array<string|int, mixed>

intel2Moto()

Converts from Intel to Motorola endien. Just reverses the bytes (assumes hex is passed in)

intel2Moto(type $intel) : array<string|int, mixed>
Parameters
$intel : type
Tags
staticvar

array $cache

Return values
array<string|int, mixed>

lookup_tag()

Looks up the name of the tag

lookup_tag(string $tag) : string
Parameters
$tag : string
Return values
string

lookup_type()

Looks up the datatype

lookup_type(type &$type, type &$size) : string
Parameters
$type : type
$size : type
Return values
string

validSize()

truncates unreasonable read data requests.

validSize(type $bytesofdata) : type
Parameters
$bytesofdata : type
Return values
type

unRational()

processes a irrational number

unRational(type $data, type $type, type $intel) : string
Parameters
$data : type
$type : type
$intel : type
Return values
string

rational()

processes a rational number

rational(type $data, type $type, type $intel) : type
Parameters
$data : type
$type : type
$intel : type
Return values
type

formatData()

Formats Data for the data type

formatData(type $type, type $tag, type $intel, type $data) : type
Parameters
$type : type
$tag : type
$intel : type
$data : type
Return values
type

formatExposure()

formatExposure(type $data) : type
Parameters
$data : type
Return values
type

read_entry()

Reads one standard IFD entry

read_entry(type &$result, type $in, type $seek, type $intel, type $ifd_name, type $globalOffset) : type
Parameters
$result : type
$in : type
$seek : type
$intel : type
$ifd_name : type
$globalOffset : type
Return values
type

read_exif_data_raw()

Pass in a file and this reads the EXIF data

read_exif_data_raw(string $path, int $verbose) : int

Usefull resources

  • http:// www.ba.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
  • http:// www.w3.org/Graphics/JPEG/jfif.txt
  • http:// exif.org/
  • http:// www.ozhiker.com/electronics/pjmt/library/list_contents.php4
  • http:// www.ozhiker.com/electronics/pjmt/jpeg_info/makernotes.html
  • http:// pel.sourceforge.net/
  • http:// us2.php.net/manual/en/function.exif-read-data.php
Parameters
$path : string
$verbose : int
Return values
int

ConvertToFraction()

Converts a floating point number into a simple fraction.

ConvertToFraction(type $v, type &$n, type &$d) : type
Parameters
$v : type
$n : type
$d : type
Return values
type

get35mmEquivFocalLength()

Calculates the 35mm-equivalent focal length from the reported sensor resolution

get35mmEquivFocalLength(array<string|int, mixed> &$result) : int
Parameters
$result : array<string|int, mixed>
Tags
author

Tristan Harward (trisweb)

Return values
int

lookup_Canon_tag()

Looks up the name of the tag for the MakerNote (Depends on Manufacturer)

lookup_Canon_tag(type $tag) : string
Parameters
$tag : type
Return values
string

formatCanonData()

Formats Data for the data type

formatCanonData(type $type, type $tag, type $intel, type $data, type $exif, type &$result) : type
Parameters
$type : type
$tag : type
$intel : type
$data : type
$exif : type
$result : type
Return values
type

parseCanon()

Cannon Special data section Useful:

parseCanon(type $block, type &$result, type $seek, type $globalOffset) : type
  • http://www.burren.cx/david/canon.html
  • http://www.burren.cx/david/canon.html
  • http://www.ozhiker.com/electronics/pjmt/jpeg_info/canon_mn.html
Parameters
$block : type
$result : type
$seek : type
$globalOffset : type
Return values
type

lookup_Fujifilm_tag()

Looks up the name of the tag for the MakerNote (Depends on Manufacturer)

lookup_Fujifilm_tag(type $tag) : string
Parameters
$tag : type
Return values
string

formatFujifilmData()

Formats Data for the data type

formatFujifilmData(type $type, type $tag, type $intel, type $data) : type
Parameters
$type : type
$tag : type
$intel : type
$data : type
Return values
type

parseFujifilm()

Fujifilm Special data section

parseFujifilm(type $block, type &$result) : mixed
Parameters
$block : type
$result : type

lookup_GPS_tag()

Looks up the name of the tag

lookup_GPS_tag(type $tag) : string
Parameters
$tag : type
Return values
string

formatGPSData()

Formats Data for the data type

formatGPSData(type $type, type $tag, type $intel, type $data) : type
Parameters
$type : type
$tag : type
$intel : type
$data : type
Return values
type

parseGPS()

GPS Special data section

parseGPS(type $block, type &$result, type $offset, type $seek, type $globalOffset) : type

Useful websites

-http://drewnoakes.com/code/exif/sampleOutput.html

  • http://www.geosnapper.com
Parameters
$block : type
$result : type
$offset : type
$seek : type
$globalOffset : type
Return values
type

lookup_Nikon_tag()

Looks up the name of the tag for the MakerNote (Depends on Manufacturer)

lookup_Nikon_tag(type $tag, type $model) : string
Parameters
$tag : type
$model : type
Return values
string

formatNikonData()

formatNikonData(mixed $type, mixed $tag, mixed $intel, mixed $model, mixed $data) : mixed
Parameters
$type : mixed
$tag : mixed
$intel : mixed
$model : mixed
$data : mixed

parseNikon()

Nikon Special data section

parseNikon(type $block, type &$result) : mixed
Parameters
$block : type
$result : type

lookup_Olympus_tag()

Looks up the name of the tag for the MakerNote (Depends on Manufacturer)

lookup_Olympus_tag(type $tag) : string
Parameters
$tag : type
Return values
string

formatOlympusData()

Formats Data for the data type

formatOlympusData(type $type, type $tag, type $intel, type $data) : type
Parameters
$type : type
$tag : type
$intel : type
$data : type
Return values
type

parseOlympus()

Olympus Special data section // - Updated by Zenphoto for new header tag in E-410/E-510/E-3 cameras. 2/24/2008

parseOlympus(type $block, type &$result, type $seek, type $globalOffset) : bool
Parameters
$block : type
$result : type
$seek : type
$globalOffset : type
Return values
bool

lookup_Panasonic_tag()

Looks up the name of the tag for the MakerNote (Depends on Manufacturer)

lookup_Panasonic_tag(type $tag) : string
Parameters
$tag : type
Return values
string

formatPanasonicData()

Formats Data for the data type

formatPanasonicData(type $type, type $tag, type $intel, type $data) : type
Parameters
$type : type
$tag : type
$intel : type
$data : type
Return values
type

parsePanasonic()

Panasonic Special data section

parsePanasonic(type $block, type &$result) : mixed
Parameters
$block : type
$result : type

lookup_Sanyo_tag()

Looks up the name of the tag for the MakerNote (Depends on Manufacturer)

lookup_Sanyo_tag(type $tag) : string
Parameters
$tag : type
Return values
string

formatSanyoData()

Formats Data for the data type

formatSanyoData(type $type, type $tag, type $intel, type $data) : type
Parameters
$type : type
$tag : type
$intel : type
$data : type
Return values
type

parseSanyo()

Sanyo Special data section

parseSanyo(type $block, type &$result, type $seek, type $globalOffset) : mixed
Parameters
$block : type
$result : type
$seek : type
$globalOffset : type

rc4()

encryption support functions

rc4(mixed $pass, mixed $message) : mixed
Parameters
$pass : mixed
$message : mixed

bindtextdomain()

Dummy routines so zenphoto will run on servers that do not have PHP getttext support.

bindtextdomain(mixed $domain, mixed $path) : mixed

Wrappers used as a drop in replacement for the standard gettext functions

Only include if the native PHP extension gettext is not available!

Parameters
$domain : mixed
$path : mixed

bind_textdomain_codeset()

bind_textdomain_codeset(mixed $domain, mixed $codeset) : mixed
Parameters
$domain : mixed
$codeset : mixed

ngettext()

ngettext(mixed $msgid1, mixed $msgid2, mixed $n) : mixed
Parameters
$msgid1 : mixed
$msgid2 : mixed
$n : mixed

dgettext()

dgettext(mixed $plugin, mixed $string) : mixed
Parameters
$plugin : mixed
$string : mixed

dngettext()

dngettext(mixed $theme, mixed $msgid1, mixed $msgid2, mixed $n) : mixed
Parameters
$theme : mixed
$msgid1 : mixed
$msgid2 : mixed
$n : mixed

kses()

This function makes sure that only the allowed HTML element names, attribute names and attribute values plus only sane HTML entities will occur in $string. You have to remove any slashes from PHP's magic quotes before you call this function.

kses(type $string, type $allowed_html[, type $allowed_protocols = array('http', 'https', 'ftp', 'news', 'nntp', 'telnet', 'gopher', 'mailto') ]) : type
Parameters
$string : type
$allowed_html : type
$allowed_protocols : type = array('http', 'https', 'ftp', 'news', 'nntp', 'telnet', 'gopher', 'mailto')
Return values
type

kses_hook()

You add any kses hooks here.

kses_hook(mixed $string) : mixed
Parameters
$string : mixed

kses_version()

This function returns kses' version number.

kses_version() : mixed

kses_split()

This function searches for HTML tags, no matter how malformed. It also matches stray ">" characters.

kses_split(mixed $string, mixed $allowed_html, mixed $allowed_protocols) : mixed
Parameters
$string : mixed
$allowed_html : mixed
$allowed_protocols : mixed

kses_split2()

This function does a lot of work. It rejects some very malformed things like <:::>. It returns an empty string, if the element isn't allowed (look ma, no strip_tags()!). Otherwise it splits the tag into an element and an attribute list.

kses_split2(type $matches) : string
Parameters
$matches : type
Tags
global

type $_allowed_html

global

type $_allowed_protocols

Return values
string

kses_attr()

This function removes all attributes, if none are allowed for this element.

kses_attr(type $element, type $attr, type $allowed_html, type $allowed_protocols) : type

If some are allowed it calls kses_hair() to split them further, and then it builds up new HTML code from the data that kses_hair() returns. It also removes "<" and ">" characters, if there are any left. One more thing it does is to check if the tag has a closing XHTML slash, and if it does, it puts one in the returned code as well.

Parameters
$element : type
$attr : type
$allowed_html : type
$allowed_protocols : type
Return values
type

kses_hair()

This function does a lot of work. It parses an attribute list into an array with attribute data, and tries to do the right thing even if it gets weird input. It will add quotes around attribute values that don't have any quotes or apostrophes around them, to make it easier to produce HTML code that will conform to W3C's HTML specification. It will also remove bad URL protocols from attribute values.

kses_hair(type $attr, type $allowed_protocols) : type
Parameters
$attr : type
$allowed_protocols : type
Return values
type

kses_check_attr_val()

This function performs different checks for attribute values. The currently implemented checks are "maxlen", "minlen", "maxval", "minval" and "valueless" with even more checks to come soon.

kses_check_attr_val(type $value, type $vless, type $checkname, type $checkvalue) : bool
Parameters
$value : type
$vless : type
$checkname : type
$checkvalue : type
Return values
bool

kses_bad_protocol()

This function removes all non-allowed protocols from the beginning of $string. It ignores whitespace and the case of the letters, and it does understand HTML entities. It does its work in a while loop, so it won't be fooled by a string like "javascript:javascript:alert(57)".

kses_bad_protocol(type $string, type $allowed_protocols) : type
Parameters
$string : type
$allowed_protocols : type
Return values
type

kses_no_null()

This function removes any NULL characters in $string.

kses_no_null(type $string) : type
Parameters
$string : type
Return values
type

kses_stripslashes()

This function changes the character sequence \" to just " It leaves all other slashes alone. It's really weird, but the quoting from preg_replace(//e) seems to require this.

kses_stripslashes(type $string) : type
Parameters
$string : type
Return values
type

kses_array_lc()

This function goes through an array, and changes the keys to all lower case.

kses_array_lc(mixed $inarray) : mixed
Parameters
$inarray : mixed

kses_js_entities()

This function removes the HTML JavaScript entities found in early versions of Netscape 4.

kses_js_entities(type $string) : type
Parameters
$string : type
Return values
type

kses_html_error()

This function deals with parsing errors in kses_hair(). The general plan is to remove everything to and including some whitespace, but it deals with quotes and apostrophes as well.

kses_html_error(type $string) : type
Parameters
$string : type
Return values
type

kses_bad_protocol_once()

This function searches for URL protocols at the beginning of $string, while handling whitespace and HTML entities.

kses_bad_protocol_once(type $string, type $allowed_protocols) : type
Parameters
$string : type
$allowed_protocols : type
Tags
global

type $_allowed_protocols

Return values
type

kses_bad_protocol_once2()

This function processes URL protocols, checks to see if they're in the white- list or not, and returns different data depending on the answer.

kses_bad_protocol_once2(type $matches) : string
Parameters
$matches : type
Tags
global

type $_allowed_protocols

Return values
string

kses_normalize_entities()

This function normalizes HTML entities. It will convert "AT&T" to the correct "AT&amp;T", "&#00058;" to "&#58;", "&#XYZZY;" to "&amp;#XYZZY;" and so on.

kses_normalize_entities(type $string) : type
Parameters
$string : type
Return values
type

kses_normalize_entities2()

This function helps kses_normalize_entities() to only accept 16 bit values and nothing more for &#number; entities.

kses_normalize_entities2(type $matches) : type
Parameters
$matches : type
Return values
type

kses_decode_entities()

This function decodes numeric HTML entities (&#65; and &#x41;). It doesn't do anything with other entities like &auml;, but we don't need them in the URL protocol whitelisting system anyway.

kses_decode_entities(type $string) : type
Parameters
$string : type
Return values
type

mb_strtolower()

mb_strtolower(mixed $str) : mixed
Parameters
$str : mixed

mb_strtoupper()

mb_strtoupper(mixed $str) : mixed
Parameters
$str : mixed

mb_strlen()

mb_strlen(mixed $str) : mixed
Parameters
$str : mixed

mb_substr()

mb_substr(mixed $str, mixed $start[, mixed $length = NULL ]) : mixed
Parameters
$str : mixed
$start : mixed
$length : mixed = NULL

mb_strrpos()

mb_strrpos(mixed $haystack, mixed $needle) : mixed
Parameters
$haystack : mixed
$needle : mixed

mb_strpos()

mb_strpos(mixed $haystack, mixed $needle[, mixed $offset = 0 ]) : mixed
Parameters
$haystack : mixed
$needle : mixed
$offset : mixed = 0

mb_substr_count()

mb_substr_count(mixed $haystack, mixed $needle) : mixed
Parameters
$haystack : mixed
$needle : mixed

processCommentBlock()

processCommentBlock(mixed $commentBlock) : mixed
Parameters
$commentBlock : mixed

setOption()

setOption(mixed $key, mixed $value[, mixed $persistent = true ]) : mixed
Parameters
$key : mixed
$value : mixed
$persistent : mixed = true

setOptionDefault()

setOptionDefault(mixed $key, mixed $value) : mixed
Parameters
$key : mixed
$value : mixed

debugLog()

debugLog(mixed $message[, mixed $reset = false ]) : mixed
Parameters
$message : mixed
$reset : mixed = false

printZenJavascripts()

Print any Javascript required by zenphoto.

printZenJavascripts() : mixed

adminToolbox()

Prints the clickable drop down toolbox on any theme page with generic admin helpers

adminToolbox() : mixed

getGalleryTitle()

Returns the raw title of the gallery.

getGalleryTitle() : string
Return values
string

getBareGalleryTitle()

Returns a text-only title of the gallery.

getBareGalleryTitle() : string
Return values
string

printGalleryTitle()

Prints the title of the gallery.

printGalleryTitle() : mixed

getHeadTitle()

Function to create the page title to be used within the html <head> <title></title> element.

getHeadTitle([string $separator = ' | ' ][, bool $listparentalbums = false ][, mixed $listparentpages = false ]) : mixed

Usefull if you use one header.php for the header of all theme pages instead of individual ones on the theme pages It returns the title and site name in reversed breadcrumb order:

<title of current page> | | It supports standard gallery pages as well a custom and Zenpage news articles, categories and pages.
Parameters
$separator : string = ' | '

How you wish the parts to be separated

$listparentalbums : bool = false

If the parent albums should be printed in reversed order before the current

$listparentpages : mixed = false

printHeadTitle()

Function to print the html <title>title</title> within the <head> of a html page based on the current theme page Usefull if you use one header.php for the header of all theme pages instead of individual ones on the theme pages It prints the title and site name including the <title> tag in reversed breadcrumb order: <title><title of current page> | <parent item if present> | <gallery title></title> It supports standard gallery pages as well a custom and Zenpage news articles, categories and pages.

printHeadTitle([string $separator = ' | ' ][, bool $listparentalbums = true ][, mixed $listparentpages = false ]) : mixed
Parameters
$separator : string = ' | '

How you wish the parts to be separated

$listparentalbums : bool = true

If the parent albums should be printed in reversed order before the current

$listparentpages : mixed = false

getGalleryDesc()

Returns the raw description of the gallery.

getGalleryDesc() : string
Return values
string

getBareGalleryDesc()

Returns a text-only description of the gallery.

getBareGalleryDesc() : string
Return values
string

printGalleryDesc()

Prints the description of the gallery.

printGalleryDesc() : mixed

getParentSiteTitle()

Returns the name of the parent website as set by the "Website Title" option on the gallery options tab. Use this if Zenphoto is only a part of your website.

getParentSiteTitle() : string
Tags
since
1.6
Return values
string

getParentSiteURL()

Returns the URL of the main website as set by the "Website URL" option on the gallery options tab. Use this if Zenphoto is only a part of your website.

getParentSiteURL() : string
Tags
since
1.6
Return values
string

getMainSiteName()

getMainSiteName() : string
Tags
deprecated
2.0:

Use getParentSiteTitle() instead

Return values
string

getMainSiteURL()

getMainSiteURL() : string
Tags
deprecated
2.0:

Use getParentSiteURL() instead

Return values
string

getGalleryIndexURL()

Returns the URL of the main gallery index page. If a custom index page is set this returns that page.

getGalleryIndexURL() : string

So this is not necessarily the home page of the site!

Return values
string

getStandardGalleryIndexURL()

Returns the url to the standard gallery index.php page

getStandardGalleryIndexURL([int $page = 1 ][, bool $webpath = null ]) : string
Parameters
$page : int = 1

Pagenumber to append

$webpath : bool = null

host path to be prefixed. If "false" is passed you will get a localized "WEBPATH"

Tags
see
getGalleryIndexURL()
Return values
string

getCustomGalleryIndexURL()

Gets the custom gallery index url if one is set, otherwise false

getCustomGalleryIndexURL([int $page = 1 ][, bool $webpath = null ]) : string
Parameters
$page : int = 1

Pagenumber for pagination

$webpath : bool = null

host path to be prefixed. If "false" is passed you will get a localized "WEBPATH"

Tags
see
getGalleryIndexURL()
global

array $_zp_conf_vars

Return values
string

getCustomGalleryIndexPage()

Returns the name to the individual custom gallery index page name if set, otherwise returns generic custom gallery page "gallery.php" that is widely supported by themes If you need to check if there is an indovidual custom_index_page set use `getOption('custom_index_page')` or `getCustomGalleryIndexURL()`

getCustomGalleryIndexPage() : string
Return values
string

printGalleryIndexURL()

If a custom gallery index page is set this first prints a link to the actual site index (home page = index.php) followed by the gallery index page link. Otherwise just the gallery index link

printGalleryIndexURL([string $after = NULL ][, string $text = NULL ][, bool $printHomeURL = true ]) : mixed
Parameters
$after : string = NULL

Text to append after and outside the link for breadcrumbs

$text : string = NULL

Name of the link, if NULL "Gallery" is used

$printHomeURL : bool = true

In case of a custom gallery index, display breadcrumb with home link (default is true)

Tags
since
1.4.9

getSiteHomeURL()

Returns the home page link (WEBPATH) to the Zenphoto theme index.php page Use in breadcrumbs if the theme uses a custom gallery index page so the gallery is not the site's home page

getSiteHomeURL() : string
Tags
since
1.4.9
global

string $_zp_gallery_page

Return values
string

printSiteHomeURL()

Prints the home page link (WEBPATH with trailing slash) to a Zenphoto theme index.php page Use in breadcrumbs if the theme uses a custom gallery index page so the gallery is not the site's home page

printSiteHomeURL([string $after = NULL ][, string $text = NULL ]) : mixed
Parameters
$after : string = NULL

Text after and outside the link for breadcrumbs

$text : string = NULL

Text of the link, if NULL "Home"

If the privacy page url option is set this prints a link to it

printPrivacyPageLink([string $before = null ][, string $after = null ]) : mixed
Parameters
$before : string = null

To print before the link

$after : string = null

To print after the link

getNumAlbums()

Returns the number of albums.

getNumAlbums() : int
Return values
int

getCurrentTheme()

Returns the name of the currently active theme

getCurrentTheme() : string
Return values
string

next_album()

WHILE next_album(): context switches to Album.

next_album([bool $all = false ][, bool $mine = NULL ]) : bool

If we're already in the album context, this is a sub-albums loop, which, quite simply, changes the source of the album list. Switch back to the previous context when there are no more albums.

Returns true if there are albums, false if none

Parameters
$all : bool = false

true to go through all the albums

$mine : bool = NULL

override the password checks

Tags
since
0.6
Return values
bool

getCurrentPage()

Returns the number of the current page without printing it.

getCurrentPage() : int
Return values
int

getAllAccessibleAlbums()

Gets an array of the album ids of all accessible albums (publich or user dependend)

getAllAccessibleAlbums(object $obj, array<string|int, mixed> &$albumlist, bool $scan) : mixed
Parameters
$obj : object

from whence to get the albums

$albumlist : array<string|int, mixed>

collects the list

$scan : bool

force scan for new images in the album folder

getTotalPages()

Returns the number of pages for the current object

getTotalPages([bool $one_image_page = false ]) : int
Parameters
$one_image_page : bool = false

set to true if your theme collapses all image thumbs or their equivalent to one page. This is typical with flash viewer themes

Return values
int

getPageNumURL()

Returns the URL of the page number passed as a parameter

getPageNumURL(int $page[, int $total = null ]) : int
Parameters
$page : int

Which page is desired

$total : int = null

How many pages there are.

Return values
int

hasNextPage()

Returns true if there is a next page

hasNextPage() : bool
Return values
bool

getNextPageURL()

Returns the URL of the next page. Use within If or while loops for pagination.

getNextPageURL() : string
Return values
string

printNextPageURL()

Prints the URL of the next page.

printNextPageURL(string $text[, string $title = NULL ][, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$text : string

text for the URL

$title : string = NULL

Text for the HTML title

$class : string = NULL

Text for the HTML class

$id : string = NULL

Text for the HTML id

hasPrevPage()

Returns TRUE if there is a previous page. Use within If or while loops for pagination.

hasPrevPage() : bool
Return values
bool

getPrevPageURL()

Returns the URL of the previous page.

getPrevPageURL() : string
Return values
string

printPrevPageURL()

Returns the URL of the previous page.

printPrevPageURL(string $text[, string $title = NULL ][, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$text : string

The linktext that should be printed as a link

$title : string = NULL

The text the html-tag "title" should contain

$class : string = NULL

Insert here the CSS-class name you want to style the link with

$id : string = NULL

Insert here the CSS-ID name you want to style the link with

printPageNav()

Prints a page navigation including previous and next page links

printPageNav(string $prevtext, string $separator, string $nexttext[, string $class = 'pagenav' ][, string $id = NULL ]) : mixed
Parameters
$prevtext : string

Insert here the linktext like 'previous page'

$separator : string

Insert here what you like to be shown between the prev and next links

$nexttext : string

Insert here the linktext like "next page"

$class : string = 'pagenav'

Insert here the CSS-class name you want to style the link with (default is "pagelist")

$id : string = NULL

Insert here the CSS-ID name if you want to style the link with this

printPageList()

Prints a list of all pages.

printPageList([string $class = 'pagelist' ][, string $id = NULL ][, int $navlen = 9 ]) : mixed
Parameters
$class : string = 'pagelist'

the css class to use, "pagelist" by default

$id : string = NULL

the css id to use

$navlen : int = 9

Number of navigation links to show (0 for all pages). Works best if the number is odd.

getPageNavList()

returns a page nav list.

getPageNavList(bool $_zp_one_image_page, int $navlen, bool $firstlast, int $current, int $total) : mixed
Parameters
$_zp_one_image_page : bool

set to true if there is only one image page as, for instance, in flash themes

$navlen : int

Number of navigation links to show (0 for all pages). Works best if the number is odd.

$firstlast : bool

Add links to the first and last pages of you gallery

$current : int

the current page

$total : int

total number of pages

printPageListWithNav()

Prints a full page navigation including previous and next page links with a list of all pages in between.

printPageListWithNav(string $prevtext, string $nexttext[, bool $_zp_one_image_page = false ][, string $nextprev = true ][, string $class = 'pagelist' ][, string $id = NULL ][, bool $firstlast = true ][, int $navlen = 9 ]) : mixed
Parameters
$prevtext : string

Insert here the linktext like 'previous page'

$nexttext : string

Insert here the linktext like 'next page'

$_zp_one_image_page : bool = false

set to true if there is only one image page as, for instance, in flash themes

$nextprev : string = true

set to true to get the 'next' and 'prev' links printed

$class : string = 'pagelist'

Insert here the CSS-class name you want to style the link with (default is "pagelist")

$id : string = NULL

Insert here the CSS-ID name if you want to style the link with this

$firstlast : bool = true

Add links to the first and last pages of you gallery

$navlen : int = 9

Number of navigation links to show (0 for all pages). Works best if the number is odd.

makeAlbumCurrent()

Sets the album passed as the current album

makeAlbumCurrent(object $album) : mixed
Parameters
$album : object

the album to be made current

getAlbumTitle()

Returns the raw title of the current album.

getAlbumTitle() : string
Return values
string

getBareAlbumTitle()

Returns a text-only title of the current album.

getBareAlbumTitle() : string
Return values
string

getAnnotatedAlbumTitle()

Returns an album title taged with of Not visible or password protected status

getAnnotatedAlbumTitle() : string
Return values
string

printAlbumTitle()

Prints an encapsulated title of the current album.

printAlbumTitle() : mixed

If you are logged in you can click on this to modify the title on the fly.

Tags
author

Ozh

albumNumber()

Gets the 'n' for n of m albums

albumNumber() : int
Return values
int

getParentAlbums()

Returns an array of the names of the parents of the current album.

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

optional album object to use inseted of the current album

Return values
array<string|int, mixed>

getAlbumBreadcrumb()

returns the breadcrumb item for the current images's album

getAlbumBreadcrumb([string $title = NULL ]) : array<string|int, mixed>
Parameters
$title : string = NULL

Text to be used as the URL title tag

Return values
array<string|int, mixed>

printAlbumBreadcrumb()

prints the breadcrumb item for the current images's album

printAlbumBreadcrumb([string $before = '' ][, string $after = '' ][, string $title = NULL ]) : mixed
Parameters
$before : string = ''

Text to place before the breadcrumb

$after : string = ''

Text to place after the breadcrumb

$title : string = NULL

Text to be used as the URL title attribute and text link

printSearchBreadcrumb()

Prints the "breadcrumb" for a search page if the search was for a data range, the breadcrumb is "Archive" otherwise it is "Search"

printSearchBreadcrumb([string $between = NULL ][, string $class = NULL ][, string $search = NULL ][, string $archive = NULL ][, string $format = 'F Y' ]) : mixed
Parameters
$between : string = NULL

Insert here the text to be printed between the links

$class : string = NULL

is the class for the link (if present)

$search : string = NULL

text for a search page title

$archive : string = NULL

text for an archive page title

$format : string = 'F Y'

data format for archive page breadcrumb - A datetime format, if using localized dates an ICU dateformat

getParentBreadcrumb()

returns the breadcrumb navigation for album, gallery and image view.

getParentBreadcrumb() : array<string|int, mixed>
Return values
array<string|int, mixed>

printParentBreadcrumb()

Prints the breadcrumb navigation for album, gallery and image view.

printParentBreadcrumb([string $before = NULL ][, string $between = NULL ][, string $after = NULL ][, mixed $truncate = NULL ][, string $elipsis = NULL ]) : mixed
Parameters
$before : string = NULL

Insert here the text to be printed before the links

$between : string = NULL

Insert here the text to be printed between the links

$after : string = NULL

Insert here the text to be printed after the links

$truncate : mixed = NULL

if not empty, the max lenght of the description.

$elipsis : string = NULL

the text to append to the truncated description

Prints a link to the 'main website', not the Zenphoto site home page! Only prints the link if the url is not empty and does not point back the gallery page

printHomeLink([string $before = '' ][, string $after = '' ][, string $title = NULL ][, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$before : string = ''

text to precede the link

$after : string = ''

text to follow the link

$title : string = NULL

Title text

$class : string = NULL

optional css class

$id : string = NULL

optional css id

getAlbumDate()

Returns the formatted date field of the album

getAlbumDate([string $format = null ]) : string
Parameters
$format : string = null

optional format string for the date - A datetime format, if using localized dates an ICU dateformat

Return values
string

printAlbumDate()

Prints the date of the current album

printAlbumDate([string $before = '' ][, string $format = NULL ]) : mixed
Parameters
$before : string = ''

Insert here the text to be printed before the date.

$format : string = NULL

A datetime format, if using localized dates an ICU dateformat

getAlbumLocation()

Returns the Location of the album.

getAlbumLocation() : string
Return values
string

printAlbumLocation()

Prints the location of the album

printAlbumLocation() : mixed
Tags
author

Ozh

getAlbumDesc()

Returns the raw description of the current album.

getAlbumDesc() : string
Return values
string

getBareAlbumDesc()

Returns a text-only description of the current album.

getBareAlbumDesc() : string
Return values
string

printAlbumDesc()

Prints description of the current album

printAlbumDesc() : mixed
Tags
author

Ozh

getAlbumCustomData()

Returns the custom_data field of the current album

getAlbumCustomData() : string
Return values
string

printAlbumCustomData()

Prints the custom_data field of the current album.

printAlbumCustomData() : mixed

Converts and displays line break in the admin field as
.

Tags
author

Ozh

getAlbumData()

A composit for getting album data

getAlbumData(string $field) : string
Parameters
$field : string

which field you want

Return values
string

printAlbumData()

Prints arbitrary data from the album object

printAlbumData(string $field[, string $label = '' ]) : mixed
Parameters
$field : string

the field name of the data desired

$label : string = ''

text to label the field

Tags
author

Ozh

getAlbumPage()

Returns the album page number of the current image

getAlbumPage([object $album = NULL ]) : int
Parameters
$album : object = NULL

optional album object

Return values
int

getAlbumURL()

Returns the album link url of the current album.

getAlbumURL([object $album = NULL ]) : string
Parameters
$album : object = NULL

optional album object

Return values
string

printAlbumURL()

Prints the album link url of the current album.

printAlbumURL(string $text, string $title[, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$text : string

Insert the link text here.

$title : string

Insert the title text here.

$class : string = NULL

Insert here the CSS-class name with with you want to style the link.

$id : string = NULL

Insert here the CSS-id name with with you want to style the link.

getAlbumThumb()

Returns the name of the defined album thumbnail image.

getAlbumThumb() : string
Return values
string

getPasswordProtectImage()

Returns an <img> element of the password protect thumb substitute

getPasswordProtectImage([string $extra = '' ]) : string
Parameters
$extra : string = ''

extra stuff to put in the HTML

Tags
deprecated
2.0

Use printPasswordProtectedImage() instead

Return values
string

getPasswordProtectedImage()

Gets the URL to the password protected images

getPasswordProtectedImage() : string
Tags
since
1.6.1
global

string $_zp_themeroot

Return values
string

printPasswordProtectedImage()

Prints an image element with the password protected image.

printPasswordProtectedImage([string $extra = '' ]) : mixed
Parameters
$extra : string = ''

extra attributes, trailing space required. Do not pass the width/height as it is taken from the image itself

Tags
since
1.6.1

Replaces getPasswordProtectImage()

printAlbumThumbImage()

Prints the album thumbnail image.

printAlbumThumbImage([string $alt = '' ][, string $class = '' ][, string $id = '' ][, string $title = '' ]) : mixed
Parameters
$alt : string = ''

Insert the text for the alternate image name here.

$class : string = ''

Insert here the CSS-class name with with you want to style the link.

$id : string = ''

Insert here the CSS-id name with with you want to style the link.

$title : string = ''

option title attribute

getCustomAlbumThumb()

Returns a link to a custom sized thumbnail of the current album

getCustomAlbumThumb([int $size = null ][, int $width = NULL ][, int $height = NULL ][, int $cropw = NULL ][, int $croph = NULL ][, int $cropx = NULL ][, int $cropy = null ][, bool $effects = NULL ]) : string
Parameters
$size : int = null

the size of the image to have

$width : int = NULL

width

$height : int = NULL

height

$cropw : int = NULL

crop width

$croph : int = NULL

crop height

$cropx : int = NULL

crop part x axis

$cropy : int = null

crop part y axis

$effects : bool = NULL

image effects (e.g. set 'gray' to force grayscale)

Return values
string

printCustomAlbumThumbImage()

Prints a link to a custom sized thumbnail of the current album

printCustomAlbumThumbImage([string $alt = '' ][, int $size = null ][, int $width = NULL ][, int $height = NULL ][, int $cropw = NULL ][, int $croph = NULL ][, int $cropx = NULL ][, int $cropy = null ][, string $class = NULL ][, string $id = NULL ][, string $title = null ][, bool $maxspace = false ]) : string

See getCustomImageURL() for details.

Parameters
$alt : string = ''

Alt atribute text

$size : int = null

size

$width : int = NULL

width

$height : int = NULL

height

$cropw : int = NULL

cropwidth

$croph : int = NULL

crop height

$cropx : int = NULL

crop part x axis

$cropy : int = null

crop part y axis

$class : string = NULL

css class

$id : string = NULL

css id

$title : string = null

title attribute

$maxspace : bool = false

true for maxspace image, false is default

Return values
string

getMaxSpaceContainer()

Called by ***MaxSpace functions to compute the parameters to be passed to xxCustomyyy functions.

getMaxSpaceContainer(int &$width, int &$height, object $image[, bool $thumb = false ]) : mixed
Parameters
$width : int

maxspace width

$height : int

maxspace height

$image : object

the image in question

$thumb : bool = false

true if for a thumbnail

getCustomAlbumThumbMaxSpace()

Returns a link to a un-cropped custom sized version of the current album thumb within the given height and width dimensions.

getCustomAlbumThumbMaxSpace(int $width, int $height) : string
Parameters
$width : int

width

$height : int

height

Return values
string

printCustomAlbumThumbMaxSpace()

Prints a un-cropped custom sized album thumb within the given height and width dimensions.

printCustomAlbumThumbMaxSpace([string $alt = '' ][, int $width = null ][, int $height = null ][, string $class = NULL ][, string $id = NULL ][, string $title = null ]) : mixed

Note: a class of 'not_visible' or 'password_protected' will be added as appropriate

Parameters
$alt : string = ''

Alt text for the url

$width : int = null

width

$height : int = null

height

$class : string = NULL

Optional style class

$id : string = NULL

Optional style id

$title : string = null

Optional title attribute

getNextAlbum()

Returns the next album

getNextAlbum() : object
Return values
object

getNextAlbumURL()

Get the URL of the next album in the gallery.

getNextAlbumURL() : string
Return values
string

getPrevAlbum()

Returns the previous album

getPrevAlbum() : object
Return values
object

getPrevAlbumURL()

Get the URL of the previous album in the gallery.

getPrevAlbumURL() : string
Return values
string

isImagePage()

Returns true if this page has image thumbs on it

isImagePage() : bool
Return values
bool

isAlbumPage()

Returns true if this page has album thumbs on it

isAlbumPage() : bool
Return values
bool

getNumImages()

Returns the number of images in the album.

getNumImages() : int
Return values
int

getFirstPageImages()

getFirstPageImages([type $one_image_page = false ]) : type
Parameters
$one_image_page : type = false
Tags
since
1.6
global

obj $_zp_current_album

global

type $_zp_current_search

Return values
type

next_image()

Returns the next image on a page.

next_image([bool $all = false ][, int $firstPageCount = NULL ][, bool $mine = NULL ]) : bool

sets $_zp_current_image to the next image in the album.

Returns true if there is an image to be shown

Parameters
$all : bool = false

set to true disable pagination

$firstPageCount : int = NULL

the number of images which can go on the page that transitions between albums and images Normally this parameter should be NULL so as to use the default computations.

$mine : bool = NULL

overridePassword the password check

Return values
bool

makeImageCurrent()

Sets the image passed as the current image

makeImageCurrent(object $image) : mixed
Parameters
$image : object

the image to become current

getImageTitle()

Returns the raw title of the current image.

getImageTitle() : string
Return values
string

getBareImageTitle()

Returns a text-only title of the current image.

getBareImageTitle() : string
Return values
string

getAnnotatedImageTitle()

Returns the image title taged with not visible annotation.

getAnnotatedImageTitle() : string
Return values
string

printImageTitle()

Prints title of the current image

printImageTitle() : mixed
Tags
author

Ozh

imageNumber()

Returns the 'n' of n of m images

imageNumber() : int
Return values
int

getImageDate()

Returns the image date of the current image in yyyy-mm-dd hh:mm:ss format.

getImageDate([string $format = null ]) : string

Pass it a date format string for custom formatting

Parameters
$format : string = null

A datetime format, if using localized dates an ICU dateformat

Return values
string

printImageDate()

Prints the date of the current album

printImageDate([string $before = '' ][, string $format = null ]) : mixed
Parameters
$before : string = ''

Insert here the text to be printed before the date.

$format : string = null

A datetime format, if using localized dates an ICU dateformat

getImageLocation()

Returns the Location field of the current image

getImageLocation() : string
Return values
string

getImageCity()

Returns the City field of the current image

getImageCity() : string
Return values
string

getImageState()

Returns the State field of the current image

getImageState() : string
Return values
string

getImageCountry()

Returns the Country field of the current image

getImageCountry() : string
Return values
string

getImageDesc()

Returns the raw description of the current image.

getImageDesc() : string

new lines are replaced with
tags

Return values
string

getBareImageDesc()

Returns a text-only description of the current image.

getBareImageDesc() : string
Return values
string

printImageDesc()

Prints the description of the current image.

printImageDesc() : mixed

Converts and displays line breaks set in the admin field as
.

getImageData()

A composit for getting image data

getImageData(string $field) : string
Parameters
$field : string

which field you want

Return values
string

getImageCustomData()

Returns the custom_data field of the current image

getImageCustomData() : string
Return values
string

printImageCustomData()

Prints the custom_data field of the current image.

printImageCustomData() : string

Converts and displays line breaks set in the admin field as
.

Return values
string

printImageData()

Prints arbitrary data from the image object

printImageData(string $field[, string $label = '' ]) : mixed
Parameters
$field : string

the field name of the data desired

$label : string = ''

text to label the field.

Tags
author

Ozh

getFullImageFilesize()

Returns the file size of the full original image

getFullImageFilesize() : int
Tags
since
1.5.2
global

obj $_zp_current_image

Return values
int

hasNextImage()

True if there is a next image

hasNextImage() : bool
Return values
bool

hasPrevImage()

True if there is a previous image

hasPrevImage() : bool
Return values
bool

getNextImageURL()

Returns the url of the next image.

getNextImageURL() : string
Return values
string

getPrevImageURL()

Returns the url of the previous image.

getPrevImageURL() : string
Return values
string

getPrevImageThumb()

Returns the thumbnail of the previous image.

getPrevImageThumb() : string
Return values
string

getNextImageThumb()

Returns the thumbnail of the next image.

getNextImageThumb() : string
Return values
string

getImageURL()

Returns the url of the current image.

getImageURL() : string
Return values
string

printImageURL()

Prints the link to the current image.

printImageURL(string $text, string $title[, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$text : string

text for the link

$title : string

title tag for the link

$class : string = NULL

optional style class for the link

$id : string = NULL

optional style id for the link

getImageMetaData()

Returns the Metadata infromation from the current image

getImageMetaData([ $image = NULL ][, string $displayonly = true ]) : array<string|int, mixed>
Parameters
$image : = NULL

optional image object

$displayonly : string = true

set to true to return only the items selected for display

Return values
array<string|int, mixed>

printImageMetadata()

Prints the Metadata data of the current image

printImageMetadata([string $title = NULL ][, bool $toggle = true ][, string $id = 'imagemetadata' ][, string $class = null ][, mixed $span = NULL ]) : mixed
Parameters
$title : string = NULL

title tag for the class

$toggle : bool = true

set to true to get a javascript toggle on the display of the data

$id : string = 'imagemetadata'

style class id

$class : string = null

style class

$span : mixed = NULL
Tags
author

Ozh

getSizeCustomImage()

Returns an array with the height & width

getSizeCustomImage([int $size = null ][, int $width = NULL ][, int $height = NULL ][, int $cw = NULL ][, int $ch = NULL ][, int $cx = NULL ][, int $cy = NULL ][, obj $image = NULL ][, string $type = 'image' ]) : array<string|int, mixed>
Parameters
$size : int = null

size

$width : int = NULL

width

$height : int = NULL

height

$cw : int = NULL

crop width

$ch : int = NULL

crop height

$cx : int = NULL

crop x axis

$cy : int = NULL

crop y axis

$image : obj = NULL

The image object for which the size is desired. NULL means the current image

$type : string = 'image'

"image" (sizedimage) (default), "thumb" (thumbnail) required for using option settings for uncropped images

Return values
array<string|int, mixed>

getSizeDefaultImage()

Returns an array [width, height] of the default-sized image.

getSizeDefaultImage([int $size = NULL ][,  $image = NULL ]) : array<string|int, mixed>
Parameters
$size : int = NULL

override the 'image_zize' option

$image : = NULL

object the image for which the size is desired. NULL means the current image

Return values
array<string|int, mixed>

getSizeFullImage()

Returns an array [width, height] of the original image.

getSizeFullImage([ $image = NULL ]) : array<string|int, mixed>
Parameters
$image : = NULL

object the image for which the size is desired. NULL means the current image

Return values
array<string|int, mixed>

getDefaultWidth()

The width of the default-sized image (in printDefaultSizedImage)

getDefaultWidth([mixed $size = NULL ][,  $image = NULL ]) : int
Parameters
$size : mixed = NULL
$image : = NULL

object the image for which the size is desired. NULL means the current image

Return values
int

getDefaultHeight()

Returns the height of the default-sized image (in printDefaultSizedImage)

getDefaultHeight([mixed $size = NULL ][,  $image = NULL ]) : int
Parameters
$size : mixed = NULL
$image : = NULL

object the image for which the size is desired. NULL means the current image

Return values
int

getFullWidth()

Returns the width of the original image

getFullWidth([ $image = NULL ]) : int
Parameters
$image : = NULL

object the image for which the size is desired. NULL means the current image

Return values
int

getFullHeight()

Returns the height of the original image

getFullHeight([ $image = NULL ]) : int
Parameters
$image : = NULL

object the image for which the size is desired. NULL means the current image

Return values
int

isLandscape()

Returns true if the image is landscape-oriented (width is greater than height) or - kept here for backwards compatibility - square (equal widht and height)

isLandscape([ $image = NULL ]) : bool
Parameters
$image : = NULL

object the image for which the size is desired. NULL means the current image

Return values
bool

getDefaultSizedImage()

Returns the url to the default sized image.

getDefaultSizedImage([ $image = NULL ]) : string
Parameters
$image : = NULL

object the image for which the size is desired. NULL means the current image

Return values
string

printDefaultSizedImage()

Show video player with video loaded or display the image.

printDefaultSizedImage(string $alt[, string $class = null ][, string $id = null ][, string $title = null ][, obj $image = null ]) : mixed
Parameters
$alt : string

Alt text

$class : string = null

Optional style class

$id : string = null

Optional style id

$title : string = null

Optional title attribute

$image : obj = null

optional image object, null means current image

getImageThumb()

Returns the url to the thumbnail of the current image.

getImageThumb() : string
Return values
string

printImageThumb()

printImageThumb(string $alt[, string $class = null ][, string $id = null ][, string $title = null ][, obj $image = null ]) : mixed
Parameters
$alt : string

Alt text

$class : string = null

optional class attribute

$id : string = null

optional id attribute

$title : string = null

optional title attribute

$image : obj = null

optional image object, null means current image

getSizeDefaultThumb()

Gets the width and height of a default thumb for the <img> tag height/width

getSizeDefaultThumb([obj $image = NULL ]) : aray
Parameters
$image : obj = NULL

Image object, if NULL the current image is used

Tags
global

type $_zp_current_image

Return values
aray

getFullImageURL()

Returns the url to original image.

getFullImageURL([ $image = NULL ]) : string

It will return a protected image is the option "protect_full_image" is set

Parameters
$image : = NULL

optional image object

Return values
string

getUnprotectedImageURL()

Returns the "raw" url to the image in the albums folder

getUnprotectedImageURL([ $image = NULL ]) : string
Parameters
$image : = NULL

optional image object

Return values
string

getProtectedImageURL()

Returns an url to the password protected/watermarked current image

getProtectedImageURL([object $image = NULL ][, string $disposal = NULL ]) : string
Parameters
$image : object = NULL

optional image object overrides the current image

$disposal : string = NULL

set to override the 'protect_full_image' option. 'protected', "download", "unprotected" or "no-access"

Return values
string

getSizedImageURL()

Returns a link to the current image custom sized to $size

getSizedImageURL(int $size) : mixed
Parameters
$size : int

The size the image is to be

getCustomImageURL()

Returns the url to the image with the dimensions you define with this function.

getCustomImageURL(int $size[, int $width = NULL ][, int $height = NULL ][, int $cropw = NULL ][, int $croph = NULL ][, int $cropx = NULL ][, int $cropy = NULL ][, bool $thumbStandin = false ][, bool $effects = NULL ][, obj $image = null ]) : string
Parameters
$size : int

the size of the image to have

$width : int = NULL

width

$height : int = NULL

height

$cropw : int = NULL

crop width

$croph : int = NULL

crop height

$cropx : int = NULL

crop part x axis

$cropy : int = NULL

crop part y axis

$thumbStandin : bool = false

set true to inhibit watermarking

$effects : bool = NULL

image effects (e.g. set gray to force to grayscale)

$image : obj = null

optional image object, null means current image

Return values
string

$size, $width, and $height are used in determining the final image size. At least one of these must be provided. If $size is provided, $width and $height are ignored. If both $width and $height are provided, the image will have those dimensions regardless of the original image height/width ratio. (Yes, this means that the image may be distorted!)

The $crop* parameters determine the portion of the original image that will be incorporated into the final image.

$cropw and $croph "sizes" are typically proportional. That is you can set them to values that reflect the ratio of width to height that you want for the final image. Typically you would set them to the final height and width. These values will always be adjusted so that they are not larger than the original image dimensions.

The $cropx and $cropy values represent the offset of the crop from the top left corner of the image. If these values are provided, the $croph and $cropw parameters are treated as absolute pixels not proportions of the image. If cropx and cropy are not provided, the crop will be "centered" in the image.

When $cropx and $cropy are not provided the crop is offset from the top left proportionally to the ratio of the final image size and the crop size.

Some typical croppings:

$size=200, $width=NULL, $height=NULL, $cropw=200, $croph=100, $cropx=NULL, $cropy=NULL produces an image cropped to a 2x1 ratio which will fit in a 200x200 pixel frame.

$size=NULL, $width=200, $height=NULL, $cropw=200, $croph=100, $cropx=100, $cropy=10 will will take a 200x100 pixel slice from (10,100) of the picture and create a 200x100 image

$size=NULL, $width=200, $height=100, $cropw=200, $croph=120, $cropx=NULL, $cropy=NULL will produce a (distorted) image 200x100 pixels from a 1x0.6 crop of the image.

$size=NULL, $width=200, $height=NULL, $cropw=180, $croph=120, $cropx=NULL, $cropy=NULL will produce an image that is 200x133 from a 1.5x1 crop that is 5% from the left and 15% from the top of the image.

printCustomSizedImage()

Print normal video or custom sized images.

printCustomSizedImage([string $alt = '' ][, int $size = null ][, int $width = NULL ][, int $height = NULL ][, int $cropw = NULL ][, int $croph = NULL ][, int $cropx = NULL ][, int $cropy = NULL ][, string $class = NULL ][, string $id = NULL ][, bool $thumbStandin = false ][, bool $effects = NULL ][, string $title = null ][, string $type = 'image' ][, obj $image = null ][, bool $maxspace = false ]) : mixed

Note: a class of 'not_visible' or 'password_protected' will be added as appropriate

Notes on cropping:

The $crop* parameters determine the portion of the original image that will be incorporated into the final image. The w and h "sizes" are typically proportional. That is you can set them to values that reflect the ratio of width to height that you want for the final image. Typically you would set them to the fincal height and width.

Parameters
$alt : string = ''

Alt text for the url

$size : int = null

size

$width : int = NULL

width

$height : int = NULL

height

$cropw : int = NULL

crop width

$croph : int = NULL

crop height

$cropx : int = NULL

crop x axis

$cropy : int = NULL

crop y axis

$class : string = NULL

Optional style class

$id : string = NULL

Optional style id

$thumbStandin : bool = false

set to true to treat as thumbnail

$effects : bool = NULL

image effects (e.g. set gray to force grayscale)

$title : string = null

Optional title attribute

$type : string = 'image'

"image" (sizedimage) (default), "thumb" (thumbnail) required for using option settings for uncropped images

$image : obj = null

optional image object, null means current image

$maxspace : bool = false

true for maxspace, false default

getCustomSizedImageMaxSpace()

Returns a link to a un-cropped custom sized version of the current image within the given height and width dimensions.

getCustomSizedImageMaxSpace(int $width, int $height) : string

Use for sized images.

Parameters
$width : int

width

$height : int

height

Return values
string

getCustomSizedImageThumbMaxSpace()

Returns a link to a un-cropped custom sized version of the current image within the given height and width dimensions.

getCustomSizedImageThumbMaxSpace(int $width, int $height) : string

Use for sized thumbnails.

Parameters
$width : int

width

$height : int

height

Return values
string

printCustomSizedImageThumbMaxSpace()

Creates image thumbnails which will fit un-cropped within the width & height parameters given

printCustomSizedImageThumbMaxSpace([string $alt = '' ][, int $width = null ][, int $height = null ][, string $class = NULL ][, string $id = NULL ][, string $title = null ][, obj $image = null ]) : mixed
Parameters
$alt : string = ''

Alt text for the url

$width : int = null

width

$height : int = null

height

$class : string = NULL

Optional style class

$id : string = NULL

Optional style id

$title : string = null

optional title attribute

$image : obj = null

optional image object, null means current image

printCustomSizedImageMaxSpace()

Print normal video or un-cropped within the given height and width dimensions. Use for sized images or thumbnails in an album.

printCustomSizedImageMaxSpace([string $alt = '' ][, int $width = null ][, int $height = null ][, string $class = NULL ][, string $id = NULL ][, mixed $thumb = false ][, string $title = null ][, obj $image = null ]) : mixed

Note: a class of 'not_visible' or 'password_protected' will be added as appropriate

Parameters
$alt : string = ''

Alt text for the url

$width : int = null

width

$height : int = null

height

$class : string = NULL

Optional style class

$id : string = NULL

Optional style id

$thumb : mixed = false
$title : string = null

optional title attribute

$image : obj = null

optional image object, null means current image

printSizedImageURL()

Prints link to an image of specific size

printSizedImageURL(int $size, string $text, string $title[, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$size : int

how big

$text : string

URL text

$title : string

URL title

$class : string = NULL

optional URL class

$id : string = NULL

optional URL id

getTags()

Returns a list of tags for context of the page called where called

getTags() : string
Tags
since
1.1
Return values
string

printTags()

Prints a list of tags, editable by admin

printTags([string $option = 'links' ][, string $preText = NULL ][, string $class = NULL ][, string $separator = ', ' ]) : mixed
Parameters
$option : string = 'links'

links by default, if anything else the tags will not link to all other images with the same tag

$preText : string = NULL

text to go before the printed tags

$class : string = NULL

css class to apply to the div surrounding the UL list

$separator : string = ', '

what charactor shall separate the tags

Tags
since
1.1

printAllTagsAs()

Either prints all of the galleries tgs as a UL list or a cloud

printAllTagsAs(string $option[, string $class = '' ][, string $sort = NULL ][, bool $counter = FALSE ][, bool $links = TRUE ][, int $maxfontsize = 2 ][, int $maxcount = 50 ][, int $mincount = 1 ][, int $limit = NULL ][, int $minfontsize = 0.8 ][, bool $exclude_unassigned = true ][, bool $checkaccess = false ]) : mixed
Parameters
$option : string

"cloud" for tag cloud, "list" for simple list

$class : string = ''

CSS class

$sort : string = NULL

"results" for relevance list, "random" for random ordering, otherwise the list is alphabetical

$counter : bool = FALSE

TRUE if you want the tag count within brackets behind the tag

$links : bool = TRUE

set to TRUE to have tag search links included with the tag.

$maxfontsize : int = 2

largest font size the cloud should display

$maxcount : int = 50

the floor count for setting the cloud font size to $maxfontsize

$mincount : int = 1

the minimum count for a tag to appear in the output

$limit : int = NULL

set to limit the number of tags displayed to the top $numtags

$minfontsize : int = 0.8

minimum font size the cloud should display

$exclude_unassigned : bool = true

True or false if you wish to exclude tags that are not assigne to any item (default: true)

$checkaccess : bool = false

True or false (default: false) if you wish to exclude tags that are assigned to items (or are not assigned at all) the visitor is not allowed to see Beware that this may cause overhead on large sites. Usage of the static_html_cache is strongely recommended then.

Tags
since
1.1

getAllDates()

Retrieves a list of all unique years & months from the images in the gallery

getAllDates([string $order = 'asc' ]) : array<string|int, mixed>
Parameters
$order : string = 'asc'

set to 'desc' for the list to be in descending order

Return values
array<string|int, mixed>

printAllDates()

Prints a compendum of dates and links to a search page that will show results of the date

printAllDates([string $class = 'archive' ][, string $yearid = 'year' ][, string $monthid = 'month' ][, string $order = 'desc' ]) : mixed
Parameters
$class : string = 'archive'

optional class

$yearid : string = 'year'

optional class for "year"

$monthid : string = 'month'

optional class for "month"

$order : string = 'desc'

set to 'desc' for the list to be in descending order

getCustomPageURL()

Produces the url to a custom page (e.g. one that is not album.php, image.php, or index.php)

getCustomPageURL(string $page[, string $q = '' ][, bool $webpath = null ]) : string
Parameters
$page : string

page name to include in URL

$q : string = ''

query string to add to url

$webpath : bool = null

host path to be prefixed. If "false" is passed you will get a localized "WEBPATH"

Return values
string

printCustomPageURL()

Prints the url to a custom page (e.g. one that is not album.php, image.php, or index.php)

printCustomPageURL(string $linktext, string $page[, string $q = '' ][, string $prev = '' ][, string $next = '' ][, string $class = NULL ]) : mixed
Parameters
$linktext : string

Text for the URL

$page : string

page name to include in URL

$q : string = ''

query string to add to url

$prev : string = ''

text to insert before the URL

$next : string = ''

text to follow the URL

$class : string = NULL

optional class

isArchive()

tests if a search page is an "archive" page

isArchive() : bool
Return values
bool

getSearchURL()

Returns a search URL

getSearchURL(mixed $words, mixed $dates, mixed $fields, int $page[, array<string|int, mixed> $object_list = NULL ]) : string
Parameters
$words : mixed

the search words target

$dates : mixed

the dates that limit the search

$fields : mixed

the fields on which to search

$page : int

the page number for the URL

$object_list : array<string|int, mixed> = NULL

the list of objects to search

Tags
since
1.1.3
deprecated
2.0
  • Use SearchEngine::getSearchURL() instead
Return values
string

printSearchForm()

Prints the search form

printSearchForm([string $prevtext = NULL ][, string $id = 'search' ][, string $buttonSource = '' ][, string $buttontext = '' ][, string $iconsource = NULL ][, array<string|int, mixed> $query_fields = NULL ][, mixed $object_list = NULL ][, string $within = NULL ][, bool $enable_fieldselector = null ]) : mixed

Search works on a list of tokens entered into the search form.

Tokens may be part of boolean expressions using &, |, !, and parens. (Comma is retained as a synonom of | for backwords compatibility.)

Tokens may be enclosed in quotation marks to create exact pattern matches or to include the boolean operators and parens as part of the tag..

Parameters
$prevtext : string = NULL

text to go before the search form

$id : string = 'search'

css id for the search form, default is 'search'

$buttonSource : string = ''

optional path to the image for the button or if not a path to an image, this will be the button hint

$buttontext : string = ''

optional text for the button ("Search" will be the default text)

$iconsource : string = NULL

optional theme based icon for the search fields toggle

$query_fields : array<string|int, mixed> = NULL

override selection for enabled fields with this list

$object_list : mixed = NULL
$within : string = NULL

set to true to search within current results, false to search fresh

$enable_fieldselector : bool = null

True|false to enable/disable the search fields selector. Default null to use the option as set

Tags
since
1.1.3

getSearchWords()

Returns the a sanitized version of the search string

getSearchWords() : string
Tags
since
1.1
Return values
string

getSearchDate()

Returns the date of the search

getSearchDate([string $format = 'F Y' ]) : string
Parameters
$format : string = 'F Y'

A datetime format, if using localized dates an ICU dateformat

Tags
since
1.1
Return values
string

checkForGuest()

returns the auth type of a guest login

checkForGuest([string &$hint = NULL ][, string &$show = NULL ]) : string
Parameters
$hint : string = NULL
$show : string = NULL
Return values
string

checkAccess()

Checks to see if a password is needed

checkAccess([string &$hint = NULL ][, bool &$show = NULL ]) : bool

Returns true if access is allowed

The password protection is hereditary. This normally only impacts direct url access to an object since if you are going down the tree you will be stopped at the first place a password is required.

Parameters
$hint : string = NULL

the password hint

$show : bool = NULL

whether there is a user associated with the password.

Tags
since
1.1.3
Return values
bool

getPageRedirect()

Returns a redirection link for the password form

getPageRedirect() : string
Return values
string

printPasswordForm()

Prints the album password form

printPasswordForm(mixed $_password_hint[, mixed $_password_showuser = NULL ][, mixed $_password_showProtected = true ][, mixed $_password_redirect = NULL ]) : mixed
Parameters
$_password_hint : mixed
$_password_showuser : mixed = NULL
$_password_showProtected : mixed = true
$_password_redirect : mixed = NULL
Tags
since
1.1.3

prints the zenphoto logo and link

printZenphotoLink() : mixed

exposeZenPhotoInformations()

Expose some informations in a HTML comment

exposeZenPhotoInformations([string $obj = '' ][, array<string|int, mixed> $plugins = '' ][, string $theme = '' ]) : mixed
Parameters
$obj : string = ''

the path to the page being loaded

$plugins : array<string|int, mixed> = ''

list of activated plugins

$theme : string = ''

The theme being used

getCodeblock()

Gets the content of a codeblock for an image, album or Zenpage newsarticle or page.

getCodeblock([int $number = 1 ][, mixed $object = NULL ]) : string

The priority for codeblocks will be (based on context) 1: articles 2: pages 3: images 4: albums 5: gallery.

This means, for instance, if we are in ZP_ZENPAGE_NEWS_ARTICLE context we will use the news article codeblock even if others are available.

Note: Echoing this array's content does not execute it. Also no special chars will be escaped. Use printCodeblock() if you need to execute script code.

Parameters
$number : int = 1

The codeblock you want to get

$object : mixed = NULL
Return values
string

printCodeblock()

Prints the content of a codeblock for an image, album or Zenpage newsarticle or page.

printCodeblock([int $number = 1 ][, mixed $what = NULL ]) : string
Parameters
$number : int = 1

The codeblock you want to get

$what : mixed = NULL

optonal object for which you want the codeblock

Return values
string

checkPageValidity()

Checks for URL page out-of-bounds for "standard" themes Note: This function assumes that an "index" page will display albums and the pagination be determined by them. Any other "index" page strategy needs to be handled by the theme itself.

checkPageValidity(bool $request, string $gallery_page, int $page) : bool
Parameters
$request : bool
$gallery_page : string
$page : int
Return values
bool

will be true if all is well, false if a 404 error should occur

print404status()

print404status(mixed $album, mixed $image, mixed $obj) : mixed
Parameters
$album : mixed
$image : mixed
$obj : mixed

getOwnerAuthor()

Gets current item's owner (gallery images and albums) or author (Zenpage articles and pages)

getOwnerAuthor([bool $fullname = false ]) : bool
Parameters
$fullname : bool = false

If the owner/author has a real user account and there is a full name set it is returned

Tags
since
1.5.2
global

obj $_zp_current_album

global

obj $_zp_current_image

global

obj $_zp_current_zenpage_page

global

obj $_zp_current_zenpage_news

Return values
bool

printOwnerAuthor()

Prints current item's owner (gallery images and albums) or author (Zenpage articles and pages)

printOwnerAuthor([type $fullname = false ]) : mixed
Parameters
$fullname : type = false
Tags
since
1.5.2

getOwnerAuthorURL()

Returns the search url for items the current item's owner (gallery) or author (Zenpage) is assigned to

getOwnerAuthorURL() : type

This eventually may return the url to an actual user profile page in the future.

Tags
since
1.5.2
Return values
type

printOwnerAuthorURL()

Prints the link to the search engine for results of all items the current item's owner (gallery) or author (Zenpage) is assigned to

printOwnerAuthorURL([type $fullname = false ][, type $resulttype = 'all' ][, type $class = null ][, type $id = null ][, type $title = null ]) : mixed

This eventually may return the url to an actual user profile page in the future.

Parameters
$fullname : type = false
$resulttype : type = 'all'
$class : type = null
$id : type = null
$title : type = null
Tags
since
1.5.2

getUserURL()

Returns a an url for the search engine for results of all items the user with $username is assigned to either as owner (gallery) or author (Zenpage) Note there is no check if the user name is actually a vaild user account name, owner or author! Use the *OwerAuthor() function for that instead

getUserURL(string $username[, string $resulttype = 'all' ]) : string|null

This eventually may return the url to an actual user profile page in the future.

Parameters
$username : string

The user name of a user. Note there is no check if the user name is actually valid!

$resulttype : string = 'all'

'all' for owner and author, 'gallery' for owner of images/albums only, 'zenpage' for author of news articles and pages

Tags
since
1.5.2
Return values
string|null

printUserURL()

Prints the link to the search engine for results of all items $username is assigned to either as owner (gallery) or author (Zenpage) Note there is no check if the user name is actually a vaild user account name, owner or author! Use the *OwerAuthor() function for that instead

printUserURL(string $username[, string $resulttype = 'all' ][, string $linktext = null ][, string $class = null ][, type $id = null ][, type $title = null ]) : mixed

This eventually may point to an actual user profile page in the future.

Parameters
$username : string

The user name of a user.

$resulttype : string = 'all'

'all' for owner and author, 'gallery' for owner of images/albums only, 'zenpage' for author of news articles and pages

$linktext : string = null

The link text. If null the user name will be used

$class : string = null

The CSS class to attach, default null.

$id : type = null

The CSS id to attach, default null.

$title : type = null

The title attribute to attach, default null so the user name is used

Tags
since
1.5.2

printCopyrightNotice()

Display the site or image copyright notice if defined and display is enabled

printCopyrightNotice([string $before = '' ][, string $after = '' ][, mixed $linked = true ][, mixed $type = 'gallery' ]) : mixed
Parameters
$before : string = ''

Text to print before it

$after : string = ''

Text to print after it Å“param bool $linked Default true to use the copyright URL if defined

$linked : mixed = true
$type : mixed = 'gallery'
Tags
since
1.5.8
since
1.6

Also handles the image copyright notice

global

obj $_zp_gallery

printGalleryCopyrightNotice()

Display the site copyright notice if defined and display is enabled

printGalleryCopyrightNotice([string $before = '' ][, string $after = '' ][, mixed $linked = true ]) : mixed
Parameters
$before : string = ''

Text to print before it

$after : string = ''

Text to print after it Å“param bool $linked Default true to use the copyright URL if defined

$linked : mixed = true
Tags
since
1.6
  • Added as shortcut to the general printCopyRightNotice

printImageCopyrightNotice()

Display the image copyright notice if defined and display iss enabled

printImageCopyrightNotice([string $before = '' ][, string $after = '' ][, mixed $linked = true ]) : mixed
Parameters
$before : string = ''

Text to print before it

$after : string = ''

Text to print after it Å“param bool $linked Default true to use the copyright URL if defined

$linked : mixed = true
Tags
since
1.6
  • Added as shortcut to the general printCopyRightNotice

getCurrentPageAppendix()

Gets the current page number if it is larger than 1 for use on paginated pages for SEO reason to avoid duplicate titles

getCurrentPageAppendix([string $before = ' (' ][, string $after = ')' ]) : string
Parameters
$before : string = ' ('

Text to add before the page number. Default ' (';

$after : string = ')'

Text to add ager the page number. Default ')';

Tags
since
1.6
Return values
string

printCurrentPageAppendix()

Prints the current page number if it is larger than 1 for use on paginated pages for SEO reason to avoid duplicate titles

printCurrentPageAppendix([string $before = ' (' ][, string $after = ')' ]) : mixed
Parameters
$before : string = ' ('

Text to add before the page number. Default ' (';

$after : string = ')'

Text to add ager the page number. Default ')';

Tags
since
1.6

gallerystats_filesize_r()

gallerystats_filesize_r(mixed $path) : mixed
Parameters
$path : mixed

printBarGraph()

Prints a table with a bar graph of the values.

printBarGraph([string $sortorder = "mostimages" ][, string_type $type = "albums" ][, mixed $from_number = 0 ][, mixed $to_number = 10 ]) : mixed
Parameters
$sortorder : string = "mostimages"

"popular", "mostrated","toprated","mostcommented" or - only if $type = "albums"! - "mostimages"

$type : string_type = "albums"

"albums", "images", "pages", "news", "tags"

$from_number : mixed = 0
$to_number : mixed = 10

printThumbNav()

Prints the jQuery bxslider HTML setup to be replaced by JS

printThumbNav([int $minitems = NULL ][, int $maxitems = NULL ][, int $width = NULL ][, int $height = NULL ][, int $cropw = NULL ][, int $croph = NULL ][, bool $fullimagelink = NULL ][, string $mode = NULL ][, int $speed = NULL ]) : mixed
Parameters
$minitems : int = NULL

The minimum number of thumbs to be visible always if resized regarding responsiveness.

$maxitems : int = NULL

The maximum number of thumbs to be visible always if resized regarding responsiveness.

$width : int = NULL

Width Set to NULL if you want to use the backend plugin options.

$height : int = NULL

Height Set to NULL if you want to use the backend plugin options.

$cropw : int = NULL

Crop width Set to NULL if you want to use the backend plugin options.

$croph : int = NULL

Crop heigth Set to NULL if you want to use the backend plugin options.

$fullimagelink : bool = NULL

Set to TRUE if you want the thumb link to link to the full image instead of the image page. Set to NULL if you want to use the backend plugin options.

$mode : string = NULL

'horizontal','vertical', 'fade'

$speed : int = NULL

The speed in miliseconds the slides advance when clicked

checkForUpdate()

Searches the zenphoto.org home page for the current zenphoto download locates the version number of the download and compares it to the version we are running.

checkForUpdate() : string
Tags
since
1.1.3
Return values
string

If there is a more current version on the WEB, returns its version number otherwise returns FALSE

admin_showupdate()

Displays the "new version available" message on admin pages

admin_showupdate(mixed $tab, unknown_type $subtab) : mixed
Parameters
$tab : mixed
$subtab : unknown_type

comment_form_PaginationJS()

comment_form_PaginationJS() : mixed

comment_form_visualEditor()

comment_form_visualEditor() : mixed

comment_form_print10Most()

Admin overview summary

comment_form_print10Most() : mixed

getCommentAddress()

Processes the post of an address

getCommentAddress(int $i) : array<string|int, mixed>
Parameters
$i : int

sequence number of the comment

Return values
array<string|int, mixed>

getCommentErrors()

Returns an error message if a comment posting was not accepted

getCommentErrors() : string
Return values
string

printCommentErrors()

Tool to output an error message if a comment posting was not accepted

printCommentErrors() : mixed

comment_form_addComment()

Generic comment adding routine. Called by album objects or image objects to add comments.

comment_form_addComment(string $name, string $email, string $website, string $comment, string $code, string $code_ok, object $receiver, string $ip, bool $private, bool $anon, string $customdata[, bit $check = false ][, bool $dataconfirmation = null ]) : object

Returns a comment object

Parameters
$name : string

Comment author name

$email : string

Comment author email

$website : string

Comment author website

$comment : string

body of the comment

$code : string

CAPTCHA code entered

$code_ok : string

CAPTCHA hash expected

$receiver : object

the object (image or album) to which to post the comment

$ip : string

the IP address of the comment poster

$private : bool

set to true if the comment is for the admin only

$anon : bool

set to true if the poster wishes to remain anonymous

$customdata : string
$check : bit = false

bitmask of which fields must be checked. If set overrides the options

$dataconfirmation : bool = null

True if data privacy confirmation required

Return values
object

commentFormUseCaptcha()

Use see if a captcha should be displayed

commentFormUseCaptcha() : bool
Return values
bool

comment_form_postcomment()

checks if comments are allowed and then processes them if so

comment_form_postcomment(string $error) : mixed
Parameters
$error : string

comment_form_handle_comment()

Handles the POSTing of a comment

comment_form_handle_comment() : null|bool
Return values
null|bool

getCommentAuthorName()

Returns the comment author's name

getCommentAuthorName() : string
Return values
string

getCommentAuthorEmail()

Returns the comment author's email

getCommentAuthorEmail() : string
Return values
string

getCommentAuthorSite()

Returns the comment author's website

getCommentAuthorSite() : string
Return values
string

Prints a link to the author

getCommentAuthorLink([string $title = NULL ][, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$title : string = NULL

URL title tag

$class : string = NULL

optional class tag

$id : string = NULL

optional id tag

Prints a link to the author

printCommentAuthorLink([string $title = NULL ][, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$title : string = NULL

URL title tag

$class : string = NULL

optional class tag

$id : string = NULL

optional id tag

getCommentDateTime()

Returns a formatted date and time for the comment.

getCommentDateTime([string $format = NULL ]) : string

Uses the "date_format" option for the formatting unless a format string is passed.

Parameters
$format : string = NULL

A datetime format, if using localized dates an ICU dateformat

Return values
string

getCommentBody()

Returns the body of the current comment

getCommentBody() : string
Return values
string

Creates a link to the admin comment edit page for the current comment

printEditCommentLink(string $text[, string $before = '' ][, string $after = '' ][, string $title = NULL ][, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$text : string

Link text

$before : string = ''

text to go before the link

$after : string = ''

text to go after the link

$title : string = NULL

title text

$class : string = NULL

optional css clasee

$id : string = NULL

optional css id

getLatestComments()

Gets latest comments for images, albums, news and pages

getLatestComments(int $number[, string $type = "all" ][, int $id = NULL ]) : mixed
Parameters
$number : int

how many comments you want.

$type : string = "all"

"all" for all latest comments of all images, albums, news and pages an array of table items e.g. array('images','albums') for all images, albums, news and pages "image" for the lastest comments of one specific image "album" for the latest comments of one specific album "news" for the latest comments of one specific news article "page" for the latest comments of one specific Page

$id : int = NULL

the record id of element to get the comments for if $type != "all"

printLatestComments()

Prints latest comments for images, albums, news and pages

printLatestComments(int $number[, int $shorten = '123' ][, string $type = "all" ][, int $item = NULL ][, string $ulid = 'showlatestcomments' ][, string $shortenindicator = '...' ]) : mixed
Parameters
$number : int

how many comments you want.

$shorten : int = '123'

how many characters you want to show in the excerpt.

$type : string = "all"

"all" for all latest comments of all images, albums, news and pages an array of table items e.g. array('images','albums', 'news', 'pages') for all images, albums, news and pages "image" for the lastest comments of one specific image "album" for the latest comments of one specific album "news" for the latest comments of one specific news article "page" for the latest comments of one specific Page

$item : int = NULL

the record id of element to get the comments for if $type != "all".

$ulid : string = 'showlatestcomments'

id for the

    element.

$shortenindicator : string = '...'

indicator to show that the string is truncated.

getCommentCount()

Retuns the count of comments on the current image

getCommentCount() : int
Return values
int

next_comment()

Iterate through comments; use the ZP_COMMENT context.

next_comment([bool $desc = false ]) : bool

Return true if there are more comments

Parameters
$desc : bool = false

set true for desecnding order

Return values
bool

getCommentStored()

Returns the data from the last comment posted

getCommentStored([bool $numeric = false ]) : array<string|int, mixed>
Parameters
$numeric : bool = false

Set to true for old themes to get 0->6 indices rather than descriptive ones

Return values
array<string|int, mixed>

commentReply()

Takes a comment and makes the body of an email.

commentReply(obj $obj, string $author, string $fullcomment) : string
Parameters
$obj : obj

Object of the item commented on

$author : string

Comment author

$fullcomment : string

The comment itself

Return values
string

commentsAllowed()

Returns true if all the right conditions are set to allow comments for the $type

commentsAllowed(string $type) : bool
Parameters
$type : string

Which comments

Return values
bool

getComments()

Gets an array of comments for the current admin

getComments(int $number) : array<string|int, mixed>
Parameters
$number : int

how many comments desired

Tags
since
1.6
  • Renamed from fetchComments()
Return values
array<string|int, mixed>

fetchComments()

Gets an array of comments for the current admin

fetchComments(int $number) : array<string|int, mixed>
Parameters
$number : int

how many comments desired

Tags
deprecated
2.0
  • Use getComments() instead
Return values
array<string|int, mixed>

printCommentForm()

Prints a form for posting comments

printCommentForm([bool $showcomments = true ][, string $addcommenttext = NULL ][, bool $addheader = true ][, string $comment_commententry_mod = '' ][, bool $desc_order = false ]) : mixed
Parameters
$showcomments : bool = true

defaults to true for showing list of comments

$addcommenttext : string = NULL

alternate text for "Add a comment:"

$addheader : bool = true

set true to display comment count header

$comment_commententry_mod : string = ''

use to add styles, classes to the comment form div

$desc_order : bool = false

default false, set to true to change the comment order to descending ( = newst to oldest)

getField()

Retrieves the post field if it exists

getField(string $field[, int $level = 3 ]) : string
Parameters
$field : string
$level : int = 3
Return values
string

printContactForm()

Prints the mail contact form, handles checks and the mail sending. It uses Zenphoto's check for valid e-mail address and website URL and also supports CAPTCHA.

printContactForm([string $subject_override = '' ]) : mixed

The contact form itself is a separate file and is located within the /contact_form/form.php so that it can be style as needed.

Parameters
$subject_override : string = ''

set to override the subject.

showOrNotShowField()

Helper function that checks if a field should be shown ("required" or "show") or omitted ("ommitt").

showOrNotShowField(string $option) : bool

Only for the fields set by radioboxes.

Parameters
$option : string

The option value

Return values
bool

checkRequiredField()

Helper function that checks if the field is a required one. If it returns '*" to be appended to the field name as an indicator.

checkRequiredField(string $option) : string

Not for the CAPTCHA field that is always required if shown...

Parameters
$option : string

the option value

Return values
string

printContactFormMacro()

Buffers the contact form print out so it can be passed to its content macro

printContactFormMacro([type $subject_override = '' ]) : type
Parameters
$subject_override : type = ''
Return values
type

getContactFormMacros()

Registers the content macro(s)

getContactFormMacros(array<string|int, mixed> $macros) : array<string|int, mixed>
Parameters
$macros : array<string|int, mixed>

Passes through the array of already registered

Return values
array<string|int, mixed>

defaultCodeblocks_codebox()

defaultCodeblocks_codebox(mixed $current, mixed $object, mixed $number) : mixed
Parameters
$current : mixed
$object : mixed
$number : mixed

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

printBarGraph()

Prints a table with a bar graph of the values.

printBarGraph() : mixed

printdownloadList()

Prints the actual download list included all subfolders and files

printdownloadList([string $dir = '' ][, string $listtype = 'ol' ][, array<string|int, mixed> $filters = array() ][, array<string|int, mixed> $excludesuffixes = '' ][, string $sort = 'desc' ]) : mixed
Parameters
$dir : string = ''

An optional different folder to generate the list that overrides the folder set on the option.

$listtype : string = 'ol'

"ol" or "ul" for the type of HTML list you want to use

$filters : array<string|int, mixed> = array()

an array of files to exclude from the list. Standard items are Array( '.', '..','.DS_Store','Thumbs.db','.htaccess','.svn')

$excludesuffixes : array<string|int, mixed> = ''

an array of file suffixes (without trailing dot to exclude from the list (e.g. "jpg")

$sort : string = 'desc'

'asc" or "desc" (default) for alphabetical ascending or descending list

getdownloadList()

Gets the actual download list included all subfolders and files

getdownloadList(string $dir8, array<string|int, mixed> $filters8, array<string|int, mixed> $excludesuffixes, string $sort) : array<string|int, mixed>
Parameters
$dir8 : string

An optional different folder to generate the list that overrides the folder set on the option. This could be a subfolder of the main download folder set on the plugin's options. You have to include the base directory as like this: "folder" or "folder/subfolder" or "../folder" You can also set any folder within or without the root of your Zenphoto installation as a download folder with this directly

$filters8 : array<string|int, mixed>

an array of files to exclude from the list. Standard items are '.', '..','.DS_Store','Thumbs.db','.htaccess','.svn'

$excludesuffixes : array<string|int, mixed>

an array of file suffixes (without trailing dot to exclude from the list (e.g. "jpg")

$sort : string

'asc" or "desc" (default) for alphabetical ascending or descending list

Return values
array<string|int, mixed>

getDownloadURL()

Gets the download url for a file

getDownloadURL(string $file) : mixed
Parameters
$file : string

the path to a file to get a download link.

printDownloadURL()

Prints a download link for a file, depending on the plugin options including the downloadcount and filesize

printDownloadURL(string $file[, string $linktext = NULL ]) : mixed
Parameters
$file : string

the path to a file to print a download link.

$linktext : string = NULL

Optionally how you wish to call the link. Set/leave to NULL to use the filename.

printFullImageDownloadURL()

Prints the dwnload url link for a full image

printFullImageDownloadURL([string $linktext = null ][, obj $imageobj = null ]) : mixed
Parameters
$linktext : string = null

Linktext for the download

$imageobj : obj = null

Optional image object to use, otherwise the current image if available

Tags
since
1.5.7
global

type $_zp_current_image

printDownloadAlbumZipURL()

Prints a download link for an album zip of the current album (therefore to be used only on album.php/image.php).

printDownloadAlbumZipURL([string $linktext = NULL ][, object $albumobj = NULL ][, bool $fromcache = NULL ]) : mixed

This function only creates a download count and then redirects to the original Zenphoto album zip download.

Parameters
$linktext : string = NULL
$albumobj : object = NULL
$fromcache : bool = NULL

if true get the images from the cache

printLanguageSelector()

prints a form for selecting a locale The POST handling is by getUserLocale() called in functions.php

printLanguageSelector([mixed $flags = NULL ]) : mixed
Parameters
$flags : mixed = NULL

elFinderAutoloader()

elFinderAutoloader(mixed $name) : mixed
Parameters
$name : mixed

access()

Simple function to demonstrate how to control file access using "accessControl" callback.

access(string $attr, string $path, mixed $data, mixed $volume) : bool|null

This method will disable accessing files/folders starting from '.' (dot)

Parameters
$attr : string

attribute name (read|write|locked|hidden)

$path : string

file path relative to volume root directory started with directory separator

$data : mixed
$volume : mixed
Return values
bool|null

accessImage()

accessImage(mixed $attr, mixed $path, mixed $data, mixed $volume) : mixed
Parameters
$attr : mixed
$path : mixed
$data : mixed
$volume : mixed

accessAlbums()

accessAlbums(mixed $attr, mixed $path, mixed $data, mixed $volume) : mixed
Parameters
$attr : mixed
$path : mixed
$data : mixed
$volume : mixed

imagecreatefrombmp()

imagecreatefrombmp(mixed $filename_or_stream_or_binary) : mixed
Parameters
$filename_or_stream_or_binary : mixed

elFinder_admin_tabs()

elFinder_admin_tabs(mixed $tabs) : mixed
Parameters
$tabs : mixed

elFinder_tinymce()

elFinder_tinymce(mixed $discard) : mixed
Parameters
$discard : mixed

printAddToFavorites()

printAddToFavorites(mixed $obj[, mixed $add = NULL ][, mixed $remove = NULL ]) : mixed
Parameters
$obj : mixed
$add : mixed = NULL
$remove : mixed = NULL

printFavoritesURL()

Prints links to the favorites "albums"

printFavoritesURL([type $text = NULL ][, mixed $before = NULL ][, mixed $between = NULL ][, mixed $after = NULL ]) : mixed
Parameters
$text : type = NULL
$before : mixed = NULL
$between : mixed = NULL
$after : mixed = NULL
Tags
global

favorites $_zp_myfavorites

log_message()

log_message(mixed $class, mixed $msg) : mixed
Parameters
$class : mixed
$msg : mixed

getGeoCoord()

$returns coordinate informations for an image

getGeoCoord( $image) : mixed
Parameters
$image :

image object

addGeoCoord()

Add a point to a map object

addGeoCoord( $map,  $coord) : mixed
Parameters
$map :

google map object

$coord :

coordinates array

getImageGeodata()

Gathers the data for an image

getImageGeodata( $image,  $map) : mixed
Parameters
$image :

image object

$map :

google map object

getAlbumGeodata()

Gathers the map data for an album

getAlbumGeodata( $album,  $map) : mixed
Parameters
$album :

album object

$map :

google map object

printGoogleMap()

Output the google map

printGoogleMap([string $text = NULL ][, string $id = NULL ][, string $hide = NULL ][, object $obj = NULL ][, function $callback = NULL ]) : mixed
Parameters
$text : string = NULL

text for the "toggle" link that shows/hides the map. Set empty to omit (then Map is always displayed)

$id : string = NULL

used to set the IDs for the toggle href element ($id_toggle) and the map element ($id_data)

$hide : string = NULL

initial map state: "hide", "show", or "colorbox"

$obj : object = NULL

optional image/album object. Pass string for generic map and use callback to set points

$callback : function = NULL

optional callback function to set map options.

getHitcounter()

returns the hitcounter for the current page or for the object passed

getHitcounter([object $obj = NULL ]) : string
Parameters
$obj : object = NULL

the album or page object for which the hitcount is desired

Return values
string

getTotalHitcounter()

Gets the total hitcounter sum of one or several items

getTotalHitcounter([array<string|int, mixed> $items = array() ]) : int
Parameters
$items : array<string|int, mixed> = array()

an array with one or more item table names, e.g. array('albums', 'images', 'news', 'news_categories', 'pages')

Tags
author

Malte Müller (acrylian)

since
1.5.3
Return values
int

getAlbumStatistic()

Returns a array of album objects of album statistic accordingly to $option

getAlbumStatistic([int $number = 5 ][, string $option = '' ][, string $albumfolder = '' ][, int $threshold = 0 ][, mixed $sortdirection = 'desc' ][, bool $collection = false ]) : array<string|int, mixed>
Parameters
$number : int = 5

the number of albums to get

$option : string = ''

"popular" for the most popular albums, "latest" for the latest uploaded by id (Discovery) "latest-date" for the latest by date "latest-mtime" for the latest by mtime "latest-publishdate" for the latest by publishdate "mostrated" for the most voted, "toprated" for the best voted "latestupdated" for the latest updated "random" for random order (yes, strictly no statistical order...)

$albumfolder : string = ''

The name of an album to get only the statistc for its direct subalbums

$threshold : int = 0

the minimum number of ratings (for rating options) or hits (for popular option) an album must have to be included in the list. (Default 0)

$sortdirection : mixed = 'desc'
$collection : bool = false

only if $albumfolder is set: true if you want to get statistics to include all subalbum levels

Return values
array<string|int, mixed>

printAlbumStatistic()

Prints album statistic according to $option as an unordered HTML list A css id is attached by default named '$option_album'

printAlbumStatistic(string $number, string $option[, bool $showtitle = false ][, bool $showdate = false ][, bool $showdesc = false ][, int $desclength = 40 ][, string $showstatistic = '' ][, int $width = NULL ][, int $height = NULL ][, bool $crop = NULL ][, mixed $albumfolder = '' ][, mixed $firstimglink = false ][, int $threshold = 0 ][, bool $collection = false ]) : mixed
Parameters
$number : string

the number of albums to get

$option : string

"popular" for the most popular albums, "latest" for the latest uploaded by id (Discovery) "latest-date" for the latest by date "latest-mtime" for the latest by mtime "latest-publishdate" for the latest by publishdate "mostrated" for the most voted, "toprated" for the best voted "latestupdated" for the latest updated "random" for random order (yes, strictly no statistical order...)

$showtitle : bool = false

if the album title should be shown

$showdate : bool = false

if the album date should be shown

$showdesc : bool = false

if the album description should be shown

$desclength : int = 40

the length of the description to be shown

$showstatistic : string = ''

"hitcounter" for showing the hitcounter (views), "rating" for rating, "rating+hitcounter" for both.

$width : int = NULL

the width/cropwidth of the thumb if crop=true else $width is longest size. (Default 85px)

$height : int = NULL

the height/cropheight of the thumb if crop=true else not used. (Default 85px)

$crop : bool = NULL

'true' (default) if the thumb should be cropped, 'false' if not

$albumfolder : mixed = ''
$firstimglink : mixed = false
$threshold : int = 0

the minimum number of ratings (for rating options) or hits (for popular option) an album must have to be included in the list. (Default 0)

$collection : bool = false

only if $albumfolder is set: true if you want to get statistics to include all subalbum levels

printAlbumStatisticItem()

A helper function that only prints a item of the loop within printAlbumStatistic() Not for standalone use.

printAlbumStatisticItem(array<string|int, mixed> $album, string $option[, bool $showtitle = false ][, bool $showdate = false ][, bool $showdesc = false ][, int $desclength = 40 ][, string $showstatistic = '' ][, int $width = NULL ][, int $height = NULL ][, bool $crop = NULL ][, bool $firstimglink = false ]) : mixed
Parameters
$album : array<string|int, mixed>

the array with album objects that getAlbumsStatistic() submitted

$option : string

"popular" for the most popular albums, "latest" for the latest uploaded by id (Discovery) "latest-date" for the latest by date "latest-mtime" for the latest by mtime "latest-publishdate" for the latest by publishdate "mostrated" for the most voted, "toprated" for the best voted "latestupdated" for the latest updated "random" for random order (yes, strictly no statistical order...)

$showtitle : bool = false

if the album title should be shown

$showdate : bool = false

if the album date should be shown

$showdesc : bool = false

if the album description should be shown

$desclength : int = 40

the length of the description to be shown

$showstatistic : string = ''

"hitcounter" for showing the hitcounter (views), "rating" for rating, "rating+hitcounter" for both.

$width : int = NULL

the width/cropwidth of the thumb if crop=true else $width is longest size. (Default 85px)

$height : int = NULL

the height/cropheight of the thumb if crop=true else not used. (Default 85px)

$crop : bool = NULL

'true' (default) if the thumb should be cropped, 'false' if not

$firstimglink : bool = false

'false' (default) if the album thumb link should lead to the album page, 'true' if to the first image of theh album if the album itself has images

getImageStatistic()

Returns a array of image objects of image statistic according to $option

getImageStatistic(string $number, string $option[, string $albumfolder = '' ][, bool $collection = false ][, int $threshold = 0 ][, mixed $sortdirection = 'desc' ]) : array<string|int, mixed>
Parameters
$number : string

the number of images to get

$option : string

"popular" for the most popular images, "popular" for the most popular albums, "latest" for the latest uploaded by id (Discovery) "latest-date" for the latest by date "latest-mtime" for the latest by mtime "latest-publishdate" for the latest by publishdate "mostrated" for the most voted, "toprated" for the best voted "latestupdated" for the latest updated "random" for random order (yes, strictly no statistical order...)

$albumfolder : string = ''

foldername of an specific album

$collection : bool = false

only if $albumfolder is set: true if you want to get statistics from this album and all of its subalbums

$threshold : int = 0

the minimum number of ratings (for rating options) or hits (for popular option) an image must have to be included in the list. (Default 0)

$sortdirection : mixed = 'desc'
Return values
array<string|int, mixed>

printImageStatistic()

Prints image statistic according to $option as an unordered HTML list A css id is attached by default named accordingly'$option'

printImageStatistic(string $number, string $option[, string $albumfolder = '' ][, bool $showtitle = false ][, bool $showdate = false ][, bool $showdesc = false ][, int $desclength = 40 ][, string $showstatistic = '' ][, int $width = NULL ][, int $height = NULL ][, bool $crop = NULL ][, bool $collection = false ][, bool $fullimagelink = false ][, int $threshold = 0 ]) : string
Parameters
$number : string

the number of albums to get

$option : string

"popular" for the most popular images, "popular" for the most popular albums, "latest" for the latest uploaded by id (Discovery) "latest-date" for the latest by date "latest-mtime" for the latest by mtime "latest-publishdate" for the latest by publishdate "mostrated" for the most voted, "toprated" for the best voted "latestupdated" for the latest updated "random" for random order (yes, strictly no statistical order...)

$albumfolder : string = ''

foldername of an specific album

$showtitle : bool = false

if the image title should be shown

$showdate : bool = false

if the image date should be shown

$showdesc : bool = false

if the image description should be shown

$desclength : int = 40

the length of the description to be shown

$showstatistic : string = ''

"hitcounter" for showing the hitcounter (views), "rating" for rating, "rating+hitcounter" for both.

$width : int = NULL

the width/cropwidth of the thumb if crop=true else $width is longest size. (Default 85px)

$height : int = NULL

the height/cropheight of the thumb if crop=true else not used. (Default 85px)

$crop : bool = NULL

'true' (default) if the thumb should be cropped, 'false' if not

$collection : bool = false

only if $albumfolder is set: true if you want to get statistics from this album and all of its subalbums

$fullimagelink : bool = false

'false' (default) for the image page link , 'true' for the unprotected full image link (to use Colorbox for example)

$threshold : int = 0

the minimum number of ratings (for rating options) or hits (for popular option) an image must have to be included in the list. (Default 0)

Return values
string

checkIfNew()

A little helper function that checks if an image or album is to be considered 'new' within the time range set in relation to getImageDate()/getAlbumDate() Returns true or false.

checkIfNew([string $mode = "image" ][, int $timerange = 604800 ]) : bool
Parameters
$mode : string = "image"

What to check "image" or "album".

$timerange : int = 604800

The time range the item should be considered new. Default is 604800 (unix time seconds = ca. 7 days)

Return values
bool

getNumAllSubalbums()

Gets the number of all subalbums of all subalbum levels of either the current album or $albumobj

getNumAllSubalbums(object $albumobj[, string $pre = '' ]) : bool
Parameters
$albumobj : object

Optional album object to check

$pre : string = ''

Optional text you want to print before the number

Return values
bool

getPictureOfTheDay()

Returns an randomly selected image objecet from the gallery per day.

getPictureOfTheDay([string $albumfolder = '' ][, bool $collection = false ]) : object|nill

Returns null on failure

Parameters
$albumfolder : string = ''

foldername of an specific album. If not set from all images in the gallery

$collection : bool = false

only if $albumfolder is set: true if you want to get statistics from this album and all of its subalbums

Tags
since
1.5.8
Return values
object|nill

getjPlayerSkins()

Gets the skin names and css files

getjPlayerSkins() : mixed

getjPlayerSkinCSS()

Gets the css files for a skin. Helper function for getjPlayerSkins().

getjPlayerSkinCSS(mixed $skins, mixed $dir) : mixed
Parameters
$skins : mixed
$dir : mixed

printjPlayerPlaylist()

printjPlayerPlaylist([mixed $option = "playlist" ][, mixed $albumfolder = "" ]) : mixed
Parameters
$option : mixed = "playlist"
$albumfolder : mixed = ""

macro_admin_tabs()

macro_admin_tabs(mixed $tabs) : mixed
Parameters
$tabs : mixed

macroList_show()

macroList_show(mixed $macro, mixed $detail) : mixed
Parameters
$macro : mixed
$detail : mixed

markRelease_button()

markRelease_button(mixed $buttons) : mixed
Parameters
$buttons : mixed

printItemsListTable()

Prints the table part of a single page item for the sortable pages list

printItemsListTable(mixed $item, bool $flag) : mixed
Parameters
$item : mixed
$flag : bool

set to true to flag the element as having a problem with nesting level

printItemsList()

Prints the sortable pages list returns true if nesting levels exceede the database container

printItemsList(mixed $items) : bool
Parameters
$items : mixed
Return values
bool

Prints the link to the edit page of a menu item. For gallery and Zenpage items it links to their normal edit pages, for custom pages and custom links to menu specific edit page.

printItemEditLink(array<string|int, mixed> $item) : mixed
Parameters
$item : array<string|int, mixed>

Array of the menu item

printItemStatusDropdown()

Prints the item status selector to choose if all items or only hidden or visible should be listed

printItemStatusDropdown() : mixed

getMenuSetSelector()

returns the menu set selector

getMenuSetSelector(string $active) : mixed
Parameters
$active : string

true if changing the selection shuld reload to the new selection

publishItem()

Sets a menu item to published/visible

publishItem(int $id, string $show, string $menuset) : mixed
Parameters
$id : int

id of the item

$show : string

published status.

$menuset : string

chosen menu set

addSubalbumMenus()

adds (sub)albums to menu base with their gallery sorting order intact

addSubalbumMenus(string $menuset, int $id, string $link, string $sort) : mixed
Parameters
$menuset : string

chosen menu set

$id : int

table id of the parent.

$link : string

folder name of the album

$sort : string

xxx-xxx-xxx style sort order for album

addalbumsToDatabase()

Adds albums to the menu set. Returns the next sort order base

addalbumsToDatabase(string $menuset[, string $base = NULL ]) : int
Parameters
$menuset : string

current menu set

$base : string = NULL

starting "sort order"

Return values
int

addPagesToDatabase()

Adds Zenpage pages to the menu set

addPagesToDatabase(string $menuset[, mixed $base = NULL ]) : int
Parameters
$menuset : string

current menu set

$base : mixed = NULL
Return values
int

addCategoriesToDatabase()

Adds Zenpage news categories to the menu set

addCategoriesToDatabase(string $menuset[, mixed $base = NULL ]) : mixed
Parameters
$menuset : string

chosen menu set

$base : mixed = NULL

addItem()

Adds an menu item set via POST

addItem(mixed &$reports) : array<string|int, mixed>
Parameters
$reports : mixed
Return values
array<string|int, mixed>

updateMenuItem()

Updates a menu item (custom link, custom page only) set via POST

updateMenuItem(mixed &$reports) : mixed
Parameters
$reports : mixed

printAlbumsSelector()

Prints all albums of the Zenphoto gallery as a partial drop down menu (<option></option> parts).

printAlbumsSelector(string $current) : string
Parameters
$current : string

set to the album name selected (if any)

Return values
string

printZenpagePagesSelector()

Prints all available pages in Zenpage

printZenpagePagesSelector(string $current) : string
Parameters
$current : string

set to the page selected (if any)

Return values
string

printZenpageNewsCategorySelector()

Prints all available articles or categories in Zenpage

printZenpageNewsCategorySelector(string $current) : string
Parameters
$current : string

set to category selected (if any)

Return values
string

printCustomPageSelector()

Prints the selector for custom pages

printCustomPageSelector(mixed $current) : string
Parameters
$current : mixed
Return values
string

unpublishedZenphotoItemCheck()

checks if a album or image is un-published and returns a '*'

unpublishedZenphotoItemCheck(mixed $obj[, mixed $dropdown = true ]) : string
Parameters
$obj : mixed
$dropdown : mixed = true
Return values
string

menu_admin_toolbox_global()

Add menu to the admin toolbox

menu_admin_toolbox_global(mixed $zf) : mixed
Parameters
$zf : mixed

menu_tabs()

Adds menu manager to admin tabs

menu_tabs( $tabs) : unknown
Parameters
$tabs :

array Admin tabs

Return values
unknown

getMenuItems()

Gets the menu items

getMenuItems(string $menuset, string $visible) : array<string|int, mixed>
Parameters
$menuset : string

the menu tree desired

$visible : string
Return values
array<string|int, mixed>

getItem()

Gets a menu item by its id

getItem(int $id) : array<string|int, mixed>
Parameters
$id : int

id of the item

Return values
array<string|int, mixed>

checkChosenMenuset()

Checks which menu set is chosen via $_GET. If none is explicity chosen the "default" one (create initially) is used.

checkChosenMenuset([mixed $default = 'default' ]) : string
Parameters
$default : mixed = 'default'
Return values
string

checkChosenItemStatus()

Checks if the menu item is set visible or not

checkChosenItemStatus() : string
Return values
string

getItemTitleAndURL()

Gets the title, url and name of a menu item

getItemTitleAndURL(mixed $item) : array<string|int, mixed>
Parameters
$item : mixed
Return values
array<string|int, mixed>

getMenuVisibility()

Gets the menu visibility

getMenuVisibility() : string
Return values
string

inventMenuItem()

"invents" a menu item for the current page (for when one does not exist) Adds the item to the current menuset and modifies its "parent" as needed

inventMenuItem(string $menuset, string $visibility[, string $field = 'sort_order' ]) : int|array<string|int, mixed>|string

returns a contrived sort_order for the item.

Parameters
$menuset : string
$visibility : string
$field : string = 'sort_order'

The field of the array item to get, "all" for the full item array, "key" for the array index of the item within the items array (old default value)

Return values
int|array<string|int, mixed>|string

getCurrentMenuItem()

Returns the data of the current menu item

getCurrentMenuItem(string $menuset[, string $field = 'sort_order' ]) : int|array<string|int, mixed>|string
Parameters
$menuset : string

current menu set

$field : string = 'sort_order'

The field of the array item to get, "all" for the full item array, "key" for the array index of the item within the items array (old default value). Default 'sort_order'

Tags
since
1.5.7

Return values changed to match function name and doc, parameter $field added to help

Return values
int|array<string|int, mixed>|string

getMenumanagerPredicessor()

Returns the link to the predicessor of the current menu item

getMenumanagerPredicessor([string $menuset = 'default' ]) : string
Parameters
$menuset : string = 'default'

current menu set

Return values
string

Prints the previous link of the current menu item

printMenumanagerPrevLink(string $text[, string $menuset = 'default' ][, string $title = NULL ][, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$text : string
$menuset : string = 'default'
$title : string = NULL
$class : string = NULL
$id : string = NULL

getMenumanagerSuccessor()

Returns the successor link of the current menu item

getMenumanagerSuccessor([string $menuset = 'default' ]) : string
Parameters
$menuset : string = 'default'
Return values
string

Gets the link to the next menu item

printMenumanagerNextLink(string $text[, string $menuset = 'default' ][, string $title = NULL ][, string $class = NULL ][, string $id = NULL ]) : mixed
Parameters
$text : string
$menuset : string = 'default'

current menu set

$title : string = NULL
$class : string = NULL
$id : string = NULL

printMenuemanagerPageListWithNav()

Prints a list of all pages.

printMenuemanagerPageListWithNav(string $prevtext, mixed $nexttext[, string $menuset = 'default' ][, string $class = 'pagelist' ][, string $nextprev = true ][, string $id = NULL ][, bool $firstlast = true ][, int $navlen = 9 ]) : mixed
Parameters
$prevtext : string

Insert here the linktext like 'previous page'

$nexttext : mixed
$menuset : string = 'default'

current menu set

$class : string = 'pagelist'

the css class to use, "pagelist" by default

$nextprev : string = true

set to true to get the 'next' and 'prev' links printed

$id : string = NULL

the css id to use

$firstlast : bool = true

Add links to the first and last pages of you gallery

$navlen : int = 9

Number of navigation links to show (0 for all pages). Works best if the number is odd.

printMenuemanagerPageList()

Prints a full page navigation including previous and next page links with a list of all pages in between.

printMenuemanagerPageList([mixed $menuset = 'default' ][, string $class = 'pagelist' ][, string $id = NULL ][, bool $firstlast = true ][, int $navlen = 9 ]) : mixed
Parameters
$menuset : mixed = 'default'
$class : string = 'pagelist'

Insert here the CSS-class name you want to style the link with (default is "pagelist")

$id : string = NULL

Insert here the CSS-ID name if you want to style the link with this

$firstlast : bool = true

Add links to the first and last pages of you gallery

$navlen : int = 9

Number of navigation links to show (0 for all pages). Works best if the number is odd.

getParentMenuItems()

Gets the parent menu items of the current menu item. Returns the array of the items or false.

getParentMenuItems([string $menuset = 'default' ][, array<string|int, mixed> $currentitem = null ]) : array<string|int, mixed>|false
Parameters
$menuset : string = 'default'

current menu set

$currentitem : array<string|int, mixed> = null

Optional array of the menu item to get parents of. Default null for the current item

Return values
array<string|int, mixed>|false

printMenumanagerBreadcrumb()

Prints the breadcrumbs of the current page

printMenumanagerBreadcrumb([string $menuset = 'default' ][, string $before = '' ][, string $between = ' | ' ][, string $after = ' | ' ]) : mixed

NOTE: this function is entirely dependedn on the menu tree you have generated. It will work only with static menu trees. That is, if the page upon which you call this function is not present in your menu tree it will not have any parent pages. Thus, menu items generated for instance by function calls cannot have parents in the printMenumanagerBreadcrumb sense.

Likewise if you have non exclusive menu links to a page the parentage of that page with respect to breadcrumbs may not reflect on the menu transitions that the user used to arrive on the page.

Parameters
$menuset : string = 'default'

current menu set

$before : string = ''

before text

$between : string = ' | '

between text

$after : string = ' | '

after text

Returns the menu item corresponding to $link

getMenuFromLink(string $link[, string $menuset = 'default' ]) : array<string|int, mixed>
Parameters
$link : string
$menuset : string = 'default'
Return values
array<string|int, mixed>

submenuOf()

Returns true if the current menu item is a sub item of $link

submenuOf(string $link[, string $menuset = 'default' ]) : bool
Parameters
$link : string

possible parent

$menuset : string = 'default'

current menuset

Return values
bool

createMenuIfNotExists()

Creates a menu set from the items passed. But only if the menu set does not already exist

createMenuIfNotExists(array<string|int, mixed> $menuitems[, string $menuset = 'default' ]) : mixed
Parameters
$menuitems : array<string|int, mixed>

items for the menuset array elements: 'type'=>menuset type 'title'=>title for the menu item 'link'=>URL or other data for the item link 'show'=>set to 1:"visible" or 0:"hidden", 'nesting'=>nesting level of this item in the menu heirarchy

$menuset : string = 'default'

current menuset

getMenuItemChilds()

Gets the direct child menu items of the current menu item. Returns the array of the items or false.

getMenuItemChilds([string $menuset = 'default' ][, bool $allchilds = false ][, mixed $currentitem = null ]) : array<string|int, mixed>|false
Parameters
$menuset : string = 'default'

current menu set

$allchilds : bool = false

Set to false (default) for the next level childs, true for childs of all further levels

$currentitem : mixed = null
Return values
array<string|int, mixed>|false

isCurrentitemParent()

Checks if the item $item is a parent item of the current item

isCurrentitemParent([string $menuset = 'default' ][, array<string|int, mixed> $item = array() ]) : bool
Parameters
$menuset : string = 'default'

Name of the menuset to use

$item : array<string|int, mixed> = array()

Array of the item to check

Return values
bool

isPublicMenuItem()

Checks if the actual object the menu item represents is actually public

isPublicMenuItem(string $menuset, array<string|int, mixed> $item, array<string|int, mixed> $itemarray) : bool
Parameters
$menuset : string
$item : array<string|int, mixed>

The menu item array of the menu item to check

$itemarray : array<string|int, mixed>

The item array of the menu item to check as returned by getItemTitleAndURL()

Tags
since
1.6.1
Return values
bool

printCustomMenu()

Prints a context sensitive menu of all pages as a unordered html list

printCustomMenu([string $menuset = 'default' ][, string $option = 'list' ][, string $css_id = '' ][, string $css_class_topactive = '' ][, string $css_class = '' ][, string $css_class_active = '' ][, int $showsubs = 0 ][, bool $counter = false ]) : string
Parameters
$menuset : string = 'default'

the menu tree to output

$option : string = 'list'

The mode for the menu: "list" context sensitive toplevel plus sublevel pages, "list-top" only top level pages, "omit-top" only sub level pages "list-sub" lists only the current pages direct offspring

$css_id : string = ''

CSS id of the top level list

$css_class_topactive : string = ''

class of the active item in the top level list

$css_class : string = ''

CSS class of the sub level list(s)

$css_class_active : string = ''

CSS class of the sub level list(s)

$showsubs : int = 0

Set to depth of sublevels that should be shown always. 0 by default. To show all, set to a true! Only valid if option=="list".

$counter : bool = false

TRUE (FALSE default) if you want the count of articles for Zenpage news categories or images/subalbums for albums.

Return values
string

getSelectedLayout()

Gets the selected layout page for this item. Returns false if nothing is selected.

getSelectedLayout(object $obj, string $type) : string|false
Parameters
$obj : object

the object being selected

$type : string

For Zenphoto gallery items "multiple_layouts_albums", 'multiple_layouts_albums_images', 'multiple_layouts_images' For Zenpage CMS items , "multiple_layouts_pages", , "multiple_layouts_news" , "multiple_layouts_news_categories"

Return values
string|false

checkParentLayouts()

Checks if there is a layout inherited from a parent items (album, page or category) and returns it. Returns false otherwise.

checkParentLayouts(object $obj, string $type) : array<string|int, mixed>|false
Parameters
$obj : object

the object being selected

$type : string

For Zenphoto gallery items "multiple_layouts_albums", 'multiple_layouts_albums_images', 'multiple_layouts_images' For Zenpage CMS items , "multiple_layouts_pages", , "multiple_layouts_news" , "multiple_layouts_news_categories"

Return values
array<string|int, mixed>|false

checkLayoutUseForImages()

Gets the selected layout page for images if the album option to use the equivalent of their album layout is seleted.

checkLayoutUseForImages(object $obj) : array<string|int, mixed>|false
Parameters
$obj : object

the album

Return values
array<string|int, mixed>|false

layoutSelector()

returns the layout selector for an object.

layoutSelector(mixed $html, object $obj[, mixed $prefix = '' ]) : string
Parameters
$html : mixed
$obj : object
$prefix : mixed = ''
Return values
string

layoutSelector_album()

returns the layout selectors for an album.

layoutSelector_album(mixed $html, object $obj[, mixed $prefix = '' ]) : string
Parameters
$html : mixed
$obj : object
$prefix : mixed = ''
Tags
parem

string $prefix

Return values
string

getLayoutSelector()

Worker function for creating layout selectors. Returns the HTML

getLayoutSelector(object $obj, string $type, string $text[, string $prefix = '' ][, bool $secondary = false ]) : string
Parameters
$obj : object
$type : string
$text : string
$prefix : string = ''

Default empty

$secondary : bool = false

Default false

Return values
string

getLayout()

Gets the select layout page and returns it to the load_theme_script filter

getLayout(string $path) : string
Parameters
$path : string

Path of the layout file

Return values
string

saveLayoutSelection()

Saves the layout page assignment via filter on the backend

saveLayoutSelection(string $message, object $obj) : string
Parameters
$message : string

Message (not used)

$obj : object

Object of the item to assign the layout

Return values
string

saveZenphotoLayoutSelection()

Saves the layout page assignment via filter on the backend for images and albums

saveZenphotoLayoutSelection(object $obj, string $prefix) : string
Parameters
$obj : object

Object of the item to assign the layout

$prefix : string
Return values
string

deleteLayoutSelection()

processes object removals if they have been assigned layouts

deleteLayoutSelection(bool $allow, object $obj) : bool
Parameters
$allow : bool

we just return this since we have no need to abort the remove

$obj : object

the object being removed

Return values
bool

copyLayoutSelection()

Copies the layout selection

copyLayoutSelection(int $newid, obj $obj) : mixed
Parameters
$newid : int

ID of the item to copy to

$obj : obj

Object of the original item return int

printOpenStreetMap()

Template function wrapper for the openStreetMap class to show a map with geodata markers for the current image or collected the images of an album.

printOpenStreetMap([array<string|int, mixed> $geodata = NULL ][, string $width = NULL ][, string $height = NULL ][, array<string|int, mixed> $mapcenter = NULL ][, int $zoom = NULL ][, array<string|int, mixed> $fitbounds = NULL ][, string $class = '' ][, int $mapnumber = NULL ][, obj $obj = NULL ][, bool $minimap = false ]) : mixed

For more flexibility use the class directly.

The map is not shown if there is no geodata available.

Parameters
$geodata : array<string|int, mixed> = NULL

Array of the geodata to create and display markers. See the constructor of the openStreetMap Class for the require structure

$width : string = NULL

Width with unit, e.g. 100%, 100px, 100em

$height : string = NULL

Height with unit, e.g. 100px, 100em

$mapcenter : array<string|int, mixed> = NULL

geodata array(lat,lng);

$zoom : int = NULL

Number of the zoom 0 -

$fitbounds : array<string|int, mixed> = NULL

geodata array('min' => array(lat,lng), 'max => array(lat,lng))

$class : string = ''

Class name to attach to the map element

$mapnumber : int = NULL

If calling more than one map per page an unique number is required

$obj : obj = NULL

Image or album object to skip current image or album and also $geodata

$minimap : bool = false

True to show the minimap in the lower right corner

Tags
deprecated
2.0

– Use openStreetMap::printOpenStreetMap() instead

global

obj $_zp_current_album

global

obj $_zp_current_image

global

string $_zp_gallery_page

printPagedThumbsNav()

Prints a paged thumbnail navigation to be used on a theme's image.php, independent of the album.php's thumbs loop

printPagedThumbsNav([int $imagesperpage = '' ][, bool $counter = false ][, string $prev = '' ][, string $next = '' ][, int $width = NULL ][, int $height = NULL ][, bool $crop = NULL ][, bool $placeholders = NULL ][, bool $showpagelist = false ][, mixed $pagelistprevnext = false ][, mixed $pagelistlength = 6 ]) : mixed

NOTE: With version 1.0.2 $size is no longer an option for this plugin. This plugin now uses the new maxspace function if cropping set to false.

The function contains some predefined CSS ids you can use for styling. NOTE: In 1.0.3 a extra div around the thumbnails has been added:

. The function prints the following HTML:

(if the link is inactive id="pagedthumbsnav-prevdisabled", you can hide it via CSS if needed)
(...) (the active thumb has class="pagedthumbsnav-active")
Next thumbnail list (if the link is inactive id="pagedthumbsnav-nextdisabled", you can hide it via CSS if needed)

(optional)

  • (active page link has css class "pagedthumbsnav-pagelistactive" attached)

    You can of course build your own order of the elements as this plugin is with version 1.2.7 based on a class. Make a custom theme function and change the order of the functions calls within. Alternatively you can use also use the "get" class methods to build something completely customized.

    Parameters
    $imagesperpage : int = ''

    How many thumbs you want to display per list page

    $counter : bool = false

    If you want to show the counter of the type "Images 1 - 10 of 20 (1/3)"

    $prev : string = ''

    The previous thumb list link text

    $next : string = ''

    The next thumb list link text

    $width : int = NULL

    The thumbnail crop width, if set to NULL the general admin setting is used. If cropping is FALSE this is the maxwidth of the thumb

    $height : int = NULL

    The thumbnail crop height, if set to NULL the general admin setting is used. If cropping is FALSE this is the maxwheight of the thumb

    $crop : bool = NULL

    Enter 'true' or 'false' to override the admin plugin option setting, enter NULL to use the admin plugin option (default)

    $placeholders : bool = NULL

    Enter 'true' or 'false' if you want to use placeholder for layout reasons if teh the number of thumbs does not match $imagesperpage. Recommended only for cropped thumbs. This is printed as an empty whose width and height are set via inline css. The remaining needs to be style via the css file and can be addressed via "#pagedthumbsimages span".

    $showpagelist : bool = false

    Enter 'true' or 'false' if you want to a list of the pages available. Can be styled via "#pagedthumbsnav-pagelist".

    $pagelistprevnext : mixed = false
    $pagelistlength : mixed = 6

    zenphoto_PHPMailer()

    zenphoto_PHPMailer(mixed $msg, mixed $email_list, mixed $subject, mixed $message, mixed $from_mail, mixed $from_name, mixed $cc_addresses, mixed $replyTo) : mixed
    Parameters
    $msg : mixed
    $email_list : mixed
    $subject : mixed
    $message : mixed
    $from_mail : mixed
    $from_name : mixed
    $cc_addresses : mixed
    $replyTo : mixed

    printAlbumMenu()

    Prints a list of all albums context sensitive.

    printAlbumMenu(string $option[, bool $showcount = NULL ][, string $css_id = '' ][, string $css_class_topactive = '' ][, string $css_class = '' ][, string $css_class_active = '' ][, string $indexname = "Gallery Index" ][, int $showsubs = NULL ][, bool $firstimagelink = false ][, bool $keeptopactive = false ]) : mixed

    Since 1.4.3 this is a wrapper function for the separate functions printAlbumMenuList() and printAlbumMenuJump(). that was included to remain compatiblility with older installs of this menu.

    Usage: add the following to the php page where you wish to use these menus: enable this extension on the zenphoto admin plugins tab. Call the function printAlbumMenu() at the point where you want the menu to appear.

    Parameters
    $option : string

    "list" for html list, "list-top" for only the top level albums, "omit-top" same as list, but the first level of albums is omitted "list-sub" lists the offspring level of subalbums for the current album "jump" dropdown menu of all albums(not context sensitive)

    $showcount : bool = NULL

    true for a image counter or subalbum count in brackets behind the album name, false for no image numbers or leave blank

    $css_id : string = ''

    insert css id for the main album list, leave empty if you don't use (only list mode)

    $css_class_topactive : string = ''

    insert css class for the active link in the main album list (only list mode)

    $css_class : string = ''

    insert css class for the sub album lists (only list mode)

    $css_class_active : string = ''

    insert css class for the active link in the sub album lists (only list mode)

    $indexname : string = "Gallery Index"

    insert the name how you want to call the link to the gallery index (insert "" if you don't use it, it is not printed then)

    $showsubs : int = NULL

    Set to depth of sublevels that should be shown always. 0 by default. To show all, set to a true! Only valid if option=="list".

    $firstimagelink : bool = false

    If set to TRUE and if the album has images the link will point to page of the first image instead the album thumbnail page

    $keeptopactive : bool = false

    If set to TRUE the toplevel album entry will stay marked as active if within its subalbums ("list" only)

    Tags
    since
    1.2

    printAlbumMenuList()

    Prints a nested html list of all albums context sensitive.

    printAlbumMenuList(string $option[, bool $showcount = NULL ][, string $css_id = '' ][, mixed $css_class_topactive = '' ][, string $css_class = '' ][, string $css_class_active = '' ][, string $indexname = "Gallery Index" ][, int $showsubs = NULL ][, bool $firstimagelink = false ][, bool $keeptopactive = false ][, bool $startlist = true ][, int $limit = NULL ]) : html

    Usage: add the following to the php page where you wish to use these menus: enable this extension on the zenphoto admin plugins tab; Call the function printAlbumMenuList() at the point where you want the menu to appear.

    Parameters
    $option : string

    "list" for html list, "list-top" for only the top level albums, "omit-top" same as list, but the first level of albums is omitted "list-sub" lists the offspring level of subalbums for the current album

    $showcount : bool = NULL

    true for a image counter in brackets behind the album name, false for no image numbers or leave empty

    $css_id : string = ''

    insert css id for the main album list, leave empty if you don't use (only list mode)

    $css_class_topactive : mixed = ''
    $css_class : string = ''

    insert css class for the sub album lists (only list mode)

    $css_class_active : string = ''

    insert css class for the active link in the sub album lists (only list mode)

    $indexname : string = "Gallery Index"

    insert the name (default "Gallery Index") how you want to call the link to the gallery index, insert "" if you don't use it, it is not printed then.

    $showsubs : int = NULL

    Set to depth of sublevels that should be shown always. 0 by default. To show all, set to a true! Only valid if option=="list".

    $firstimagelink : bool = false

    If set to TRUE and if the album has images the link will point to page of the first image instead the album thumbnail page

    $keeptopactive : bool = false

    If set to TRUE the toplevel album entry will stay marked as active if within its subalbums ("list" only)

    $startlist : bool = true

    set to true to output the UL tab (false automatically if you use 'omit-top' or 'list-sub')

    $limit : int = NULL

    truncation of display text

    Return values
    html

    list of the albums

    printAlbumMenuListAlbum()

    Handles an album for printAlbumMenuList

    printAlbumMenuListAlbum(array<string|int, mixed> $albums, string $folder, string $option, string $showcount, int $showsubs, string $css_class, string $css_class_topactive, string $css_class_active, bool $firstimagelink, bool $keeptopactive[, int $limit = NULL ]) : mixed
    Parameters
    $albums : array<string|int, mixed>

    albums array

    $folder : string
    $option : string

    see printAlbumMenuList

    $showcount : string

    see printAlbumMenuList

    $showsubs : int

    see printAlbumMenuList

    $css_class : string

    see printAlbumMenuList

    $css_class_topactive : string

    see printAlbumMenuList

    $css_class_active : string

    see printAlbumMenuList

    $firstimagelink : bool

    If set to TRUE and if the album has images the link will point to page of the first image instead the album thumbnail page

    $keeptopactive : bool

    If set to TRUE the toplevel album entry will stay marked as active if within its subalbums ("list" only)

    $limit : int = NULL

    truncation of display text

    printAlbumMenuJump()

    Prints a dropdown menu of all albums(not context sensitive) Is used by the wrapper function printAlbumMenu() if the options "jump" is choosen. For standalone use, too.

    printAlbumMenuJump([string $option = "count" ][, string $indexname = "Gallery Index" ][, bool $firstimagelink = false ][, mixed $showsubs = NULL ][, bool $skipform = false ]) : mixed

    Usage: add the following to the php page where you wish to use these menus: enable this extension on the zenphoto admin plugins tab; Call the function printAlbumMenuJump() at the point where you want the menu to appear.

    Parameters
    $option : string = "count"

    "count" for a image counter in brackets behind the album name, "" = for no image numbers

    $indexname : string = "Gallery Index"

    insert the name (default "Gallery Index") how you want to call the link to the gallery index, insert "" if you don't use it, it is not printed then.

    $firstimagelink : bool = false

    If set to TRUE and if the album has images the link will point to page of the first image instead the album thumbnail page

    $showsubs : mixed = NULL
    $skipform : bool = false

    If set to false this prints a full form option select list (default), if set to true it will only print the options

    checkSelectedAlbum()

    A printAlbumMenu() helper function for the jump menu mode of printAlbumMenu() that only checks which the current album so that the entry in the in the dropdown jump menu can be selected Not for standalone use.

    checkSelectedAlbum(string $checkalbum, string $option) : string
    Parameters
    $checkalbum : string

    The album folder name to check

    $option : string

    "index" for index level, "album" for album level

    Return values
    string

    returns nothing or "selected"

    unpublishSubalbums()

    unpublishSubalbums(mixed $album) : mixed
    Parameters
    $album : mixed

    printRating()

    Prints the rating star form and the current rating Insert this function call in the page script where you want the star ratings to appear.

    printRating([bool $vote = 3 ][, object $object = NULL ][, bool $text = true ]) : mixed

    NOTE: If $vote is false or the rating_recast option is false then the stars shown will be the rating. Otherwise the stars will show the value of the viewer's last vote.

    Parameters
    $vote : bool = 3

    set to false to disable voting

    $object : object = NULL

    optional object for the ratings target. If not set, the current page object is used

    $text : bool = true

    if false, no annotation text is displayed

    getRating()

    Returns the current rating of an object

    getRating([object $object = NULL ]) : float
    Parameters
    $object : object = NULL

    optional ratings target. If not supplied, the current script object is used

    Return values
    float

    printRegistrationForm()

    Parses the verification and registration if they have occurred places the user registration form

    printRegistrationForm([string $thanks = NULL ]) : mixed
    Parameters
    $thanks : string = NULL

    the message shown on successful registration

    printRegisterURL()

    prints the link to the register user page

    printRegisterURL(string $_linktext[, string $prev = '' ][, string $next = '' ][, string $class = NULL ]) : mixed
    Parameters
    $_linktext : string

    text for the link

    $prev : string = ''

    text to insert before the URL

    $next : string = ''

    text to follow the URL

    $class : string = NULL

    optional class

    getRelatedItems()

    getRelatedItems([mixed $type = 'news' ][, mixed $album = NULL ]) : mixed
    Parameters
    $type : mixed = 'news'
    $album : mixed = NULL

    createRelatedItemsResultArray()

    Helper function for getRelatedItems() only.

    createRelatedItemsResultArray(array<string|int, mixed> $result, string $type) : mixed

    Returns an array with array for each item with name, album (images only), type and weight (search weight value) Excludes the current item itself.

    Parameters
    $result : array<string|int, mixed>

    array with search results

    $type : string

    "albums", "images", "news", "pages"

    printRelatedItems()

    Prints the x related articles based on a tag search

    printRelatedItems([int $number = 5 ][, string $type = 'news' ][, string $specific = NULL ][, bool $excerpt = NULL ][, bool $thumb = false ][, mixed $date = false ]) : mixed
    Parameters
    $number : int = 5

    Number of items to get

    $type : string = 'news'

    'albums', 'images','news','pages', "all" for all combined.

    $specific : string = NULL

    If $type = 'albums' or 'images' name of album

    $excerpt : bool = NULL

    If a text excerpt (gallery items: description; Zenpage items: content) should be shown. NULL for none or number of length

    $thumb : bool = false

    For $type = 'albums' or 'images' if a thumb should be shown (default size as set on the options)

    $date : mixed = false

    rulesList()

    rulesList() : type
    Tags
    global

    type $_zp_conf_vars

    Return values
    type

    Prints a RSS link for if (class_exists('RSS')) printRSSLink() and if (class_exists('RSS')) printRSSHeaderLink()

    getRSSLink(string $option[, string $lang = NULL ][, string $addl = NULL ]) : mixed
    Parameters
    $option : string

    type of RSS: "Gallery" feed for latest images of the whole gallery "Album" for latest images only of the album it is called from "Collection" for latest images of the album it is called from and all of its subalbums "Comments" for all comments of all albums and images "Comments-image" for latest comments of only the image it is called from "Comments-album" for latest comments of only the album it is called from "AlbumsRSS" for latest albums "AlbumsRSScollection" only for latest subalbums with the album it is called from or "News" feed for all news articles "Category" for only the news articles of the category that is currently selected "NewsWithImages" for all news articles and latest images "Comments" for all news articles and pages "Comments-news" for comments of only the news article it is called from "Comments-page" for comments of only the page it is called from "Comments-all" for comments from all albums, images, news articels and pages "Pages" feed for all pages

    $lang : string = NULL

    optional to display a feed link for a specific language. Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used.

    $addl : string = NULL

    provided additional data for feeds (e.g. album object for album feeds, $categorylink for zenpage categories

    Prints an RSS link

    printRSSLink(string $option, string $prev, string $linktext, string $next[, bool $printIcon = true ][, string $class = null ][, string $lang = '' ][, string $addl = NULL ]) : mixed
    Parameters
    $option : string

    type of RSS: See getRSSLink for details

    $prev : string

    text to before before the link

    $linktext : string

    title of the link

    $next : string

    text to appear after the link

    $printIcon : bool = true

    print an RSS icon beside it? if true, the icon is zp-core/images/rss.png

    $class : string = null

    css class

    $lang : string = ''

    optional to display a feed link for a specific language. Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used.

    $addl : string = NULL

    provided additional data for feeds (e.g. album object for album feeds, $categorylink for zenpage categories

    Prints the RSS link for use in the HTML HEAD

    printRSSHeaderLink(string $option, string $linktext[, string $lang = '' ][, string $addl = NULL ]) : mixed
    Parameters
    $option : string

    type of RSS: "Gallery" feed for latest images of the whole gallery "Album" for latest images only of the album it is called from "Collection" for latest images of the album it is called from and all of its subalbums "Comments" for all comments of all albums and images "Comments-image" for latest comments of only the image it is called from "Comments-album" for latest comments of only the album it is called from "AlbumsRSS" for latest albums "AlbumsRSScollection" only for latest subalbums with the album it is called from

    $linktext : string

    title of the link

    $lang : string = ''

    optional to display a feed link for a specific language. Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used.

    $addl : string = NULL

    provided additional data for feeds (e.g. album object for album feeds, $categorylink for zenpage categories

    executeRSS()

    executeRSS() : mixed

    seo_cleanup_button()

    seo_cleanup_button(mixed $buttons) : mixed
    Parameters
    $buttons : mixed

    getE()

    getE(mixed $e) : mixed
    Parameters
    $e : mixed

    cleanAlbum()

    cleanAlbum(mixed $obj) : mixed
    Parameters
    $obj : mixed

    checkFolder()

    checkFolder(mixed $album, mixed $album_cleaned) : mixed
    Parameters
    $album : mixed
    $album_cleaned : mixed

    Prints a link to call the slideshow (not shown if there are no images in the album) To be used on album.php and image.php A CSS id names 'slideshowlink' is attached to the link so it can be directly styled.

    printSlideShowLink([string $linktext = NULL ][, string $linkstyle = Null ]) : mixed

    If the mode is set to "jQuery Colorbox" and the Colorbox plugin is enabled this link starts a Colorbox slideshow from a hidden HTML list of all images in the album. On album.php it starts with the first always, on image.php with the current image.

    Parameters
    $linktext : string = NULL

    Text for the link

    $linkstyle : string = Null

    Style of Text for the link

    printSlideShow()

    Prints the slideshow using the {@link http://http://www.malsup.com/jquery/cycle2/ jQuery plugin Cycle2 }

    printSlideShow([bool $heading = true ][, bool $speedctl = false ][, obj $albumobj = NULL ][, obj $imageobj = NULL ][, int $width = NULL ][, int $height = NULL ][, bool $crop = false ][, bool $shuffle = false ][, bool $linkslides = false ][, bool $controls = true ]) : mixed

    Two ways to use: a) Use on your theme's slideshow.php page and called via printSlideShowLink(): If called from image.php it starts with that image, called from album.php it starts with the first image (jQuery only) To be used on slideshow.php only and called from album.php or image.php.

    b) Calling directly via printSlideShow() function (jQuery mode) Place the printSlideShow() function where you want the slideshow to appear and set create an album object for $albumobj and if needed an image object for $imageobj. The controls are disabled automatically.

    NOTE: The jQuery mode does not support movie and audio files anymore. If you need to show them please use the Flash mode. Also note that this function is not used for the Colorbox mode!

    Parameters
    $heading : bool = true

    set to true (default) to emit the slideshow breadcrumbs in flash mode

    $speedctl : bool = false

    controls whether an option box for controlling transition speed is displayed

    $albumobj : obj = NULL

    The object of the album to show the slideshow of. If set this overrides the POST data of the printSlideShowLink()

    $imageobj : obj = NULL

    The object of the image to start the slideshow with. If set this overrides the POST data of the printSlideShowLink(). If not set the slideshow starts with the first image of the album.

    $width : int = NULL

    The width of the images (jQuery mode). If set this overrides the size the slideshow_width plugin option that otherwise is used.

    $height : int = NULL

    The heigth of the images (jQuery mode). If set this overrides the size the slideshow_height plugin option that otherwise is used.

    $crop : bool = false

    Set to true if you want images cropped width x height (jQuery mode only)

    $shuffle : bool = false

    Set to true if you want random (shuffled) order

    $linkslides : bool = false

    Set to true if you want the slides to be linked to their image pages (jQuery mode only)

    $controls : bool = true

    Set to true (default) if you want the slideshow controls to be shown (might require theme CSS changes if calling outside the slideshow.php page) (jQuery mode only)

    getAllTagsFromAlbum()

    Prints a tag cloud list of the tags in one album and optionally its subalbums. Returns FALSE if no value.

    getAllTagsFromAlbum(string $albumname[, bool $subalbums = false ][, string $mode = 'images' ]) : array<string|int, mixed>
    Parameters
    $albumname : string

    folder name of the album to get the tags from ($subalbums = true this is the base albums)- This value is mandatory.

    $subalbums : bool = false

    TRUE if the tags of subalbum should be. FALSE is default

    $mode : string = 'images'

    "images" for image tags, "albums" for album tags."images" is default.

    Return values
    array<string|int, mixed>

    getAllTagsFromZenpage()

    Gets all tags used by either all Zenpage news articles or pages.

    getAllTagsFromZenpage([string $mode = 'news' ]) : mixed
    Parameters
    $mode : string = 'news'

    "news" for Zenpage news article tags, "pages" for Zenpage pages tags

    printAllTagsFromZenpage()

    Prints a tag cloud list of the tags used by either all Zenpage news articles or pages.

    printAllTagsFromZenpage([string $mode = 'news' ][, string $separator = '' ][, string $class = '' ][, int $showcounter = true ][, bool $tagcloud = true ][, integere $size_min = 1 ][, int $size_max = 5 ][, int $count_min = 1 ][, int $count_max = 50 ]) : mixed
    Parameters
    $mode : string = 'news'

    "news" for Zenpage news article tags, "pages" for Zenpage pages tags

    $separator : string = ''

    how to separate the entries

    $class : string = ''

    css classs to style the list

    $showcounter : int = true

    if the tag count should be shown (no counter if $mode = "all")

    $tagcloud : bool = true

    if set to false a simple list without font size changes will be printed, set to true (default) prints a list as a tag cloud

    $size_min : integere = 1

    smallest font size the cloud should display

    $size_max : int = 5

    largest font size the cloud should display

    $count_min : int = 1

    the minimum count for a tag to appear in the output

    $count_max : int = 50

    the floor count for setting the cloud font size to $size_max

    printAllTagsFromAlbum()

    Prints a tag cloud list of the tags in one album and optionally its subalbums.

    printAllTagsFromAlbum([string $albumname = "" ][, bool $subalbums = false ][, string $mode = 'images' ][, string $separator = '' ][, string $class = '' ][, int $showcounter = true ][, bool $tagcloud = true ][, integere $size_min = 1 ][, int $size_max = 5 ][, int $count_min = 1 ][, int $count_max = 50 ]) : mixed

    Known limitation: If $mode is set to "all" there is no tag count and therefore no tag cloud but a simple list

    Parameters
    $albumname : string = ""

    folder name of the album to get the tags from ($subalbums = true this is the base albums)

    $subalbums : bool = false

    TRUE if the tags of subalbum should be. FALSE is default

    $mode : string = 'images'

    "images" for image tags, "albums" for album tags, "all" for both mixed

    $separator : string = ''

    how to separate the entries

    $class : string = ''

    css classs to style the list

    $showcounter : int = true

    if the tag count should be shown (no counter if $mode = "all")

    $tagcloud : bool = true

    if set to false a simple list without font size changes will be printed, set to true (default) prints a list as a tag cloud

    $size_min : integere = 1

    smallest font size the cloud should display

    $size_max : int = 5

    largest font size the cloud should display

    $count_min : int = 1

    the minimum count for a tag to appear in the output

    $count_max : int = 50

    the floor count for setting the cloud font size to $size_max

    printAllTags()

    Prints a tag cloud list of the tags in one album and optionally its subalbums. Base function to printAllTagsFromAlbum().

    printAllTags(array<string|int, mixed> $tags, string $mode[, string $separator = '' ][, string $class = '' ][, int $showcounter = true ][, bool $tagcloud = true ][, integere $size_min = 1 ][, int $size_max = 5 ][, int $count_min = 1 ][, int $count_max = 50 ]) : mixed

    Note meant to be used standalone.

    Parameters
    $tags : array<string|int, mixed>

    array of tags with the fields count, id, and name (as passed by the specific printAllTagsFrom.... functions)

    $mode : string

    "images" for image tags, "albums" for album tags, "all" for images and albums mixed or "news" for Zenpage news articles, "pages" for Zenpage pages

    $separator : string = ''

    how to separate the entries

    $class : string = ''

    css classs to style the list

    $showcounter : int = true

    if the tag count should be shown (no counter if $mode = "all")

    $tagcloud : bool = true

    if set to false a simple list without font size changes will be printed, set to true (default) prints a list as a tag cloud

    $size_min : integere = 1

    smallest font size the cloud should display

    $size_max : int = 5

    largest font size the cloud should display

    $count_min : int = 1

    the minimum count for a tag to appear in the output

    $count_max : int = 50

    the floor count for setting the cloud font size to $size_max

    getAllTagsFromAlbum_multi_unique()

    Removes duplicate entries in multi dimensional array.

    getAllTagsFromAlbum_multi_unique(array<string|int, mixed> $array) : array<string|int, mixed>

    From kenrbnsn at rbnsn dot com http://uk.php.net/manual/en/function.array-unique.php#57202

    Parameters
    $array : array<string|int, mixed>
    Return values
    array<string|int, mixed>

    tagSuggestJS_frontend()

    tagSuggestJS_frontend() : mixed

    tagSuggestJS()

    tagSuggestJS([mixed $exclude_unassigned = false ][, mixed $checkaccess = false ]) : mixed
    Parameters
    $exclude_unassigned : mixed = false
    $checkaccess : mixed = false

    printFullAlbumsList()

    Prints all albums of the Zenphoto gallery as a partial drop down menu (<option></option> parts).

    printFullAlbumsList() : string
    Return values
    string

    printSubLevelAlbums()

    Recursive helper function for printFullAlbumsList() to get all sub albums of each top level album

    printSubLevelAlbums(mixed &$albumobj) : string
    Parameters
    $albumobj : mixed
    Return values
    string

    unpublishedZenphotoItemCheck()

    checks if a album or image is un-published and returns a '*'

    unpublishedZenphotoItemCheck(mixed $obj[, mixed $dropdown = true ]) : string
    Parameters
    $obj : mixed
    $dropdown : mixed = true
    Return values
    string

    shortentitle()

    shortens a string, truncate_string() was not exact enough.

    shortentitle( $title,  $length) : string
    Parameters
    $title :

    int Title of the image

    $length :

    int The desired length

    Return values
    string

    printImageslist()

    Prints the images and/or albums as thumbnails of the selected album

    printImageslist( $number) : string
    Parameters
    $number :

    int The number of images per page

    Return values
    string

    getImageType()

    Returns the object "type" of the "image".

    getImageType(mixed $imageobj) : string

    Note: If the root object is a video object then If a mediaplayer is enabled a sub-type of video or audio will be determined from the suffix. If it is not one of the known suffixes or if the mediaplayer is not enabled then 'other' is returned as the object type.

    Pure images return empty for an object type.

    Parameters
    $imageobj : mixed
    Return values
    string

    printNewsArticlesList()

    Prints all available articles in Zenpage

    printNewsArticlesList(mixed $number) : string
    Parameters
    $number : mixed
    Return values
    string

    checkAlbumForImages()

    Checks if an album has images for display on the form

    checkAlbumForImages() : bool
    Return values
    bool

    showZenphotoOptions()

    Checks if the full Zenphoto include form options should be shown

    showZenphotoOptions() : bool
    Return values
    bool

    printTinyPageNav()

    Prints the page navigation for albums or Zenpage news articles

    printTinyPageNav([ $pagestotal = "" ][,  $currentpage = "" ][,  $mode = 'images' ]) : string
    Parameters
    $pagestotal : = ""

    int The number page in total

    $currentpage : = ""

    int Number of the current page

    $mode : = 'images'

    string 'images' or 'articles'

    Return values
    string

    printZenpageItems()

    Prints the Zenpage items as a partial dropdown (pages, news articles, categories)

    printZenpageItems() : string
    Return values
    string

    printAllNestedList()

    Prints all available pages or categories in Zenpage

    printAllNestedList() : string
    Return values
    string

    unpublishedZenpageItemCheck()

    checks if a news article or page is un-published and/or protected and returns a '*'

    unpublishedZenpageItemCheck(mixed $page) : string
    Parameters
    $page : mixed
    Return values
    string

    setTinyZenpageLocale()

    Set the locale for gettext translation of this plugin. Somehow ZenPhoto's setupDomain() does not work here.

    setTinyZenpageLocale() : mixed

    ..

    printTinyZenpageCategorySelector()

    Prints the dropdown menu for the category selector for the news articles list

    printTinyZenpageCategorySelector([mixed $currentpage = '' ]) : mixed
    Parameters
    $currentpage : mixed = ''

    tinymce4ConfigJS()

    tinymce4ConfigJS(mixed $mode) : mixed
    Parameters
    $mode : mixed

    getTinyMCE4ConfigFiles()

    getTinyMCE4ConfigFiles(mixed $mode) : mixed
    Parameters
    $mode : mixed

    upload_extra()

    upload_extra(mixed $uploadlimit, mixed $passedalbum) : mixed
    Parameters
    $uploadlimit : mixed
    $passedalbum : mixed

    upload_form()

    upload_form(mixed $uploadlimit, mixed $passedalbum) : mixed
    Parameters
    $uploadlimit : mixed
    $passedalbum : mixed

    httpUploadHandler()

    httpUploadHandler(mixed $uploadHandlers) : mixed
    Parameters
    $uploadHandlers : mixed

    httpUploadHandler_admin_tabs()

    httpUploadHandler_admin_tabs(mixed $tabs) : mixed
    Parameters
    $tabs : mixed

    jQueryUpload_headers()

    jQueryUpload_headers() : mixed

    upload_extra()

    upload_extra(mixed $uploadlimit, mixed $passedalbum) : mixed
    Parameters
    $uploadlimit : mixed
    $passedalbum : mixed

    upload_form()

    upload_form(mixed $uploadlimit, mixed $passedalbum) : mixed
    Parameters
    $uploadlimit : mixed
    $passedalbum : mixed

    jQueryUploadHandler()

    jQueryUploadHandler(mixed $uploadHandlers) : mixed
    Parameters
    $uploadHandlers : mixed

    jQueryUploadHandler_admin_tabs()

    jQueryUploadHandler_admin_tabs(mixed $tabs) : mixed
    Parameters
    $tabs : mixed

    printUserLogin_out()

    Prints the logout link if the user is logged in.

    printUserLogin_out([string $before = '' ][, string $after = '' ][, int $showLoginForm = NULL ][, string $logouttext = NULL ]) : mixed

    This is for album passwords only, not admin users;

    Parameters
    $before : string = ''

    before text

    $after : string = ''

    after text

    $showLoginForm : int = NULL

    to display a login form to not display a login form, but just a login link, set to 0 to display a login form set to 1 to display a link to a login form in colorbox, set to 2, but you must have colorbox enabled for the theme pages where this link appears.)

    $logouttext : string = NULL

    optional replacement text for "Logout"

    user_mailing_list_button()

    user_mailing_list_button(mixed $buttons) : mixed
    Parameters
    $buttons : mixed

    getExpiryDatePost()

    Retrieves posted expiry date and checks it against the current date/time Returns the posted date if it is in the future Returns NULL if the date is past

    getExpiryDatePost() : string
    Return values
    string

    processTags()

    processes the taglist save

    processTags(object $object) : mixed
    Parameters
    $object : object

    the object on which the save happened

    updatePage()

    Updates or adds a page and returns the object of that page

    updatePage(array<string|int, mixed> &$reports[, bool $newpage = false ]) : object
    Parameters
    $reports : array<string|int, mixed>

    report display

    $newpage : bool = false

    true if it is a new page

    Return values
    object

    deletePage()

    Deletes a page (and also if existing its subpages) from the database

    deletePage(mixed $titlelink) : mixed
    Parameters
    $titlelink : mixed

    printPagesListTable()

    Prints the table part of a single page item for the sortable pages list

    printPagesListTable(object $page, bool $flag) : mixed
    Parameters
    $page : object

    The array containing the single page

    $flag : bool

    set to true to flag the element as having a problem with nesting level

    updateArticle()

    Updates or adds a news article and returns the object of that article

    updateArticle(array<string|int, mixed> &$reports[, bool $newarticle = false ]) : object
    Parameters
    $reports : array<string|int, mixed>

    display

    $newarticle : bool = false

    true if a new article

    Return values
    object

    deleteArticle()

    Deletes an news article from the database

    deleteArticle(mixed $titlelink) : mixed
    Parameters
    $titlelink : mixed

    printArticleCategories()

    Print the categories of a news article for the news articles list

    printArticleCategories(obj $obj) : mixed
    Parameters
    $obj : obj

    object of the news article

    printPageArticleTags()

    Print the categories of a news article for the news articles list

    printPageArticleTags(obj $obj) : mixed
    Parameters
    $obj : obj

    object of the news article

    printCategorySelection()

    Prints the checkboxes to select and/or show the category of an news article on the edit or add page

    printCategorySelection([int $id = '' ][, string $option = '' ]) : mixed
    Parameters
    $id : int = ''

    ID of the news article if the categories an existing articles is assigned to shall be shown, empty if this is a new article to be added.

    $option : string = ''

    "all" to show all categories if creating a new article without categories assigned, empty if editing an existing article that already has categories assigned.

    printArticleDatesDropdown()

    Prints the dropdown menu for the date archive selector for the news articles list

    printArticleDatesDropdown(mixed $pagenumber) : mixed
    Parameters
    $pagenumber : mixed

    getNewsAdminOption()

    Compiles an option parameter list

    getNewsAdminOption(array<string|int, mixed> $test) : array<string|int, mixed>
    Parameters
    $test : array<string|int, mixed>

    array of parameter=>type elements. type=0:string type=1:numeric

    Return values
    array<string|int, mixed>

    getNewsAdminOptionPath()

    Creates the admin paths for news articles if you use the dropdowns on the admin news article list together

    getNewsAdminOptionPath(array<string|int, mixed> $list) : string
    Parameters
    $list : array<string|int, mixed>

    an parameter array of item=>value for instance, the result of getNewsAdminOption()

    Return values
    string

    printUnpublishedDropdown()

    Prints the dropdown menu for the published/un-publishd selector for the news articles list

    printUnpublishedDropdown() : mixed

    printSortOrderDropdown()

    Prints the dropdown menu for the sortorder selector for the news articles list

    printSortOrderDropdown() : mixed

    printCategoryDropdown()

    Prints the dropdown menu for the category selector for the news articles list

    printCategoryDropdown() : mixed

    printArticlesPerPageDropdown()

    Prints the dropdown menu for the articles per page selector for the news articles list

    printArticlesPerPageDropdown(mixed $pagenumber, mixed $articles_page) : mixed
    Parameters
    $pagenumber : mixed
    $articles_page : mixed

    printAuthorDropdown()

    Prints the dropdown menu all authors that currently are authors of news articles

    printAuthorDropdown() : mixed

    updateCategory()

    Updates or adds a category

    updateCategory(array<string|int, mixed> &$reports[, bool $newcategory = false ]) : mixed
    Parameters
    $reports : array<string|int, mixed>

    the results display

    $newcategory : bool = false

    true if a new article

    deleteCategory()

    Deletes a category (and also if existing its subpages) from the database

    deleteCategory(mixed $titlelink) : mixed
    Parameters
    $titlelink : mixed

    printCategoryListSortableTable()

    Prints the list entry of a single category for the sortable list

    printCategoryListSortableTable(array<string|int, mixed> $cat, string $flag) : string
    Parameters
    $cat : array<string|int, mixed>

    Array storing the db info of the category

    $flag : string

    If the category is protected

    Return values
    string

    printCategoryCheckboxListEntry()

    Prints the checkboxes to select and/or show the category of an news article on the edit or add page

    printCategoryCheckboxListEntry(mixed $cat, mixed $articleid, string $option[, mixed $class = '' ]) : mixed
    Parameters
    $cat : mixed
    $articleid : mixed
    $option : string

    "all" to show all categories if creating a new article without categories assigned, empty if editing an existing article that already has categories assigned.

    $class : mixed = ''

    printNestedItemsList()

    Prints the nested list for pages and categories

    printNestedItemsList([string $listtype = 'cats-sortablelist' ][,  $obj = '' ][, string $option = '' ][, mixed $class = 'nestedItem' ]) : string
    Parameters
    $listtype : string = 'cats-sortablelist'

    'cats-checkboxlist' for a fake nested checkbock list of categories for the news article edit/add page 'cats-sortablelist' for a sortable nested list of categories for the admin categories page 'pages-sortablelist' for a sortable nested list of pages for the admin pages page

    $obj : = ''

    $obj Optional, default empty. Passing an articledid is deprecated and will be removed in ZenphotoCMS 2.0.

    • listtype = 'cats-checkboxlist': Object of the news article if the categories an existing articles is assigned to shall be shown, empty if this is a new article to be added.
    • listtype = 'pages-sortablelist': Object of the page object to show sub pages of or empty for all
    $option : string = ''

    Only for $listtype = 'cats-checkboxlist': "all" to show all categories if creating a new article without categories assigned, empty if editing an existing article that already has categories assigned.

    $class : mixed = 'nestedItem'
    Return values
    string

    | bool

    updateItemSortorder()

    Updates the sortorder of the items list in the database

    updateItemSortorder([string $mode = 'pages' ]) : array<string|int, mixed>
    Parameters
    $mode : string = 'pages'

    'pages' or 'categories'

    Return values
    array<string|int, mixed>

    checkForEmptyTitle()

    Checks if no title has been provide for items on new item creation

    checkForEmptyTitle(string $titlefield, string $type[, mixed $truncate = true ]) : string
    Parameters
    $titlefield : string

    The title field

    $type : string

    'page', 'news' or 'category'

    $truncate : mixed = true
    Return values
    string

    zenpagePublish()

    Publishes a page or news article

    zenpagePublish(object $obj, int $show) : string
    Parameters
    $obj : object
    $show : int

    the value for publishing

    Return values
    string

    skipScheduledPublishing()

    Skips the scheduled future publishing by setting the date of a page or article to the current date to publish it immediately or the expiration handling by setting the expiredate to null.

    skipScheduledPublishing(object $obj[, string $type = 'futuredate' ]) : string
    Parameters
    $obj : object
    $type : string = 'futuredate'

    "futuredate" or "expiredate"

    Tags
    since
    1.5.7
    Return values
    string

    checkHitcounterDisplay()

    Checks if there are hitcounts and if they are displayed behind the news article, page or category title

    checkHitcounterDisplay(string $item) : string
    Parameters
    $item : string

    The array of the current news article, page or category in the list.

    Return values
    string

    getNewsPagesStatistic()

    returns an array of how many pages, articles, categories and news or pages comments we got.

    getNewsPagesStatistic(string $option) : mixed
    Parameters
    $option : string

    What the statistic should be shown of: "news", "pages", "categories"

    zenpageJSCSS()

    Prints the links to JavaScript and CSS files zenpage needs.

    zenpageJSCSS() : mixed

    Actually the same as for zenphoto but with different paths since we are in the plugins folder.

    authorSelector()

    Prints a dropdown to select the author of a page or news article (Admin rights users only)

    authorSelector([mixed $author = NULL ]) : mixed
    Parameters
    $author : mixed = NULL

    Prints the publish/un-published/scheduled publishing icon with a link for the pages and news articles list.

    printPublishIconLink(obj $obj[, mixed $type = '' ][, mixed $linkback = '' ]) : mixed
    Parameters
    $obj : obj

    Object of the page or news article to check

    $type : mixed = ''
    $linkback : mixed = ''
    Tags
    since
    1.6.1

    checkIfChecked()

    Checks if a checkbox is selected and checks it if.

    checkIfChecked(string $field) : mixed
    Parameters
    $field : string

    the array field of an item array to be checked (for example "permalink" or "comments on")

    checkIfLockedPage()

    Checks if the current logged in admin user is the author that locked the page/article.

    checkIfLockedPage(object $page) : bool

    Only that author or any user with admin rights will be able to edit or unlock.

    Parameters
    $page : object

    The array of the page or article to check

    Return values
    bool

    checkIfLockedNews()

    Checks if the current logged in admin user is the author that locked the article.

    checkIfLockedNews(mixed $news) : bool

    Only that author or any user with admin rights will be able to edit or unlock.

    Parameters
    $news : mixed
    Return values
    bool

    is_AdminEditPage()

    Checks if the current admin-edit.php page is called for news articles or for pages.

    is_AdminEditPage(string $page) : bool
    Parameters
    $page : string

    What you want to check for, "page" or "newsarticle"

    Return values
    bool

    processZenpageBulkActions()

    Processes the check box bulk actions

    processZenpageBulkActions(mixed $type) : mixed
    Parameters
    $type : mixed

    zenpageBulkActionMessage()

    zenpageBulkActionMessage(mixed $action) : mixed
    Parameters
    $action : mixed

    Creates the titlelink from the title passed.

    createTitlelink(string|array<string|int, mixed> $title, string $date) : type
    Parameters
    $title : string|array<string|int, mixed>

    The title respectively language array of titles

    $date : string

    The date the article is saved

    Tags
    since
    1.5.2
    Return values
    type

    checkTitlelinkDuplicate()

    Checks if a title link of this itemtype already exists

    checkTitlelinkDuplicate(string $titlelink, string $itemtype) : bool
    Parameters
    $titlelink : string

    The titlelink to check

    $itemtype : string
    Tags
    since
    1.5.2
    Return values
    bool

    Append or prepends a date string to a titlelink as defined.

    addDateToTitlelink(string $titlelink) : string

    Note: This does not check the item type option and will add to any string passed!

    Parameters
    $titlelink : string

    The titleink (e.g. as created by createTitleink())

    Tags
    since
    1.5.2
    Return values
    string

    getNewsIndexURL()

    Returns the full path of the news index page

    getNewsIndexURL([int $page = '' ]) : string
    Parameters
    $page : int = ''

    Page number to append, default empty (page 1)

    Return values
    string

    getNewsArchiveURL()

    Returns the full path of the news archive page

    getNewsArchiveURL(string $date) : string
    Parameters
    $date : string

    the date of the archive page

    Return values
    string

    RSS_Tags()

    RSS_Tags(mixed $item, mixed $type) : mixed
    Parameters
    $item : mixed
    $type : mixed

    RSS_Channel()

    RSS_Channel(mixed $channel) : mixed
    Parameters
    $channel : mixed

    RSS_Retrieve()

    RSS_Retrieve(mixed $url) : mixed
    Parameters
    $url : mixed

    zenphoto_sendmail()

    zenphoto_sendmail(mixed $msg, mixed $email_list, mixed $subject, mixed $message, mixed $from_mail, mixed $from_name, mixed $cc_addresses, mixed $replyTo) : mixed
    Parameters
    $msg : mixed
    $email_list : mixed
    $subject : mixed
    $message : mixed
    $from_mail : mixed
    $from_name : mixed
    $cc_addresses : mixed
    $replyTo : mixed
    
            
    On this page

    Search results