Advanced search  

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

Pages: 1 [2]   Go Down

Author Topic: [Fixed]: Vbulletin 4.0 with cpg 1.4.25  (Read 54318 times)

0 Members and 1 Guest are viewing this topic.

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #20 on: January 25, 2010, 05:34:47 pm »

Codjo (Jochen {aka Miski}) and Paul M

Thank you for your contribution. As far as I know none of us have Vbulletin so we are unable to test the fix ourselves. Hopefully Paul (who appears to part of the Vb team) has tested and confirmed the fix. If it does indeed work I am sure our users will be pleased. The bridge appears to be functioning at Jochen's site running CPG 1.4.25.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #21 on: January 25, 2010, 05:36:57 pm »

Yes, thank you all.
If this can be confirmed by a member of the vB staff or enough "regular" vB users we will come up with a separate bridge file for vB4 and the corresponding options populated inside the bridge manager for the next Coppermine release.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #22 on: January 28, 2010, 11:59:28 am »

I have now managed to test this and it seems to be working fine on my test machine. Paul M also appears to be a member of the Vb team from his profile on the Vb forums.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Paul M

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 2
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #23 on: January 28, 2010, 07:46:29 pm »

You dont need a seperate bridge, just something like this in your code to get the session id

Code: [Select]
$sessionid = $_COOKIE[$prefix . '_sessionhash']; // 4.0.1 +

if (empty($sessionid))
{     // 4.0.0 or before
      $sessionid = $_COOKIE[$prefix. 'sessionhash'];
}

:)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #24 on: January 29, 2010, 08:11:22 am »

Thanks for the update. I have edited bridge/vbulletin30.inc.php and replaced
Code: [Select]
// definition of how to extract id, name, group from a session cookie
function session_extraction()
{
if (isset($_COOKIE[$this->cookie_name . 'sessionhash'])) {
$session_id = addslashes($_COOKIE[$this->cookie_name . 'sessionhash']);

$sql = "SELECT u.{$this->field['user_id']}, u.{$this->field['password']}, u.{$this->field['grouptbl_group_id']}+100 AS usergroupid FROM {$this->usertable} AS u, {$this->sessionstable} AS s WHERE s.{$this->field['user_id']}=u.{$this->field['user_id']} AND s.sessionhash='$session_id'";

$result = cpg_db_query($sql, $this->link_id);

if (mysql_num_rows($result)){
$row = mysql_fetch_array($result);
return $row;
} else {
    return false;
}
}
with
Code: [Select]
// definition of how to extract id, name, group from a session cookie
function session_extraction()
{
if (isset($_COOKIE[$this->cookie_name . '_sessionhash'])) {
    $session_id = addslashes($_COOKIE[$this->cookie_name . '_sessionhash']);
} elseif (isset($_COOKIE[$this->cookie_name . 'sessionhash'])) {
    $session_id = addslashes($_COOKIE[$this->cookie_name . 'sessionhash']);
}
if (isset($session_id)) {
$sql = "SELECT u.{$this->field['user_id']}, u.{$this->field['password']}, u.{$this->field['grouptbl_group_id']}+100 AS usergroupid FROM {$this->usertable} AS u, {$this->sessionstable} AS s WHERE s.{$this->field['user_id']}=u.{$this->field['user_id']} AND s.sessionhash='$session_id'";

$result = cpg_db_query($sql, $this->link_id);

if (mysql_num_rows($result)){
$row = mysql_fetch_array($result);
return $row;
} else {
    return false;
}
}
}
I am attaching the modified file to this posting (just download, then rename from vbulletin30.inc.php.txt back to vbulletin30.inc.php and replace your copy with the modified file). Please report if this works as expected.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #25 on: January 31, 2010, 03:06:29 pm »

Please confirm - I'd like to see this fix included with the upcoming maintenance release cpg1.4.26, which I can only do if someone confirms my suggestion.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #26 on: January 31, 2010, 03:27:51 pm »

I can test it tomorrow. I don't have vB but a mate in the office does and I can test on his machine.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #27 on: January 31, 2010, 03:34:24 pm »

OK, thanks. I'm looking forward to your report. Cheers  ;D
Logged

alfisti.net

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
    • http://alfisti.net
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #28 on: February 01, 2010, 09:18:25 am »

Please confirm
Thank you Joachim :)
This works (as expected) fine :) with vB 4.01 and coppermine 1.4.25
(tested in a already installed version, not with the install function)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #29 on: February 01, 2010, 05:50:06 pm »

Phill,

did you have the chance to test the modified bridge file out?

Cheers

Joachim
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Vbulletin 4.0 with cpg 1.4.25
« Reply #30 on: February 01, 2010, 09:44:05 pm »

I've tried with vB3.8.4 and 4.01 and the bridge works as expected. Well done on adding it to 1.4.26 :)
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: 1 [2]   Go Up
 

Page created in 0.022 seconds with 19 queries.