Installing the UDM4 dropdown menu on phpBB2

PHPBB is one of the webs most popular open source community forum applications. This document is designed to help you install and configure a UDM4 dropdown menu on an installation of phpBB version 2.x. The dropdown menu will be automatically populated with all categories and forums on your phpBB2 forum and will be dynamically updated when you make changes to your forum structure.

phpBB2 requirements

The following prodecures were tested and verified to work on phpBB2 version 2.0.x. These procedures should work on previous versions as well, but have not been tested.

Adding a UDM4 dropdown menu to phpBB

There are three steps to integrating your UDM dropdown menu on your phpBB forum.

  1. Get the UDM4 Code
  2. Install the udm_phpbb2.class.php file
  3. Modify your phpBB Installation

Get the UDM4 Code

The first thing you will need to do is have a licensed copy of UDM4 to install on your system. You may either purchase a license or, if you work for a non-profit / non-commercial organization, request a non-profit license online.

Once you have a license, you may download the UDM4 dropdown menu code and install the code on your server (using FTP or similar method), in the phpBB root directory directory. (i.e. you should have a phpBB2/udm-resources/ folder).

Install the udm_phpbb2.class.php file

Once you have the UDM menu installed on your server, you will need to download the following file:

udm_phpbb2.class.zip

Extract (unzip) this file. You should see a file named "udm_phpbb2.class.php". Place this file in the following directory on your server...

INSTALLATION_DIR/phpBB2/includes/

(Where INSTALLATION_DIR is your web root - usually similar to /var/www/html or /home/username/html)

Modify your phpBB installation

The final step is to add UDM to your installation. To do this, you should be aware of the various customizations you have done to your current forum installation. The examples below assume a standard phpBB installation. If you have made customizations, the same concepts outlined below apply, however the locations of the files may differ.

First, open the INSTALLATION_DIR/phpBB2/includes/page_header.php file and add this code. This code should be added towards the end of the file, right before the template parse function call.

header ('Expires: 0');
header ('Pragma: no-cache');
//generate udm components
include($phpbb_root_path . 'includes/udm_phpbb2.class.php');
$udm = new UDM($db,$board_config['script_path']);
$template->assign_vars(
	array(
		"UDM_HEADER"=>$udm->get_config("header"),
		"UDM_BODY"=>$udm->get_config("body"),
		"UDM_MENU"=>$udm->display()
	)
);	
$template->pparse('overall_header');

This set will include the necessary udm class to generate the header configuration files, body configuration files and the proper ul / li structure for the menu based on your current forum set up.

Next, you'll need to modify the template files as needed to include the UDM dropdown menu on every page of your forum.

To add the header, footer and menu to your phpBB installation, you'll need to open the following file: INSTALLATION_DIR/phpBB2/templates/subSilver/overall_header.tpl.

PLEASE NOTE! If you are using a different template that the default "subSilver" template, then open the appropriate template sub directory.

Once you've opened the correct template file, find the </head> tag and add the following immediately before it.

{UDM_HEADER}

</head>

Next, you'll need to add the body configuration files immediately after the <body> opening tag.


<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">

{UDM_BODY}

The final step is to add the udm menu to your site. This can be added anywhere on the site, in many different locations. For our example, we will add it to the overall_header.tpl file so we can include it in every page, but your particular installation may vary. Below is an example on how to add your menu to the overall_header.tpl file.

Scroll to the bottom of the file, and add the code below.


<br />

{UDM_MENU}
  	<br style="clear:both;" />
  

<br />

NOTE: Depending on your UDM needs, you may need to modify the udm_phpbb2.class.php file, specifically the get_config() method, to generate the correct head and body configuration options. If you have questions on how to do this, you may contact us, or post in our forum.

This should provide the basics to get a functioning UDM menu installed and working on your phpBB2 forums. If you need assistance with customization, feel free to request a quote from us to customize your UDM menu to match your site's look and feel. If you have any problems with these instructions, or would like to offer use some helpful tips, please feel free to contact us.

Thank you.

This document is intended to offer methods to install UDM4 on a third party system. We do not endorse the use of any particular third party system, and offer this document as-is, without warranty expressed or implied. phpBB2 is a Trademark of the phpBB Group , © 2000, 2002, 2003, 2007 phpBB Group - All Rights Reserved

User Notes


Search

UDM 4 is valid XHTML, and in our judgement, meets the criteria for WAI Triple-A conformance.