As I mentioned in a previous post, I’m trying to get a phpBB forum to allow user registrations using Facebook Connect. So far all looks good, so I’ll explain how I managed to do this.
Disclaimer: I do not support this plugin.
Also, I did not develop this plugin and cannot guarantuee that it’s safe.
Having said that, if you’re as stubborn (or desperate for a Facebook plugin for phpBB) as I am, keep on reading. (Note: I’ll just assume you have already installed the latest version of phpBB. If not, you may want to go here first: Download phpBB.)
Getting a Facebook API key
To be able to even connect to Facebook you will need to create an application. Unfortunately, this means you’ll have to verify your Facebook account by filling in a cellphone number or credit-card. This sucks, but it’s necessary. Once you’ve created an app and filled in all the right information, you’ll have some info that you can use to verify yourself as the creator of the app. For the plugin we’re installing you will need you Application ID and your Application Secret Key.
Download the plugin
Once upon a time some guy called Skinny Vinny developed a plugin to add Facebook Connect to phpBB. Unfortunately, he disappeared off of the face of the internet, taking his website svmods.com along with him. Developing of the mod was discontinued, the original file was nowhere to be found anymore and nobody else came up with the idea to pick it up again. I would have loved to start the development of a new plugin, but unfortunately I’m not familiar enough with PHP to start something like that from scratch. Instead, I managed to find the zip-file with the plugin by Skinny Vinny somewhere in an archived page, which I’m going to use.
Note: as the plugin page states this plugin was not completed, not has it been tested for security flaws. Use it at your own risk.
Download the Facebook Connect for phpBB plugin here: svmods_facebook_connect_for_phpbb.zip
One thing I hate about phpBB is the way you have to actually edit the core files if you want to use a plugin. Decent software like vBulletin or MediaWiki has plenty of hooks which you can use to launch a plugin with, without having to modify the system files. To make this a little easier, a plugin was developed for phpBB called Automod, which installs a plugin automatically for you, saving you the trouble of having to edit the files manually. For some reason however, the Facebook plugin does not work with Automod. This means we have to install it manually after all. Fortunately though, the amount of edits is relatively low (compared to some other plugins) so it shouldn’t be too much of a pain.
First of all, backup your forum files and database. If you don’t know how to backup your database, see this tutorial: Backing up your phpBB database.
Backing up your files is as easy as connecting to your server with an FTP-client and downloading the entire /forums/ (or whatever you have called it) folder to your PC.
After you’ve backed up your forums, you can start uploading the plugin. In the plugin’s zip-file you just downloaded there’s a folder called /root/. Open it, and upload the contents into the folder on your server that has the forums in it.
Probably you will get a prompt asking you if you want to overwrite the /includes/ and /languages/ folders. This means you’re uploading into the right directory. Just click ‘yes’.
Adding the plugin code to phpBB
This is where the fun part starts: you will have to make some changes to the phpBB core files. In the downloaded zip there’s an install_mod.xml file. Open it, and follow the instructions. It’s not that hard, and if you mess it up just restore your foums by uploading your backed-up files to the server again and try over.
Activating the plugin
Finally, to activate the plugin you’ll have to log in to the Administration Control Panel of your forums. Purge the cache, and then go to the Board Settings page. Here you’ll find a section where you can add your Facebook Application ID and secret (the ones you saved from before when you made a Facebook Application). Hit the submit button, and you should be done!
As always, if you have any questions, remarks or feedback just let me know in the comments below or tweet me at @Litso_. I’m seriously interested in getting this plugin to an official status, so if you’re a PHP developer and you want to help me out making this plugin better, let me know! I think there’s a lot of people wanting to use this plugin, so let’s give them something good!