by May 1, 2005 0 comments



PhpBB is a free package to set up an online forum. (PCQuest forums at http://forums.pcquest.com,
is based on it). phpBB provides features that would suffice for the needs of most forums and it can be pushed much beyond its out-of-the-box capabilities using plug-ins aka mods. More than a couple of them can be downloaded from
http://www.phpbb.com/mods.  

In this article we’ll take you through the methods of installing mods. Note that incorrect installation of a mod can render your forum inoperable. So if you have a live running forum, we suggest that you install the mods on a test machine and subsequently replicate the setup online. We assume that your Linux installation runs with Apache, PHP and MySQL, all installed and configured. 

Direct Hit!
Applies to:
System and Web administrators
USP: Extend an online forum using plugins
Links:
www.phpbb.comwww.phpbb.com/mods 

The installation of phpBB is simple. Download it and extract the archive in the Web root directory
(typically/var/www/html). Create a database in MySQL (say phpbb). Subsequently, point your browser to
http:///phpBB2
Follow the instructions on the page to complete the installation. You may like to refer to the article Your Own Forum (March 2005, PCQuest) for a detailed installation step. Login to the forum as admin (with the credentials specified during the phpBB installation). Click on ‘Go to Administration Panel’, and create the category and forums as per your requirement. We now take up some examples to explain mod installation.

As simple as copying files
A basic phpBB installation allows you to post only text. A mod named the attachment mod allows you to post files along with their posts. Obviously who can post attachments and who can download attachments can be controlled via the phpBB’s Administration Panel. You can download the attachment mod from
http://www.phpbb.com/phpBB/catdb.php?mode=download&id=436728.
Unzip the archive which will produce a directory named attach_mod. Change to the ‘root’ subdirectory under attach_ mod. 

The directory structure under the root subdirectory resembles that of phpBB installation. You can install the attachment mod by copying the files found in the root subdirectory to the phpBB2 installation directory
(say /var/www/ html/phpBB2) following the same structure. For example, copy the
file named attach_rules. php found in root to /var/www /html/phpBB2. And the
file named admin_attachments. php found under root/admin directory is to be copied to var/www/
html/phpBB2/admin. An easy way to achieve this is change to the root subdirectory and issue:

cp -R * /var/www/html/phpBB2

Subsequently load up the URL: http://127.0.0.1/phpBB2/install/mod_table_inst.php
This will modify the database for the attachment mod. The good news is that the phpBB package bundled with PCQLinux 2005 (the distro given out by PCQuest with the March 2005 issue) already includes the attachment mod, which is pre-installed in the way described above. 

Tinkering with phpBB files
Though comprehensive, the attachment mod is still simple to install as it bundles the modified files. And these files can be easily copied across to an existing phpBB installation. 

Changes to the database were done simply by uploading a URL. But for some mods you will need to manually edit the phpBB files and make changes to the database. Such mods come with a .txt file or a .mod file, which explain the changes to be made. Consider the following snippet for a mod, which allows users to see the topics started by them. 

#

#—–[ OPEN ]——————————————

#

includes/page_header.php

#

#—–[ FIND ]—————————————–

#

‘L_WHOSONLINE_MOD’ => sprintf($lang[‘Mod_online_color’], ‘‘, ‘‘),

#

#—–[ AFTER, ADD ]———————————-

#
//
// MOD – TOPICS I’VE STARTED – deejay

‘L_SEARCH_STARTEDTOPICS’ => $lang[‘topics_created’],

‘U_SEARCH_STARTEDTOPICS’ => append_sid(‘search.’.$phpEx.’?search_id=startedtopics’),

// MOD – TOPICS I’VE STARTED – deejay

//

The above snippet asks to open (depicted by #—–[ OPEN ]—–) the file named page_header.php, found in the ‘includes’ directory, in a text editor. Then find (depicted
by #—–[ FIND ]—) the lines that say:

‘L_WHOSONLINE_MOD’ => sprintf($lang[‘Mod_online_color’], ‘‘, ‘‘),

After these lines, append the code (depicted by #—–[ AFTER, ADD ]—–) at the end of the extract above. 

EasyMOD-a mod to install mods
Installing a mod is not a mundane task. With EasyMOD, you can install a mod through the phpBB Admin Panel with only a few clicks. 

Download the mod from http://area51.phpbb.com/phpBB/viewtopic.php?t=153-91
The page explains how to install the mod. Copy some files to the phpBB directory and then upload to a URL. After installation, go to the Administration Panel and under the Mod Center and click on Install MODs. You will see some pre-existing mods that can be installed via EasyMOD. Click on Process if you wish to install them. To install other mods, download and place the mod’s directory under
/var/www/html/phpBB2/admin/mods. Note that the mod that you are installing to use must be EasyMOD compatible. This will be indicated by an icon when you click on ‘Install MODS’. While not many mods are compatible with EasyMOD, this shall change soon.

Shekhar Govindarajan
IT4Enterprise

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

<