phpBB2 : Creating Communities phpBB 2.0.x Contrib

This directory contains a couple extra add-ons for phpBB 2.0.x.

Please note none of these are directly supported by phpBB Group

You should contact the author/s (via our forums) if you want further information. A large number of additional mods are available introducing increased funtionality to the standard phpBB2 release. You can find many additional mods at our main site:

http://www.phpbb.com/mods/

NOTE: Once you have made use of files contained in this directory it should be deleted from your server. You should NOT leave this directory in place!

Template cacheing

Authors: Crimsonbane, psoTFX and nathan

File Caching Updated

During development of phpBB2 a recurring issue of server load has cropped up. phpBB 2.0.0 differs from many of its contemporaries by doing many more tasks at runtime. While this allows for simpler upgrade and modification paths it also leads to a greater strain being placed on the server. To help reduce this issue a cacheing template system was created based on work by Crimsonbane. This stores a compiled version of each template resulting in a generally significant reduction in server load and perhaps page generation time.

Two versions of the cacheing system are contained in this directory, one uses flat files the other a MySQL database. Testing has shown that, in general, the average virtual host seems to show better performance with the flat file solution. However this may not be the case for your system, so please feel free to try both.

In both cases you need to rename your existing template.php script (in includes/) and replace it with whichever template_*.php you want to try.

template_file_cache.php

To use the flat file system you need to create a directory called 'cache' in your phpBB root directory (it may already exist and contain some default files, do not delete these). This directory must be writeable by the web server, e.g. global write access. Under UNIX systems this is typically achieved by using chmod a+w cache or chmod 777 cache. Many FTP applications also allow you to change permission properties. See your applications manual for details on how to do this.

Please note that creating a world writeable directory is of course a potential security issue. Most of the time this is not a great issue, however on virtual hosting accounts there may be users who have nothing better to do than cause problems. Therefore you should monitor the status of this directory regularly and report any problems to your hosting provider (who will be in a position to take action against any offending user).

NB: The directory required for this version of the file caching template system differs from previous releases. You can safely delete the old caching directories.

template_db_cache.php

To use the database system (note that this is only compatible with MySQL at present) you need to create the following table (replacing the phpbb_ prefix with your own if you used something different):

CREATE TABLE phpbb_template_cache (
  template_name char(255) NOT NULL default '',
  template_handle char(50) NOT NULL default '',
  template_cached int(11) NOT NULL default '0',
  template_echo tinyint(1) NOT NULL default '1',
  template_compile text NOT NULL,
  PRIMARY KEY  (template_name)
)

These files should not be incorporated into any mod or other plug-in, etc. They have been tested quite thoroughly but we cannot guarantee their stability in all cases. The system is based on work by Crimsonbane and of course Nathan's original templating system.

Visual Confirmation System

Author: psoTFX

The visual confirmation system is part of phpBB 2.0.x since version 2.0.11. For historical purposes, the instructions below are left untouched.

Unfortunately there are people "out there" who have nothing better to do than cause other people trouble. Even worse are groups that write applications which cause problems. One very annoying (and pointless) way in which people can cause you trouble is by mass registering users. This Mod, back-ported from the forthcoming phpBB 2.2 helps eliminate or reduce this problem. It generates a random series of six alphanumeric characters as a png image. The user must then input these characters before they can register a new user. Should they fail three times in a row they will be locked out for the rest of that session

To get the best from this Mod you should be running PHP4 and have the zlib module installed and loaded. It is quite common for zlib to be installed by default. If you are unsure whether it is please check with your hosting provider or review the output of phpinfo();. This Mod does not require GD, Imagemagick, NetPBM or any other module or utility. If you do not have zlib available the Mod will fall-back to a simpler output method. However this will still deter the majority of would be trouble makers.

phpBB 2.0.6 is shipped with various bits of the visual confirmation system already installed. To complete installation you should unzip the contents of the visual_confirmation.zip archive into your phpBB root directory. Allow it to overwrite any existing files. Please Note that if you have any Mods installed which have altered; profile.php, includes/usercp_register.php, admin/admin_board.php or templates/subSilver/admin/board_config_body.tpl you will lose these changes. In this situation you are advised to manually diff the files and make the changes yourself.

The default English language pack includes the necessary new strings for this mod. Other languages may be updated in time. However you can easily add the strings yourself, they are listed below. Please do not translate the %s present in one of these strings. This is a placeholder for additional text that will be inserted by phpBB.

lang_main.php

lang_admin.php

If you use a style other than subSilver you will need to make changes to two templates. The changes are quite straightforward, see below for details.

profile_add_body.tpl

Find similar:

Add after:

admin/board_config_body.tpl

Find similar:

Add after:

PLEASE NOTE: Templates can vary greatly and the above code should only be used as a guide. You may want to contact the template designer if you do not feel comfortable making the changes yourself.

Once these tasks have been completed you should visit your Administration Control Panel. Under General -> Configuration you will find a new option "Enable Visual Confirmation", check the yes box to switch the system on. Because some of your visitors may be visually impaired a message is output along with the image noting the board email address as a point of contact should they be unable to read the code.

While the Mod is designed to be relatively light in terms of load a very busy board with dozens of registrations a minute may see some affect from it. We would be interested in your experiences in this respect.

Database Informer

Authors: Blade, AL, Techie-Michael, Black Fluffy Lion

dbinformer.php

NOTE: dbinformer.php now works with all of phpBB's supported DBMSes.

Following a large number of people reporting could not connect to database errors with phpBB, especially on installations, this script has been compiled by the Support Team. To use it, enter your database server hostname / DSN, database name, database username, database password, and the table prefix you would like dbinformer.php to use (e.g. phpbb_) and select your database type in the space provided. Also specify whether you wish to generate a config.php file with the data entered and then press Submit.

The script will then report whether connections to the database server and your database were established. If they were not, then it will display descriptive error messages. If the connection was successful then it will list the tables in your database; tables which start with your chosen prefix will appear in bold. If you choose to generate a new config file (useful if your file was accidently deleted, was not sent, etc) the code for that will appear at the bottom of the page. Simply copy that code over and save it as config.php or click on Download to download the file. Make sure it has only 19 lines in it and then upload it to your phpBB root directory.

Please also note that this file (in common with the contrib directory as a whole) should be deleted after use. Do not leave this file in place if it is not needed.

Copyright and disclaimer

This application is opensource software released under the GPL. Please see source code and the docs/ directory for more details. The phpBB2 package, its contents and the template cacheing files are Copyright © 2002 phpBB Group, All Rights Reserved. Other packages are the copyright of their respective authors.