Lightroom 2 Zenphoto Publishing Service v1.5.1

126 Commented Monday, June 21st, 2010 Under: Scripts

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

Installation

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.

Configuration

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:

lr_publishing

  1. Go to the Publish Service section of Lightroom and select the “Zenphoto Publisher”
  2. Enter a name for the service (any string is possible)
  3. Enter the URL of your Zenphoto server (without “http”)
  4. Optional: if you have decided to change the default path of the web service you can enter a new path (without a trailing slash)
  5. Press “Save” to create a new service
  6. Open the Publish Service again and login (enter admin username and password)
    lr_login
  7. When the username and the password but also the given Zenphoto-URL and the path to the web service are correct you will see that you are logged-in.
  8. The buttons “Sync Albums” and “Full Sync” are now enabled.
    • Sync Albums” – will read information for all albums from your server and will create corresponding albums (in Lightroom terminology: collections) in Lightroom
    • Full Sync” – will do the same as “Sync albums” but will also read information for all images from Zenphoto and assign them to Lightroom when the images are in your current catalog. (ATTENTION: Windows user please see Bugs and Limitation section below)
  9. Please close the Publishing Manager now
  10. You should now be ready to work!

When you have created your service the first time you will need to make an initial sync with your Zenphoto web server. You can do this first sync via the buttons “Sync Albums” and “Full Sync” as explained above or via the special "Maintenance" collection.

This collection is created automatically, when you have started the service and cannot be removed. In fact it only exists for Windows users which might have problems with the syncing method explained in point (8).

Please note: all Lightroom collections will be removed when you press "Sync albums" or "Full sync" and the service will be initialized again. All unpublished images will be lost and have to be assigned to the albums again. But "Sync albums" or "Full sync" will not make any changes on the server side.

Depending on your catalog size and the amount of images on your server the sync-procedure can take a while. A progress bar will show you the status of your sync.

Once you have synced Lightroom and Zenphoto you will see a list of all you albums already published in Zenphoto and the albums will contain the images (under the assumption that the images on Zenphoto are available in your current active catalog, too). Now you are able to:

lz_publishinglist lr_menu
  • create, rename, delete or modify albums
  • assign images to your albums
  • remove images from your albums

The album creation and edit functionalities are very similar. A dialog as shown below pops-up and allows you to enter some general data as used to in Zenphoto.

lz_edit

Provided functions

  • two-way sync with all albums and images already installed on your Zenphoto installation
  • create albums
  • delete albums
  • rename albums – change the album name, the album folder and start a manual sync of the album
  • handle Zenphoto sub-albums (including rename and move, see: Limitations below)
  • upload images
  • delete images

Requirements

  • Lightroom 3 (previous versions will not work)
  • Zenphoto 1.3
  • you’ll need write permissions for temporary image files for ‘zp-lightroom’ folder on your server

Download "Lightroom 2 Zenphoto"

Type
Freeware
Version
1.5.1
Platform
Lightroom 3
Filename
ZenphotoPublisher.zip
Size
65.6 kB

F.A.Q.

I get “Server could not be connected” but my settings are correct

This happens when your server settings are incorrect. Please make sure that ZenPhoto-URL only contains the server name and the webservice directory does contain the complete webpath. For example: when you have installed Zenphoto under ‘www.testsystem.com/zp then usually the zp-lightroom folder is then located under www.testsystem.com/zp/zp-lightroom. The correct settings are now:

  • ZenPhoto-URL: www.testsystem.com
  • webservice directory: /zp/zp-lightroom

I have logged-in but cannot publish any photos

Please make sure that the zp-lightroom directory has write permissions. This is necessary for temporary files. If you cannot or wont make it writable then change the upload method to XML data.

If you 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.

Changelog

v1.5.1

  • 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!

v1.5

  • 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

v1.3.1

  • 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)

v1.3

  • 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)

v1.2.7

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

v1.2.6

  • 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

v1.2.5

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

v1.2

  • 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

v1.1

  • 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

v1.0

  • 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

v1.0rc

  • 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

v0.6

  • 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

v0.5

  • Zenphoto sub-album handling
  • major stability improvements and exception handling
  • some minor GUI changes

v0.4

  • Unfortunately, I’ve uploaded an old version with non working functions yesterday. This is a bug fixed and hopefully working version now.

v0.3

  • 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… :-(

126 Responses to “Lightroom 2 Zenphoto Publishing Service v1.5.1”

  1. Lars says:

    @Marcia: please change the upload method to “XML data”

  2. Lars says:

    @all: please check out the new version 1.5. Now it supports multiple plugin instances. Please note, due to some major code changes it is necessary that you will need to configure all plugin configuration again.

  3. Fabrice says:

    Hi Lars,
    Since I upgraded to the last version of your plugin, it doesn’t work anymore. With 1.3, everything was perfect. Now, I can’t login and in the field “Path of the web service”, my path is always replaced by “POST”. Is it possible to find the 1.3 version of your plugin ? It was perfect for me :-)

  4. Lars says:

    @Fabrice: have you tried to uninstall and re-install the plugin. Does anybody else has similar problems?

  5. Chris says:

    Hi Lars,
    I’m seeing a problem with 1.5, also. I can’t login, and the plugin reports an internal error when I try to access the Maintenance collection. This looks like a fantastic plugin, so I’d love to be able to get it to work.

    If it helps, the error logged by Lightroom (Mac, 3.0, Snow Leopard) is:

    Plug-in error log for plug-in at: /Users/ctucker/Library/Application Support/Adobe/Lightroom/Plugins/ZenPhotoPublisher.lrplugin

    **** Error 1

    An error occurred while attempting to load this plug-in’s portion of the Export dialog.
    ZenphotoPublishSupport.lua:123: canceled

  6. Fabrice says:

    @Lars : yes, I tried a lot of times. I also saw that sometimes, the “log in” button is empty.

  7. Fabrice says:

    @Lars :
    When I do the step 6 “Open the Publish Service again and login”, My configuration is lost. The only thing that is retained is the description. The other fields are replaced by http://www.yourwebserver.com and /zp-lightroom. When I try to reopen the configuration, the relative path is “POST” and sometimes I have to reload the plugin because Lightroom is saying it is crashed.

  8. Chris says:

    Quick update: I got it all working by updating to the latest version of Zenphoto (I was previously on 1.2) and reconfiguring everything. It’s possible there was a permissions issue on the server, or that the zp-lightroom code doesn’t work well with older versions of Zenphoto. I wasn’t seeing quite the same issues as Fabrice, though: I never had a problem with the relative path being set to POST.

  9. Lars says:

    Hi Chris, on the one hand site it is good to hear that it is working. On the other hand: you should get a message when ZP is lower than 1.3 ;-)

    @Fabrice: which ZP version do you use?

    BTW: version 1.5 was developed on Lightroom 3.2RC (which fixes a lot of bugs). So it would be really great if somebody could confirm that the plugin (v1.5) is running fine or if there are really problems with 1.5. I have tested the plugin today for a long time and couldn’t reproduce any errors… Or in other words: I really would like to fix any bugs but therefore it’s necessary to reproduce them. In the past I’ve noticed that the optimization of the catalog can fix some problems….

  10. Fabrice says:

    Hi Lars, I am using ZenPhoto 1.3.1, the web site is http://www.fabriceplas.be/gallery

  11. Chris says:

    Hi Lars,
    I’ll keep my eye out for any further issues. Are you interested in releasing the source for the plugin? I’d be happy to drop into the code in the future if I have any problems and help out that way (and obviously submit back any tweaks/fixes)
    Cheers,
    Chris

  12. Lars says:

    @Chris: to be honest, it is not really my intention to release the source code at the moment. But I would be happy to get any feedback, bug reports and feature requests to improve the plugin. Do you currently have feature requests or bugs with the current release?

  13. Lars says:

    @Fabrice: have you tried LR3.2RC? And if so, does it fixed your your problem?

  14. Fabrice says:

    I tried with 3.2RC, it doesn’t work. I don’t know what is my problem but computers don’t like me those last days !
    it’s certainly a problem with me, your plugin seems to be perfect for other people :-)

  15. Etienne says:

    I am also getting the problem reported by Fabrice. The relative path in my plugin is being reset to “POST” on each startup of Lightroom. Also, no matter what I put in the relative path field, the plugin sends the request to my server with “POST” as the relative path. I have the tcpdumps to prove this.

  16. Etienne says:

    Also I have tried with 3.2RC and, like Fabrice, the problem is still the same — “POST” is always the value the plugin uses for “relative path” no matter what I put in there.

  17. Lars says:

    Hi everybody, today I have uploaded the v1.5.1 which contains a bug fix, only. Please check the release notes for further information. I’m very sorry for the non-working release. It is really really strange because it is working perfectly on my own system. I will further investigate to find the reason for trouble. Thank you very much for your support! Is anybody there interrested to play the beta-tester role in future? Cheers, Lars

  18. Etienne says:

    hi Lars,

    1.5.1 works for me. The POST problem is corrected. A few questions / requests:

    1/ On my ZP, i have albums within albums. But the plugin has just a straight list of all my albums on one single level. Can the hierarchies mirror each other as hierarchies?

    2/ Some pictures from the web site were not synced with the local folders. I don’t know why.

    3/ I’m happy to be a better tester.

  19. Fabrice says:

    Hi Lars,
    The “POST” problem is corrected here but I still can not connect to server.

  20. Fabrice says:

    hi Lars,
    The POST problem is also corrected here bt I still cannot connect to my server. I tried with Lightroom 3 and 3rc2

  21. Lars says:

    @Fabrice: please check the FAQ and your values.

  22. Fabrice says:

    @Lars,
    On the login button, I can see “Switch User” but I am not logged in.
    Upload Photos is XML Data and I CHMOD 777 the webservice directory and its files. I still cannot connect to the server.

  23. Etienne says:

    @Fabrice,
    try setting it to HTTP POST, not XML. Make sure you are using the username / password for zenphoto, not the server. And make sure your relative path doesn’t include the domain, just everything that comes after it which links to zp-lightroom.

  24. Fabrice says:

    @Etienne,
    I tried both XML and HTTP POST. I am using zenphoto’s username and pass and my relative path is OK

  25. Lars says:

    Hi Fabrice, I’m pretty sure that you have entered somewhere a wrong value. If not try the following: uninstall the publishing service and the plugin. Then optimize your catalog and restart LR. Finally re-install the plugin. I’ve noticed in the past that this can fix problems with plugins (for what reason ever). If everything fails then send me your login data and paths via the contact form (to make i not sooo public :-) ) so that I can take a look (if you like). Greets, Lars

  26. Fabrice says:

    maybe am I stupid but I can’t make work… :-) I’ll send you a private message !

Leave a Reply