coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: dhumann05 on January 09, 2007, 08:37:58 AM

Title: trouble with redirect
Post by: dhumann05 on January 09, 2007, 08:37:58 AM
I seem to have created a problem for myself. I installed my forum on a subdomain (board.mttmteens.org) but the gallery is installed on the primary domain. I bridged the two and now when I try to log into coppermine, it takes me to the phpBB2 board to login, and when I enter the cridentials, it either gives me a 404 with a url of "http://board.mttmteens.org/index.php" or it tries to send me back to the gallery while still on the subdomain (ie. board.mttmteens.org/campphotos). I, therefore, cannot get into my coppermine settings at all. Help please?


Coppermine install: http://mttmteens.org/campphotos
Forum install: http://board.mttmteens.org
Coppermine version: cpg1.4.9
Forum version: phpBB2 2.0.21
Test user account: testuser / testuser

BridgeManager settings:
Forum URL:  http://board.mttmteens.org
Relative path to your BBS's config file:  ../board
Use post-based groups?:  0
Title: Re: trouble with redirect
Post by: Nibbler on January 09, 2007, 03:18:17 PM
The redirect can't work like that, since there is no path from the forum to the gallery. PHPBB will not redirect by URL for security reasons. To disable the redirect:

bridge/phpbb2018.inc.php


function login_page()
{
global $CONFIG;

$cpg = parse_url($CONFIG['site_url']);
$bb = parse_url($this->boardurl);
$levels = count(explode('/', $bb['path'])) - 1;
$redirect = str_repeat('../', $levels) . trim($cpg['path'], '/') . '/';

$this->redirect("/login.php?redirect=$redirect");
}

function logout_page()
{
global $CONFIG;

$cpg = parse_url($CONFIG['site_url']);
$bb = parse_url($this->boardurl);
$levels = count(explode('/', $bb['path'])) - 1;
$redirect = str_repeat('../', $levels) . trim($cpg['path'], '/') . '/';

$this->redirect("/login.php?logout=true&sid={$this->sid}&redirect=$redirect");
}


change to


function login_page()
{
$this->redirect("/login.php");
}

function logout_page()
{
$this->redirect("/login.php?logout=true&sid={$this->sid}");
}


Then add your own links to the gallery from the forum.
Title: Re: trouble with redirect
Post by: dhumann05 on January 09, 2007, 10:44:50 PM
add my own links in the forum to the gallery? as in just a hyperlink in a post or what? Is it possible just to disable the bridge altogether?
Title: Re: trouble with redirect
Post by: Nibbler on January 09, 2007, 11:07:28 PM
Add a link in your forum's navigation. Refer to their boards or documentation for details. Of course you can disable the bridge, this is explained in the manual.
Title: Re: trouble with redirect
Post by: dhumann05 on February 06, 2007, 03:13:39 PM
is there any way, in my current situation, to just disable the bridge? (I havent yet figured out how to add a link to my gallery in my forum navigation. I also have been busy so I havent slaved too much over it yet). Any help would be appreciated.
Title: Re: trouble with redirect
Post by: Nibbler on February 06, 2007, 03:16:22 PM
Yes, read the manual as suggested.
Title: Re: trouble with redirect
Post by: dhumann05 on February 06, 2007, 03:38:08 PM
ok, so I have a link in the navigation for the forum. I click "login" on the gallery, it takes me to the forum, I login, click the gallery link, and it takes me to the gallery while still not logged in??
Title: Re: trouble with redirect
Post by: Nibbler on February 06, 2007, 03:53:34 PM
Your forum's cookie domain should be set to .mttmteens.org