[script] How to integrate vBulletin 3.6.X with Coppermine 1.4.X [script] How to integrate vBulletin 3.6.X with Coppermine 1.4.X
 

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]

Main Menu

[script] How to integrate vBulletin 3.6.X with Coppermine 1.4.X

Started by Iguana1986, March 08, 2007, 12:06:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Iguana1986

_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.

function session_extraction()
{
return false;

}


2) Replace the function cookie_extraction with this.

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'

jerx

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

evitu

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

Joachim Müller

Thanks to me for locking this topic to stop the "me too" postings.