$phpbb_root_path = './';
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/
// --> $phpbb_root_path = './ccc/';
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ddd/
// --> $phpbb_root_path = '../ccc/';
//
$phpbb_root_path = 'phpbb2/';
//
// prevent hacking attempts - phpBB needs this line to work
//
define ('IN_PHPBB', true);
//
// lets make a little check if your root_path is correct ;-)
//
if (!file_exists($phpbb_root_path . 'extension.inc'))
{
die ('phpBB Fetch All:
$phpbb_root_path is wrong and does not point to your forum.');
}
//
// now we include (integrate) some files which we need
//
//
// this is a phpBB file
//
include_once ($phpbb_root_path . 'extension.inc');
//
// again a phpBB file
//
include_once ($phpbb_root_path . 'common.' . $phpEx);
//
// phpBB file, too
//
include_once ($phpbb_root_path . 'includes/bbcode.' . $phpEx);
//
// well, this is 'our' file - the common Fetch All file needed
// every time you use Fetch All
//
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/common.' . $phpEx);
//
// since we are 'only' displaying some news we only need this one
//
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/posts.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/users.' . $phpEx);
//
// these lines will setup the phpBB session management which we need
// for proper security settings - just don't touch them unless you know
// what you are doing
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// here we go: fetch some news!
//
$CFG['posts_exclude_forums'] = (array(2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15));
$news = phpbb_fetch_posts();
//
// disconnect from the database
//
phpbb_disconnect();
//
// Hint:
//
// If you are curious what's in the $news array
// --> uncomment the following line
// You will see all elements of the array along with
// their keys and values.
//
// echo ('