404 Tech Support

Installing phpBB mods

Modifying a phpBB forum from its base installation can add new features or change behavior to get a final product that works how you want it to do. In order to do this, you download and install a mod. This typically comes in the form of a zip file containing instructions and some new php/html files. Installations consist of copying files to your web server and changing the code in a number of different files (it all depends on the functionality of the mod and what it will affect). Given the non-straight forward nature of mod installations, it can be discouraging and intimidating. After a few installations and time spent in notepad or Notepad++, the pains of installing shouldn’t be so bad. Hopefully this documentation here can help speed up that process as well.

Following is a quick walkthrough on installing the View or mark unread posts mod:

A quick word of warning, you want to only download mods from only the phpBB Mods database. Mods and code modification of your phpBB installation could open it up to vulnerabilities via holes and malicious code. Mods through the database means there is at least some overhead and tracking to make sure code is clean and authors are accountable.

Once you have downloaded the mod that you want to install, extract the files from the .zip to a folder on your desktop.

Use a FTP client like Filezilla for any point in this tutorial or the mod instructions that say to copy a file to or from your server.

Copy the directory you just extracted from the zip to be a sub-folder of your phpBB installation. Then view the install.xml file with a web browser. For example, I just have to go here: http://domainname.com/mods/markunreads/install.xml

The install.xml file is a set of instructions for installing the mod. It contains a list of files that need editing and a list of files that were included with the mod. I also contains notes from the author and version information.

The directions are fairly straight-forward at this point. Scroll down to the list of ‘Files to Edit’.

Second word of warning, you always want to be sure to have a back-up on hand for easy restore purposes.

The ‘Files to Edit’, for this mod, include these:

You should create a folder called backup and reproduce the folder structure seen here. This will make it much easier for installing the modified files and for restoring a back-up. Under your backup folder, create sub-folders called includes, language, and styles. Styles should then have a sub-folder under it called prosilver and another under that called template. The exact spelling is important.

Now use an FTP client like Filezilla to copy the specified files to their specified folders from the list above.

Once you have a backup copy made. Copy the backups folder to the same location and rename it to modified.

Not to state the obvious, but you’re only going to edit the files in the modified folder. Go through each file, one at a time, according to the instructions and perform the edits listed.

Open the common.php file with Notepad or Notepad++ and search the code for the line under the Find. Click on the ‘SELECT ALL‘ link for a convenient way to highlight the code. Just hit Ctrl+C or right-click on it to copy it into the find function of the editor. Once you find the line it is talking about, complete the next step listed. In this case, that is Add after. This means to add the following code after the line of code you just had to Find.

This follows the same way for instructions like Add before, Add in-line after, Replace with, and other obvious instructions. You add the code before the found line, add it within the same line of the code found, or replace the found code with the code that follows respectively.

After all changes have been made copy the files back to their respective locations. If you followed the earlier step and replicated the folder structure, this step can be an easy drag-and-drop. Overwrite the old versions of the files when you copy them there. If something goes wrong, you can just copy from your backup folder.

In the Administration Control Panel, go to the Styles tab. Under Style Components, click on Templates. In the same row as Prosilver (or the style you edited), click ‘Refresh.’

You should now be able to see your mod in action on your forum.

Update: Check out AutoMOD for a much simpler means of installing/uninstalling official phpBB mods.