[cpg1.4.x]: punbb 1.3 bridge [cpg1.4.x]: punbb 1.3 bridge
 

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

[cpg1.4.x]: punbb 1.3 bridge

Started by cuteseal, April 28, 2009, 12:41:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cuteseal

Hi guys,

I upgraded my punbb forum from 1.2 to 1.3 and found that the bridge is not working anymore.

However, I did some poking around in the 1.2 bridge and got some hints from Nibbler here:
http://forum.coppermine-gallery.net/index.php/topic,54446.0.html

I have changed the following lines:

list($id, $pass_hash) = unserialize($_COOKIE[$this->cookie_name]);
to
list($id, $pass_hash) =@explode('|', base64_decode($_COOKIE[$this->cookie_name]));

and also

return md5($this->cookie_seed.$password);
to
return $password;

And that seemed to do the trick.

I don't pretend to be a coder or know what the internals of the code, so I was wondering if someone could please verify what I've done to make sure that it's all ok?


I've done some preliminary testing:
- Login as user 1 in forums, I'm logged in as user 1 in gallery
- Logout user 1 in forums, I'm logged out in gallery
- Login as user 2 in forums, I'm logged in as user 2 in gallery
etc.

The only problem so far I can see is that when I click on the logout link in the gallery, it redirects to the forums with a message:

Quote
Please confirm or cancel your last action

Unable to confirm security token. A likely cause for this is that some time passed between when you first entered the page and when you submitted a form or clicked a link. If that is the case and you would like to continue with your action, please click the Confirm button. Otherwise, you should click the Cancel button to return to where you were.

If I click on the confirm button, it logs me out successfully - but this message would no doubt be confusing to users.


Thanks,
Julian

cuteseal


Nibbler

Thanks. Attached is a bridge file for punbb 1.3 that includes your changes and fixes logging out.

To use, unzip and upload the attached file into the bridge directory and add the following code (verbatim) into bridgemgr.php to enable it in the bridge manager.


$default_bridge_data['punbb13'] = array(
  'full_name' => 'PunBB v1.3',
  'short_name' => 'punbb13',
  'support_url' => 'http://punbb.informer.com/',
  'full_forum_url_default' => '',
  'full_forum_url_used' => '',
  'relative_path_to_config_file_default' => '../board/',
  'relative_path_to_config_file_used' => 'lookfor,config.php',
  'use_post_based_groups_default' => '0',
  'use_post_based_groups_used' => 'radio,1,0',
);

Joachim Müller

@Nibbler: Should this be added to the core package?

cuteseal

Thanks Nibbler!  Just tested the code and it works a treat! It looks like the "please confirm or cancel your last action" message is gone now. :D


Just wondering though - when you successfully login or logout, it doesn't redirect back to the coppermine page.  Is that supposed to happen?

Nibbler

Yeah. The PunBB code doesn't allow us to do that. If you need it you'll need to hack the punbb code (or better: write an extension for punbb).

cuteseal


Studia

Hi!
I have one problem: After integration with PunBB 1.3, users (from database PunBB 1.3) with names in russian language incorrect are displayed.
Without integration all work fine.

my forum: http://yreconom.ru/
my gallery http://yreconom.ru/cpg/

Studia

ops...

it's test forum

login - test
pasword - test

Nibbler

I think there's a solution for this posted in the Russian language section. It's not punbb specific.

tanzy

I too was having the same problem. I was not sure as to why the bridge wasn't working when I upgraded from PUNBB forum from 1.2 to 1.3 but so many other users have also been reportedly said to be having the same issue. Anyway, I am glad to see that you have solved the issue by editing the lines. I was thinking of reverting back to 1.2 but now thanks to you, the issue is solved.

polak

welcome
please help my coppermine 1.5 punbb 1.4.2 integration