* database object here. Whatever you choose, you need to reference
* Authentication->authDb to the object
*/
- function _setupDatabase() {}
+ function _setupDatabase()
+ {
+ // connect to the DB
+ $this->authDb = new DB_MySQL($this->registry);
+
+ require_once 'includes/auth/config.php';
+ $this->authDb->connect(
+ $config['auth']['dbServer'],
+ $config['auth']['dbUser'],
+ $config['auth']['dbPassword'],
+ $config['auth']['dbName'],
+ false
+ );
+ }
// ###################################################################
/**
// ###################################################################
function _setupDatabase()
{
- $this->authDb =& $this->db;
+ $this->authDb = &$this->db;
}
// ###################################################################
// ###################################################################
function _setupDatabase()
{
+ parent::_setupDatabase();
+
// check and see if we need to call session_name()
+ require_once 'includes/auth/config.php';
+ $this->cookieName = $config['auth']['Drupal']['cookieName'];
$this->cookieName = ($this->cookieName == null ? session_name() : $this->cookieName);
-
- // connect to the DB
- $this->authDb = new DB_MySQL($this->registry);
- $this->authDb->connect('DRUPAL_DATABASE_SERVER', 'DATABASE_USER', 'DATABASE_PASSWORD', 'DATABASE_NAME', false);
}
// ###################################################################
// ###################################################################
function _setupDatabase()
{
- // connect to the DB
- $this->authDb = new DB_MySQL($this->registry);
- $this->authDb->connect('DATABASE_SERVER', 'DATABASE_USER', 'DATABASE_PASSWORD', 'DATABASE_NAME', false);
+ parent::_setupDatabase();
+
+ require_once 'includes/auth/config.php';
+ $this->phpBBTablePrefix = $config['auth']['phpBB2']['tablePrefix'];
+ $this->cookieName = $config['auth']['phpBB2']['cookieName'];
}
// ###################################################################
// ###################################################################
function _setupDatabase()
{
- $this->authDb = new DB_MySQL($this->registry);
- $this->authDb->connect('VBULLETIN_DATABASE_SERVER', 'VB_DATABASE_USER', 'VB_DATABASE_PASSWORD', 'VBULLETIN_DATABASE_NAME', false);
+ parent::_setupDatabase();
+
+ require_once 'includes/auth/config.php';
+ $this->licenseKey = $config['auth']['vBulletin3']['licenseKey'];
+ $this->vBTablePrefix = $config['auth']['vBulletin3']['tablePrefix'];
}
// ###################################################################
--- /dev/null
+<?php
+/*=====================================================================*\
+|| ###################################################################
+|| # Bugdar
+|| # Copyright (c)2004-2009 Blue Static
+|| #
+|| # This program is free software; you can redistribute it and/or modify
+|| # it under the terms of the GNU General Public License as published by
+|| # the Free Software Foundation; version 2 of the License.
+|| #
+|| # This program is distributed in the hope that it will be useful, but
+|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+|| # more details.
+|| #
+|| # You should have received a copy of the GNU General Public License along
+|| # with this program; if not, write to the Free Software Foundation, Inc.,
+|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+|| ###################################################################
+\*=====================================================================*/
+
+// ###################################################################
+// Database connectivity settings
+
+/**
+ * Name of the database server to connect to for authentication
+ */
+$config['auth']['dbServer'] = 'localhost';
+
+/**
+ * MySQL user of the authentication database
+ */
+$config['auth']['dbUser'] = 'mysql';
+
+/**
+ * Password of the authentication database
+ */
+$config['auth']['dbPassword'] = 'secret';
+
+/**
+ * Authentication database name
+ */
+$config['auth']['dbName'] = 'remote_auth_db';
+
+// ###################################################################
+// Drupal configuration
+
+/**
+ * The cookie name to use for Drupal. Leaving this NULL will get it from session_name()
+ */
+$config['auth']['Drupal']['cookieName'] = null;
+
+// ###################################################################
+// phpBB2 configuration
+
+/**
+ * Database table prefix
+ */
+$config['auth']['phpBB2']['tablePrefix'] = 'phpbb2_';
+
+/**
+ * The cookie name that is set in phpBB -> Administration -> General Admin -> Configuration -> Cookie Settings -> Cookie Name
+ */
+$config['auth']['phpBB2']['cookieName'] = 'phpbb2mysql';
+
+// ###################################################################
+// vBulletin 3 configuration
+
+/**
+ * Database table prefix
+ */
+$config['auth']['vBulletin3']['tablePrefix'] = '';
+
+/**
+ * This is the vBulletin license key that you can find in the Members' Area that is used in creating cookies
+ */
+$config['auth']['vBulletin3']['licenseKey'] = 'LXXXXXXX';
+
+?>
\ No newline at end of file