News

Using external sources

Administrating 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.

Using videos from Youtube or other portals

Zenphoto is actually meant to manage multimedia files on your own webspace but since Zenphoto 1.2.6 there is indeed a way:
  1. Enable the class-textobject plugin on the backend plugins page.
  2. Upload a plain text file (.txt) with an embed code via ftp or the backend.
  3. To use an thumbnail besides the default one follow the same instructions as for video thumbnails.
  4. That's all. 

This (...)

Caching

How caching works

 
There are several different caches:
Image cache

Zenphoto does not touch the original full images you uploaded to the albums directory. But it does cache the resized images like thumbs, sized large images or any other sized images so they don't have to be generated again.

Zenphoto also caches sized images if they have the same size of the original full image. It does this to prevent overhead checking this everytime if it needs to be cached. If available on your server Zenphoto will use symlinks to those already sized instead of copying the image again (unless a watermark is set).

Zenphoto generally 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 the dimensions of your images and your server's power this might result in an initial delay once. Other systems create fixed predefined sizes on upload but this allows Zenphoto themes to flexible use all kinds of different (...)

Problems with languages

How to install languages (translations)

A translation has this folder and naming structure:

de_DE/
de_DE/LC_MESSAGES
de_DE/LC_MESSAGES/zenphoto.po
de_DE/LC_MESSAGES/zenphoto.mo

This is an example for the German translation (de_DE locale). Just place the translation folder – in this case de_DE – within /zp-core/locale/ and you can select the translation on the Options > General > Languages on the Zenphoto backend.

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 (...)

Using plugins and third party features

Installing third party plugins

Installing

Official plugins and extensions reside within /zp-core/zp-extensions. You should never install third party plugins there. Instead you need to install them within the root /plugins folder.

Zenphoto plugins consist at least of one file  <pluginname>.php. It may optionally use a folder with the same name within the plugins folder that contains 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 only 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 setup with all plugin features because they are (...)

Login and password problems

What is the link to login on the backend?

  1. mod_rewrite support: <path to your installation>/admin
  2. no mod_rewrite: <path to your installation>/zp-core/admin.php

Forgotten admin password

  1. 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.
  2. 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.

Problems logging in on the backend

First please review "Forgotten admin password" above. 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 contains

define('DEBUG_LOGIN', false); // set to true to log admin saves and login attempts (...)

Site protection

Image hotlinking protection

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 commentary 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 (...)

Installation problems

Notes about deprecated functions

In the process of adding features and improving Zenphoto we occasionally find we need to change the way something 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 what needs to be updated.

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 (...)

Moving and changing existing installations

Changing the folder name Zenphoto is installed in

If you did not install Zenphoto in the root of your webspace but in a separate folder (called "zenphoto" for example) just rename it.
After that you need to do one of these things:

  1. Re-run setup (you might need to unprotect the setup files)
  2. Or manually edit your .htaccess file and change the RewriteBase at the beginning to the current folder name. #1 would do that for you.

Moving on the same server

  1. Unprotect the setup scripts.
    1. Physical move: 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. (...)

pdf-thumb-generation

A plugin to generate preview thumbs from pdf, eps,ai (Adobe Illustrator) and tiff file formats. Ghostscript is required to be installed on the server.

Content macros

Note: The example macros in this text contain a space after the first and before the last bracket. This is to avoid them being executed. On real usages there should be none.

General

Zenphoto 1.4.5 introduced the content macros. The overall concept follows the shortcodes Wordpress features. A simple content macro looks like this (spaces to avoid execution only!):

[ ZENPHOTO_VERSION ]

This is one of the default ones (later more) and will print the Zenphoto version number.

Content macros are added directly as text to fields. They work in the following places:

  • Codeblock content
  • Gallery description
  • Image description
  • Album description
  • Zenpage article content
  • Zenpage page content

If you need them to work on other places you can use the function applyMacros($text). (...)