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: Xoops xGall to CPG - a rough how-to....  (Read 3054 times)

0 Members and 1 Guest are viewing this topic.

modtang

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Xoops xGall to CPG - a rough how-to....
« 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
« Last Edit: June 17, 2005, 07:23:14 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Xoops to CPG
« Reply #1 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.
Logged

modtang

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Xoops to CPG
« Reply #2 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.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Xoops xGall to CPG - a rough how-to....
« Reply #3 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.
Logged
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
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.