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: [script] How to integrate vBulletin 3.6.X with Coppermine 1.4.X  (Read 4396 times)

0 Members and 1 Guest are viewing this topic.

Iguana1986

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

_Sorry for my english_

Today I have found (and resolved) the problem that don't allow one user to go directly in gallery homepage if it is integrated with vb.


The problem is this :

The file vbulletin30.inc.php try to find one cookie called 'cookieprefix_sessionhash'.

But when you are in forum and then close the browser, this cookie expire because vBulletin don't hold it.

So I have make this vbulletin30.inc.php that WORKS with 'cookieprefix_userid'.


You must do this :


1) Replace the function session_extraction.

Code: [Select]
function session_extraction()
{
return false;

}

2) Replace the function cookie_extraction with this.

Code: [Select]
function cookie_extraction() {
if (isset($_COOKIE[$this->cookie_name . 'userid'])) {
$userFromCookie_id = addslashes($_COOKIE[$this->cookie_name . 'userid']);

$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 WHERE u.userid='$userFromCookie_id'";

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

if (mysql_num_rows($result)){
$row = mysql_fetch_array($result);
return $row;
} else {
    return false;
}
}
}






Goodbye
Antonino Calabro'
« Last Edit: November 11, 2008, 07:06:13 am by Joachim Müller »
Logged

jerx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 85
Re: [script] How to integrate vBulletin 3.6.X with Coppermine 1.4.X
« Reply #1 on: November 10, 2008, 09:59:02 pm »

Thank you, Antonino! This solves the problem you described.
Logged

evitu

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: [script] How to integrate vBulletin 3.6.X with Coppermine 1.4.X
« Reply #2 on: November 11, 2008, 03:08:01 pm »

Thank antonino for this script! And thanks to jerx who had upped  this topic :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [script] How to integrate vBulletin 3.6.X with Coppermine 1.4.X
« Reply #3 on: November 11, 2008, 11:09:06 pm »

Thanks to me for locking this topic to stop the "me too" postings.
Logged
Pages: [1]   Go Up
 

Page created in 0.099 seconds with 15 queries.