Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Posting Moved Pictures  (Read 2404 times)

0 Members and 1 Guest are viewing this topic.

bigun

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Posting Moved Pictures
« on: April 13, 2007, 01:41:52 pm »

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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Posting Moved Pictures
« Reply #1 on: April 13, 2007, 02:48:19 pm »

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

bigun

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Posting Moved Pictures
« Reply #2 on: April 13, 2007, 03:00:35 pm »

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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Posting Moved Pictures
« Reply #3 on: April 13, 2007, 03:13:07 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.