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: Move albums from the Main gallery to User Galleries  (Read 1490 times)

0 Members and 1 Guest are viewing this topic.

jlwagner

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
    • Electronic Mother
Move albums from the Main gallery to User Galleries
« on: July 28, 2008, 06:34:30 pm »

When I started setting up my Coppermine Gallery, I bulk uploaded my albums in the Main Gallery. Now that I understand Coppermine slightly better, I would like to move the albums from the Main gallery to my User Gallery. Is there any way to do this?

I did a search which found a thread (http://forum.coppermine-gallery.net/index.php/topic,10286.0/topicseen.html) that I thought was the identical question, in which Joachim tersely responded, "not out of the box".  But I am comfortable working "outside the box" with MySQL, so I would like to re-ask this question. 

In that thread, Joachim also questioned why anyone would want to move the albums, and suggested using categories instead.  My answer is as follows:

My new site will have many relatives uploading family scrapbooks, and I am just one of their peers in that regard.  Their photos are uploaded to User Galleries.  Keywords are used to aggregate the photos by subject; they will appear in subject-specific albums in the Main Gallery.  As a newcomer to Coppermine admin, I bulk uploaded some of my albums to the Main Gallery, but my personal scrapbooks should not receive preferential treatment.  How can I move them to a User Gallery of my own? 

I apologize to Joachim for posting my response to the original thread.  I appreciate his quick reactions to postings; the level of support is terrific.  Unfortunately, the original thread was in the wrong forum, so my reply was as well.  He scowled heavily in my direction and locked that thread.  Very sorry to have aggravated anyone.  Thanks for listening.

I am now browsing in the database tables.  Would the following procedure work?

1.  Log in as admin, and add a new user for my non-admin, personal self.
2.  Log-in as the new personal user and add some empty albums in my User Gallery.
3.  Note the album-id's of the new User albums in the MySQL albums table.
4.  Run some queries on the pictures table to change all photos having one of the old album-id's to one of the new album-id's.
5.  Run one query to change all photos having the admin's ownerID to the new personal OwnerID. 
6.  Log in as Admin and delete the now empty Main albums; and make sure the properties for the new User albums are set to what the properties of the old ones were.

Does this sound like it would work?  Is there a preferable way?

Thank you for your attention.

--- Jordan


 


Logged
--- Jordan

jlwagner

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
    • Electronic Mother
Re: Move albums from the Main gallery to User Galleries
« Reply #1 on: July 29, 2008, 07:48:09 am »

For the benefit of others who may want to do the same thing, I report that I tried it and it seems to work, but with one additional step needed:
You also need a query to update the 'owner_name' field in the pictures table. 

I don't understand yet why the pictures table needs both an owner-id field and an owner-name field; seems redundant.  Also don't understand yet why that field isn't in the album table's records instead of the pictures table.  (So far, I've been thinking that all photos in an album are always owned by the album owner.)

Anyway, the bottom line is that this procedure appears to have moved the albums from the Main Gallery to the Users Gallery successfully.  (As always, backup your database first.)

If anything comes back to bite me later, I'll come back here to warn ya.
Logged
--- Jordan
Pages: [1]   Go Up
 

Page created in 0.056 seconds with 20 queries.