There's not much to decrypt really - in fact you can achieve rather a lot by pasting in a short block of code on every page (.php) of your site.
For phpbb3;
Paste this at the very top of each page - change the path to phpbb3 to suit:
PHP Code:
<?php
define('IN_PHPBB', true);
// Specify the path to your phpBB3 installation directory.
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : 'phpBB3/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>
Here are some code examples;
PHP Code:
<!-- if user is logged in show members stylesheet else show default stylesheet -->
<?php
if($user->data['is_registered'])
{echo "<link href=\"http://www.mywebsite/styles/members.css\" rel=\"stylesheet\" type=\"text/css\">";}
else
{echo "<link href=\"http://www.mywebsite/styles/default.css\" rel=\"stylesheet\" type=\"text/css\">";}
?>
PHP Code:
<?php if($user->data['is_registered'])
{
print $user->data['username'];
echo' is logged in<br />
<a title="Log out" href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout', true, $user->session_id). '">Log out</a>';
}
else
{
echo 'You are not logged in<br /><a title="Log in" href="login_page.php">Log In</a> or <a title="Register" href="forum/ucp.php?mode=register"> Register Now</a>!';
}
?>
You can specify usergroups or even individual users like this;
PHP Code:
<!-- If Admin or bobtest is logged in show content else show alternative -->
<?php if (($user->data['group_id'] == 11902) || ($user->data['username'] == 'bobtest')) { ?>
You are logged in as Admin or bobtest
<?php } else { ?>
Who are you? Some random Joe off the street?
<?php } ?>
You can find your group ID (in my example, the Admin group is 11902) by logging into the ACP, going to the "General" tab and selecting "Manage groups" on the left (under QUICK ACCESS)
Then select "Members" and look in the URL - it's the number on the very end.
So, using combinations of the code above you can protect your content/scripts/online tools and serve them to logged-in members or specific groups, or just yourself.
This thread got me started: http://www.phpbb.com/community/viewt...60577#p4016875
Hope that helps 
BTW -You also need to check to make sure the cookie is set to cover the whole domain and not just the phpbb3 forum. To do that, go to the "General" tab again, right at the bottom select "Cookie settings" (under SERVER CONFIGURATION) and set the cookie path to "/". And the cookie domain should just be something like ".mywebsite.com".
I also read somewhere that the number of dots in the cookie domain can affect things so if you have a .co.uk wesbite, you might have to set the cookie domain to "mywebsite.co.uk" - the 2 dots are still there but at the end - this was definitely a factor on phpbb2 but it may have been corrected in phpbb3.
Bookmarks