• Resolved WebTechGlobal

    (@webtechglobal)


    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.

    https://www.ads-software.com/plugins/phpbb-single-sign-on/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter WebTechGlobal

    (@webtechglobal)

    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.

    Plugin Author onigoetz

    (@onigoetz)

    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.

    Thread Starter WebTechGlobal

    (@webtechglobal)

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Another phpBridge Plugin – Doing Research’ is closed to new replies.