coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: buchananben on May 23, 2006, 11:05:51 AM

Title: login redirect with cpg 1.4.6/punBB1.2.12
Post by: buchananben on May 23, 2006, 11:05:51 AM
If I am in my gallery ie http://buchanan.homedns.org/nightcats/gallery and I click 'login' and enter my details, I am redirected to my forum http://buchanan.homedns.org/nightcats/forum after logging in, instead of back to my gallery. Is there a way to fix this?
there is a test account you can log in with user:test pass:test
Thanks
Ben
Title: Re: login redirect with cpg 1.4.6/punBB1.2.12
Post by: Nibbler on May 23, 2006, 12:27:16 PM
You need to apply a code 'fix' to punbb to enable that.


For login/logout redirection:

Edit punbb's login.php


Find: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Login'];

Add before it: $redirect_url = (isset($_GET['redir'])) ? $_GET['redir'] : $redirect_url;


Find: redirect('index.php', $lang_login['Logout redirect']);

Change to: redirect(isset($_GET['redir']) ? $_GET['redir'] : 'index.php', $lang_login['Logout redirect']);
Title: Re: login redirect with cpg 1.4.6/punBB1.2.12
Post by: buchananben on May 24, 2006, 02:03:45 AM
Thanks so much. That worked perfectly.
Ben