Xoops xGall to CPG - a rough how-to.... Xoops xGall to CPG - a rough how-to....
 

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]

Main Menu

Xoops xGall to CPG - a rough how-to....

Started by modtang, June 16, 2005, 08:37:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

modtang

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

Joachim Müller

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.

modtang

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:
Quote4, 0, 0, 0, 0, 'NO');
becomes
Quote4, 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.

kegobeer

Thanks for posting what you did.  This may come in handy for other users wishing to convert.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots