Blog |Follow Nick on Twitter| About
 

UPDATE: This Plugin has been updated, please download the update from http://wordpress.org/extend/plugins/phpbb-recent-topics/, and please comment on the new post, thanks.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [caption id="attachment\_1935" align="aligncenter" width="150" caption="Screenshot phpbb\_recent\_topics admin page"][![Screenshot phpbb\_recent\_topics admin page](https://www.linickx.com/files/2009/08/phpbb_recent_topix_v05x-150x150.png "Screenshot phpbb_recent_topics admin page")](https://www.linickx.com/files/2009/08/phpbb_recent_topix_v05x.png)[/caption] Admin GUI -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Version 0.5 is the first enhancement update to php_recent_topics for a looooooonnnng while!

Actually it's taken me soo long to finish that we've jumping straight into ~~0.5.2~~ 0.5.3 which includes bug fixes from 0.4.1 & 0.4.2

There are four notable changes, two minor, two major :D

Minor CHANGE 1: You should notice the admin page don't look so rubbish, we're now using the new CSS provided by the WordPress team!

Minor CHANGE 2: The SQL syntax now excludes SPAM from being shown up in the wigdet by only selecting "Approved" posts, thanks Ashish.

Major CHANGE 1: The admin page now has the option for excluding forums from being displayed by the widget, this was one of the most requested features but please be advised this change means there are New database permissions required for upgraders!
Before you did GRANT SELECT ON phpbb_database.phpbb_topics TO wp_user@localhost; NOW DO THIS TOO....

GRANT SELECT ON phpbb_database.phpbb_forums TO wp_user@localhost;

Major CHANGE 2: The plugin now supports "Insecure" Database connectivity, getting the plugin to talk to the PHPBB DB seemed to be the biggest hurdle for most, so I've added a simpler way to keep my SPAM down. This approach is not recommended as the plug-in stores your PHPBB DB credentials IN CLEAR TEXT in the WordPress database. As a side effect from this is, now users can connect to a PHPBB database installed on a different server to WordPress - This suggestion actually came from someone called Nedim.. Thanks!

Some of the usual information now follows....

Download phpBB_Recent_Topics_0.5.2 from wordpress.org

The Installation

Before starting you need to get your database configuration sorted. So, are you going to connect to the PHPBB Database securely or Insecurely?

To connect Securely you need to GRANT access TO WordPress FROM 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 wp_user@localhost;

AND

GRANT SELECT ON phpbb_database.phpbb_forums TO wp_user@localhost;

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

WordPress 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. http://www.mydomain.com/forum)
    • * 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"
  • The use of Insecure connectivity is optional - See Below
  • Tick the boxes of any Forums you don't want this plugin to show posts from
  • 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...
      <?php
      if (function_exists('phpbb_topics')) {
      phpbb_topics();
      }
      ?>
      

What is Insecure MySQL Connectivity & How do I use it?
If you need to you can connect in a less secure manner, the connection details held in your PHPBB config.php can be loaded into WordPress. This is insecure becuase the phpbb3 credentials are store in clear text, this is bad cuase if someone somehow comprised WordPress they'd have full access to PHPBB.

To use, tick the "Enable Insecure Database Connection" box, and submit, when the page re-freshes you'll have some more boxes to populate, from your phpbb config.php fill in

$dbuser = phpbb MySQL Database UserName $dbpasswd = phpbb MySQL Database Password $dbhost = phpbb MySQL Server

Click update, and you should be connected!

Support
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
The source for this plugin is in the wordpress subversion, you can download it directly from here; and when wordpress.org re-crawls my readme the latest version will also be available on wordpress.org/extend/plugins/

I hope you enjoy my plug-in!

rgds,

Nick

 
Nick Bettison ©