Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [Solved]: Autopopulate Custom Field 1 on Upload?  (Read 2799 times)

0 Members and 1 Guest are viewing this topic.

Garibaldi

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 100
    • Wisconsin Collector Car
[Solved]: Autopopulate Custom Field 1 on Upload?
« on: April 16, 2009, 12:11:03 am »

Hello All,

I'm working on a new Coppermine install in which I'd like to be able to upload a jpg or png and have other versions of the same image associated with it. For example I upload picture.jpg and then on the intermediate page for picture.jpg I could choose to download the files picture.psd, picture.tif, etc. The way I was thinking of doing this is just having a zip file that contains all these files.

My question is, is there a way to:
- on normal upload prompt the user when they get to the page to set each individual picture's information to upload the zip file and then populate its URL to the Custom Field 1 input field?
- on batch upload simply check to see if there is a file with the same name as the photo (e.g. picture.zip) in the same directory and to populate the Custom Field 1 input field with that URL?

Maybe there is a better way to do this - please let me know what you think!

Thanks,

Garibaldi
« Last Edit: April 19, 2009, 09:13:06 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Autopopulate Custom Field 1 on Upload?
« Reply #1 on: April 16, 2009, 08:10:12 am »

Possible if you code it, but no pre-existing solution.
Logged

Garibaldi

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 100
    • Wisconsin Collector Car
Re: Autopopulate Custom Field 1 on Upload?
« Reply #2 on: April 16, 2009, 04:53:37 pm »

Sure, I'd be glad to code it but I need a little help getting started. I'd like to add some javascript and a link to the page where you can enter each individual file's information (and select the album to put it in) during a regular upload. Could you help me find where the Custom User Field 1 box is generated in the codebase? Is it in upload.php? Moreover, could you tell me where to look for the batch add files when it sends the queries to the database for the new files in the directory? I could add code at this point to check for the existence of an identically-named file and populate the Custom User Field 1 accordingly at that time.

Thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Autopopulate Custom Field 1 on Upload?
« Reply #3 on: April 16, 2009, 10:54:00 pm »

If you can't figure out what code to edit then the mod you're trying to accomplish will be beyond your skills I'm afraid. Telling you where the code that needs modification resides at would mean doing half the work. Things are not that simple, you know.
Additionally, we have a strict "one question per thread" policy that you agreed to respect when signing up.
Logged

Garibaldi

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 100
    • Wisconsin Collector Car
Re: Autopopulate Custom Field 1 on Upload?
« Reply #4 on: April 17, 2009, 10:55:56 pm »

I've completed the first version of this modification, which I posted in this thread.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.