Path constants Sep 10, 2014 / Updated: Aug 14, 2018
Zenphoto uses several path related constants internally you should always use these if you work with paths so your themes and plugins are safe for any possible name changes. These constants are defined in /zp-core/global-definitions.php.
For all URL's to actual items (albums, image, news and pages) you should rather use Zenphoto's object model framework or the related template functions.
- /albums/ – stores all albums and images. If you use a custom name it of course stores that name.
- http(s)://yourdomain.com/albums/ – full webpath to the /albums folder
- /var/www/html/zenphoto/albums/ – The path to the albums folder but with the full server path if you installed in a subfolder "zenphoto" (exact path depends on the host)
- /backup/ – stores the database backup made with the backup utility
- /cache/ – stores all the cached images
- /zp-core/zp-extensions/common/ – stores some files that several official plugins make use of
- /zp-data/ – stores the configuration and log files
- The full web path to your installation, e.g. http://www.yourdomain.com/zenphoto/ if you installed Zenphoto in a folder "zenphoto".
- /zp-core/zp-extensions/ – stores all officially included plugins
- http or https – The server protocol as set on its option. If you use it you need to add ://
- The host part of the url, e.g. http://www.yourdomain.com
- The full path on your server. e.g. /var/www/html/zenphoto if you installed in a subfolder "zenphoto" (the exact path depends on the host)
- /cache_html/ – stores all the cached static HTML files of your site pages if using the static_html_cache plugin and also the RSS feeds if the RSS cache is enabled.
- /themes/ – stores all themes
- /uploaded/ – the default folder for general non gallery files
- /plugins/ – stores all 3rd party plugins
- /zp-core/utilities/ – stores offcially included utiltiy plugins which appear as buttons on the main overview page on the backend.
- stores the path to your install. If you installed in a folder called "zenphoto" resolves to zenphoto.
- /zp-core/ – The Zenphoto core folder
Note: The constants do not include the slashes.
Path to a 3rd party plugin:
Path to an included plugin:
FULLWEBPATH.'/'.ZENFOLDER.'/'.PLUGIN_FOLDER.'/officialplugin.phpIf you print out URL's using these constants, don't forget to escape them using html_encode() to be sure.
This text by www.zenphoto.org is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Code examples are released under the GPL v2 or later license