I am currently designing a website that has multiple portfolios.
The design is created according to the clients specs, so the front-end of zenphoto is of no use. I understand I can create a template, but I have very little time to delve into that (I know, sorry).
The main problem is, I allready have the pages for the portfolios ready and I was looking for a solution for uploading, resizing, watermarking and thumbnailing. I tried all scripts I could find, but only zenphoto has all the things I need... except for 1 thing: it doesn't save the details (sized pictures) and the thumbnails in a logical place with a logical name. As I understand it, I need to use the functions/classes that come with zenphoto to access those (like getDefaultSizedImage etc.)
The problem I am having is this: which files must I include into my existing pages to have access to those functions?
These pages are now designed as follows, each page is loaded with portfolio.php?gallery=galleryName
This script loads all filenames in the folder "galleryName" and creates an unordered list of the associated thumbnails. Each thumbnail then has a link to the detail. For now this only works because I physically created the details and thumbnails. But this needs to be automated for the client. For this I hope to use zenphoto, but I have no idea how to get the url to the details and thumbs from the filelist?
Any help is much appreciated.
Comments
Zenphoto is not an image editor. If all you really want is what you describe, use a tool on your PC to process the images.
You can of course use the classes, etc. of Zenphoto but you will have to set up the environment for them to functions. See the user guide for "Zenphoto as a plugin" You will have to include ALL the zenphoto files to use it.
But basically, Zenphoto was not designed to do what you desire.
except for 1 thing: it doesn't save the details (sized pictures) and the thumbnails in a logical place with a logical name.
I think you should take a closer look at how Zenphoto works, the storage of the cached images is actually quite logical in place and names...
First, I am sure I could make a front-end theme to fit the clients need. Unfortunately I do not have the time.
Secondly, using a tool on the PC to do the work as you propose is not productive and prone to errors. All people of the company must be able to upload pictures and these must all be scaled down to the same sizes with the same watermark. Also, they do not always work at the same PC's (sometimes on the road or from home as well). Setting up a local environment (e.g. photoshop) is not a controllable option.
I do agree with you that this is not the most ideal solution, and I would be better of writing my own "back-end", but like I said, this does not fit in the budget.
Anyway, if I may ask two more questions:
1) Does the license allow me to make custom modifications to the core-code?
2) if yes, could you point me to the files where the cached images are named and saved?
Thank you very much.
Zenphoto does resize the image for display, the thumbnails and the so called sized images. It does not touch the original full images you upload. You have to make sure that your server is able to handle your image sizes.
See: http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#11
1) Zenphoto is GPL v2 licenced so you can do that (the full licence is included), but your are on your own then if you run into trouble as we don't recommend that considering future updates. Better is to see if you can do what you need with plugins and/or the theme.
2) The cache files are within the `cache` folder which rebuilds the structure of the main `albums` folder. It is not necessary to access these directly, Zenphoto's internals do this for you. See:
http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#22
http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#23
Also I would recommend to read the theming tutorial and also to get a little more comfortable with Zenphoto to see what it is capable of.
Also since it seems you want to use Zenphoto within an existing site you should take a look at this:
http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin
Second, I will try to use it as a plug-in. I read most of the basic documentation and browsed through the class/function docs. But I can't find the functions: zp_load_gallery(), zp_load_album($folder), and zp_load_image($folder, $filename) as mentioned in the zenphoto-as-plugin section?
So I only have one basic question: How do I set $_zp_current_album ?
No, I did understand it correctly. Just wanted to make it clear (perhaps that was not necessary in your case, but we of course don't always know the background of users)
Glad you found it. Feel free to ask further questions if needed.
As I look more and more into zenphoto I must say I am quite impressed. It is a lot more flexible than I thought at first. I am sure to give it a good study after this job.