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: "Home-made bridging" with phpBB: less ambitious, easier. Anyone ever tried?  (Read 10762 times)

0 Members and 1 Guest are viewing this topic.

kubizo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24

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

Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4860
    • Windsurf.me

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

kubizo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24

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
Logged

kubizo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24

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.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4860
    • Windsurf.me

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

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

kubizo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24

I have very few users, about 30.

Thanks a lot for the suggestions!

K
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4860
    • Windsurf.me

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765

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!
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4860
    • Windsurf.me

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?
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765

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 ;)
Logged

kubizo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24

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!

Logged

kubizo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24

Quote
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?
I just tried and the answer is no :-(
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765

QUESTION: can I create the users in phpBB before bridging instead of after?
Doesn't matter.


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.
Logged

kubizo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24

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!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765

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.
Logged

kubizo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24

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!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765

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.


Bridging was a success!
Don't forget to
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.
Logged

kubizo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24

Done, thanks again!
Logged
Pages: [1]   Go Up
 

Page created in 0.381 seconds with 20 queries.