WordPress.org

Forums

You do not have sufficient permissions to access this page. (2 posts)

  1. varunkrish
    Member
    Posted 9 years ago #

    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

    <?php
    /*
    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
    Version: 2.4.5
    Author URI: http://www.happypoet.com
    */
    add_option(phpbb_path,'/myforum/','path to phpbb forum',yes);
    $phpbb_root_path=get_option(phpbb_path);
    //echo $phpbb_root_path;
    //
    // 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!
    //
    function wp_phpbb_add_post($post_ID,$title,$content){
    $result = phpbb_insert_post($forum,$author,$title,$content);
    }
    add_action('publish_post','wp_phpbb_add_post',9);
    // disconnect from the database

    phpbb_disconnect();

  2. kensav
    Member
    Posted 8 years ago #

    anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic