i have been working on a plugin to enable posting of wordpress posts automatically into a forum in phpbb.
i have used phpbb fetch all for the job
but when i activate the plugin from the admin cp i get this message "You do not have sufficient permissions to access this page"
i need to delete/rename the plugin for making the blog work like before..
heres the peice of code
Plugin Name: WP-PHPBB
Plugin URI: http://www.happypoet.com/hacker/wphpbb/
Description: Not happy with WordPress Comments, this plugin merges WordPress into PHPBB, using PHPBB as the comment system.
Author: Wilbur Bennett
Author URI: http://www.happypoet.com
add_option(phpbb_path,'/myforum/','path to phpbb forum',yes);
// prevent hacking attempts - phpBB needs this line to work
$wphpbb_user_level = 8;
define ('IN_PHPBB', true);
// lets make a little check if your root_path is correct ;-)
if (!file_exists($phpbb_root_path . 'extension.inc'))
die ('<tt><b>phpBB Fetch All:</b>
$phpbb_root_path is wrong and does not point to your forum.</tt>');
// 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
// 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 . 'includes/functions_post.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/posts.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/editor.' . $phpEx);
// here we go: fetch some news!
$result = phpbb_insert_post($forum,$author,$title,$content);
// disconnect from the database