Redirect Problem with vBulletin 2.3.2 Redirect Problem with vBulletin 2.3.2
 

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

Redirect Problem with vBulletin 2.3.2

Started by CarterX, August 23, 2005, 09:15:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CarterX

Gallery: http://www.theocmedia.net/media (Version 1.3.3)
Forum: http://www.theocmedia.net/forum (Version 2.3.2)

What Happens:
- I click Login in the gallery. It redirects me to the Forum main page (not logged in)
- I click Logout in the gallery. It redirects me to the Forum page saying Cookies have been cleared. (it did log out)

What I don't want is the redirection part. I want seperate login pages for both, and so when I logout, I remain in the gallery / a custom redirection page.


vbulletin23.inc.php

// database configuration

define('VB_DB_NAME', '****'); // The name of the database used by the board
define('VB_BD_HOST', 'localhost'); // The name of the database server
define('VB_DB_USERNAME', '****'); // The username to use to connect to the database
define('VB_DB_PASSWORD', '****'); // The password to use to connect to the database

// The web path to your vBulletin Board directory
// In this example http://yoursite_name.com/vbulletin23/

define('VB_WEB_PATH', '/forum/');

// ------------------------------------------------------------------------- //
// Nothing to edit below this line
// ------------------------------------------------------------------------- //

// Prefix and names for the database tables

define('VB_TABLE_PREFIX', ''); // Leave empty, not supported by vBulletin 2.3
define('VB_USER_TABLE', 'user'); // The members table
define('VB_SESSION_TABLE', 'session'); // The sessions table
define('VB_GROUP_TABLE', 'usergroup'); // The groups table


Test Account:
Username: test
Password: test1

Nibbler

You can define your own behaviour using the udb_login_page() and udb_logout_page() functions in the bridge file.

CarterX

Right, Thanks!
Since I'm not all that good at PHP, can you help me out a bit?

I'm kind of stuck on what to do:


// Redirect
function udb_redirect($target)
{
    header('Location: http://' . $_SERVER['HTTP_HOST'] . VB_WEB_PATH . $target);
    exit;
}

// Register
function udb_register_page()
{
    $target = 'register.php';
    udb_redirect($target);
}
// Login
function udb_login_page()
{
    $target = 'index.php';
    udb_redirect($target);
}


I don't know how to change it so that It will go to the COPPERMINE index page instead of the Forum one..



sunshinebrian

yeah, I'm having the same problem with 3.0.1 - the integration works but when I try to log in on the coppermine page it takes me to the forum page.

Can someone help me out with some code to fix it? I would appreciate it so much!

Nibbler

That's intended behaviour. If you want something more complex then you'll need to code it as suggested above.

sunshinebrian

oh ok, thanks anyway. I don't know how to code it like that but thanks.