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: Change Ownership of Images  (Read 4281 times)

0 Members and 1 Guest are viewing this topic.

casp3r

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Change Ownership of Images
« on: June 02, 2010, 05:31:05 pm »

Just wondering if it's possible to change the ownership of an image. I'm looking at the possibility of moving from SMG (Simple Machines Gallery) to Coppermine and I don't want my members to have to upload all their images again so I was going to do it. A long process (nearly 1500 images) but I don't mind. Is it possible to upload the images using the admin account and then reassign ownership of them to the appropriate member?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Change Ownership of Images
« Reply #1 on: June 02, 2010, 05:41:02 pm »

That's possible, but changing the ownership is not implemented as a control in the coppermine user interface - you'd have to run some simple queries against the database (using phpMyAdmin or similar), but that's dead easy. For details, post details (e.g. the link to your gallery that is mandatory to post as per board rules).
Logged

casp3r

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Change Ownership of Images
« Reply #2 on: June 02, 2010, 10:31:33 pm »

Hi Joachim and thanks for the reply. Sorry I can't supply a link to the coppermine gallery as I am running it locally (on my laptop) as a trial. The gallery I was thinking of moving over to Coppermine is this one

http://www.niaviation.co.uk/media/
Logged

casp3r

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Change Ownership of Images
« Reply #3 on: June 03, 2010, 11:51:19 am »

Quote
you'd have to run some simple queries against the database (using phpMyAdmin or similar), but that's dead easy.
Any chance you could give me an example?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: Change Ownership of Images
« Reply #4 on: June 03, 2010, 12:02:14 pm »

http://www.w3schools.com/sql/sql_update.asp

Code: [Select]
UPDATE cpg15x_pictures SET owner_id = 'new_id' WHERE owner_id = 'old_id';
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Change Ownership of Images
« Reply #5 on: June 03, 2010, 02:13:20 pm »

...or
Code: [Select]
UPDATE cpg15x_pictures SET owner_id = 'new_id' WHERE filepath = 'path/to/files/by/a/particular/user/';
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.