PHPBB and website integration

10 03 2016

I needed to integrate a website login with a phpBB3 forum recently, and this blog post came in really useful:  http://www.3cc.org/blog/2010/03/integrating-your-existing-site-into-phpbb3/

The only issue with it was the logout section – it uses $_GET, but when I implement this I get a message saying that this is an ‘illegal use of $_GET’.

Instead, the logout code that worked for me was this – it uses request_var() instead:

<?php
$cp = request_var('cp', '');
if ($cp == "logout") {
$user->session_kill();
$user->session_begin();
echo "Logged out";
}
?>
Advertisements

Actions

Information

One response

23 03 2017
APL

Hi Andrew,

Saw you phpbb integration post over stackoverflow and in process of trying a way to implement my brand new site with already installed phpbb v3.2.0

Can I try your code on my site and see how I get on and perhaps also advise what you file structure is linke. I noticed you have a menu.php which I guess is called from one of the frame son your site?
My site will not use frames and is plain html front page for now.

Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: