forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 bridging => Topic started by: Fast Lane on July 21, 2010, 09:40:54 am

Title: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on July 21, 2010, 09:40:54 am
This should work.  Let me know if it does not.

Thanks again to Coppermine for all the hard work.  My small contribution!

If you have set a custom cookie prefix in your Invision board, please see the bridge file header for special instructions.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Αndré on July 21, 2010, 11:17:53 am
Thanks for your contribution.


  Note: If you have a custom cookie you will need to revise the following
      items on lines 146-148. edit: $_COOKIE['member_id'] and $_COOKIE['pass_hash']. 
      Example, if you have a cookie prefix of "mysite_" then revise as follows...
      $_COOKIE['mysite_member_id'] and $_COOKIE['mysite_pass_hash']
I'm unfamiliar with bridging. But can't this be auto-detected?
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on July 21, 2010, 12:05:05 pm
Probably if I parse the ipb database I can.  For the majority of people it will already be plug and play (only if you added a cookie prefix will you need to make those edits).  I wanted to get something working to everyone asap :P.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: WYoLars on July 21, 2010, 10:22:43 pm
What should we have the gallery and forums cookie settings set to?

Thanks for the help!
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on July 22, 2010, 12:17:42 am
If you set a cookie prefix in the ipb control panel (   1.  Tools & Settings  >    2. System Settings > Cookie Prefix) then you need to make the update above.  If not then no edits are needed :).

Can anyone confirm if this is working for them?
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Phill Luckhurst on July 22, 2010, 12:30:12 am
Hopefully someone will. I do not have IPB so cannot test it.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: WYoLars on July 22, 2010, 12:43:18 am
I have not been able to get it to work, but appears to be a cookie issuse


i have nothing set in the cookies setting under IPB (default)

in Coppermine i have a cookie name of cpg15x and path to /

Do i need to change the name of the Coppermine cookie name?
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on July 22, 2010, 05:35:23 am
I will upgrade my gallery and note back my status.  I think it should work and I will note any config issues / changes for the group.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Αndré on July 22, 2010, 08:19:16 am
Hopefully someone will. I do not have IPB so cannot test it.
Same here. That's why I haven't the bridge file to the svn yet.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on July 22, 2010, 08:49:31 am
ok.  I installed 1.5.6 and fixed the bridge.  It works for me great :).

see attached and enjoy!!

Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on July 22, 2010, 10:50:19 am
please use this the latest attached file.  I cleaned up a few things to make it generic.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on July 22, 2010, 10:54:16 am
Attn mods/admin.  Can you please remove all previous attachments (except my last one which works and is the final copy).  Thanks! :)
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Αndré on July 22, 2010, 11:28:16 am
I attached your latest contribution to the first post and deleted the rest.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on July 22, 2010, 11:45:06 am
thanks!
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on July 22, 2010, 11:47:01 am
actually can you delete the note and just say "see the bridge file header if you have a cookie prefix for special instructions".
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Αndré on July 22, 2010, 11:53:01 am
Changed initial post in a similar way as suggested.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: WYoLars on July 22, 2010, 10:17:00 pm
It shows im logged in now !!!

but i can't upload or access the admin panel, ive tried setting my main group to Root Admin and Administrator, neither seem to fix it.

Is there a place I need to devine the Admin group and the Members group ID?

(tried with Use Bridge App groups as NO, still no user or admin menu)
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on July 23, 2010, 02:31:04 am
You probably need to run the bridge manager directly.

http://yourdomain.tld/your_coppermine_folder/bridgemgr.  Use this to run the setup. 

Also make sure in the ipb conf_global.php the admin group is set right (root of your forums for the file).  Also make sure you adjust all the settings correct for permissions.  I found that upon the upgrade all the permissions were wacked (even the admin/members could not upload).  You may need to fix that yourself.

Good luck!
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: WYoLars on July 23, 2010, 06:06:29 am
You are the man, that was it. The numbers got changed in conf_global.php

I thank you from the bottom of my heart, this almost drove me to a inferiour gallery product.

Thank you again! I hope it works for others.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: nanspellian on July 30, 2010, 04:25:40 am
You probably need to run the bridge manager directly.

http://yourdomain.tld/your_coppermine_folder/bridgemgr.  Use this to run the setup. 

Also make sure in the ipb conf_global.php the admin group is set right (root of your forums for the file).  Also make sure you adjust all the settings correct for permissions.  I found that upon the upgrade all the permissions were wacked (even the admin/members could not upload).  You may need to fix that yourself.

Good luck!

Hello :)
I'm glad that it worked out for you WYoLars, and thnx for the bridge and suggestions Fast Lane....but still I have the same problem...I'm logged in and nothing works
http://taiwaninegypt.com/gallery/

i did as you suggested, but nothing happened :(
1. i ran bridgemanger script (http://mysite.com/gallery/bridgemgr.php)  is that right?
2. I checked ipb cong_global.php and nothing changed, it's the same.
3. I adjusted the permissions

after all that, nothing really worked....i'm logged in but neither the admin links are there nor "upload file"....can anyone help please?  :'(
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on August 02, 2010, 04:49:45 am
make sure the conf global file has the right group for the admin (which you are).  Next you will need to re-enable permissions in coppermine for uploading (when I upgraded all the permissions were random/demoted).
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: nanspellian on August 05, 2010, 11:49:31 pm
thnx for replying...well...i just did like you told me....

1. the congif_global (of the forum) 'admin_group' is set to 4
2. Premission (on the gallery) for the admin is ok. and i can upload pics.

but still, "I don't have premission!" :(


i'm sorry for my stupid question but do i have to edit these lines?
this one?
Code: [Select]
if (isset($bridge_lookup)) {
    $default_bridge_data[$bridge_lookup] = array(
        'full_name' => 'Invision Power Board 3.x',
        'short_name' => 'invisionboard30',
        'support_url' => 'http://forums.invisionpower.com/',
        'full_forum_url_default' => 'http://www.yoursite.com/forums',
        'full_forum_url_used' => 'mandatory,not_empty,no_trailing_slash',
        'relative_path_to_config_file_default' => '../forums/',
        'relative_path_to_config_file_used' => 'lookfor,conf_global.php',
        'use_post_based_groups_default' => '0',
        'use_post_based_groups_used' => 'radio,1,0',


and this?
Code: [Select]
function cpg_udb()
        {
            global $BRIDGE;
           
            if (!USE_BRIDGEMGR) {
                $this->boardurl = 'http://localhost/ipb';
                require_once('../ipb/conf_global.php');
                $this->use_post_based_groups = 0;
            } else {
                require_once($BRIDGE['relative_path_to_config_file'] . '/conf_global.php');
                $this->boardurl = $INFO['board_url'];
                $this->use_post_based_groups = $BRIDGE['use_post_based_groups'];
            }


because it seems that the url to my board is not correct yet the bridge is working. My problem is that I can't upload photos.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on August 11, 2010, 11:37:42 am
Yes, "www.yoursite.com/forums" needs updated as well as "../forums/"

if you fix these hopefully everything will work for you.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: nanspellian on August 13, 2010, 11:22:29 pm
Thank you Fast Lane for your reply...
:)
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Fast Lane on August 17, 2010, 10:16:11 am
I suggest this be rolled into the next release pending anyone here objecting.  I hope it proves helpful :).
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Αndré on September 01, 2010, 02:35:04 pm
I suggest this be rolled into the next release
Do you mean the next release of cpg1.5.x? If so, please contribute an updated bridge file.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: imgr8 on October 16, 2010, 10:51:46 pm
I had read earlier that if I cannot use this bridge if I have files already uploaded in the gallery because the users who are already defined in the gallery with be overwritten. Is this true? Can I use this bridge even with members and files already in the gallery or is it only possible for a new installation?
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Phill Luckhurst on October 17, 2010, 10:36:55 am
Please read the docs - http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_standalone_start
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: epo5 on November 11, 2010, 01:24:26 am
i get this error
Quote
You don't have permission to access this page.


if i unbridge everything works ok (apart from being bridged..lol)

i cant log into gallery even with stand alone link it just sents me to my admin cp on ipb to log in. this does no good
so how to i change permissions with out being able to log in?

im running IPB 3.1
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Tasos on November 30, 2010, 11:30:16 pm
Lane, can i give you ftp pass, because i cant do it  :-\
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: anewday on November 13, 2011, 09:57:48 pm
Hi, will this work with Invision 3.2.3? :)
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Phill Luckhurst on November 15, 2011, 11:32:43 am
Give it a go and find out? If it works please come and tell us all. If not post here and maybe someone in the community will be able to assist.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Elemental Crisis on June 03, 2012, 07:39:49 am
Just letting everyone know that this bridge still works with the latest versions of both IPB (3.3.2) and CPG (1.5.20).

The only problem I've encountered is I was unable to get the bridge to properly work if I set it to use IPB's group settings. It looked like the bridge was setup successfully but I was unable to access the config panel, keep getting the you don't have permission error. Granted I didn't spend too much time trying to it to work and just stuck with CPG's groups. 
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Elemental Crisis on June 13, 2012, 03:10:39 pm
IF anyone runs into problems when using bridge app custom groups, here's a fix.

http://forum.coppermine-gallery.net/index.php/topic,75032.msg361342.html#msg361342
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: pols1337 on September 30, 2012, 04:31:31 am
@Andre would you please think about including this InvisionPowerBoard 3.x bridge into the next release of Coppermine?  You include the IPB 2.x series in the bridge, but it's out of date. 
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Αndré on October 02, 2012, 05:24:56 pm
You include the IPB 2.x series in the bridge, but it's out of date.
It wasn't me, but another dev team member ;) However, I'll check if it's possible to add new bridge files to cpg1.5.22. Please reply to this post, as I'll receive a notification in my mailbox.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: pols1337 on October 02, 2012, 10:01:20 pm
@Αndré Yes, you may want to include InvisionPowerBoard 3.x bridge since right now, IPB is still on the 3.x series.  Their current release is 3.3, and it seems like they're going to release 3.4 in the future so this bridge will be valid for awhile. 

You may want to remove the IPB 2.x series since I read somewhere that they announced the end-of-life for that series.  (No more support or development).

Looking into the future, after IPB 3.4 (where the board is at the core) is moving over to a new platform called IP Community Suite 4.0 series (where the core is stand-alone, and things like the forum, gallery, and blogs are all add-ons).  It will also use a brand new system called "IP Connect" to connect with other software.  If you're interested, you can read more about "IP Connect" here:

http://community.invisionpower.com/blog/1174/entry-7911-ipboard-34-dev-update-ips-connect/ (http://community.invisionpower.com/blog/1174/entry-7911-ipboard-34-dev-update-ips-connect/)

Hope this information helps,
Joel
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: pols1337 on October 08, 2012, 04:38:37 am
Hi, in case anyone was wondering, this bridge file DOES work. (Actually, I ended up using the bridge file from here (http://forum.coppermine-gallery.net/index.php/topic,75032.msg361410.html#msg361410), because it looked like it was updated more recently. 

I am bridging between Coppermine 1.5.20 and Invision Power Board 3.3.4 -- the latest versions of each.  Tested with guest (no log-in), a regular member, and admin.

Some installation notes for non-technical people:
What I tested:
Hopefully someone technical can take a look at the files attached on this thread and in the other IPB bridge thread (http://forum.coppermine-gallery.net/index.php/topic,75032.msg361410.html#msg361410) to ascertain any differences and converge them before it gets released as an official bridge.

But yes, it works  :)

Joel / pols1337
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Elemental Crisis on October 18, 2012, 05:28:39 pm
I've attached the bridge file from the other thread to this post so it's easier to find. Anyone using IPB should use this file instead of the one in the original post as it's been updated to work with IPB 3.X.

  • When you try to log-out from Coppermine, it takes you back to your IPB page but it doesn't actually log you out.  Wish this could be fixed, but it's relatively minor.
I was unable to fix this for IPB 3.3, it has something to do with the session ID not being generated correctly by the bridge script.

I HIGHLY recommend reading the instructions from the bridge file, I've even copied them so make it easier for everyone. 

Quote
  3.x Bridge by Steve Palik
  Note: If you have a cookie prefix you will need to revise the following
      items on lines 143-145. In in the "cookie_extraction" function (lines 143-145) edit the words
      member_id and pass_hash to myprefix_member_id and myprefix_pass_hash (where "myprefix_" is
      your custom prefix defined in IPB (IPB control panel... 1.  Tools & Settings  >    2. System Settings > Cookie Prefix).
      
      ENJOY!!!!
      
  3.3.X Fixes by Elemental Crisis and Dahrkael
  Note: All of the redirect links with the expection of Logout should now work. As I was unable to get the logout link to
        properly work, I set it to redirect the user to the forum index where they can log out. I also was able to fix the
      problem when "Use bridge app custom groups?" was set to "yes", you'll just need to make one small edit to get it
      working properly.
      
      Open udb_base.inc.php - Its located in the "bridge" folder.
      
      Find (Starting at line 153):
      
       if  ($this->multigroups){
            $USER_DATA['groups'] = $this->get_groups($row);
        } else {
            if ($this->use_post_based_groups){
                $USER_DATA['groups'] = array(0 => $row['group_id']);
            } else {
                $USER_DATA['groups'] = array(0 => (in_array($row['group_id'], $this->admingroups)) ? 1 : 2);
            }
        }
    }
      Replace With:
      
            if ($this->use_post_based_groups){
                $USER_DATA['groups'] = array(0 => $row['group_id']+100);
            } else {
                $USER_DATA['groups'] = array(0 => (in_array($row['group_id'], $this->admingroups)) ? 1 : 2);
            }
        }
      
      If you want more than one goup to have admin access, do the following.
      
      Find (In this file):
      
      $this->admingroups = array($INFO['admin_group']);
      
      Replace With:
      
      $this->admingroups = array();

        Put whatever group ID's (Taken from IPB, not Coppermine) you want inside the parentheses separated by a comma.
      Make sure to also include your admin group ID, otherwise you won't get admin access.
      
      Example giving admin access to my admin group (ID:4) and my staff group (ID:6).
      
      $this->admingroups = array(4,6);
      
      Hope this helps!
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: pols1337 on October 24, 2012, 02:15:17 pm
This is excellent -- thank you Elemental Crisis  :)
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: pols1337 on October 29, 2012, 06:20:09 pm
On the horizon for InvisionPowerBoard 3.4 .... IP.Connect

http://community.invisionpower.com/resources/articles/index.html/_/administration/integration/ips-connect-r29 (http://community.invisionpower.com/resources/articles/index.html/_/administration/integration/ips-connect-r29)
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: anewday on December 07, 2012, 07:10:55 am
Thanks guys for the updated bridge. Does it only work for Coppermine 1.5 and higher? I get an error, "Fatal error: Class 'Inspekt' not found in line 171" on 1.4, did some googling and it appears to the an incompatible version.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: Phill Luckhurst on December 07, 2012, 08:20:43 am
Yes, you should upgrade from 1.4.x as a matter of urgency. It has been unsupported for nearly 2 years now so there have been no security updates.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: anewday on December 12, 2012, 06:10:21 am
Hi, I cannot get the bridge to work on my test forum running on IPB 3.3.4. The forum is located at www.domain.tld/testforum and the gallery is in www.domain.tld/testforum/gallery. Admin group is 4, conf_global.php file is located in the testforum folder and the test forum's cookie prefix is "test". I also followed the instructions to modify udb_base.inc.php to fix the problem when "use bridge app custom groups" was set to yes.

I logged in using the standalone admin account in the gallery, enabled "use bridge app custom groups" in the bridge manager, no errors show up after clicking on the finish button but it doesn't show any content at all.

Here are the modified parts from the bridge file.

Code: [Select]
if (isset($bridge_lookup)) {
    $default_bridge_data[$bridge_lookup] = array(
        'full_name' => 'Invision Power Board 3.x',
        'short_name' => 'invisionboard30',
        'support_url' => 'http://forums.invisionpower.com/',
        'full_forum_url_default' => 'http://www.domain.tld/testforum',
        'full_forum_url_used' => 'mandatory,not_empty,no_trailing_slash',
        'relative_path_to_config_file_default' => '../',
        'relative_path_to_config_file_used' => 'lookfor,conf_global.php',
        'use_post_based_groups_default' => '0',
        'use_post_based_groups_used' => 'radio,1,0',
    );

Code: [Select]
function cpg_udb()
        {
            global $BRIDGE;

            if (!USE_BRIDGEMGR) {
                $this->boardurl = 'http://www.domain.tld/testforum';
                require_once('../conf_global.php');
                $this->use_post_based_groups = 0;
            } else {
                require_once($BRIDGE['relative_path_to_config_file'] . 'conf_global.php');
                $this->boardurl = $INFO['board_url'];
                $this->use_post_based_groups = $BRIDGE['use_post_based_groups'];
            }

Cookie prefix
Code: [Select]
if ($superCage->cookie->keyExists('test_member_id') && $superCage->cookie->keyExists('test_pass_hash')) {
                $id = $superCage->cookie->getInt('test_member_id');
                $pass = substr($superCage->cookie->getEscaped('test_pass_hash'), 0, 32);
            }

Did I miss anything else? Thanks in advance for your help. :)
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: anewday on December 19, 2012, 06:00:11 am
Well, I figured it out the cause and it's the unnecessary _ before the pass_hash and member_id.
Title: Re: Invision (IPB) 3.x Bridge for Coppermine 1.5.x
Post by: pols1337 on September 29, 2013, 03:08:17 am
An update.

Bridge file provided by Elemental Crisis works for CPG 1.5.24 bridged to IPB 3.4.5