trouble with redirect trouble with redirect
 

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

trouble with redirect

Started by dhumann05, January 09, 2007, 08:37:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dhumann05

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

Nibbler

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.

dhumann05

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?

Nibbler

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.

dhumann05

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.

Nibbler

Yes, read the manual as suggested.

dhumann05

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??

Nibbler

Your forum's cookie domain should be set to .mttmteens.org