PHP Forum Software Showdown Part 1: bbPress
A relative new-comer, bbPress “is forum software with a twist from the creators of WordPress”. The first public version, 0.72, was released in mid-October 2006, and the version we'll be installing, 0.73, was released a couple of weeks later. Downloading bbPress is fairly easy, since there's only two options – one for the installer in .zip, and one in .tar.gz.
File and folder size
At 170 KB, the zip file is extremely small, and is less than 500 KB unzipped. Of the six pieces of forum software that I'll be reviewing, bbPress is the smallest, but we'll see what that translates into as far as functionality.
bbPress requires PHP 4.2+ and MySQL 4.0+, as well as MultiViews or mod_rewrite. All-in-all, pretty standard.
Installing on our local Web server
Unlike past articles, for these forum reviews we're going to create the necessary users and databases using the command line interface of MySQL. If you're going to be installing these forums to a remote system, just create the user(s) and database(s) as usual (and that goes for if you're installing it locally as well).
Creating the user and database via the command-line
First, you'll need to login to MySQL. Open up the Run prompt by going to Start > Run … and type cmd, then press Enter. At the prompt, if you've setup MySQL correctly, you can type the following command, followed by pressing Enter.
mysql -h localhost -u root -p
At this point, you'll be prompted to enter your password, which you'll have already setup. Enter your password and press Enter.
At this point, you're logged into MySQL. Now, we can create our database, create our user, and grant the user privilege to modify the database we created.
Since we're installing bbPress, we'll create a database called bbPress.
create database bbPress;
At this point, you'll be told that “Query OK, 1 row affected”, followed by the execution time.
Now, we'll create a user with privileges to access the database. Note that other than the bold text, this command is case-insensitive. Also, you may want to change 'bbpress' to something different (as this is the user's password).
Before you enter this, look it over, and then read the paragraph following, for an explanation.
GRANT select, insert, update, delete, index, alter, create, drop
TO bbPress IDENTIFIED BY 'bbpress';
The first line, “GRANT select, insert, update, delete, index, alter, create, drop”, states what privileges the user will be granted. The next line, “ON bbPress.”, states what the privileges are applied to. Finally, “TO bbPress IDENTIFIED BY 'bbpress';” states what user will get these privileges. Since the user doesn't exist yet, we're also giving a password to the user.
If the query is ok, enter the following command.
UPDATE mysql.user SET Password = OLD_PASSWORD(’bbpress’) WHERE User = ‘bbPress’;
If this query is OK, and it works, type exit, and press Enter. Now attempt to login to the bbPress user. Once you've logged in, enter the following command.
You should be given an ASCII table that shows there's a database of bbpress. Yippee.
Now, let's install bbPress.
First, unzip the downloaded zip file. The files are all included in a bbpress folder. For this guide, we'll be keeping it in that folder, since we'll be installing a number of forums. However, if you decide to go with bbPress, you may not want to keep the files in the bbPress folder.
Once bbPress has been decompressed, go into the bbpress folder and make a copy of the config-sample.php file. Rename the copy to simply config.php. Next, open the file. There's a lot of things to change, so get ready.
First, change lines 4 to 7 (begin with 'define'). Per the above, it'll be something like the following.
define('BBDB_NAME', 'bbPress'); // The name of the database
define('BBDB_USER', 'bbPress'); // Your MySQL username
define('BBDB_PASSWORD', 'bbpress'); // …and password
define('BBDB_HOST', 'localhost'); // 99% chance you won't need to change this value
Line 15 will need to be changed as well. For my installation, it was as follows.
Line 17 was changed as well. This may vary for your installation.
$bb->path = '/projects/bbpress/'; // Example: '/forums/'
I'm going to leave the name (line 20) as is, but change line 23, the email. Make sure you change your's accordingly.
$bb->admin_email = '[email protected]';
Line 35 should also be changed, per your timezone.
$bb->gmt_offset = 0;
We'll leave everything else as is, for now. Let's make sure Apache is up and running, and we'll see what else we have to do. Head over to http://localhost/projects/bbpress/
Click the First Step link. Enter in a couple options for the Administrator. These include Login name, Website, Location, and Interests.
You'll also need to define your First Forum by giving it a Name and a Description.
Only Login name and Forum Name are required, so I entered 'admin' and 'Test', respectively. Continue to the next step.
The Second Step creates the tables (8) and gives you a password. It's random, so hold on to it. In my case, it was cbe15b. You can click on either link to go to the bbPress page, which is available at http://localhost/projects/bbpress/, in my case.
You can now login to check out the Administrative interface, or you check out the topic that was created.
How's the code look?
Overall, the code validates pretty dang well. There's a minor issue with an opening and closing small tag, with nothing between, on the main interface view, and some tables missing summaries, but other than that … code looks good.
As far as the internal PHP code, like WordPress, it's full. You'll need to reference files and documentation, back and forth, but that's to be expected, I suppose.
Upgrading and default layout
Unlike some of the other forums we'll be looking at, there's no upgrade-only installation file. Yuck. Upgrading WordPress is a beast, and it looks like that's going to be an issue with bbPress.
Where it gets really bad is when you look at the layout. The default layout, especially for the admin interface, could absolutely be better. Unfortunately, it looks like the styles are buried in multiple files, in multiple folders.
As with WordPress, it looks like upgrading is going to be a beast (with functions dropping and being added), but even more so because there doesn't appear to be a way to easily create your own styles, outside of the core files.
The administrative interface, other than being rather ugly, is pretty simple. Unfortunately, there's no way, via the interface alone, to modify the styles or code.
The temporary conclusion
At this point, I'm going to stop, since we'll want other forums to compare before we go any further. However, you should have a bbPress, version 0.73, forum setup.
Stay tuned for the next PHP Forum review.
Support This Site
If my blog was helpful to you, then please consider visiting my Amazon Wishlist.