Global variables

    This list of common global variables Zenphoto uses internally can be useful for developing extra theme functions or plugins.

    The usage of these is aimed at the more web developing experienced user as they primarily are to be used with the object model.

    General Zenphoto globals

    The list of installed locales
    Used to cache the list of albums that an admin may administer
    Cache of the admin users
    Cache for the current album loop
    Contains the album folder name (when it is internal to the Zenphoto installation.)
    Cache of the tags used in a gallery. (Used in the Tag Strings case only, contains multiple copies of a tag.)
    Cache for the current comment loop
    Contains the error from the last comment post
    Saves comment context from a post for restoration
    Holds configuration information from the zp-config.php file. May be overridden by the $_zp_options array.
    Cache of the tags with occurrence counts.
    An array containing the credentials of the currently logged in administrator
    The current active album object
    Saved album
    The current comment
    Contains the 'context' Zenphoto is operating in
    Saved context
    The current active image object
    Saved image
    The current active search
    If not NULL, contains the current dynamic album
    Set true if Zenphoto has encountered an error
    The list of EXIF fields that Zenphoto handles
    If set, the multimedia player object ("flash" for historic reasons)
    The gallery object. This is the base object of Zenphoto site itself.
    A cache of the number of albums that go on the index.php page
    The basename of the page loaded by the root index.php. (e.g. album.php, image.php, etc.)
    Cache for the current image loop
    An array of locale, language name pairs
    Contains the privileges of the current admin. (It is 0 if no one is logged in.)
    Contains the error indication from the last login
    Used only in Admin. Set to true if the admin user/password must be set.
    Part of the object query cache
    Part of the object query cache
    Used for transitioning to a single option table
    The current set of Options
    The current gallery/album page
    If set, the google maps object
    Plugins register the global initialization needed by plugins
    Cache of Authorizations
    Count of queries
    Object for sorting albums
    The list of valid image file suffixes
    The list of valid video (and music) file suffixes
    The WEBPATH to the current theme
    Cache of the Unique tags.
    An indicator of whether we are using Tag Tables or Tag Strings.
    If not NULL contains the path to the album folder external to the Zenphoto instalation.
    Used when making a zip archive

    Zenpage CMS-plugin globals

    The current active news article object
    The current active news category. Note: Before 1.4 this is just the name of the category, afterwards this contains the object of the category
    The total number of news pages for the news article loop
    The total number of news articles
    The current active page object

    Creative Commons LicenseThis text by is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

    Code examples are released under the GPL v2 or later license

    For questions and comments please use the forum or discuss on the social networks.

    Related items