PressTigers

Using WP-United to Integrate WordPress with PHPBB3.0

PHPBB is a forum developed in PHP that provides support for multiple database engines, user groups, plugins and various notification options, etc. This article will take you through a guide to integrate WordPress with PHPBB version 3.0.x, so that the user (who logged-in WordPress already) can automatically log-in to PHPBB forum (same in the case of log-out). If a user registers for WordPress, at the same time a user account will also be created in PHPBB forum and vice versa.

In order to integrate WordPress with PHPBB3.0, you need to have WP-United WordPress Plugin, WP-United MOD for PHPBB3.0 and FTP Access. Follow the steps mentioned below while modifying PHPBB forum files:

1- Install WP-United plugin in your WordPress. Once installation is done, activate the plugin. Now go to plugin Dashboard and select PHPBB installation config.php file.

Using WP-United to Integrate WordPress with PHPBB3.0-1

2- You need to install WP-United MOD in PHPBB manually by downloading it from Github. Once it is downloaded, you can modify or add the following files in PHPBB forum:

  1. phpbb_forum_root/includes/functions_content.php
  2. phpbb_forum_root/memberlist.php
  3. phpbb_forum_root/viewtopic.php
  4. phpbb_forum_root/includes/functions.php
  5. phpbb_forum_root/includes/functions_user.php
  6. phpbb_forum_root/includes/acp/acp_main.php
  7. phpbb_forum_root/style.php
  8. phpbb_forum_root/styles/prosilver/template/overall_header.html
  9. phpbb_forum_root/styles/prosilver/template/overall_footer.html
  10. phpbb_forum_root/styles/prosilver/template/memberlist_view.html
  11. phpbb_forum_root/styles/prosilver/template/viewtopic_body.html
  12. phpbb_forum_root/styles/prosilver/template/editor.js
  13. phpbb_forum_root/styles/prosilver/theme/common.css

After that, include the following files in MOD:

  1. root/includes/hooks/hook_wp-united.php
  2. root/language/
  3. root/styles/
  4. root/wp-united/

Now copy /root/includes/hooks/hook_wp-united.php file to phpbb_forum_root/includes/hooks/hook_wp-united.php, /root/language/ file to phpbb_forum_root /language/, /root/styles/ file to phpbb_forum_root/styles/ and /root/wp-united/ file to phpbb_forum_root/wp-united/ respectively. After this, refresh the WP-United Admin Dashboard page and click on Connect button.

Using WP-United to Integrate WordPress with PHPBB3.0-2

The MOD is installed but not connected yet.

3- You need to modify the functions oriented files (like PHP files) mentioned below to get the MOD activated, using the following manual instructions carefully:

  1. Open includes/functions_content.php file, find function make_clickable($text, $server_url = false, $class = ‘postlink’) line of code and replace it with:
  2. Open memberlist.php file, find the following lines of code:

    Now add the following before the above mentioned lines of code:
  3. Open viewtopic.php file, find the following lines of code:

    Now add the following before the above mentioned lines of code:

    In the same file, find the following lines of code:

    Now add the following before the above mentioned lines of code:
  4. Open includes/functions.php file, find the following lines of code:

    Now put the following after the above mentioned lines of code:
  5. Open includes/functions_user.php file, find function validate_username($username, $allowed_username = false) line of code and replace it with the following:
  6. Open includes/acp/acp_main.php file, find $cache->purge(); line of code and add the following after it:

4- Now, edit the following remaining files to complete the integration:

  1. Open style.php file, find echo $theme[‘theme_data’]; line of code and add the following before it:
  2. Open styles/prosilver/template/overall_header.html file, find <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> line of code and replace it with <!– IF WP_DTD –>{WP_DTD}<!– ELSE –><!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”><!– ENDIF –>.Now find <title>{SITENAME} &bull; <!– IF S_IN_MCP –>{L_MCP} &bull; <!– ELSEIF S_IN_UCP –>{L_UCP} &bull; <!– ENDIF –>{PAGE_TITLE}</title> line of code and add the following after it:

    Find <script type=”text/javascript”> line of code and add the following before it:

    Find </head> and add the following before it:

    Find <li class=”icon-faq”><a href=”{U_FAQ}” title=”{L_FAQ_EXPLAIN}”>{L_FAQ}</a></li> and add the following after it:
  3. Open styles/prosilver/template/overall_footer.html file, find <!– IF TRANSLATION_INFO –><br />{TRANSLATION_INFO}<!– ENDIF → line of code and add the following after it:
  4. Open styles/prosilver/template/memberlist_view.html file, find the following lines of code:

    Now add the following after the above mentioned lines of code:
  5. Open styles/prosilver/template/viewtopic_body.html file, find the following lines of code:

    Now add the following after the above mentioned lines of code:
  6. Open styles/prosilver/template/editor.js file, find document.write(‘<td bgcolor=”#’ + color + ‘” style=”width: ‘ + width + ‘px; height: ‘ + height + ‘px;”>’); line of code and replace it with document.write(‘<td bgcolor=”#’ + color + ‘” style=”width: ‘ + width + ‘px; height: ‘ + height + ‘px; background-color: #’ + color + ‘;”>’);.Note: Make this alteration only if you are using template integration because it is done for the compatibility of PHPBB forum with default WordPress template.
  7. Open styles/prosilver/theme/common.css file, find the following lines of code:

    Now replace it with the following:

    In the same file, find #site-description { line of code and add the following after it:

5- Go to WP-United Admin Dashboard, refresh it and then click on Connect button. You are done as WordPress and PHPBB 3.0 are integrated now.

Using WP-United to Integrate WordPress with PHPBB3.0-3

6- Before doing any testing, complete the steps mentioned below:

  1. Remove PHPBB cache. For this, go to phpbb_root_dir/cache/ folder and delete all the files.
  2. Open phpbb_root_dir/rokbb3.php file and find the following code on line number 153:

    Now wrap the function deceleration with the following code:
  3. Now try to login from WordPress and check that a login session has been created automatically or not while navigating towards PHPBB forum in PHPBB forum.
  4. Similarly try to login from PHPBB forum and check that a login session has been created automatically or not while navigating towards WordPress in WordPress.
  5. If you get an error message like:
    Using WP-United to Integrate WordPress with PHPBB3.0-4 You need to remove this error. For this, open phpbb_root_dir/includes /startup.php file and find the following code in line number 22:

    Now replace it with error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT); code. If you have activated a different theme in your PHPBB forum rather than prosilver, then repeat the same steps with the activated theme as you  have done with prosilver.

7- In case of any error, make sure that your PHPBB Server Settings (especially “script path“) and WordPress Settings are correct. After that, try re-installing.

If you are getting blank pages, turn on PHP error reporting or look into your Server log so that you can find the underlying cause of problem that persists.

User Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Get in Touch