UNbridging phpbb2, keeping users and galleries as standalone? UNbridging phpbb2, keeping users and galleries as standalone?
 

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

UNbridging phpbb2, keeping users and galleries as standalone?

Started by rainbowz, June 01, 2007, 07:07:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rainbowz

I have already bridged my Coppermine gallery 100% successfully and it's been running perfectly fine for ages while bridged to phpBB. I have several hundred phpBB users with galleries. There's absolutely no issue here with the current CPG and phpBB setup. However, I'm looking at moving from phpBB and I want to set Coppermine 1.4.10 as a standalone and unbridge from phpBB 2.0.18 but keep the data that the phpBB users have previously put in.

How do I configure/change Coppermine to recognize the users after I've turned off Bridging? Currently when I do this, they all "vanish" and I, admin, am the only one with a gallery. When I switch Bridging back on, they all return with galleries intact.

How can I get all these users to have their standalone account and still keep all the user/gallery/photos/comments data that's currently under their bridged CPG info?

Coppermine install: http://cakescanada.com/GalleriaCPG/
Forum install: http://cakescanada.com/forumsX
Coppermine version: cpg1.4.10
Forum version: phpBB 2.0.18
Test user account: copper / mine

BridgeManager settings:
Forum URL:  http://cakescanada.com/forumsX
Relative path to your BBS's config file:  ../config.php/
Use post-based groups?:  1
Cookie name/preifx: cakescanad_forum

rainbowz

PS: If this has already been discussed and instructions given, I searched but could not find it. If you know where that thread is, please link to it. Thanks.

Joachim Müller

Quote from: rainbowz on June 01, 2007, 07:07:12 PM
How can I get all these users to have their standalone account and still keep all the user/gallery/photos/comments data that's currently under their bridged CPG info?
I'm sorry, there's no pre-made script to accomplish this. If you turn off bridging, your coppermine gallery will revert to the state it used to be before you started bridging in the first place: the pics your users uploaded will still be there, but Coppermine then doesn't "know" your users any longer, so the correlation between everything they did (uploading pics, commenting, voting etc.) will be lost. To prevent this from happening, you'd have to come up with a custom script that converts all your user accounts existing inside phpBB's database into coppermine's users table. This is not that easy and hasn't been done before as far as I know.
Bottom line: possible if you code the necessary converter script. Not an easy task though.

Are you planning to use coppermine as standalone or are you just going to bridge it with another BBS app? Because if you're going to do the later, I'd suggest using one of the existing BBS converters (e.g. the phpBB->SMF converter). If everything runs smoothly there and the user IDs are kept from one BBS app to the other, you could unbridge and then re-bridge coppermine with your new BBS and everything should be fine.

rainbowz

I'm looking to install another BBS but I really prefer to just keep Coppermine as standalone from here on and let users log in from there. I suppose I could set up a "fresh" CPG (so as not to munge up the current info) and plop in a couple of fake new Users then see what data it requires and just grab that database info out of the current phpBB files. Does this sound like a good starting point? Any oddities you can think of I should watch out for as far as what data I'd need to pull over?

I don't mind doing some scripting...

rainbowz

Well, I did a tiny test, copied a couple of bits and it worked! Woohoo!

I think it's not going to be too hard to do, just run an SQL script to grab some specific data and port them over. I'll give a more detailed explanation later on.

Cenobitez

I'm working on something like this as we speak.

The SQL to grab the data is

SELECT `user_id`, `username`, `user_password`, `user_lastvisit`, `user_regdate`, `user_email` FROM `phpbb_users`

I have chosen to include userlast visit and user reg date, just for 'having that' info to hand.

Since i'm using PHP to extract the data, The LastVisit and RegDate are easier convert in PHP than adding into the SQL, altho I'm sure converting within SQL will be faster, but unless your talking thousands upon thousands of users it won't be an issue anyway.

I'm prob going to make an ugly looking script that pulls the data out of the PHP Database, and returns a help or inserts just like when you export from PHPMyAdmin, so that I can simply import into phpmyadmin, won't win any beauty awards but will do the job :)

I'l post the finished after i had some sleep, its 4am UK time and I'm starting to miss words and semi colons out :)

Cenobitez

Right, I have successfully run done this :)

I just need to test it, and make sure new members can sign up.

rainbowz

Quote from: Cenobitez on August 23, 2007, 03:50:29 PM
Right, I have successfully run done this :)

I just need to test it, and make sure new members can sign up.


I know practically zip about writing scripts so I haven't managed to create an easy way to automate it and doing it all "by hand" proved more of a hassle than it was worth. I'm definitely intrigued to see what you came up with and hopefully can get the gallery back online with "hard-coded" members (as opposed to the CPG sucking info from the old phpbb database).The members have been whining about having it taken offline but it just hasn't been  a huge priority in the larger scheme of things. They'll be thrilled if I can get it back up without having to lose all their entries.

Keep us posted!

And a HUGE thanks for plugging away at this rather unusual request.

Cenobitez

All this does it pull the user information out of the PHPBB database and provides it in 2 different ways. First into a textarea box, and secondly it gives a link to download a .sql file.

Upload the script into your Forum folder, ensure your folder is writable by scipts, and also the script is allowed to write as well, then just run the script.

If you use the text area, right click and select all, then right click again choose copy.

You then need to login to PHPMyAdmin, navigate to the coppermine database, then click on the SQL tab, then right click and choose paste the  insert statements and hit go.

If you use the file download.

You then need to login to PHPMyAdmin, navigate to the coppermine database, then choose the Import tab, then browse for the file and then click go.

Both methods work.

Once this is done, be sure to delete both the script and the phpbb-users.sql file :)

http://www.skindustrial.com/downloads/pcd.zip

Cenobitez

I just tried the above script on a database of 4613 members and the data was too big and resulting in IE's leaky memory dying a death.

I'll add an option statement where the method can be chosen and replace the file later, along with a button to delete the .sql file.

If i get a chance, i'll make a sister script that can be added to the coppermine folder and slam the data into.

I got a busy weekend ahead now :)