coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: Geeck on December 29, 2005, 02:26:24 PM

Title: CPG integration with IPB
Post by: Geeck on December 29, 2005, 02:26:24 PM
Hi,

I have problems integrating CPG 1.4.2 with Invision Power Board 2.1.3
The problem is that I have those two on other domains:

Forum is http://forum.olesnica.org.pl
Gallery is http://galeria.olesnica.org.pl

How can I integrate that? There is a problem with redirections. I managed solve this partially. Just copied conf_global.php from forum dir to coppermine folder. Now it redirects me to forum login page but after entering correct data and pressing Log me in button redirect fails (it merges those two addresses).

Anyone can help? Besides. Is it possible to write such bridge file that would just connect to IPB database and extract login/pass but CPG login/logout/edit user pages would be used?
Title: Re: CPG integration with IPB
Post by: Nibbler on December 29, 2005, 02:55:22 PM
http://forum.coppermine-gallery.net/index.php?topic=24032.0
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 02:59:12 PM
I don't have any error messages. I wrote clearly where problem lies.

Once again. I don't have forum and gallery on the same domain but on other. Is it possible somehow to bridge?
Title: Re: CPG integration with IPB
Post by: Nibbler on December 29, 2005, 03:01:54 PM
Yes it's possible. The bridge is not enabled and you haven't provided a test account so there is no way that I can see what happens when you attempt to login.
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 03:03:48 PM
I will provide those in a moment.

BTW. The test account must be created in gallery or forum?
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 03:09:54 PM
Account created (forum):
login: test
pass: pass

Bridge is enabled.

(sorry for two posts)
Title: Re: CPG integration with IPB
Post by: Nibbler on December 29, 2005, 03:16:47 PM
You need to set your forum's cookie domain to .olesnica.org.pl for the bridge to work. I don't think IPB supports redirection back to Coppermine after login.
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 03:21:20 PM
Cookie domain helped! That is so great. But is there really NO way to redirect back properly to Coppermine? Maybe some small change in code?
Title: Re: CPG integration with IPB
Post by: Nibbler on December 29, 2005, 03:32:06 PM
It would be a change to the IPB code, which I neither know nor have legal access to.
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 03:36:38 PM
I have an idea. If it works I'll post it here.

One more thing. After I login using bridged Coppermine (so my login and password are taken from forum database) I'm treated as normal registered user in Coppermine, not as an admin (and I am admin of both forum and gallery). Why?
Title: Re: CPG integration with IPB
Post by: Nibbler on December 29, 2005, 03:43:01 PM
Try this (http://forum.coppermine-gallery.net/index.php?topic=25151.msg117014#msg117014).
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 03:48:22 PM
Now works great :) Thanks!

Right now I'll try to workaround redirection bug somehow.
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 04:26:04 PM
Oh... there is a big bug. The user ID does not match at all.
My user ID in forum's database is "6" and in gallery is "2". I've changed the gallery ID value manually from "2" to "6" and still gallery is showing me as user with ID "2", not "6".

Can I fix that?
Title: Re: CPG integration with IPB
Post by: Joachim Müller on December 29, 2005, 05:45:40 PM
when bridging is enabled, the user id in coppermine doesn't matter.
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 06:00:22 PM
Before bridge process I had user ID "2" in Coppermine. Now after that Coppermine still shows my old ID ("2"), but in forum I've got "6". So it is ok (if the Coppermine user id now doesn't matter)? Shouldn't it fetch PROPER user id?
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 08:41:20 PM
So, no ideas why that happens?
Title: Re: CPG integration with IPB
Post by: Nibbler on December 29, 2005, 08:45:19 PM
Any accounts you had in Coppermine before you made the bridge are 'forgotten' while bridged.
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 08:48:35 PM
So all the bridging thing is for nothing to me. I just wanted to keep all albums and users in gallery but get login and pass from IPB database (and user group). That's a pity :(
Title: Re: CPG integration with IPB
Post by: Nibbler on December 29, 2005, 09:04:13 PM
Refer to the documentation:

Quote5.2.3 Coppermine users, groups and pics uploaded by users are lost when integrating

Warning: If you already have users and custom groups in your coppermine database when you enable bbs integration, be aware that they will be lost. If your coppermine users have already created private albums and uploaded pics to them, they will be lost as well!
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 09:09:41 PM
Yes, I know.
Well maybe someday such thing will be possible, who knows.
Title: Re: CPG integration with IPB
Post by: kegobeer on December 29, 2005, 09:10:36 PM
You will have to use a tool like phpMyAdmin to manually change usernames and userids for personal galleries, images, comments, etc to match the bbs userids and usernames.
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 09:19:01 PM
That's the problem!
I've changed MY user_id in "cpg_users" table to match this from forum's database. The "user_name" is the same in both databases. After this it still wrong! That's what i'm saying all the time. But GauGau said that Coppermine database is no longer used after bridging for that... All this is weird for me.
Title: Re: CPG integration with IPB
Post by: kegobeer on December 29, 2005, 09:21:59 PM
No, no, no, no.  You have to change the userids associated with the pictures, albums, etc, not the ids in the user table.  That means going thru the pictures table and manually changing the uid for each picture.  The same goes for albums.
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 09:27:41 PM
Now this makes sense... but I have sooo many numbers to change My God :)
Title: Re: CPG integration with IPB
Post by: kegobeer on December 29, 2005, 09:38:18 PM
Dump your bbs user table and your Coppermine user table.  Crossreference the userids.  Use phpMyAdmin to execute a query like this:


UPDATE TABLE cpg142_pictures SET uid=10099 where uid=10005


You will also have to update usernames where applicable.  As always, backup your database before proceeding.
Title: Re: CPG integration with IPB
Post by: Geeck on December 29, 2005, 11:04:22 PM
I must do:
* albums
* pictures
* comments

Is that all?
Title: Re: CPG integration with IPB
Post by: kegobeer on December 29, 2005, 11:29:37 PM
The comments table is author_id instead of uid.
There's nothing to change in the albums table, since they are assigned to categories.  You'll have to change the categories table's owner_id.
The favpics table is user_id.
The pictures table is owner_id and owner_name.

Several tables have a md5 hash applied to the owner_id/author_id - nothing to do about those.

Backup, make the changes, and see what happens!
Title: Re: CPG integration with IPB
Post by: ISBB on December 30, 2005, 04:00:19 AM
If anyone can get ahold of GeorgeCC he did a re-direction work around for me.. :D  This is w/ 1.3 and ipb 2.1.3 :D
Title: Re: CPG integration with IPB
Post by: Geeck on December 30, 2005, 08:33:14 AM
kegobeer: OK. I'll try today and tell if it helps.
Title: Re: CPG integration with IPB
Post by: Geeck on January 01, 2006, 04:05:20 PM
kegobeer: I've changed everything in database. Now it works perfectly! Thank You very much :)

Is it possible to use Coppermine User manager after bridging? At least to see currently used quota. Right now I don't have any possibilty to check that.
Title: Re: CPG integration with IPB
Post by: Joachim Müller on January 01, 2006, 04:37:31 PM
"one issue per thread"!
Title: Re: CPG integration with IPB
Post by: Geeck on January 01, 2006, 04:43:41 PM
Yes... all those issues concerns bridging.
Title: Re: CPG integration with IPB
Post by: Joachim Müller on January 01, 2006, 04:47:34 PM
different issues though. Locking this thread.