Can Coppermine do this...? Can Coppermine do this...?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Can Coppermine do this...?

Started by nowotny, March 11, 2009, 03:52:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nowotny

Hello

I have never used Coppermine Gallery before and I wanted to ask you if it can cope with my specific setup... I see it has many, many features and I wouldn't want invest too much time into researching it all if in the end it turned out that it can't do what I need... I'm sure everyone who ever looked for a perfect piece of software for themselves will understand that... :)

Here's my situation:
I have two machines in my LAN:
1. a Windows XP one, on which I hold all my photos on in one folder and a e.g. '21-02-2009' date subfolders that actually hold all the images...
2. a local Linux server that runs the webserver

Now, what I would want to be able to do is to "submit" that main folder with my photos to Coppermine and for it to be able to automatically make albums/galleries based on the 'date' subfolders with thumbnails and the whole sha-bang... :)
Here's a couple of restrictions:
1. the thumbnails should be kept on the server; no files should be saved inside the folders with the images
2. it should automatically acknowledge when I add a new 'date' subfolder with set of photos, e.g. from today and update the gallery (can be with a cronjob or something)

So basically I need a system that'll allow me to show my new sets to my colleagues and so I can easily access it when I'm not at my computer...

I have already mounted the main photo folder on my server machine so accessing it is not a problem... The question is can Coppermine do the rest...?

BTW, I'm a PHP programmer so if there's something that needs to be altered/plugin written/etc, I'm up for it...

Joachim Müller

Coppermine doesn't support remote storage. This being said: no, you can't keep your pics on another machine but the webserver.

gmc

True - Coppermine doesn't support remote storage, and can't do everything you want - but given the following and adding my assumptions:
Quote1. the thumbnails should be kept on the server; no files should be saved inside the folders with the images
Assuming you would never really want to serve the high res image - Coppermine creates thumb and intermediate images based on the settings in config and saves them on the server.
QuoteI have already mounted the main photo folder on my server machine so accessing it is not a problem...
so we have access to both your original photos and Coppermine to start
QuoteI'm a PHP programmer so if there's something that needs to be altered/plugin written/etc, I'm up for it...
OK - then write some code!

Here is what I would envision...
A cron or similar task could run on whatever basis and:
compare folders on your WinXP machine with the folders in the 'albums' directory on the Linux server...
If a new folder is found on the WinXP:

  • Copy folder over to the Coppermine albums directory (user comments in http://php.net/manual/en/function.copy.php give an example of a recursive function to copy a folder and its contents.)  You could resize as part of the copy (using GD2 or similar) to intermediate image size and save time later... but not required - Coppermine can do the resize for you.
  • Then you will need to drive Coppermine functions to:

    • 'create new album'
    • 'batch add files'
    • optionally 'delete full size images' - (if you didn't resize as part of the copy) will save a lot of space depending on original image size.
The challenge would be getting 'create new album' and 'batch add files' to truly run in batch... Certainly would seem to be doable...

A bit of coding to get the pics there 'automagically', and then you have the rest of the features of Coppermine to use.
For what its worth...
Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

nowotny

Quote from: Joachim Müller on March 11, 2009, 05:44:26 PM
Coppermine doesn't support remote storage. This being said: no, you can't keep your pics on another machine but the webserver.
Like I said, I already mounted the remote folder with my photos on my server so now I could trick the webserver to think that the folder is local by making a symlink or something... like I said, that's not an issue here... :)

Quote from: gmc on March 11, 2009, 09:47:14 PMAssuming you would never really want to serve the high res image - Coppermine creates thumb and intermediate images based on the settings in config and saves them on the server.
That's a wrong assumption... ;) That's the whole idea - having access to all the original photos in a manageable fashion...

The "intermediate images" you're mentioning... is it like a set of images in a different resolutions...? Like on flickr...?

Quote from: gmc on March 11, 2009, 09:47:14 PMHere is what I would envision...
Ok... then I'll look into it deeper...

Thanks guys... ;)

gmc

QuoteThat's a wrong assumption...  That's the whole idea - having access to all the original photos in a manageable fashion...
The "intermediate images" you're mentioning... is it like a set of images in a different resolutions...? Like on flickr...?
OK.. the problem with assumptions..  ;D Let me add a couple of thoughts to consider...

Coppermines structure has you place the photos in an 'ALBUMS' directory... it then updates that directory adding thumbnail - and optionally intermediate (yes - different resolution you specify in CPG admin pages) images to the directory... If you create intermediate images, you can then delete the originals to save space...

Since you stated the requirement:
Quote1. the thumbnails should be kept on the server; no files should be saved inside the folders with the images
I would still suggest the copy strategy I outlined... I would purge the copied files once thumb and intermediate images are created ("optionally 'delete full size images'"). I would add a customization that when the intermediate image is served, it also serves a link to the full size image saved on your Win2K machine - pointed at with a simlink. Your folder structure in 'albums' would match that on your Win2K machine - so constructing the link would just be adding the right prefix to the file info saved for the image.  Following this link would bring you the full size image (direct to image or page with <img> tag displaying it based on what you want...)

This keeps CPG structure intact (photos and thumbnails it uses coexist), and your original photos left untouched and alone on your Win2K machine - but accessible via links.

Good luck!
Greg

Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Joachim Müller

Greg's suggestions sound very good to me, I second all of what he said: copy stuff over instead of linking your precious originals into a folder structure. Coppermine stores the files it creates (thumbnails at least) within the very folder structure the originals reside in, so if you decide for the symlink option, the thumbnails will be created on your remote box.

Regarding the "intermediate" sized images question: would it be too much asked from you to at least cursorily read the documentation that we provide?