forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: modtang on June 16, 2005, 08:37:20 am

Title: Xoops xGall to CPG - a rough how-to....
Post by: modtang on June 16, 2005, 08:37:20 am
I'm currently running the CPG module for Xoops. I've decided I want to go to a stand-alone version of CPG as Xoops has a lot more features than I need. I'm afraid of messing things up so I thought I'd ask for some advice before I changed over.

Can I do a direct SQL export/import or will I have to convert tables or something?

BTW, existing tables related to the gallery are:
    xoops_xcgal_albums
    xoops_xcgal_categories
    xoops_xcgal_ecard
    xoops_xcgal_pictures
    xoops_xcgal_usergroups
    xoops_xcgal_votes
    xoops_xoopscomments
    xoops_xoopsnotifications

Thanks!  ;D
Title: Re: Xoops to CPG
Post by: Joachim Müller on June 16, 2005, 10:35:10 am
I'm sorry, we don't know the xoops port at all, we simply can't tell. The xoops port has been a third-party contribution. Back up both your files and your database, then try for yourself. If it fails, go back to what you had by restoring your backup. Please post your results here.
Title: Re: Xoops to CPG
Post by: modtang on June 17, 2005, 05:07:11 am
I had to do this manually, but it wasn't difficult. I've got very little SQL experience and I figured it out. You could probably write a script for it if you knew what you were doing. I exported the xopos_xgal_* tables to my hard drive. I opened it up and did a search and replace on all instances of xoops_xcgal_ and changed it to cpg133_

I dropped all the tables I already had data for (on the exported file on my hard drive) in the new database I'd created. Had to make some manual edits here:

Under
Quote
--
-- Dumping data for table `cpg133_albums`
--
a value of

Quote
, ''
has to be added for each album (it's en empty keyword field).

Import data!

Quote
--
-- Dumping data for table `cpg133_categories`
--
needs an extra '0' before the YES/NO option at the end.

eg:
Quote
4, 0, 0, 0, 0, 'NO');
becomes
Quote
4, 0, 0, 0, 0, 0, 'NO');

Import data!

I believe
Quote
--
-- Dumping data for table `cpg133_pictures`
--
was ok so just import that data as-is.

That's the bulk of it. Just copy/move all folders under xgal/albums to your rootcpg/albums folder. If you have added usergroups and other things you'll have to sort that out. I hadn't. Importing the votes was the only thing I didn't really bother with because it looked like more trouble than it was worth.

Basically, if you just want to switch from Xoops xGall to CPG1.3, keeping only categories, albums and pictures, the above should work for you.

My explanation is not as clear as I would like so I will see if I can clarify, if necessary. PM me if you have any questions and hopefully I can help.

If you want to see the finished result, go here: www.carminegiovinazzo.net/gallery

I have't edited or tweaked it yet (at the time of writing this) so that's just a straight conversion using the above instructions.
Title: Re: Xoops xGall to CPG - a rough how-to....
Post by: kegobeer on June 17, 2005, 05:30:40 am
Thanks for posting what you did.  This may come in handy for other users wishing to convert.