
[How to] Install PhpBB in Drupal
In this module, I'll explain how to Integrate PhpBB in Drupal. I checked a lot over Internet and the results seems to confusing than problem solving. Somehow, I found the solution by reading documentations (Read me files) at PhpBB website and Drupal website.
PREREQUISITE : The module requires php5 to run.
If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged
PREREQUISITE : The module requires php5 to run.
- Back up your Drupal and Phpbb3 folders.
- Install PhpBB by following instructions from this post. While copying the decompressed files, copy them to the Drupal folder.
- In order to integrate, we need to use phpbbdrupalbridge module in PhpBB3 and Phpbbforum module in Drupal. By using these two, we can create a link between them.
- First lets go with bridge. Download the phpbbdrupalbridge-3.0.10.zip MOD from http://phpbb.drupalbridge.org/download
- Unpack the phpbbdrupalbridge-3.0.10.zip archive directory.
- Open root folder in the phpdrupalbridge directory.
- Copy the contents in folders includes/ & styles/ to /phpBB3/ folder.
Example 1 : phpdrupalbridge-3.0.10/root/includes/phpdrupalbridge/phpbb_api.php to /phpBB3/includes/phpdrupalbridge/phpbb_api.php
Example 2 : phpdrupalbridge-3.0.10/root/styles/prosilver-embed to /phpBB3/styles/prosilver-embed - If any files are asking for overwriting, click yes and overwrite them.
- Copy ../root/images directory to Drupal images directory.
Do not forget to add a line " Disallow: /images/ " (without quotes) to your robots.txt file (I'm not sure about this line. I didn't do this. If something goes wrong, perform this step and try)- Goto PhpBB installed location in your browser
- Login using admin credentials
- Goto ACP (Administrative Control Panel) (Most probably Link is available at the bottom of your webpage)
- Go to General tab --> Server settings
( Note : These are Example settings. Let's say I hosted XYZ website in subfolder of abc.com. Even though I have xyz.com as my domain, I should point to base domain only in this case. That is the meaning of base url below )- Domain name : www.abc.com/xyz$base_url = 'www.abc.com/xyz';
or - Domain name : abc.com/xyz$base_url = 'http://abc.com/xyz';
Look for " $base_url " in the file /sites/default/settings.php and change that to match the address to your drupal installation. You shouldn't put trailing slash. Drupal will add it for you dynamically. - Script path: /xyz/phpBB3
If you have drupal and phpBB3 installed in subdirectory you must enterScript path: /subdirectory/phpBB3
( NOTE : I have phpBB3 installed in subfolder of my drupal. Drupal is installed in abc/xyz folder. phpBB is installed in abc/xyz/phpBB3/ - Force server URL settings: (*) Yes () No.
- Domain name : www.abc.com/xyz$base_url = 'www.abc.com/xyz';
- Go to General tab --> Cookie settings
Cookie domain: .xyz.com
Cookie name: [any random name of your choice]
My Example.. Cookie name: phpbb3_1f2g9
Cookie path: /
( Note: your domain name .example.com with leading dot. ) - Go to General tab --> User registration settings
- Account activation: () Disable () None (*) By User[Email-verification] () By
- AdminUsername length: 3 - 30
- Password length: 6 - 30
- Go to General tab --> Security settings
- Check IP against DNS Blackhole List: () Yes (*) No
- This can be enabled if security attacks are increasing
- Check e-mail domain for valid MX record: () Yes (*) No If enabled, the e-mail domain provided on registration and profile changes is checked for a valid MX record.
- Go to General tab --> Load settings
- Session length: 22100Sessions will expire after this time, in seconds. So, set this value according your needs.
- Go to ACP --> Styles tab
- prosilver-embed --> Install
or/and - subsilver2-embed --> Install
In the Install style make sure that the style is active. Do not make it default. - Clear phpBB cache. To do this,
Go to General tab --> In the middle of the page (vertically) you can find, - By default, the phpbbdrupalbridge MOD installs phpbbdrupalbridge API files into the ../phpBB3/includes/phpbbdrupalbridge/ directory.
- Move it to the sites/all/modules/phpbbforum/includes/ directory.
Example : Move /phpBB3/includes/phpbbdrupalbridge/phpbb_api.php to sites/all/modules/phpbbforum/includes/phpbbdrupalbridge/phpbb_api.php
( Note : You should use only one copy of /phpbbdrupalbridge directory ) - Now we have to install to Phpbbforum module in Drupal. To do this, Download the phpBBforum module from http://drupal.org/project/phpbbforum
- Unpack the archive.
- Copy all the contents to sites/all/modules/phpbbforum/
Example: Downloaded phpbbforum/css/phpbbforum.css to server sites/all/modules/phpbbforum/css/phpbbforum.css - Remember that we didn't test our http://xyz.com/PhpBB3 after installing the bridge and module. We need to check now. To test how you will be authenticated, login to your phpBB forum as admin.
- Next step is to go back to Drupal admin dashboard. Login to Drupal site as admin
- Go to Modules tab.
- Enable the phpBBforum module.
- In order to run phpBB inside of drupal page correctly, clean URLs must be enabled.
- To do this, go to Dashboard >> Configuration >> Clean URLs --> Enable and save.
- Go to Dashboard >> Configuration >> phpBBforum settings.
- You can see the erroneous phpBBforum status.
- Even if you fill correct settings here, it throws you an error.
- This is because of bug in bridge/module.
- So replace the ../phpbb3/includes/functions_user.php with this file.
- Now go to Dashboard >> Configuration >> phpBBforumsettings.
- To see the success message, fill the settings as below
- phpBB forum root path : /home/ .. /public_html/ .. /phpBB3/
- Path to phpBB api file : /home/../public_html/../sites/all/modules/phpbbforum/includes/phpbbdrupalbridge/
- phpBB api file name : phpbb_api.php
( Note : If you ignore trailing slashes or if you don't give full path here, Drupal won't read PhpBB database ) - If you didn't move the folders, as mentioned in steps 21 & 22 above, above gives you error again.
- In the same page, scroll down for the section phpBB page settings. Fill the following.
phpBB display way : In the Drupal page - Scroll to Profile fields mapping section.
- You can see field names like field_gender over there. These fields are nothing but attributes of a user in the website.
- These field names should match with the Drupal user registration form field names. By default, these fields doesn't exist in a Drupal fresh install. So we need to create them. To create fields, leave the webpage like that and open a new browser tab, go to Dashboard --> Configuration --> Account Settings --> Manage fields tab (On top right corner)
- Create fields that match with the name i.e same name as in previous phpBBforumsettings page.
Example : field_gender - After creating all those fields, save them
- Now come back to phpBBforumsettings tab make sure that you checked Drupal master for Select master registration system in phpBB/Drupal settings. If this is in phpBB master, users will get Access Denied error when users try to click on Create New Account in Drupal homepage.
- Set other settings if you want and Save configuration.
- After above steps, the phpBBstatus field which showed error before, displaya success message.
- Navigate to Dashboard --> Structure --> Blocks
- Enable phpBBforum: Hidden authentication block.
- Configure its settings as below.
Show block on specific pages : * Show on every page except the listed pages.Pages: " user/reset/* " Hit Enter
" user/password " ( without quotes )
- If you want advanced synchronization, do not disable it in the future even. Enable the phpBBforum blocks you want to use (optional).
- Check whether the link http://xyz.com/phpbbforum is working fine in your browser.
- If page phpbbforum is not found, Go to Dashboard >> Configuration >> Performance --> Clear cached data
- To setup a link to phpbbforum page, go to Dashboard >> Structure >> Menus >> Navigation
- See Menu item with blank title in state (Disabled)
- You may enable it if you do want phpbbforum in Navigation menu too. Note that Menu link title is mandatory.
( Note : To remove this in future, you need to remove the page title ) - Go to Dashboard >> Structure >> Menus >> Add links --> Enter Menu item as phpbbforum.
- The name that appears in URLs for PhpBB forums is phpbbforum
- To change this name you should add URL aliases. For URL aliasing, go to Dashboard --> Configuration --> URL Aliases
- Let us say, we want to use the term 'forums' instead of phpbbforum in URLS.
- Click Add Alias. Add each alias as below.
- phpbbforum -> forums
- phpbbforum/index.php -> forums/index.php
- phpbbforum/viewtopic.php -> forums/viewtopic.php
- phpbbforum/viewforum.php -> forums/viewforum.php
- phpbbforum/viewonline.php -> forums/viewonline.php
- phpbbforum/memberlist.php -> forums/memberlist.php
- phpbbforum/posting.php -> forums/posting.php
- phpbbforum/search.php -> forums/search.php
- phpbbforum/ucp.php -> forums/ucp.php
- phpbbforum/mcp.php -> forums/mcp.php
- phpbbforum/faq.php -> forums/faq.php
- phpbbforum/report.php -> forums/report.php
- phpbbforum/adm/index.php -> forums/adm/index.php
- If existing path is : http://xyz.com/phpbbforum , it comes as http://xyz.com/forums( Note : Use a relative path and don't add a trailing slash or the URL alias won't work. )
- To setup content submission to phpBB forum go to Dashboard --> Structure --> Content types --> Add content type
- Give name as phpBBforum.
- Go to phpbbforum submission settings ( left bottom of same page )
Drupal to phpBB submission: (*) Enabled
This requires Drupal to phpBB node submission : enabled in phpBB topic submission settings in phpBBforum settings in Dashboard --> Configuration - Download my patch files from here
- Copy all those to your /PhpBB3 folder on server in. If asked, click yes to override
- You're done with integration. Have a coffee. :)
NOTE : PhpBB forum links in menus and navigation appears only after login as authenticated user
If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged
