Lightroom 2 Zenphoto Publishing Service v1.5.1 + SRC
Today I like to introduce a new plug-in for Lightroom 3. “Lightroom 2 Zenphoto” is – like the name already says – a Lightroom 3 publishing service. The service gives you the possibility to sync Lightroom with your Zenphoto installation – but in an intelligent and very easy to use way…
The new publishing service feature of Lightroom gives you the possibility to monitor and manage exported images on different web services. Whenever you make changes on published photos (e.g. change the image settings or some of the metadata in Lightroom), these photos will be monitored and marked, automatically. You can now republish all these photos with a single click.
Furthermore, whenever you add or remove photos from your published collections, they will be added or removed to your web server the next time you press the Lightroom “Publish” button. Please read the Lightroom 3 documentation for the full story…
How does the service work?
After you have installed the service via the Lightroom “Plug-in Manager”, you have to enter the host of your Zenphoto installation. In the next step press the login button and enter your username and the password. You must be a Zenphoto administrator to be able to login. All other Zenphoto accounts are not allowed to access the web service.
After you successfully logged-in you can sync with your already uploaded images. When pressing the “Sync Album” or the “Sync Photos” button, all Zenphoto albums will be read and created as collections as part of the “Lightroom 2 Zenphoto” service. Therefore the plug-in will connect to the web server and will gather information of your already uploaded albums and images (e.g. the album name, the filename and the URL).
This information is used to to find the images within your current active catalog. If an image was found, it will be assigned to the corresponding collection of the “Lightroom 2 Zenphoto” service.
Finally, you will get an infobox showing you the images which were not found in your current catalog but are available in your Zenphoto installation.
Once you have synced with your Zenphoto installation you can assign any image you like to an album (or – in Lightroom terminology – collection). When you now change any metadata of published images, these images will be automatically marked to be republished the next time you push the “Publish” button.
Please see the Lightroom 3 documentation for details on how it works.
The installation is very simple. The download comes as a ZIP-file which contains two directories:
- ZenphotoPublisher.lrplugin – is the Lightroom plug-in which must be installed from the Lightroom Plugin Manager
- zp-lightroom – the web service which makes the interaction between Lightroom an Zenphoto possible. Please copy this directory as it is into the root path of your Zenphoto installation. All communication between Lightroom and Zenphoto is done via XML-calls:
- IXR_Library.inc.php – 3rd party PHP class to handle XML client/server communication (this class is also used e.g. by WordPress)
- xmlprc.php – contains functions to access the Zenphoto-API, e.g. to read data and make any changes. The service will not write to the database via SQL. Any changes are made via Zenphoto-API calls. So it should be save in any way! Nevertheless, there are some SQL-statements used to get images and albums based on their stored database ID. Unfortunately, Zenphoto offers only the possibility to get this ID, e.g. via “getAlbumID”, but offers no function to get an album or image by its ID 🙁
- xmlrpc_upload.php – receives multipart POST messages and stores the image. The received images will be temporarily saved in the ‘zp-lightroom’ directory. So please make sure that sufficient write permissions are available.
zp-lightroom directory to your root path of your Zenphoto installation. Furthermore you need to install the ZenphotoPublisher.lrplugin via the Lightroom’s Plug-in Manager. When you have done this and you’ll have activated the plug-in you’ll need to do some configuration steps to connect with your server:
now have still problems then check the owner and the permissions of the photos that you want publish. In other words: you must be the owner of a photo that you want publish to the server. This problem can happen when you want “overwrite” an already existing photo on the server which has a different owner or not sufficient permissions.
I get the message ‘Unable to upload photo …’
See the point above. If you still have problems, then please try to change the “Upload method” to “XML data”.
My filenames contain an apostrophe and I cannot publish any photos
Please change the “Upload method” to “XML data”. Until now I couldn’t find any way to cast an apostrophe for the Multipart-POST, but “XML data” is working.
Download “ZenPhoto Publisher”
- many users have reported huge problems with the version 1.5. Unfortunately until now I couldn’d find the reason why the plugin isn’t working on these systems but on my one – I love computers! 🙁 Until I have found the error I have decided do “downgrade” the plugin and have removed the code which seems to make trouble. This release contains now all bug fixes and changes of v1.5 but does not support multiple instances of the publish service anymore. Sorry for any inconveniences!
- new: it is now possible to have multiple instances of the publish service. This might be interesting for people which have more than one Zenphoto installation. To make this possible several major code changes were necessary. So you will need to remove any old plugin versions and initialize all configuration again (sorry, but there is no other way…)
- changed: the communication from the publishing service to the server is now XML based, too. This prevents some errors which could occur when using special HTML characters
- several “small” bug fixes
- blog: created a small F.A.Q. (see above) and updated the screenshoots
- fixed: in some server configurations it could happen that a “PHP Warning: Cannot modify header information…” exception was fired. This release is fixing this issue. (thanks to wolfich for the hint and support)
- new: watermarking, sharpening etc. was re-enabled (due to an user request)
- fixed: the sync functionality was fixed for files with similar names. In the past it happened that a file on a server e.g. with the name “2010-01-02-0100.jpg” was matched to a file in LR e.g. “2010-01-02-0100a.dng”. This happened because I searched for filenames without the filetype extention but also without the trailing “.” and “2010-01-02-0100” is a substring of “2010-01-02-0100a” – which is a wrong match. This is fixed now and working. (thanks to Pekka for the hint)
- new: added the ability to choose the upload method. Usualy, the image files will be trasmitted via HTTP MultiPost.This requires that the “zp-lightroom” folder on the server has write permissions. But but some users will not be able to set this folder to write enabaled. In this case you can select not the upload method from the Publishing Manager dialog. Via a selection menu you can select “HTTP MultiPost” or “XML file” upload method. If you choose the XML method the image file is converted to a base64 string and will be submitted as a part of the XML. Please note, that this kind of upload takes much longer and needs more resourses because the file needs to be converted and trasmitted as a normal string. Furthermore and depending on your webserver configuration a memory allocation error can happen on your server when uploading large files (in this case no special exception handling is possible so you will only get an unspecific error message). I recommend the XML upload only if HTTP MultiPost is not working at all.
- changed: the plug-in checkes now the Zenphoto version. If the version is lower than 1.3 a message appears and a login is not possible.fixed: when using album names with special characters (like: ä,ü etc.) an error “ZenphotoExportServiceProvider.lua:426” happend. This is fixed now. (thanks to Pekka)
- fixed: the links in Lightroom to the albums and images in ‘Show album on Zenphoto” were wrong, when Zenphoto was running in a sub-folder of the webserver. This is fixed now and Zenphoto can run in the root or in any sub-folder with correct Lightroom links. (thanks to Pekka)
- fixed: a bug that happened when trying to sync with only one Zenphoto album was fixed
- fixed: removed the sync function from the Publishing Manager (many users had problems). Please use now the sync function from the “Maintenance” collection, only. Simply, right click on the “Maintenance” node and select “Edit album…”. Choose now your operation from the opened dialog.
- new: delete “not found images”. When initially syncing the images from your server it might happen that there are images on the server but not in your catalog. You are now able to remove these images from your server. Open the album management dialog via the “Edit album” context menu item and press the “Delete –not found-“ button.
- change: when making a sync over all abums and images the “not found images” are now assigned to each collection in Lightroom. So you don’t need to do a sync on each collection to find out which photos are not available in your current catalog. Just open the album management dialog via “Edit album” context menu item and press the “Show –not found-” button.
- change: some internal API changes
- new: the album description field accepts now HTML code, too
- changed: login is enabled when a service has been created. How to use? Enter a name for your service and press the “Save” button. Then open the Publishing dialog again and login.
- improved error handling
- bug: fixed a bug in web service that occured when a database entry without a corresponding album folder exists
- new: upload method of images has been changed from base64 coded XML to HTTP multipart. This makes the upload process faster and enables the handling of larger files without web server memory problems. Only the image upload process uses this multipart method. The data communication itselfs is untouched and XML-based.
- new: new file ‘xmlrpc_upload.php’ in the web service receives the photo and save it to the current path
- change: the value for the web service directory within the Publishing Manager now expects the directory and NOT anymore the path with the xmlrpc.php file. Please ensure that you changed your configuration!
- some minor GUI changes
- some little bug fixes and code optimizations
- data exchange via base64 coded values. This allows a better handling of special HTML characters, like quotes
- redesigned creation and edit dialog to be able to handle some general album facilities
- major stability improvements
- rewritten PHP functions
- ignore dynamic albums when importing from server
- simplified and more stable album and sub-album management (edit/rename/move)
- more secure album delete functionality – you can now choose whether the selected collection (album) shall be removed from the server and from the ZenphotoPublisher service or if the collection shall be removed from the ZenphotoPublisher service, only
- ability to save image list of not found images after a server sync
- Lightroom “rename” function is now working
- further stability improvements
- some minor GUI changes
- Zenphoto sub-album handling
- major stability improvements and exception handling
- some minor GUI changes
- Unfortunately, I’ve uploaded an old version with non working functions yesterday. This is a bug fixed and hopefully working version now.
- initial release
Bugs & Limitations
- Due to a bug in Lightroom, the Zenphoto sub-albums are not yet fully supported
- Lightroom crashed sometimes when using the Sync buttons from inside the Publishing Manager. This seems to happen under Vista only, and is already announced as a bug to Adobe. I never have experienced catalog damages – but nevertheless: use it on your own risk. If you afraid problems then make use of the sync buttons from withing the “Maintenance” collection. This works in any case!
- ATTENTION: do never ever make an album part of itself or of an containing sub-album. Usually, there should be fired an exception by Zenphoto, but it doesn’t happen… 🙁