Troubleshooting guide May 20, 2011 / Updated: May 18, 2013
- Configuration
- Errors, Error messages, etc.
- Images & Albums
- Installation
- Internationalization
- Miscellaneous
- Plugins, FIlters, etc.
- Searching
- Security, Passwords, etc.
- Zenpage news and pages
Configuration
-
Replacing default images
Zenphoto uses various default images for display like default thumbs for multimedia items if no video thumbnail is used or for password protected albums. You can of course use your own images instead.
Example: /zp-core/images/err-passwordprotected.png
To replace this place an image of the same name within one of these places:
- /plugins/images/err-passwordprotected.png (globally)
- /themes/<yourtheme>/images/err-passwordprotected.png (only for the theme)
The same can be done with plugins. Replicate the plugin folder structure in your theme and the files therein will override the default ones. Or you can make "global" overrides of files by placing the structure in the plugins folder.
-
How to setup a theme for Colorbox
If you wish to display the full image using the Colorbox plugin, you probably need to modify your theme if it does not have support for it already. Just enabling the plugin is not enough otherwise. It is recommended to read the theming tutorial for theming basics.
image.php
Generally all standard themes link the sized image to the full image. To make it open in a Colorbox you need to add the javascript jQuery definition to the page's header and add a class to the link so Colorbox is assigned to it. If you set the full image to protected you need to add to the jQuery js define the photo: true option.
You can look at the Zenpage theme's image.php for an example usage. Several examples and detailed info on configuring Colorbox are available on the Colorbox site itself.
album.php
If you wish to link the thumbnails on the album page directly bypassing the image.php page you need to do the above and also change the link within the next_image() loop to link to the full image. Mika Epstein (Ipstenu) has written a detailed tutorial about this.
Note that this will only open the images of the current page. If you want to open all images in the album you need to modify your theme quite further to print invisible links of thte other pages' images. This will require some more advanced Zenphoto and PHP knowledge using the Zenphoto object model framework.
-
How to rename the folder Zenphoto is installed in?
If you did not install Zenphoto in the root of your webspace but in a folder name zenphoto for example just rename it. Then you need to do one of these things:
- Re-run setup (you might need to re-upload the setup file and folder you will get a note about that)
- Or manually edit your .htaccess file and change the RewriteBase at the beginning to the current folder name. #1 would do that for you.
-
How to move my installation on the same server?
- If you installed Zenphoto in a subfolder named for example Zenphoto and just want to move it to the root or another folder, just copy the complete content (all files and folders) of the folder to the new location.
- Re-upload the setup scripts.
- Now run setup (zp-core/setup.php). This will correct the rewritebase in your .htaccess file to the new location (you can also do this manually within the file).
- Now access your site/admin backend and everything should be as usual.
-
How to install third party plugins
Installing
Official plugin and extensions resided within /zp-core/zp-extensions. You should never install third party plugins there. Instead you need to install them within the root /plugins folders.
Zenphoto plugins consist at least of one file <pluginname>.php. It may optionally use a folder of its same name within the plugins folder that contains further files like extra functions, css files or images. Example:
plugins/<yourplugin>.php plugins/<yourplugin>/ (contains additional files needed by your plugin)
If you download a (third party) plugin and uncompress (unzip) it you will often have the file or the file and folder within another folder. Don't upload that folder but its content as shown above to the /plugins folder directly. The third party plugin should now show up on the plugins tab on the backend.
Usage
Not all themes are already setup with all plugin features because they are optional. On our themes page your can see what standard theme supports which layout specific plugins.
This means you have to add some of them to your theme files yourself. This is generally very easy as it is mostly just adding one extra function where you want the plugin's feature to be visible. Please refer to the plugin's instruction. Please additionally refer to these text to learn how to do that: -
Why are images of the correct size still cached additionally?
Once-upon-a-time the image was not cached for display on the single image display (image.php) if the size is already the needed size.
Remember Zenphoto's albums are file system based so there was a serious problem with that strategy. Caching an image happens only once per "size" and takes some disk space. Testing to see if the image should be cached happens every time the image is referenced for display in any way.
So the trade-off is storage space vs. processing overhead. With the cost of disk so low these days the choice is a no-brainer.
If you want no processiong/caching you need to modify your theme's image.php to use the full image directly.
-
How do watermarks work?
- Are watermarks actually added to the image so that when someone saves them they get their image has our watermark on them?
Yes. Watermarks are added to the image itself by the image processor when discovered and resized by Zenphoto and cached. That is for all images except the full images you upload. Those only on request by setting the options. - Are watermarks applied still if we upload via FTP? If so how does that work?
Yes, see #1Ӭ - If we turn on Watermarking what happens to existing images that have previously been uploaded before we turned on Watermarking?
As they are cached nothing happens unless you clear the cache so the cached images are regenerated. - Can we use "text" to add as a watermark or are graphics only supported?
Only images supported (as there is no option, right?) but of course you can use text as an image.
- Are watermarks actually added to the image so that when someone saves them they get their image has our watermark on them?
-
What is the CombiNews mode?
This mode shows the lastest gallery items like images incl. videos and audio or albums mixed within the news section as if they were news articles. The image/album title is shown as the title and the image/album description as the article content. The CombiNews mode has basically three modes:
- Latest images: Entries for all images ever added
- Latest albums: Entries for all albums ever created
- Latest images by album: Entries for all images but grouped by images that have been added within a day to each album (Scheme: 'x new images in album y on date z')
Here an example of the 3rd mode:
First entry is a real article, the second a gallery one.
There is of course also a RSS mode available for CombiNews (see the documentation).
Note since news articles are only sorted by date the CombiNews might lead to unexpected results if you set the image sortorder to "id". Try using "date" or "mtime".
Image and albums and articles are still independend and nothing is changed on your site, except the display. You can use this to easily setup a photoblog or audio/podcast blog for example.
View a live demo here -
Why is there a check box for editing the Titlelink?
In case you are not satisfied with the automatic generation of the titlelink you can edit it. For example if you have a long title you might want to have a shorter url name or maybe the seo friendly generation cleared out something you want to be there, then you can edit it. You can only edit it if you check the checkbox "edit titlelink".This overrides the permaTitlelink option.
-
Can I change the names of the theme files pages.php and news.php?
No, but you can change the mod_rewrite rules in the .htaccess file (if your server supports this) if you need to show a different term in the URL.
-
Can I use another WSIWYG editor than TinyMCE?
Generally yes. Note that tinyZenpage will only work with TinyMCE. Also the Ajax File Manager may not work as a plugin with another editor. According to Ajax File Manger's creator phpletter it is compatible with FCKeditor though.
-
Where to upload images etc. via FTP?
Zenphoto is file system based and stores its albums and images within the root albums folder. This folder may not contain images directly but organized in folders. These folders are recognized as albums by Zenphoto and may contain images and further sub folders in unlimited levels. -
How to create custom TinyMCE configurations
- Create in the root plugins folder a new folder called tiny_mce
- Inside the new tiny_mce folder create a new folder called config
- Go to zp-core/zp-extensions/tiny_mce/config and copy any or all of the existing config files to get you started.
- Place the copied files in your new /plugins/tiny_mce/config/ folder
- Rename your copied config file(s) to something unique for each file, e.g. add a prefix like my or anything else you wish to use.
- Open the new renamed config file and ensure the first javascript line is pointing to the correct location of the normal tiny_mce.js file, by default this should be
- Make any further edits you wish to make within the config file.
- If you want to use your own CSS file for the editor add a new line after the last theme_advanced_**** item and enter
content_css : "/themes/yourthemename/content.css", <- make sure you have the comma at the end. - Create your own content.css file in your theme folder or copy one of the tiny_mce theme css files located in
/zp-core/zp-extensions/tiny_mce/themes/advanced/skins/default and place that in your theme folder and then edit it to your desired requirements and styles. - Upload the new tiny_mce folder (and its contents) in the plugins directory and your new theme content.css file to your zenphoto site.
- Login to your zenphoto admin and go to Options, Plugins, Tiny_mce and then select from the drop down selects your new tiny_mce config files and apply (save).
Your tiny_mce editor for your articles etc should now be working and using your own config files and content.css file.
For more information of config options for tiny_mce go to http://tinymce.moxiecode.com/ and have a look at some of the examples to see what you can do. -
Is it possible to rename the "uploaded" folder and put it somewhere else?
Yes, open plugins/tiny_mce/plugins/ajaxfilemanger/inc/config.base.php and in the lines 51 and 52 you find these lines:
define('CONFIG_SYS_DEFAULT_PATH', '../../../../../uploaded/'); //accept relative path only define('CONFIG_SYS_ROOT_PATH', '../../../../../uploaded/'); //accept relative path onlyChange the name and the path (must be relative paths!) as you like but remember this will be overwritten with every update. It will not be made an option because the file manager is a third party product that gets updated itself so the modification of it is kept to a minimun to make updates easier.
-
Where does the file manger store uploaded files?
The files are stored within the folder uploaded that is located in the root folder of your Zenphoto installation and that is created while running Zenpage setup automatically.
-
I have added pages and articles but I don't see them on my site!
A theme with Zenpage support is required to see them. Themes with Zenpage support are currently:
- Zenpage-default (official and included)
- Effervescence+ (official and included)
- Garland (official and included)
- zpfocus (third party)
- zpGalleriffic (third party)
- zinenaboxpacity (third party)
Of course you can setup any theme with Zenpage support yourself. Read on the theming tutorial how to do it. -
Why is the image rotate button grayed out?
The GD graphics libary on your server is missing support for image rotation. You have to contact your host about that. -
How does Zenphoto cache?
There are several different caches:- Image cache: Zenphoto does not touch the original images you uploaded to the albums directory. But it does cache the resized images like thumbs, sized images or any other sized images so they don't have to be generated any time again. Zenphoto creates these cached files on the fly. This means they are not preliminary created but on request, e.g. if someone visits a page of your site. Depending on teh dimensions of your images and your server's power this might result in an initial delay once.Those images are stored in the root /cache folder. You can clear this cache manually on the backend. It is for obvious reasons not possible to delete this cache. Note Zenhoto can't create thumbs from multimedia files.

- RSS cache: Zenphoto caches the rss feeds provided as static .xml files in the root /cache_html/rss/ folder. This can of course be disabled via an option.
- Static HTML cache: Optionally there is also the included static_html_cache plugin that caches all pages as static .html files in the same /cache_html. If you use the multilingual option a page for each language is generated automatically. Note that the cachce needs to be cleared if you change anything and want to to appear before the expire date set, it is not autocleared when saving an update.
- Sitemap cache:If you have eenabled the sitemap-extended plugin the sitemap is cached in /cache_html/sitemap as a static xml file as well. You can of course also disable this cache via the plugin's options.
- Image cache: Zenphoto does not touch the original images you uploaded to the albums directory. But it does cache the resized images like thumbs, sized images or any other sized images so they don't have to be generated any time again. Zenphoto creates these cached files on the fly. This means they are not preliminary created but on request, e.g. if someone visits a page of your site. Depending on teh dimensions of your images and your server's power this might result in an initial delay once.Those images are stored in the root /cache folder. You can clear this cache manually on the backend. It is for obvious reasons not possible to delete this cache. Note Zenhoto can't create thumbs from multimedia files.
-
Someone's asking for a PHPInfo(), what is that?
PHPInfo() is a method by which you can get a HTML (browser-based) report on your version of PHP which is installed on your webserver, and also any information about installed modules relating to your ISP or webhost configuration of PHP. It provides very useful information for supporting zenphoto, as it will help us to determine vital information about your server.
This is how you can display your PHPinfo():- Open a new text document in your favorite text editor.
- Add the following line to the document: <? phpinfo(); ?>
- Save the document as phpinfo.php and upload it to your webserver in an web-accessible location.
- Execute the document by pointing your browser to the file (e.g. http://www.yourhost.com/locationoffile/phpinfo.php
This will output a large amount of very useful information for you to peruse. You can provide this link to the support forum as a means to help us troubleshoot your configuration. You should delete the file once the issue has been resolved just to be safe. -
I have enabled comments on the gallery options and for each image and album but there is no comment form showing up on my theme!
Zenphoto 1.2.6 introduces the comment_form plugin that needs to be enabled to enable the comments section. -
Is it possible to configure TinyMCE differently?
Yes, of course. You find the configuration file for the text editor under /zp-core/js/file editor_config.js.php. You will find all info about configuration options on the TinyMCE wiki: http://wiki.moxiecode.com/index.php/TinyMCE:Index -
Does Zenphoto work with PHP Safe Mode?
Safe mode is generally considered bad practice for web hosts and users, as it breaks many programs and does not provide any real improvement in security.
1.0.8 and above should now be compatible with PHP safe mode. If any problems occur in a safe_mode configuration, please report a New Ticket describing the problem.
There may still be problems uploading using the administrator's interface while in safe_mode. This problem is not possible to fix, as in safe_mode it is impossible to both create a folder and write to that folder using the web server alone. You may only upload to existing folders that you've created using FTP upload. To get around this, we recommend you upload via FTP, or create the folders you want using FTP, and also ask your host to turn off safe mode as noted above. -
My pictures are in /zenphoto/albums/MyAlbum but the URL says /zenphoto/MyAlbum! It's wrong!
No, it's not! The URLs are correct as Zenphoto makes them. They aren't supposed to have albums in them because they aren't pointing to the folder! They're rewritten by the Apache module mod_rewrite, which translates URLs into script arguments, in this case, inputs to zenphoto. Read the next question to find out how this works. -
How do I enable mod_rewrite?
mod_rewrite is an Apache module, so it requires Apache. If you're on a shared web host, you'll have to e-mail them and ask for it. Most large web hosts that use Apache will have it enabled already, but yours may not, it's not uncommon. When the apache module mod_rewrite is not loaded, you can´t use mod_rewrite within your ZenPhoto configuration. Via phpinfo() you can look to see if mod_rewrite is listed as loaded module. If is not, you can load it by open the httpd.conf of your apache and uncomment (delete the leading #) or add this line:
LoadModule rewrite_module modules/mod_rewrite.so
Secondly, you need have the correct.htaccess file in your zenphoto installation. If you have copied the one from the distribution, Setup will have updated it to your configuration. Otherwise, make sure the RewriteBase line is correct. It should be the URL to your zenphoto after the domain name. For example, the RewriteBase for http://www.zenphoto.org/zenphoto looks like RewriteBase /zenphoto .
Third, you need to make sure mod_rewrite option is enabled (see the last question.) -
How do I disable the right click button to protect my images against downloading?
First you really need to know that by viewing images (or most other content) on the web the visitor's browser has already made a copy on the visitor's computer. It is stored in the browser's cache. Otherwise the browser would not be able to display it at all. That is how the net works. Therefore the only secure way to protect your images on the net is not to put them there in the first place.So, the question boils down to “how can I protect my intellectual rights by preventing viewers from capturing my images while still making them available for view.” Usually the actual question is “how can I disable the right click button {so that people cannot download my images.}”
The first part of this question is easily answered. There are many java scripts available to disable this action. Unfortunately, the second part of the question is not addressed by the first. The right click/save target as context menu is only one of a myriad of ways that someone can capture web content.
There is a very good discussion of this on about.com. But, just in case this link goes away without us noticing, I will summarize what it tells you.- Disabling the context menu (what right click takes you to) is very annoying to people used to using the context menu for web browsing. Disabling it may turn people away from your site in disgust.
- Disabling the context menu does not prevent capture of web content, it only prevents one small method of doing so.
So, if you wish to protect your images you need to take a different approach. Some suggestions are:- Watermark your image. Zenphoto provides a means to do this.
- Upload only small, WEB quality images. These images may be captured, but will be useful only for WEB pages.
- Embed copyright information in the image — both in the metadata and with steganalysis.
But please do not cripple your site by disabling the context menu. Even if you do, it is quite easy for the viewer to re-enable it by typing javascript:void oncontextmenu(null) into the address bar of the browser. -
Is there any limit to the number of images?
Nope, there are no limits to the number of images Zenphoto can display in a gallery or album. Zenphoto is file system based and unique in that it scales relatively well due to its simple design. The speed of the gallery is dependent on a few minor things, namely the number of images in any given album.
Zenphoto should be able to handle any number of images in the entire gallery ”“ it will help greatly with performance if they are separated into smaller albums. Even then, single albums with 2000+ photos are possible and will still be usable.
If you're having trouble with the speed of large galleries, try using the static_html_cache plugin to cache Zenphoto pages. Frequently loaded pages will be much faster. -
Can I integrate Zenphoto with Wordpress or another CMS?
Not really, Zenphoto is actually a standalone CMS of its own. Technically, there are basically three recommended ways to "integrate" Zenphoto with another CMS:- Match the look of your Zenphoto site to your existing CMS site is to create a Zenphoto theme using the CSS and HTML from your site's theme.
- Technically more advanced is zenphoto as a "plugin".
- For Wordpress specifially there are techniques available collected here : http://www.zenphoto.org/2009/11/integrating-zenphoto-into-wordpress-tutorials/
Also please review our theming tutorial. For Wordpress specifially there are some Wordpress tools available.
Or maybe you want to run your entire site with Zenphoto using the CMS plugin Zenpage. -
I have moved my zenphoto installation on my server and now all urls are wrong!
If you first installed Zenphoto within www.yourdomain.com/zenphoto and later decide to move it directly into the root www.yourdomain.com you need to run setup (/zp-core/setup.php) again. This will correct the rewrite base within the .htaccess file.
You need to do the same if you want to keep Zenphoto within a subfolder but would like to rename it to /gallery for example. -
When I click on "Gallery" the directory structure is shown
Clearly the problem is that index.php isn't set as a default file for directories under Apache (or whichever server you're using).
If it's Apache and you have access to your server's main Apache config file, you need to edit your apache.conf or httpd.conf and find the DirectoryIndex line. It should read:
DirectoryIndex index.html index.htm default.html or something similar.
Change it to:
DirectoryIndex index.html index.htm default.html index.php and whichever other directory default files you want, but definitely add the index.php to that line :) That should do it.
Read more here...
http://httpd.apache.org/docs/2.0/mod/mod_dir.html
or
If you have no access to the main config file, create a file called index.html (This is the file that Apache looks for (This is set up in http.conf)) and write a redirect code to point to the index.php file. -
What is mod_rewrite and how does it work?
mod_rewrite is an Apache module for translating URLs. In zenphoto with mod_rewrite enabled, http://www.zenphoto.org/zenphoto/impressionists/ is the URL you see (even though the album is stored at /zenphoto/albums/impressionists on the server -- the two are related, but not the same). Then, mod_rewrite translates the requested /zenphoto/impressionists into /zenphoto/index.php?album=impressionists! They're the same! The first URL, which looks like paths to a folder, is called "pretty" or "cruft-free", because it's user-friendly and easy to remember. Pretty cool huh?
If you get "404 - Page Not Found" errors and images that don't show up, you probably have told zenphoto to use mod_rewrite, but you don't have it enabled on your server. You should set the configuration option mod_rewrite to false. Logon to Admin, click on the Options tab then the Gallery configuration tab. Uncheck the box for Enable mod_rewrite and press the save button. Or you can read the next question to see how to turn it on. -
Is it possible to remove the filename extension from image names in the URL?
No, the unique identifier to find the photo requested is the actual filename, and the only way to get that is from the URL, so it must contain the filename. That's just how ZP works, it's filesystem-based. The titles are rather stored in the database as metadata, which you can't use to get a photo and doesn't need to be unique.
-
I don't have any items in my Theme Colors (Spam Filter, Watermark) dropdown list
Check your CGI log. You will probably find that the PHP glob() function has been disabled. Zenphoto uses this function in multiple places. But, don't panic. There is a define at the front of functions.php which you can change to enable replacement code for this function. Find the linedefine('SAFE_GLOB', false');in functions.php and change thefalsetotrue -
I did enable a plugin but why I don't see anything of its features on my gallery?
We did not setup all standard themes with all plugin features because they are optional. On our themes page your can see what standard theme supports which plugins.
This means you have to add some of them to your theme files yourself. This is generally very easy as it is mostly just adding one extra function where you want the plugin's feature to be visible. Please refer to these text to learn how to do that: -
I am having trouble with album (images) with accented characters in their names
It is best you avoid using accented characters in your file or folder names. it is really unnecessary to have them in file/folder names since you can edit the title to use whatever characters you like. Your site viewers see the Title, not the file/folder name.
The technical explaination is that zenphoto stores its data in UTF-8 format in the database. But your files ystem probably uses some other character set, most likely ISO-8859-1. So when zenphoto gets the name of the image (filename) or the album (folder name) the character set of that string will not be UTF-8. This is OK so long as the string also does not contain any characters which are invalid in UTF-8. Unfortunately many accented characters from ISO-8859-1 are not valid when interpreted in UTF-8 so when the string is stored into the database MySQL truncates it at the first non UTF-8 character.
Current versions of Zenphoto will handle conversion of file system character strings to UTF-8 representation. However Zenphoto assumes that the filesystem characterset is ISO-8859-1, so if yours is in some other character set, things still will not work. Another player in this drama is the character set assumed for Image URIs. Most servers seem to use ISO-859-1 even though the page claims to be in UTF-8. If your server actually assumes UTF-8 for these, you need to change the UTF8 image URIs option on the gallary configuration tab. -
The number of thumbnails on theme's album view does not match my setting
When a theme specifies a setting for the number of image (or album) thumbnails to display in a "row", the thumbnails per page will be rounded up to the nearest multiple of that specification. Prior to the 1.3.2 release setting these were done via the normalizeColumns function. Post 1.3.1 the settings are on the theme options tab.
Errors, Error messages, etc.
-
Replacing default images
Zenphoto uses various default images for display like default thumbs for multimedia items if no video thumbnail is used or for password protected albums. You can of course use your own images instead.
Example: /zp-core/images/err-passwordprotected.png
To replace this place an image of the same name within one of these places:
- /plugins/images/err-passwordprotected.png (globally)
- /themes/<yourtheme>/images/err-passwordprotected.png (only for the theme)
The same can be done with plugins. Replicate the plugin folder structure in your theme and the files therein will override the default ones. Or you can make "global" overrides of files by placing the structure in the plugins folder.
-
I am getting a "500" error when I attempt to view my gallery
There are several possibilities for this error.- Mod rewrite may not work on your installation. Correct this by un-checking the mod rewrite checkbox on the General options tab, URL options.
- There may be file permissions issues on your site. Some servers are configured not to allow scripts to run if the script file security is too loose. Check especially the root index.php script. Your service provider can tell you what these file permissions must be.
- You may not have the Apache autoindex_module installed. There is a line in several .htaccess files Zenphoto uses (the root .htaccess, one in the zp-data folder, and one in the cache folder) which is intended to prevent directory browsing of the folder(s). This line reads IndexIgnore * Remove this line.
-
I'm getting error reports that some function is deprecated.
In the process of adding features and improving Zenphoto we
occasionally find we need to change the way something has worked in the past.
Thus we may make some theme functions obsolete. When this happens we try to
maintain the old function name to keep un-migrated themes working. But we move
these functions to a plugin named deprecated-functions so that sites which are
up-to-date do not have the overhead of having them loaded each page refresh.This plugin will cause an error notification upon use of the
function so that you will know your theme needs to be updated. Generally this notification
will explain the update need is. These messages can be annoying once you know
that theme modification is needed. So, the plugin also has options that let you
disable the message on those functions that you recognize need replacing.
Disable the message and your theme will work as it did in the prior release.But NOTE: The implementation of the replacement functions in
the plugin may not survive the test of time. There will be no attempt to keep
these functions working as Zenphoto matures. If you get these deprecated
function notifications, upgrade your theme at your earliest convenience. -
Someone's asking for a PHPInfo(), what is that?
PHPInfo() is a method by which you can get a HTML (browser-based) report on your version of PHP which is installed on your webserver, and also any information about installed modules relating to your ISP or webhost configuration of PHP. It provides very useful information for supporting zenphoto, as it will help us to determine vital information about your server.
This is how you can display your PHPinfo():- Open a new text document in your favorite text editor.
- Add the following line to the document: <? phpinfo(); ?>
- Save the document as phpinfo.php and upload it to your webserver in an web-accessible location.
- Execute the document by pointing your browser to the file (e.g. http://www.yourhost.com/locationoffile/phpinfo.php
This will output a large amount of very useful information for you to peruse. You can provide this link to the support forum as a means to help us troubleshoot your configuration. You should delete the file once the issue has been resolved just to be safe. -
I think I found a bug! What do I do?
If you think you've found a bug, first check for a new version and upgrade if you find one. If that doesn't fix the problem, then search for the bug, look for a similar bug, and if you still think we don't know about it, submit a ticket on Bugtracker(GitHub) (Note: you must register at GitHub) Be as thorough as possible and include your server configuration (Apache version, PHP version, etc.) and a detailed description. Also include a URL to your site, preferably the link that shows the problem. We can do a much better job of helping you if we can see what is going on. -
When I have a problem with Zenphoto, where can I get help?
Keep reading this page, or go straight to the Support Forums.
Images & Albums
-
Replacing default images
Zenphoto uses various default images for display like default thumbs for multimedia items if no video thumbnail is used or for password protected albums. You can of course use your own images instead.
Example: /zp-core/images/err-passwordprotected.png
To replace this place an image of the same name within one of these places:
- /plugins/images/err-passwordprotected.png (globally)
- /themes/<yourtheme>/images/err-passwordprotected.png (only for the theme)
The same can be done with plugins. Replicate the plugin folder structure in your theme and the files therein will override the default ones. Or you can make "global" overrides of files by placing the structure in the plugins folder.
-
How to setup a theme for Colorbox
If you wish to display the full image using the Colorbox plugin, you probably need to modify your theme if it does not have support for it already. Just enabling the plugin is not enough otherwise. It is recommended to read the theming tutorial for theming basics.
image.php
Generally all standard themes link the sized image to the full image. To make it open in a Colorbox you need to add the javascript jQuery definition to the page's header and add a class to the link so Colorbox is assigned to it. If you set the full image to protected you need to add to the jQuery js define the photo: true option.
You can look at the Zenpage theme's image.php for an example usage. Several examples and detailed info on configuring Colorbox are available on the Colorbox site itself.
album.php
If you wish to link the thumbnails on the album page directly bypassing the image.php page you need to do the above and also change the link within the next_image() loop to link to the full image. Mika Epstein (Ipstenu) has written a detailed tutorial about this.
Note that this will only open the images of the current page. If you want to open all images in the album you need to modify your theme quite further to print invisible links of thte other pages' images. This will require some more advanced Zenphoto and PHP knowledge using the Zenphoto object model framework.
-
Why are images of the correct size still cached additionally?
Once-upon-a-time the image was not cached for display on the single image display (image.php) if the size is already the needed size.
Remember Zenphoto's albums are file system based so there was a serious problem with that strategy. Caching an image happens only once per "size" and takes some disk space. Testing to see if the image should be cached happens every time the image is referenced for display in any way.
So the trade-off is storage space vs. processing overhead. With the cost of disk so low these days the choice is a no-brainer.
If you want no processiong/caching you need to modify your theme's image.php to use the full image directly.
-
How do watermarks work?
- Are watermarks actually added to the image so that when someone saves them they get their image has our watermark on them?
Yes. Watermarks are added to the image itself by the image processor when discovered and resized by Zenphoto and cached. That is for all images except the full images you upload. Those only on request by setting the options. - Are watermarks applied still if we upload via FTP? If so how does that work?
Yes, see #1Ӭ - If we turn on Watermarking what happens to existing images that have previously been uploaded before we turned on Watermarking?
As they are cached nothing happens unless you clear the cache so the cached images are regenerated. - Can we use "text" to add as a watermark or are graphics only supported?
Only images supported (as there is no option, right?) but of course you can use text as an image.
- Are watermarks actually added to the image so that when someone saves them they get their image has our watermark on them?
-
How is metadata from images used?
Without metadata (EXIF, IPTC) there is no title that is associated with the imagefile. The normal working of Zenphoto is to use metadata if it exists in the image. It will only use the filename if no other title is found.
Once a title is set, it is not changed unless you invoke a metadata refresh. So note that even if you changed the title or any other metadata based content it will be overridden on a metadata refresh.
With the coming Zenphoto 1.4.2 it will be possible to exclude certain metadata fields from importing.
-
How to move, copy or rename albums or images without loosing title, descriptions, tags etc.?
First you need eto understand that Zenphoto is file system based. It recognizes albums and images on discovery. What is not found there anymore is considered gone. What is found new is considered new.- Images
- Info embeded via image meta data (EXIF/XMP):
This is the way we recommend. On uploading Zenphoto will read this data and add it to the database. If you you now move, copy or rename image files via FTP the data will travel with the images as it is embeded in them. However the images will be recognized as new even if their data travels with them. - Info added to the database on the backend:
If you have not embeded the data in the images and move, copy or rename them via FTP the data will be lost. If you want to avoid this you have to use the tools for "move, copy, rename" you find on right side on each image's entry on the backend edit pages. Then the data of the database is moved as well.
- Info embeded via image meta data (EXIF/XMP):
- Albums
On the file system albums are just folders. Folders can't have meta data so on moving, copying or renaming a folder all of the info entered to the database on the backend will be lost. This counts of course also to its images except you have embeded their info. If you want to avoid this you have to use the tools for "move, copy, rename" you find on right side on each album's entry on the backend edit pages. Then the data of the database is moved as well.
- Images
-
The colors of my images are wrong
First, most web browsers ignore color profiles. The latest Safari (since 2.0) and Firefox (since 3.0, disabled by default) are currently notable exceptions. It is said that Internet Exporer 9 will also have support.
Second, there are two aspects of color space. The first is the RGB values of the pixels. Then there is a color profile which may be associated with an image. So you can have pixels which are sRGB or adobeRGB or some other "color space". If the pixels are not sRGB then typically the web programs will not display the color correctly. If they are, then things should be fine.
Zenphoto does resizing of images with image processing libaries that are installed on your server. Zenphoto supports two of them:- GDlibary: This is the default libary which is most commonly availabe on servers. GD does NOT support or preserve color profiles embeded in images.
- Imagick libary (since 1.3): This is capable to preserve color profiles (due to a bug it is not in Zenphoto 1.3.1 yet) but the recommendation to use sRGB still persists.
Also beware that the commonly used "export to web" feature of some well know image processing tools generally does strip meta data including color profiles from image to achieve smaller file sizes. -
Is it possible to manage youtube videos (or from another portal)?
Zenphoto is actually meant to manage multimedia files on your own webspace but with Zenphoto 1.2.6 there is indeed a way:- Enable the class-textobject plugin on the backend plugins page.
- Upload a plain text file (.txt) with code to embed a specifc (video) file via ftp or the backend.
- To use an thumbnail besides the default one follow the same instructions as for video thumbnails.
- That's all.
-
Opening full images using Thickbox or any other JavaScript "box" script does not work
If you see some weird messy text showing instead of the full image you need to disable the full image protection on the backend options (Options > Images > Full Image Protection). These "box" scripts need to access the full image directly which naturally is not possible if it is protected. -
I am having trouble with album sorting
If you have used either the move album or the copy album feature introduced in zenphoto version 1.2 you may be have some albums which do not have the proper parentid. You can run the parentid_check script to check for an fix any problems with parentid's. The script should be placed in your zp-core folder. A fix for the orginal problem was made to the nightly builds and included in the 1.2.1 release; however, any move or copy done before the fix was made will result in albums that need this correction. -
My pictures are in /zenphoto/albums/MyAlbum but the URL says /zenphoto/MyAlbum! It's wrong!
No, it's not! The URLs are correct as Zenphoto makes them. They aren't supposed to have albums in them because they aren't pointing to the folder! They're rewritten by the Apache module mod_rewrite, which translates URLs into script arguments, in this case, inputs to zenphoto. Read the next question to find out how this works. -
Why does deleting of an album via the admin interface fail?
This may be caused by some files within the folder of that album that should not be there like for example the hidden/invisible .DS_Store files the finder of Mac OS X creates. They may be transfered with upload folders or archives. You would have to delete these files directly via ftp. Best is to avoid uploading them in the first place. -
Why does Zenphoto not show a thumbnail from my video?
Zenphoto is not able to generate thumbnails from videos and shows therefore a default replacement image. There is no way at all to do this automatically with PHP without installing a extension on your server itelf. But you can do it manually:- Make a screenshot from your movie
- Put the image named as the movie (for example: movie named movie.flv, image named movie.jpg — lower case suffixes are required!) into the album folder where your movie is located.
-
Is it really necessary to pre-cache my images at all?
Zenphoto was designed to lazy-load images to allow a gallery of unlimited size while still allowing viewing any image at any time regardless of whether it has been processed or not. It does it on the fly. It was not designed to process them all at once, the pre-caching was a hack that was added on later. The following diagram shows the process:
Better to leave them be, let the gallery work as it is, and process them when they're first requested. For users, this will mean a very slight delay the first time an image is *ever* viewed, and absolutely none after that. This is how Zenphoto is designed to work, and we think how it works best. No need to pre-cache anything, just quit worrying about the initial lag from the first processing, it only happens once.If you really need to precache image use the cache_manager plugin. But note that a theme may use special custom sizes that may not be covered by the plugin unless the theme properly registers the sizes. See the plugin documentation for details on that. -
Help! My images aren't displaying after installation and setup!
There are a number of reasons why you photos might not display after installation and setup.- You may need to check your permissions on your albums directory and cache directory. Permissions for Zenphoto files and folders
- It could be that PHP Safe Mode is enabled. Your ISP will need to help you with this configuration. You can obtain more information in the FAQ item entitled "What is PHP Safe Mode?"
- Check your .htaccess file if you're using Apache, and make sure you have the correct path for the RewriteBase line at the top. If you're not using Apache or it doesn't seem to be working, reset your mod_rewrite option.
- Search the ZenphotoForums for help, or start a new topic there. Zenphoto has a very helpful community, so don't be shy!
-
Is it possible to administrate images hosted on another server?
Zenphoto unfortunately does not support this. Zenphoto must be installed on the same server as the photos it is hosting. This is what we recommend.
Even if this was possible, it would be very slow as Zenphoto is filesystem-based and uses many filesystem operations, and doing that over a network would slow things down significantly. -
Why are some of my thumbnails/sized images not generated? Why does Zenphoto make my server crash while processing images?
Server memory issues
If you're running a web server on a VPS or other resource-limited environment, then you might not have enough memory available to the server to process very large images. You can use the following table as a guideline to see how much memory you need available to process images of different sizes:- VGA Image, 640 x 480 pixels => needs ~4.1 MB Memory
- SVGA Image, 800 x 600 pixels => needs ~4.8 MB Memory
- 1 MP Image, 1024 x 798 pixels => needs ~6.3 MB Memory
- 2 MP Image, 1600 x 1200 pixels => needs ~11.7 MB Memory
- 6 MP Image, 2816 x 2112 pixels => needs ~22.6 MB Memory
- 8.2 MP Image, 3571 x 2302 pixels => needs ~41.7 MB Memory
As you can see, the 8.2-Megapixel 3571x2302 image requires a very large amount of memory to process, and that's simply because of the number of pixels. It doesn't matter if the image is only 2 or 3 megabytes when compressed in JPEG form, or what colors the image contains or anything-- it's just how big it is, because all of those pixels have to have a place in memory while the GD library processes them. There's no way around it!Workaround 1: Re-configuring your server to work with large image files (5MB to 10MB)
Tutorial written by Aladio (https://github.com/zenphoto/zenphoto/issues/169)
The aim of this tutorial is to help the intermediate user configure PHP and setup large image files so they may be uploaded and displayed properly using Zenphoto.
Configuring PHP
The following 5 settings need to be verified or changed in the php.ini file, found on your web server, in order to run Zenphoto with large image files.
Note: You should confirm with your web-host that these settings are supported and how much server memory is available! If you are on a shared host you probably might not be allowed/able to changes these.
-
Find memory_limit around line 455 set it to 128M
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M -
Find post_max_size around line 725 set it to a big number so you can upload multiple large files.
; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
post_max_size = 1G -
Find file_uploads around line 865 set it to On.
; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On -
Find upload_max_filesize around line 865 set it to a big number so you can upload multiple large files.
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 1G -
Find max_file_uploads around line 865 set it to upload multiple files at once.
; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20
Setting up Large Image Files (5MB to 10MB)
Horizontal or Landscape Images (height < width)
If you are able to make the above changes to your php.ini file, large landscape image files should display fine when running Zenphoto.Vertical or Portrait Images (height > width)
Large portrait image files must be rotated properly or PHP will run out of memeory while Zenphoto is trying to rotate and resize your image. You will see a box containing the name of the image instead of the image itself if the error occurs. (See below for directions on how to debug images).Zenphoto reads the EXIF data contained in the image file to determine the image orientation. If the EXIF orientation property is set to anything but 1, Zenphoto will try to rotate your image. If the image is a large one the process will fail.
Debugging images
There could be many reasons for this, so the best way to diagnose this problem is to view the actual image error itself. You can do this by adding '&debug' to the image URL zenphoto uses to process the image.
To do that, locate the failed image in your gallery (it should show just the filename with a box around it, in place of the image), then right-click it and choose 'Copy Image Location' (Firefox; in IE, choose 'properties' and copy the image URL from there).
Then, paste that URL into your address bar, and at the end of it, type "&debug" without quotes. Press enter to see the image processor's error message. If you need help diagnosing it, feel free to post on the support forums.
Workaround 2: Use Imagick instead of the GD libary
Since Zenphoto 1.3 you could also switch to Imagick (ImageMagick) which may require less memory, and at least won't share memory with Apache. If your server supports this you can enable it via a checkbox on Options > Image.Browser connection issues
Another problem is that browsers often make two requests per server at the same time to speed up image loading. This is perfectly normal, but if two requests for that 8-megapixel image are made and both need processing, then the memory requirement is doubled. The only way around this is to limit the number of requests your browser makes. In Firefox, this can be done by going to about:config as the URL and searching for the network.http.max-persistent-connections-per-server option and setting it to 1.Corrupt image files
Sometimes the cause can also be a corrupte image file. That can happen sometimes if you upload via FTP or a general program error. Try opening the file with an editor and re-saving it.Corrupt EXIF/meta data
If you are using EXIF or IPTC meta data this data can be corrupted. That can happen if your editor or camera embedds it wrong or by encoding issues. Try to open the file with an editor and try to re-save it.
Installation
-
How to rename the folder Zenphoto is installed in?
If you did not install Zenphoto in the root of your webspace but in a folder name zenphoto for example just rename it. Then you need to do one of these things:
- Re-run setup (you might need to re-upload the setup file and folder you will get a note about that)
- Or manually edit your .htaccess file and change the RewriteBase at the beginning to the current folder name. #1 would do that for you.
-
How to move my installation on the same server?
- If you installed Zenphoto in a subfolder named for example Zenphoto and just want to move it to the root or another folder, just copy the complete content (all files and folders) of the folder to the new location.
- Re-upload the setup scripts.
- Now run setup (zp-core/setup.php). This will correct the rewritebase in your .htaccess file to the new location (you can also do this manually within the file).
- Now access your site/admin backend and everything should be as usual.
-
How to install third party plugins
Installing
Official plugin and extensions resided within /zp-core/zp-extensions. You should never install third party plugins there. Instead you need to install them within the root /plugins folders.
Zenphoto plugins consist at least of one file <pluginname>.php. It may optionally use a folder of its same name within the plugins folder that contains further files like extra functions, css files or images. Example:
plugins/<yourplugin>.php plugins/<yourplugin>/ (contains additional files needed by your plugin)
If you download a (third party) plugin and uncompress (unzip) it you will often have the file or the file and folder within another folder. Don't upload that folder but its content as shown above to the /plugins folder directly. The third party plugin should now show up on the plugins tab on the backend.
Usage
Not all themes are already setup with all plugin features because they are optional. On our themes page your can see what standard theme supports which layout specific plugins.
This means you have to add some of them to your theme files yourself. This is generally very easy as it is mostly just adding one extra function where you want the plugin's feature to be visible. Please refer to the plugin's instruction. Please additionally refer to these text to learn how to do that: -
Closing the site while updating Zenphoto
It might take a while to upload all the files if you are updating your Zenphoto installation. Since Zenphoto is not fully functional while doing this process your visitors will get error messages and probably be confused.
If your server has modrewrite capability it is quite easy to temporarily close your Zenphoto site. Just add this before anything else in your .htaccess file:
Redirect /index.php /<name of page>.htmlSince all of Zenphoto's front end goes through the root index.php file all will be redirected to the placeholder page you specified. The Zenphoto backend will still be accessible directly.
-
I have problems installing or upgrading using SimpleScripts
We don't support using installtion helper scripts like SimpleScripts and we don't know what these are doing. If you have problems please ask the creators of SimpleScripts.
There are frequent reports that especially upgrades are often not working as expected. A user has provided some instructions on this forum thread.
We recommend to do a manual install as described on our installation page. -
How to move my installation to a new server?
- Copy Zenphoto to the new server. Make sure it is the same release version as the old install. Do not run setup yet.
- Copy all customized themes or plugins from the old to the new location.
- Copy the albums and the cache folder from the old to the new location and if you used Zenpage also the uploaded folder.
- Export the database using the database backup tool on the admin overview page of the old install.
- Copy the backup folder with its content to the root of your new installation.
Now run setup (zp-core/setup.php). It will provide the option to import that database backup when you have to set your user/password details. - Now access your site/admin backend and everything should be as usual.
-
Does Zenphoto work with PHP Safe Mode?
Safe mode is generally considered bad practice for web hosts and users, as it breaks many programs and does not provide any real improvement in security.
1.0.8 and above should now be compatible with PHP safe mode. If any problems occur in a safe_mode configuration, please report a New Ticket describing the problem.
There may still be problems uploading using the administrator's interface while in safe_mode. This problem is not possible to fix, as in safe_mode it is impossible to both create a folder and write to that folder using the web server alone. You may only upload to existing folders that you've created using FTP upload. To get around this, we recommend you upload via FTP, or create the folders you want using FTP, and also ask your host to turn off safe mode as noted above. -
Permissions for Zenphoto files and folders
Zenphoto defaults the permissions for files and folders based on the file permissions of the zp-core folder. This usually is the correct setting. However some server configurations may not work with this setting. Zenphoto must have read access to all files and folders within the zp-core, albums and the plugins folders. (For some features such as image uploading Zenphoto also needs write access to the albums folder.) It must be able to read and write to the zp-data, cache and cache-html folders. The themes folder must be readable as well. For the theme editor to work Zenphoto must also be able to write to this folder.
Ideally, permissions should be set up with 0644 files/0755 directories ([rw-r--r--] files and [rwxr-xr-x] directories) permissions, with [youruser:webservergroup] ownership. If you can do that, we highly recommend it. The idea is basically to keep ownership of the files yourself, give group access to the web server, and shut everyone else out.
Some servers are configured so that scripts cannot be executed from folders with weak permissions. We suggest you start with the strictest permissions and relax them if that causes permissions errors. Unfortunately, there are many permutations of how servers can be configured and not all are reasonable or rational. You may have to experiment to see what works for your situation.
NOTE: As from Zenphoto release 1.2.4 you can alter these defaults from the setup program. See the Strict Permissions entry. Starting with release 1.2.7 Setup will attempt to modify the permissions on its files and folders. However, if it is unable to do this you will have to manage the permissions manually. -
I have problems installing Zenphoto on 1&1
If you don't have thumbnails you will need to open up the .htaccess file and add the following line to it if you are running php4.AddType x-mapp-php5 .php
For further issues please take a look at this tutorial:
http://www.cyberward.net/blog/2009/05/installing-zenphoto-on-1and1/ -
Can I integrate Zenphoto with Wordpress or another CMS?
Not really, Zenphoto is actually a standalone CMS of its own. Technically, there are basically three recommended ways to "integrate" Zenphoto with another CMS:- Match the look of your Zenphoto site to your existing CMS site is to create a Zenphoto theme using the CSS and HTML from your site's theme.
- Technically more advanced is zenphoto as a "plugin".
- For Wordpress specifially there are techniques available collected here : http://www.zenphoto.org/2009/11/integrating-zenphoto-into-wordpress-tutorials/
Also please review our theming tutorial. For Wordpress specifially there are some Wordpress tools available.
Or maybe you want to run your entire site with Zenphoto using the CMS plugin Zenpage. -
I'm having a problem installing, what should I check first?
Make sure you've:- Downloaded files for latest zenphoto release.
- Uploaded everything to your web server (including .htaccess file in root zenphoto directory)
- Visit your gallelry. Setup will run and show you a system check status.
- Correct any issues indicated.
- Press the GO button.
- Upload the pictures you want into your albums directory, and organize them how you wish in folders and subfolders.
If you need more help, go to the Zenphoto Forums. -
What is magic_quotes_gpc and why should it be disabled?
To quote from the PHP manual itself:
Warning This feature has been DEPRECATED and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.
magic_quotes_gpc is an early functionality of PHP that was ill-conceived and has been a great burden to developers, as well as end users ever since it's inception. It encourages sloppy code and consumes valuable resources when it is enabled.
You can disable magic_quotes_gpc by editing your PHP.ini file. Change the linemagic_quotes_gpc = Ontomagic_quotes_gpc = OffYou can also disable magic_quotes_gpc in your zenphoto .htaccess file by adding the linephp_value magic_quotes_gpc offPlease contact your hosting provider for further assistance. -
When I click on "Gallery" the directory structure is shown
Clearly the problem is that index.php isn't set as a default file for directories under Apache (or whichever server you're using).
If it's Apache and you have access to your server's main Apache config file, you need to edit your apache.conf or httpd.conf and find the DirectoryIndex line. It should read:
DirectoryIndex index.html index.htm default.html or something similar.
Change it to:
DirectoryIndex index.html index.htm default.html index.php and whichever other directory default files you want, but definitely add the index.php to that line :) That should do it.
Read more here...
http://httpd.apache.org/docs/2.0/mod/mod_dir.html
or
If you have no access to the main config file, create a file called index.html (This is the file that Apache looks for (This is set up in http.conf)) and write a redirect code to point to the index.php file. -
Can I just use specific files of from the GitHub development version to fix a problem in a stable release?
This is strongly discouraged — unless you have been told to do this by the developers — as we have made many changes and certainly do not test except as a complete package. You could, of course, do a file comparison to see what has changed exactly. -
I have moved my zenphoto installation on my server and now all urls are wrong!
If you first installed Zenphoto within www.yourdomain.com/zenphoto and later decide to move it directly into the root www.yourdomain.com you need to run setup (/zp-core/setup.php) again. This will correct the rewrite base within the .htaccess file.
You need to do the same if you want to keep Zenphoto within a subfolder but would like to rename it to /gallery for example. -
I have problems installing Zenphoto on Dreamhost
A tutorial by our user bensp: http://www.zenphoto.org/support/topic.php?id=316&replies=31
Internationalization
-
TinyMCE and/or the file manager are not translated
TinyMCE and Ajax File Manager are third party solutions that use their own translation files and technique. There are already some languages preinstalled. These are bascially those that are currently completed or partly available for Zenphoto itself and listed here: http://www.zenphoto.org/trac/report/9 But you might want to check their own project sites for more or also updated translations:
- Ajax File Manger language packs: http://www.phpletter.com/Language-Packs-Download-Center/
- TinyMCE language packs: http://services.moxiecode.com/i18n/
-
I am having trouble with album (images) with accented characters in their names
It is best you avoid using accented characters in your file or folder names. it is really unnecessary to have them in file/folder names since you can edit the title to use whatever characters you like. Your site viewers see the Title, not the file/folder name.
The technical explaination is that zenphoto stores its data in UTF-8 format in the database. But your files ystem probably uses some other character set, most likely ISO-8859-1. So when zenphoto gets the name of the image (filename) or the album (folder name) the character set of that string will not be UTF-8. This is OK so long as the string also does not contain any characters which are invalid in UTF-8. Unfortunately many accented characters from ISO-8859-1 are not valid when interpreted in UTF-8 so when the string is stored into the database MySQL truncates it at the first non UTF-8 character.
Current versions of Zenphoto will handle conversion of file system character strings to UTF-8 representation. However Zenphoto assumes that the filesystem characterset is ISO-8859-1, so if yours is in some other character set, things still will not work. Another player in this drama is the character set assumed for Image URIs. Most servers seem to use ISO-859-1 even though the page claims to be in UTF-8. If your server actually assumes UTF-8 for these, you need to change the UTF8 image URIs option on the gallary configuration tab. -
I have just installed version 1.1.7 and I cannot change the language
There is a problem with the 1.1.7 release that occurs on virgin installations or upgrades from releases prior to version 1.1.6. It may not be possible to change the language from HTTP Accept Language. To correct this, make a file named fixlocale.php and insert the following code:
<?php
require_once('template-functions.php');
query("INSERT INTO " . prefix('options') . " (name, value, ownerid) VALUES ('locale','en_US', 0)");
?>
place this file in your zp-core folder then browse to it. Once the script has run you will be able to change to the language of your choice. This problem is also corrected in the nightly builds. -
I am having difficulties with zenphoto language translations.
There are several problems you might be having with language translations:- There is no language selection for my desired language.
Zenphoto relies on volunteers to translate each release. We have a large number of dedicated individuals making translations. There may be a translation for your language which was not avaiable in time for the zenphoto release. You can check by reviewing on GItHub the current master branch or the development branch for the next release. If you language does not exist there, consider volunteering to produce it. For details see our translation tutorial. - There are phrases which are displayed in English even though I have selected a different language.
Zenphoto is an ever evolving software. We will occasionally include a translation that is not 100% complete feeling that something is better than nothing. Check the curent Zenphoto master branch to see if there is an update for your language. If that does not resolve the issue, post a note on the issue report indicating what revision of zenphoto your are running and phrases which are displaying in English. (It will also help if you indicate where you see them, eg. the Stopdesign image page, the admin theme tab.) - When I select my language I get an error saying that the locale is not supported on my server.
Language support requires two capabilities in addition to #1 above. First the server running your site must have support installed for the locale associated with your language. (See #4 for the second capability.) If you are getting an error when selecting a language saying that it is not supported on the server you will have to contact your provider to get the server updated with the necessary language support. You can get a list of locales your server supports by running the list_locales script. For further information on locales see Controlling your locale with environment variables and Locales mini-HOWTO.You can also look at the output of the list_locales script to see if there is an alternative language that fits your needs. For instance, if Zenphoto supplies a Spanish (Latin America) tranlsation But your server does not support it. Maybe your server supports Spanish (Bolivia). You could rename the es_LA folder to es_BO and get the translations. - Even though support for my language exists, I am getting only English text.
Zenphoto uses a PHP feature named gettext() to support translations. If you are getting a notice from setup.php that PHP gettext() support is not installed all text will be displayed in English no matter which language you have selected. We hope in the future to have a replacement library to provide translations for installations with no gettext() support. Until then you will have to arrange with your ISP for gettext to be installed. - I have selected HTTP Accept Language on the admin gallery configuration tab but I am not seeing text in my language.
Your browser must specify your preferred language. To see what is being reported as your preferred languages run the list_locales script. (Also see #3 and #4 above.
- There is no language selection for my desired language.
Miscellaneous
-
How to setup a theme for Colorbox
If you wish to display the full image using the Colorbox plugin, you probably need to modify your theme if it does not have support for it already. Just enabling the plugin is not enough otherwise. It is recommended to read the theming tutorial for theming basics.
image.php
Generally all standard themes link the sized image to the full image. To make it open in a Colorbox you need to add the javascript jQuery definition to the page's header and add a class to the link so Colorbox is assigned to it. If you set the full image to protected you need to add to the jQuery js define the photo: true option.
You can look at the Zenpage theme's image.php for an example usage. Several examples and detailed info on configuring Colorbox are available on the Colorbox site itself.
album.php
If you wish to link the thumbnails on the album page directly bypassing the image.php page you need to do the above and also change the link within the next_image() loop to link to the full image. Mika Epstein (Ipstenu) has written a detailed tutorial about this.
Note that this will only open the images of the current page. If you want to open all images in the album you need to modify your theme quite further to print invisible links of thte other pages' images. This will require some more advanced Zenphoto and PHP knowledge using the Zenphoto object model framework.
-
Closing the site while updating Zenphoto
It might take a while to upload all the files if you are updating your Zenphoto installation. Since Zenphoto is not fully functional while doing this process your visitors will get error messages and probably be confused.
If your server has modrewrite capability it is quite easy to temporarily close your Zenphoto site. Just add this before anything else in your .htaccess file:
Redirect /index.php /<name of page>.htmlSince all of Zenphoto's front end goes through the root index.php file all will be redirected to the placeholder page you specified. The Zenphoto backend will still be accessible directly.
Plugins, FIlters, etc.
-
Replacing default images
Zenphoto uses various default images for display like default thumbs for multimedia items if no video thumbnail is used or for password protected albums. You can of course use your own images instead.
Example: /zp-core/images/err-passwordprotected.png
To replace this place an image of the same name within one of these places:
- /plugins/images/err-passwordprotected.png (globally)
- /themes/<yourtheme>/images/err-passwordprotected.png (only for the theme)
The same can be done with plugins. Replicate the plugin folder structure in your theme and the files therein will override the default ones. Or you can make "global" overrides of files by placing the structure in the plugins folder.
-
How to setup a theme for Colorbox
If you wish to display the full image using the Colorbox plugin, you probably need to modify your theme if it does not have support for it already. Just enabling the plugin is not enough otherwise. It is recommended to read the theming tutorial for theming basics.
image.php
Generally all standard themes link the sized image to the full image. To make it open in a Colorbox you need to add the javascript jQuery definition to the page's header and add a class to the link so Colorbox is assigned to it. If you set the full image to protected you need to add to the jQuery js define the photo: true option.
You can look at the Zenpage theme's image.php for an example usage. Several examples and detailed info on configuring Colorbox are available on the Colorbox site itself.
album.php
If you wish to link the thumbnails on the album page directly bypassing the image.php page you need to do the above and also change the link within the next_image() loop to link to the full image. Mika Epstein (Ipstenu) has written a detailed tutorial about this.
Note that this will only open the images of the current page. If you want to open all images in the album you need to modify your theme quite further to print invisible links of thte other pages' images. This will require some more advanced Zenphoto and PHP knowledge using the Zenphoto object model framework.
-
How to install third party plugins
Installing
Official plugin and extensions resided within /zp-core/zp-extensions. You should never install third party plugins there. Instead you need to install them within the root /plugins folders.
Zenphoto plugins consist at least of one file <pluginname>.php. It may optionally use a folder of its same name within the plugins folder that contains further files like extra functions, css files or images. Example:
plugins/<yourplugin>.php plugins/<yourplugin>/ (contains additional files needed by your plugin)
If you download a (third party) plugin and uncompress (unzip) it you will often have the file or the file and folder within another folder. Don't upload that folder but its content as shown above to the /plugins folder directly. The third party plugin should now show up on the plugins tab on the backend.
Usage
Not all themes are already setup with all plugin features because they are optional. On our themes page your can see what standard theme supports which layout specific plugins.
This means you have to add some of them to your theme files yourself. This is generally very easy as it is mostly just adding one extra function where you want the plugin's feature to be visible. Please refer to the plugin's instruction. Please additionally refer to these text to learn how to do that: -
Is it possible to extend Zenpage myself?
Zenpage is just a little more complex Zenphoto plugin with some core support for efficiency, but just a plugin. This means you can write just another Zenphoto plugin or a theme custom function that uses Zenpage functions to provide custom functionality. You only can extend the theme relevant part of Zenpage that way unless you want to hack the plugin itself. That of course is not recommended because of possible problems with further updates. If you have a suggestion please use the Zenphoto forums.
-
TinyMCE and/or the file manager are not translated
TinyMCE and Ajax File Manager are third party solutions that use their own translation files and technique. There are already some languages preinstalled. These are bascially those that are currently completed or partly available for Zenphoto itself and listed here: http://www.zenphoto.org/trac/report/9 But you might want to check their own project sites for more or also updated translations:
- Ajax File Manger language packs: http://www.phpletter.com/Language-Packs-Download-Center/
- TinyMCE language packs: http://services.moxiecode.com/i18n/
-
What is a permaTitleLink?
The titlelink is the URL name of a page/article/category that is automatically generated seo friendly when adding an item. This is basically the equivalent to Zenphoto's album name and image file name and unique to that page/article/category even if using Zenphoto's multilingual mode.
If you don't check the permaTitlelink option the titlelink will be newly generated everytime you change the title of a page/article/category. This can lead to broken links if someone or a search engine links to you. This concept is taken from Wordpress where it is called permalink (or slug). It is referred to that as titlelink in all functions so it is called that that here, too. -
I have added pages and articles but I don't see them on my site!
A theme with Zenpage support is required to see them. Themes with Zenpage support are currently:
- Zenpage-default (official and included)
- Effervescence+ (official and included)
- Garland (official and included)
- zpfocus (third party)
- zpGalleriffic (third party)
- zinenaboxpacity (third party)
Of course you can setup any theme with Zenpage support yourself. Read on the theming tutorial how to do it. -
Can I extend the functionality of Zenphoto myself?
Yes, you can. Zenphoto supports an extensive plugin architecture . It is best you extend using these tools. You can browse to the extensions section and see what's already available.
Zenphoto is open source, so you can modify its core directly. Bear in mind code changes to the core Zenphoto code may make upgrading difficult later on, and generally hacks have little or no support.
Searching
-
Can I use tags from Zenphoto on my news articles?
Yes, can be used on news articles and pages as well.
-
The search does not work for articles and pages!
Zenphoto's search engine also includes articles and pages. If it does not work and you are using none of the standard themes it might not be implemented in your theme. See the theming tutorial how to implement this.
Security, Passwords, etc.
-
How to assign a user to a specific page or article?
This is the way if you are the master admin and want to set up something for users with lower rights:
- Create a user with rights for one album and Zenpage rights.
- Create a new page/article as master admin for that user.
- Now select the user the page/article should belong to from the author dropdown.
- Now set the page/article to locked for changes and save it. Then only admins with full admin rights or that user will be able to edit or delete that page. For all others the link and the icon buttons should be grayed out.
Note that every user with Zenpage rights can set every page or article locked for changes himself that is not already locked for changes. It does not matter if he is the original author or not.How do I get images into my pages or news articles?
There are now two ways:
- You can use Phpletter's Ajax File Manager that is included as a TinyMCE plugin. That file manager is either accessible via the "Manage files" button on the main pages or main articles page or via the image button onTinyMCE tool bar. You can view some screenshots on how to use it here: How to use the file manager
You can use this file manager to upload and manage many formats that Zenphoto itself does not support. Note that files you upload with this are placed within the uploaded folder and are independend from the normal albums. Visit also the site of the creators of this file manager: www.phpletter.com. - Also you can use tinyZenpage, a default plugin to the by default enabled text editor TinyMCE, to access images, albums as well as pages, articles or news cateogries for including. Here are some tinyZenpage screenshots about it and there is also some general info on the Zenpage plugin page.
How to change the upload file size limit for the file manager?
There is no option but you can change it directly in the file
zp-core/plugins/tiny_mce/plugins/ajaxfilemanger/inc/config.base.php in line 70. -
How to setup anonymous uploads by unregistered users?
It is not possible to upload via the backend being unregistered and it is really not recommended to lay your site open to the hacks people could do to you with un-gated access.
If you really want to do this, setup an "unpublished, protected" album . (Or leave the album published, but set the default for albums and images images to be unpublished.) Create an anonymous FTP account that allows write only access to this album folder.
Then your anonymous guests can FTP files and folders to with that account until your server chokes with too much traffic or your disk is filled to the brim. You can view this folder and publish/move images you want to approve. -
On my pages/articles list on the admin some pages/articles are greyed out and I can't edit them.
These pages/articles are locked by the original author or last author who edited them. Only that author's user will be able to edit or unlock them or any user with full admin rights.
-
I am having problems logging into the Zenphoto administrative pages
First please review I forgot my admin password. If you are still having problems after following that advice you will have to enable some debugging to allow the developers to observe what is happening when you attempt your login. Locate your site's global-definitions.php file. Using a text editor find the line which containsdefine('DEBUG_LOGIN', false); // set to true to log admin saves and login attemptsChange false to true and save the file. Now drop your administrator's table as described in the referenced troubleshooting article. Delete any debug_log.txt file in your zp-data folder. Run setup, create a new user/password, then attempt to log in. A new debug log will be created containing infromation the developers will need to troubleshoot your problem. -
How not to show albums on the gallery and/or password protect albums correctly (as well as other Zenphoto items)
If you do not wish albums or images to be shown in your gallery they should be marked not published. If you want to restrict access to them you password protect them. You will note that there are four states you can get out of this:- Published/not password protected: Any one can see these items
- Not published/not password protected: People have to "know about" these items to view them. (That is they need to know the URL.)
- Published/password protected: People will know of these items but not be able to access them without the password.
- Not published/password protected: These are truely restricted to "logged in administrators"
This is also the same for Zenpage pages and news articles/categories (passwords for categories only).Note: on the 1.4.2 release we have made a change in behavior having to do with Zenphoto users seeing unpublished items. Prior to this release, any logged in Zenphoto user was shown all unpublished items. This stems mainly from when the only users were the site managers.
We have found that our users need two kinds of users: Ones that manage all or part of the site and ones that are "customers" of the site. For the latter, it was not desirable that they be shown unpublished items in menus.
The 1.4.2 release will show unpublished items only to users with rights to manage the item type. Thus, admin users will see all unpublished items. Users with manage all xxxx rights will see unpublished xxxx items. All other users will not see unpublished items.
Of course if the user has a direct link to the unpublished item he will still be able to direct link and view it.
-
Permissions for Zenphoto files and folders
Zenphoto defaults the permissions for files and folders based on the file permissions of the zp-core folder. This usually is the correct setting. However some server configurations may not work with this setting. Zenphoto must have read access to all files and folders within the zp-core, albums and the plugins folders. (For some features such as image uploading Zenphoto also needs write access to the albums folder.) It must be able to read and write to the zp-data, cache and cache-html folders. The themes folder must be readable as well. For the theme editor to work Zenphoto must also be able to write to this folder.
Ideally, permissions should be set up with 0644 files/0755 directories ([rw-r--r--] files and [rwxr-xr-x] directories) permissions, with [youruser:webservergroup] ownership. If you can do that, we highly recommend it. The idea is basically to keep ownership of the files yourself, give group access to the web server, and shut everyone else out.
Some servers are configured so that scripts cannot be executed from folders with weak permissions. We suggest you start with the strictest permissions and relax them if that causes permissions errors. Unfortunately, there are many permutations of how servers can be configured and not all are reasonable or rational. You may have to experiment to see what works for your situation.
NOTE: As from Zenphoto release 1.2.4 you can alter these defaults from the setup program. See the Strict Permissions entry. Starting with release 1.2.7 Setup will attempt to modify the permissions on its files and folders. However, if it is unable to do this you will have to manage the permissions manually. -
I have set my Album to not published (my images to not visible) but they still show up when I view my gallery.
If you are logged in as the administrator all albums and images are visible so that you can edit, delete, etc. them. Log out and they should become invisible. -
I forgot my admin password, now what do I do?
If you supplied an email address in the Admin options there should be a Captcha string image on the log-on page. Entering that string as the log-on password will email you a link to reset your password. If the Captcha is not there, or if you don't get the email, you need to delete the Administrators table in your database and re-run setup. -
I have password protected my album but I can still view it without entering the password.
There are three things that might be happening here:- You are logged in as the administrator. Administrators are allowed to view any album, password protected or not.
- You have logged into the album at sometime in the past. Album passwords are remembered in cookies so that vieweres do not have to log in at each page display.
- If you are viewing an image page of a gallery that was not part of the zenphoto distribution it may not have implemented password protection. It is necessary for all image.php pages to use
checkforPassword()to protect elements that you do not want displayed if the viewer has not logged in.
-
How to protect my images from hotlinking?
Although Zenphoto has an option for image protection it does only protect from getting the (full) image link from your gallery site itself but not prevent real hotlinking from outside. Everyone who knows how Zenphoto stores images can find out the direct link with ease.
You can change the location for your albums by modifying the zp-config.php file. There is comentary in the file that will guide you in making such a change. Please carefully note the comments, specially for "external" album folders. Also note that server filesystem permissions settings may prevent you from making these changes.
So, to really protect your images from hotlinking you need to use .htaccess (if you server supports this). Here is a little generator tool for this: http://www.htaccesstools.com/hotlink-protection/. We additionally have prepared a template htaccess file you could adjust.
Zenpage news and pages
-
How to embed images in pages and articles?
There two way to embed images into articles.
- Using images from the gallery via tinyZenpage:
http://www.zenphoto.org/news/using-tinyzenpage - Using images from the uploaded folder:
http://www.zenphoto.org/news/using-the-ajax-file-manager
- Using images from the gallery via tinyZenpage:
-
How to create custom TinyMCE configurations
- Create in the root plugins folder a new folder called tiny_mce
- Inside the new tiny_mce folder create a new folder called config
- Go to zp-core/zp-extensions/tiny_mce/config and copy any or all of the existing config files to get you started.
- Place the copied files in your new /plugins/tiny_mce/config/ folder
- Rename your copied config file(s) to something unique for each file, e.g. add a prefix like my or anything else you wish to use.
- Open the new renamed config file and ensure the first javascript line is pointing to the correct location of the normal tiny_mce.js file, by default this should be
- Make any further edits you wish to make within the config file.
- If you want to use your own CSS file for the editor add a new line after the last theme_advanced_**** item and enter
content_css : "/themes/yourthemename/content.css", <- make sure you have the comma at the end. - Create your own content.css file in your theme folder or copy one of the tiny_mce theme css files located in
/zp-core/zp-extensions/tiny_mce/themes/advanced/skins/default and place that in your theme folder and then edit it to your desired requirements and styles. - Upload the new tiny_mce folder (and its contents) in the plugins directory and your new theme content.css file to your zenphoto site.
- Login to your zenphoto admin and go to Options, Plugins, Tiny_mce and then select from the drop down selects your new tiny_mce config files and apply (save).
Your tiny_mce editor for your articles etc should now be working and using your own config files and content.css file.
For more information of config options for tiny_mce go to http://tinymce.moxiecode.com/ and have a look at some of the examples to see what you can do. -
How to assign a user to a specific page or article?
This is the way if you are the master admin and want to set up something for users with lower rights:
- Create a user with rights for one album and Zenpage rights.
- Create a new page/article as master admin for that user.
- Now select the user the page/article should belong to from the author dropdown.
- Now set the page/article to locked for changes and save it. Then only admins with full admin rights or that user will be able to edit or delete that page. For all others the link and the icon buttons should be grayed out.
Note that every user with Zenpage rights can set every page or article locked for changes himself that is not already locked for changes. It does not matter if he is the original author or not.How do I get images into my pages or news articles?
There are now two ways:
- You can use Phpletter's Ajax File Manager that is included as a TinyMCE plugin. That file manager is either accessible via the "Manage files" button on the main pages or main articles page or via the image button onTinyMCE tool bar. You can view some screenshots on how to use it here: How to use the file manager
You can use this file manager to upload and manage many formats that Zenphoto itself does not support. Note that files you upload with this are placed within the uploaded folder and are independend from the normal albums. Visit also the site of the creators of this file manager: www.phpletter.com. - Also you can use tinyZenpage, a default plugin to the by default enabled text editor TinyMCE, to access images, albums as well as pages, articles or news cateogries for including. Here are some tinyZenpage screenshots about it and there is also some general info on the Zenpage plugin page.
How to change the upload file size limit for the file manager?
There is no option but you can change it directly in the file
zp-core/plugins/tiny_mce/plugins/ajaxfilemanger/inc/config.base.php in line 70. -
Why is there a check box for editing the Titlelink?
In case you are not satisfied with the automatic generation of the titlelink you can edit it. For example if you have a long title you might want to have a shorter url name or maybe the seo friendly generation cleared out something you want to be there, then you can edit it. You can only edit it if you check the checkbox "edit titlelink".This overrides the permaTitlelink option.
-
What is a permaTitleLink?
The titlelink is the URL name of a page/article/category that is automatically generated seo friendly when adding an item. This is basically the equivalent to Zenphoto's album name and image file name and unique to that page/article/category even if using Zenphoto's multilingual mode.
If you don't check the permaTitlelink option the titlelink will be newly generated everytime you change the title of a page/article/category. This can lead to broken links if someone or a search engine links to you. This concept is taken from Wordpress where it is called permalink (or slug). It is referred to that as titlelink in all functions so it is called that that here, too. -
TinyMCE and/or the file manager are not translated
TinyMCE and Ajax File Manager are third party solutions that use their own translation files and technique. There are already some languages preinstalled. These are bascially those that are currently completed or partly available for Zenphoto itself and listed here: http://www.zenphoto.org/trac/report/9 But you might want to check their own project sites for more or also updated translations:
- Ajax File Manger language packs: http://www.phpletter.com/Language-Packs-Download-Center/
- TinyMCE language packs: http://services.moxiecode.com/i18n/
-
I have added pages and articles but I don't see them on my site!
A theme with Zenpage support is required to see them. Themes with Zenpage support are currently:
- Zenpage-default (official and included)
- Effervescence+ (official and included)
- Garland (official and included)
- zpfocus (third party)
- zpGalleriffic (third party)
- zinenaboxpacity (third party)
Of course you can setup any theme with Zenpage support yourself. Read on the theming tutorial how to do it. -
Is it possible to extend Zenpage myself?
Zenpage is just a little more complex Zenphoto plugin with some core support for efficiency, but just a plugin. This means you can write just another Zenphoto plugin or a theme custom function that uses Zenpage functions to provide custom functionality. You only can extend the theme relevant part of Zenpage that way unless you want to hack the plugin itself. That of course is not recommended because of possible problems with further updates. If you have a suggestion please use the Zenphoto forums.
-
On my pages/articles list on the admin some pages/articles are greyed out and I can't edit them.
These pages/articles are locked by the original author or last author who edited them. Only that author's user will be able to edit or unlock them or any user with full admin rights.
-
Can I use tags from Zenphoto on my news articles?
Yes, can be used on news articles and pages as well.
-
Can I use another WSIWYG editor than TinyMCE?
Generally yes. Note that tinyZenpage will only work with TinyMCE. Also the Ajax File Manager may not work as a plugin with another editor. According to Ajax File Manger's creator phpletter it is compatible with FCKeditor though.
-
The search does not work for articles and pages!
Zenphoto's search engine also includes articles and pages. If it does not work and you are using none of the standard themes it might not be implemented in your theme. See the theming tutorial how to implement this.
-
Is it possible to rename the "uploaded" folder and put it somewhere else?
Yes, open plugins/tiny_mce/plugins/ajaxfilemanger/inc/config.base.php and in the lines 51 and 52 you find these lines:
define('CONFIG_SYS_DEFAULT_PATH', '../../../../../uploaded/'); //accept relative path only define('CONFIG_SYS_ROOT_PATH', '../../../../../uploaded/'); //accept relative path onlyChange the name and the path (must be relative paths!) as you like but remember this will be overwritten with every update. It will not be made an option because the file manager is a third party product that gets updated itself so the modification of it is kept to a minimun to make updates easier.
-
What is the CombiNews mode?
This mode shows the lastest gallery items like images incl. videos and audio or albums mixed within the news section as if they were news articles. The image/album title is shown as the title and the image/album description as the article content. The CombiNews mode has basically three modes:
- Latest images: Entries for all images ever added
- Latest albums: Entries for all albums ever created
- Latest images by album: Entries for all images but grouped by images that have been added within a day to each album (Scheme: 'x new images in album y on date z')
Here an example of the 3rd mode:
First entry is a real article, the second a gallery one.
There is of course also a RSS mode available for CombiNews (see the documentation).
Note since news articles are only sorted by date the CombiNews might lead to unexpected results if you set the image sortorder to "id". Try using "date" or "mtime".
Image and albums and articles are still independend and nothing is changed on your site, except the display. You can use this to easily setup a photoblog or audio/podcast blog for example.
View a live demo here -
Can I change the names of the theme files pages.php and news.php?
No, but you can change the mod_rewrite rules in the .htaccess file (if your server supports this) if you need to show a different term in the URL.
-
Where does the file manger store uploaded files?
The files are stored within the folder uploaded that is located in the root folder of your Zenphoto installation and that is created while running Zenpage setup automatically.
-
Is it possible to configure TinyMCE differently?
Yes, of course. You find the configuration file for the text editor under /zp-core/js/file editor_config.js.php. You will find all info about configuration options on the TinyMCE wiki: http://wiki.moxiecode.com/index.php/TinyMCE:Index
This work by www.zenphoto.org is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
For questions and comments please use the forum or discuss on the social networks.
Related items
- tag_extras (Extensions)
- seo_locale (Extensions)
- Zenpage - A CMS plugin for Zenphoto (Extensions)
- gallery_statistics (Extensions)
- Zenphoto 1.1.7 (News)

