Blog |Follow Nick on Twitter| About

UPDATE: This Plugin has been updated, please download the update from, and please comment on the new post, thanks.

This update fixes 0.4.x branch of my plugin, specifically the "You are not allowed to access this page" error that WordPress 2.8.1 introduced. No other changes have been implemented, ~~the SVN Trunk (0.5.x) is still to be updated.~~

UPDATE: 0.5.x works in WP.2.8.3, also 4got to tag this post - DOH!

The usual paste follows....

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [![phpBB Recent Topics Admin interface in Wordpress]( "phpbb recent topics screenshot v4")]( Admin GUI -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Download phpBB_Recent_Topics_0.4.2 from

What's New?

  • Plugin fixed for WP 2.8.3.

What's Old?

  • The widget patch submitted by toni.
  • I have tested this plugin with phpBB3 .
  • I finally quashed the install bug where by phpbb-recent-topics was confused with phpbb_recent_topics.
  • Sidebar Widget, yus for all you non-php people you have a widget to play with.
  • Edit the Time & Date layout - leave blank to remove it completely

The Installation

  • Unzip phpbb_recent_topics.tgz in your `/wp-content/plugins/` directory. (You'll have a new directory, with this plugin in /wp-content/plugins/phpbb_recent_topics)
  • Activate the plugin through the 'Plugins' menu in WordPress
  • Configure the plugin, you need to tell wordpress about phpbb, this is done in the wordpress menu 'Settings' -> 'phpBB Recent Topics'
    The following Settings are required: 

    • * The name of your phpBB database (e.g phpbb)
    • * The name of the table where topics are held (the default is phpbb_topics )
    • * The full url of your forum for links (e.g.
    • * The number of topics to show. (If left blank you get 5)
    • * The Date Formatting, i.e. "d/M/y - g:i a" similar to the WordPress "General Settings"
  • Hit 'Update Options"
  • To output the list of topics in a page or post...

    • * create a new page/post, type {phpbb_recent_topics} , hit 'Publish' or 'Create new page'

    To output the list of topics in your theme sidebar using the widget...

    • * click "design" in the dashboard
    • * click "widgets"
    • * next to phpBB Recent Topics click "add"
    • * click "save changes"

    To output the list of topics in your theme sidebar using a template tag...

    • * edit sidebar.php and inside \<div id="sidebar"> type...
      if (function_exists('phpbb_topics')) {

A bit about Database configuration.
If wordpress & phpBB share a DB already then set \$PHPBBDB to DB_NAME and everything will be fine, else you're going to need to GRANT the wordpress user read access to phpBB.

How to GRANT wordpress read only access to phpBB ?
If you don't know it already you need to find your wordpress mysql user id, it'll be in wp-config.php

define('DB_USER', 'wp_user');     // Your MySQL username

and you should have already found your phpbb database & table for the above.
You need to type the following syntax into your mysql database

GRANT SELECT ON phpbb_database.phpbb_topics TO [email protected];

this can be achieved by logging into phpmyadmin as your phpbb user, selecting SQL and pasting the correct GRANT into the text box.

Frequently Asked Questions

  • Is phpbb3 supported?
    • yes.
  • Can I output 10 Topics in my Page, and 3 Topics in my Sidebar ?
    • Yes ! In the Wordpress menu 'Options' -> 'phpBB Recent Topics', set 'The number of topics to show' to 10, and then in your sidebar include...\<?php
      if (function_exists('phpbb_topics')) {
  • Can I exclude a certain forum from the list ?

    • In this version, the only way to do that is to hack /wp-content/plugins/phpbb_recent_topics/display/display.php, change

      $results = $wpdb->get_results("SELECT * FROM $TOPIC_TABLE ORDER BY topic_time DESC LIMIT $LIMIT");


      $results = $wpdb->get_results("SELECT * FROM $TOPIC_TABLE WHERE forum_id != 1 ORDER BY topic_time DESC LIMIT $LIMIT");

      to exclude forum 1 from the list. I plan to setup a proper solution to this in the next version.

  • Why is the date config under settings not in the widget configuration?

    • The date settings effect both the template tag and the widget :)

I've always been honest about support, there isn't any. Basically I write this for my own needs and then publish it for you to use for free. You're more than welcome to post comments here and if you tag wordpress forum posts with "phpbb-recent-topics" I'll reply to you there, but we all have busy lives and I make no promises on how quickly I'll reply to you.

Link for posting in the correct phpbb-recent-topics forum

Finally Subversion
You also might be interested to know that I've been getting to grips with the wordpress plug-ins svn, so you can get work directly from here; and when re-crawls my readme the latest version will also be available on :cool:


Nick Bettison ©