Posting Moved Pictures Posting Moved Pictures
 

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

Posting Moved Pictures

Started by bigun, April 13, 2007, 01:41:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bigun

On my server I have setup a script to move pictures into a certain directory on a daily basis.

Does Coppermine have the ability to "post" new files just by having them moved into a certain directory and make thumbnails for them on the fly?

Joachim Müller

Coppermine doesn't have a feature that adds pics to the database just based on the fact that they exist within a particular folder. You'd need to set up a cron job on your server that triggers a script (that you would have to come up with based on searchnew.php) that looks up your "special" folder and automatically adds the files to the database.

bigun

Yeah, I was afraid of that.

I somewhat versed in PHP and Perl.. but I don't feel confident enough in my skills to read the code coppermine has and re-write the same function in some command-line type script, I would assume Perl could handle it.

Meh, I'll try anyway, couldn't hurt.  If I do manage to get this script to work, anyway you guys could use it?

Joachim Müller

You'll "just" have to modify searchnew.php, skipping the first step where the folder is being determined (instead: hard-code a particular folder to be used). In the second step, just modify the script to automatically add the files that are ticked (i.e. new) without user interaction. No fiddling with the command line needed, nor the use of Perl.
I guess others might be interessted in your script as well, so yes: please post your code once you have come up with it.