Blog |Follow Nick on Twitter| About
 

UPDATE: This Plugin has been updated, the below links to the new file, but 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 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

It's that time again, enough things have happened in the support forum to warrant another version.

phpbb_recent_topics 0.6 owes a debt of gratitude to number3nl he has worked very hard to push in two main new features and his work was so good it only needed a couple of minor tweaks from myself.

New Features!

  • The loooong awaited phpBB recent posts feature has been enabled, simply tick the box that says "Sort results by post date" and you're away!
  • Tooltips are here! Yup if you're into that kind of thing enabling tool tips will show a snippet of the post content to your visitors prior to them clicking on any links.
  • Admin UI Error Messages are here; the GUI will now inform you if you're connected to phpBB.

Bug Fixes.

  • The variables in display.php now match those of admin-display.php; hopefully this will make community contribution simpler.
  • Uninstall.php has been added so removal of the plugin is more comprehensive.

A note to upgrader's.

  • If you're using secure database connectivity you'll need to GRANT access to the posts table....
    GRANT SELECT ON phpbb_database.phpbb_posts TO wp_user@localhost;

Download phpBB_Recent_Topics_0.6 from wordpress.org

The usual stuff now follows....


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;

AND

GRANT SELECT ON phpbb_database.phpbb_posts 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 need support the community phpbb-recent-topics forum is available, I do read every post there but we all have busy lives and I make no promises on how quickly I'll reply to you.

Finally Subversion
The source for this plugin is in the wordpress subversion, you can checkout the trunk directly from here, if you weren't aware wp.org also auto-magically creates a nightly build of any developments here.

I hope you enjoy my plug-in!

rgds,

Nick

 
Nick Bettison ©