WordPress.org

Ready to get started?Download WordPress

Forums

PHPBB Single Sign On
[resolved] Another phpBridge Plugin - Doing Research (4 posts)

  1. WebTechGlobal
    Member
    Posted 12 months ago #

    Hey

    I like your plugin. We're currently working on WP e-Customers plugin and it will offer a bit of everything in a very integrated way. One thing we want to do is monetize and gamify phpBB with the same system as used in WordPress. Our phpBB bridge will be one way for a long time if not forever. WP is to be the HQ and all user management will start at WordPress.

    I'm just researching the methods to include phpBB in WordPress among the various plugins. I quickly done this with yours after copying the wpbb_phpBB3() class over to WP e-Customers and it seemed promising until I got an error...

    $b = new wpbb_phpBB3();
        wpbb_phpBB3::loadConstants();
        wpbb_phpBB3::load();
        wpbb_phpBB3::phpbbConfig();
    
        global $phpbb_root_path;
        include_once($phpbb_root_path . 'config.php');
        include_once($phpbb_root_path . 'includes/utf/utf_tools.php');
        include_once($phpbb_root_path . 'includes/utf/utf_normalizer.php');
        include_once($phpbb_root_path . 'includes/db/dbal.php');
        include_once($phpbb_root_path . 'includes/db/db_tools.php');
        include_once($phpbb_root_path . 'includes/db/mysql.php');
        include_once($phpbb_root_path . 'includes/db/mysqli.php');
        include_once($phpbb_root_path . 'includes/functions.php');
        include_once($phpbb_root_path . 'includes/constants.php');
        include_once($phpbb_root_path . 'includes/auth.php');
        include_once($phpbb_root_path . 'includes/acm/acm_file.php');
        include_once($phpbb_root_path . 'includes/cache.php');
    
        // this next line causes an error related to WP no phpBB
        echo $b->get_wp_user_by_name('Ryan Bayne');

    So obviously these are lines from your plugin but from various files. I've quickly copied and pasted. The include_once lines were commented out but I stumbled on them and also found I needed them. Not sure how your including those functions.

    All looks good until the last line there and I get "Call to undefined function wp_generate_password() in". Not sure whats going on there considering the code above is in an active WordPress plugin.

    The same issue is explained in another thread here.

    Just thought I would post it and see if it leads to some tips. I may go with an approach as you have done with your class but I'll need to strip it down a bit.

    http://wordpress.org/plugins/phpbb-single-sign-on/

  2. WebTechGlobal
    Member
    Posted 12 months ago #

    Back again! As I said I'm just looking over approaches and breaking code to get a feel for phpBB being loaded in WordPress. I done this and do not have any errors. However calling a function causes some problems.

    function loadphpBBstuff(){ 
    
            $b = new wpbb_phpBB3();
            wpbb_phpBB3::loadConstants();
            wpbb_phpBB3::load();
            wpbb_phpBB3::phpbbConfig();
    
            global $phpbb_root_path;
            include_once($phpbb_root_path . 'config.php');
            include_once($phpbb_root_path . 'includes/utf/utf_tools.php');
            include_once($phpbb_root_path . 'includes/utf/utf_normalizer.php');
            include_once($phpbb_root_path . 'includes/db/dbal.php');
            include_once($phpbb_root_path . 'includes/db/db_tools.php');
            include_once($phpbb_root_path . 'includes/db/mysql.php');
            include_once($phpbb_root_path . 'includes/db/mysqli.php');
            include_once($phpbb_root_path . 'includes/functions.php');
            include_once($phpbb_root_path . 'includes/constants.php');
            include_once($phpbb_root_path . 'includes/auth.php');
            include_once($phpbb_root_path . 'includes/acm/acm_file.php');
            include_once($phpbb_root_path . 'includes/cache.php');
    
        }  add_action('admin','loadphpBBstuff');

    I'll defo start from scratch but take a similar approach to yourself though so thanks for the plugin.

  3. onigoetz
    Member
    Plugin Author

    Posted 12 months ago #

    Hi

    I just updated the plugin,

    some of the code you use was commented out because it's from wp2bb, and the include logic was done in wpbb_phpBB3::load();

    in the current plugin there should be no dead code, so you can freely copy from there.

  4. WebTechGlobal
    Member
    Posted 12 months ago #

    Great stuff the update here is appreciated. I'll take another look and I'll be sure to mention your help somewhere.

Reply

You must log in to post.

About this Plugin

About this Topic