My coppermine Development version phpBB hacks

Discussion and questions about anything in the tech section, or any of the software or libraries I've released or have worked on.
Post Reply
Giz
Site Admin
Posts: 57
Joined: Wed May 07, 2003 6:19 pm

My coppermine Development version phpBB hacks

Post by Giz »

These will get redirection working properly:

In /bridge/phpbb.inc.php Find:

define('PHPBB_WEB_PATH','whateverpath');

and after it add:

define('PHPBB_RELATIVE_RETURN_PATH','../gallery/');

This could be whatever will get you from the phpBB2 script path in the phpBB2 board configuration to the site relative location of your gallery.

Then find inside function udb_login_page():

$target = 'login.php?redirect='.$CONFIG['ecards_more_pic_target'];

comment this out by changing it to

//$target = 'login.php?redirect='.$CONFIG['ecards_more_pic_target'];

Add this line instead:

$target = 'login.php?redirect='.PHPBB_RELATIVE_RETURN_PATH;


***********
Again in bridge/phpbb.inc.php

replace function udb_logout_page() with this one:

Code:
[php]function udb_logout_page()
{
global $CONFIG, $HTTP_COOKIE_VARS;

$session_id = addslashes($HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX.'_sid']);
$target = 'login.php?logout=true&sid='.$session_id . '&redirect='.PHPBB_RELATIVE_RETURN_PATH;
udb_redirect($target);
} [/php]


This fixes the invalid_session error you get when logging out.
Post Reply