coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: sunster13 on April 22, 2007, 04:34:11 PM

Title: Export?
Post by: sunster13 on April 22, 2007, 04:34:11 PM
Hi,

A few months ago I had a gallery on my site, but the site died shortly after.  I decided to revive the site, but the gallery was giving me an error.  I installed the latest version of cpg, and tried importing the db that already had a lot of photos (I edited the .sql file, and replaced all the cpg146 with cpg1410).  That worked, and I see all the pictures, but the usernames don't exist, because it is not bridged to mybb anymore.  I tried bridging to my new IPB, but the user id's don't correspond, and some of the previous users are no longer on my site.

Is there anyway I could export all the pictures, and then import them on a fresh install, with all the usernames replaced by mine?  That way, there wouldn't be any issues with usernames or bridging, since only the photos were imported.


Thanks
Title: Re: Export?
Post by: Stramm on April 22, 2007, 07:21:55 PM
You'd just have to edit your db a lil bit more... in the pictures table set the owner_id to your uid (usually 1) and the owner_name to your user name
Title: Re: Export?
Post by: sunster13 on April 22, 2007, 07:33:55 PM
Thanks, where do I imput that though?

I'm in phpmyadmin, and see those fields, but I'm not sure which fields to put that in.
Title: Re: Export?
Post by: Stramm on April 22, 2007, 07:41:37 PM
click 'SQL' and enter your statement... always backup your db before messing around with it

would look something like this

UPDATE cpg1410_pictures SET owner_id= '1'
or if you want to restrict it to a certain album
UPDATE cpg1410_pictures SET owner_id= '1' WHERE aid='15'

do similar for the owner_name
Title: Re: Export?
Post by: sunster13 on April 24, 2007, 11:44:37 PM
Quote from: Stramm on April 22, 2007, 07:41:37 PM
click 'SQL' and enter your statement... always backup your db before messing around with it

would look something like this

UPDATE cpg1410_pictures SET owner_id= '1'
or if you want to restrict it to a certain album
UPDATE cpg1410_pictures SET owner_id= '1' WHERE aid='15'

do similar for the owner_name

That worked.  Thanks alot for you help.