"Home-made bridging" with phpBB: less ambitious, easier. Anyone ever tried? "Home-made bridging" with phpBB: less ambitious, easier. Anyone ever tried?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

"Home-made bridging" with phpBB: less ambitious, easier. Anyone ever tried?

Started by kubizo, January 24, 2012, 12:18:50 AM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

kubizo

Hi everyone,

I read that all the user IDs get messed up when you bridge and I would really like to avoid that.

I was wondering whether there was a less invasive way to do the same. I'm not an expert and I maybe oversimplifying, but would it be possible to do the following:

1) via phpMyAdmin, create an SQL table within phpBB that replicates usernames and passwords of the cpg users (no matter the IDs, let's not bother about whether they are different or the same in the two apps).
2) In CPG, replace the links to "register" page with links to the phpBB register page
3) Edit the phpBB register page in such a way that it also creates a CPG profile
4) In CPG, edit the login page to also send a phpBB cookie
5) In phpBB, edit the login page to also send a CPG cookie

Am I dreaming? Would this be overly complicated?

Thanks a lot!

K


phill104

It really is not an easy task if you already have lots of users in your CPG database. If you have just a few users with uploaded images then you can work out their respective user IDs and edit them in the database manually.
It is a mistake to think you can solve any major problems just with potatoes.

kubizo

Thanks a lot for the reply!

Here is what I'm going to do:

1) In phpBB, create user profiles for ALL my CPG users. QUESTION: can I just add rows to the phpbb_users table in phpmyadmin? Or should I actually manually register profile by profile?
2) In phpMyAdmin, make sure that the user IDs in the phpBB_users table match the CPG user IDs (a given nickname should correspond to the same ID in CPG and phpBB). QUESTION: if I mess up the IDs in the phpbb_users table, will I make my forum messed up and unstable?
3) Do the bridging

Am I going the right way? Does this sound correct? Am I going to lose stuff?

Private albums are forbidden on my gallery, then I don't think I should lose anything!

Thanks a lot!

K

kubizo

I forgot to follow the instructions:

http://www.kubizo.com/kindle-screensaver-images/ is the gallery
http://www.kubizo.com/kindle-forum/ is the forum
And here is a test profile: TestUser, 123456

Concerning the bridge manager, I have not touched it yet.

phill104

With big jobs like this you should work on localhost anyway.

How many coppermine users do you have?
It is a mistake to think you can solve any major problems just with potatoes.

kubizo

I have very few users, about 30.

Thanks a lot for the suggestions!

K

phill104

Should not be too hard then. Simply bridge the using the supplied bridge then create all the users on PHPbb. When they are created look at their user IDs and compare the ID with their old CPG one and edit the PHPBB user table accordingly. It will take time but should work.
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

It's probably better to adjust the user ID within the Coppermine tables instead of manipulating the PHPBB user table. It's of course more effort to adjust the Coppermine database (you have to edit the IDs at several places), but I don't know the behavior of PHPBB when editing its user table and and maybe some IDs also may overlap. A database backup is mandatory!

phill104

I have done it in the past with the editing of IDs in PHPBB and all went well, only 1 user is reserved and fortunately for us it is the same one we use for admin. With only 30 members it should not bee too hard?
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

Ah sorry, I thought there are already existing users in the board. In that case I'd also edit the IDs in PHPBB's user table ;)

kubizo

Hi everyone! Thank you SOOO much for the very interesting discussion! :-)

I confirm that my board is brand new, I have not linked to it from my home page, it is totally new. I will then follow your advice, bridge and create the users in the phpBB users table :-) !!!

QUESTION: can I create the users in phpBB before bridging instead of after?

BIG PROBLEM: how do I recover the passwords? The cpg database only shows some strings of numbers (I guess it is a MD5 or something). Does phpBB3 use the EXACT same method? I mean if I copy that string straight from cpg to phpbb users table, will the user be able to login with his cpg password?

Thanks so much!


kubizo

QuoteDoes phpBB3 use the EXACT same method? I mean if I copy that string straight from cpg to phpbb users table, will the user be able to login with his cpg password?
I just tried and the answer is no :-(

Αndré

Quote from: kubizo on January 26, 2012, 01:16:14 AM
QUESTION: can I create the users in phpBB before bridging instead of after?
Doesn't matter.


Quote from: kubizo on January 26, 2012, 01:22:48 AM
I just tried and the answer is no :-(
I suggest to add some text to your board's login page, that your users have to use the password recovery procedure to get a working password.

kubizo

Thanks for the reply!

Wow, is there a way to avoid asking them to do that?

I mean, I understand that discussing how to recover users' passwords from a DB is not very ethical, but I'm not a terrorist! I just want to make life easier for them. I'm afraid that if I ask them to go through password recovery, they'll just give up their accounts :-(

Another option would be to hand-pick a new password for each of them and mail it to them... But recovering the one they had chosen would be a lot better.

Thanks everyone!

Αndré

The only way I see is to modify the PHPBB code so it generates the MD5 hash exactly as Coppermine does. You have to modify the function that compares the password during login and (for new users) modify the function that generates the hash that will be stored in the database.

kubizo

Hi Andre,

thanks a lot for the reply! Unfortunately what you're suggesting goes way beyond my programming skills :-)

I reset all passwords and mailed all my users

I'll now proceed to swap user IDs so that image attribution is correct :-)

Thanks again for all your help! Bridging was a success!

Αndré

Quote from: kubizo on January 26, 2012, 02:31:52 PM
I reset all passwords and mailed all my users
One of them was me ;) I already replied to that mail to remove my account from your gallery/board.


Quote from: kubizo on January 26, 2012, 02:31:52 PM
Bridging was a success!
Don't forget to
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.