Title: phpbb_recent_topics
Author: linickx
Published: <strong>March 22, 2007</strong>
Last modified: July 8, 2011

---

Search plugins

![](https://ps.w.org/phpbb-recent-topics/assets/banner-772x250.png?rev=515612)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/phpbb-recent-topics_867975.svg)

# phpbb_recent_topics

 By [linickx](https://profiles.wordpress.org/linickx/)

[Download](https://downloads.wordpress.org/plugin/phpbb-recent-topics.0.7.1.zip)

 * [Details](https://pcd.wordpress.org/plugins/phpbb-recent-topics/#description)
 * [Reviews](https://pcd.wordpress.org/plugins/phpbb-recent-topics/#reviews)
 *  [Installation](https://pcd.wordpress.org/plugins/phpbb-recent-topics/#installation)
 * [Development](https://pcd.wordpress.org/plugins/phpbb-recent-topics/#developers)

 [Support](https://wordpress.org/support/plugin/phpbb-recent-topics/)

## Description

Do you have a phpBB forum, do you want to drag your blog readers into your forum?
Then this plugin might just help, you can include somewhere in wordpress a list 
of recent phpbb threads (topics) in a page, a post, and even in your theme – so 
your sidebar for example !

### 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. (If you really need to, you can store the phpbb databse credential in 
the plugin using the “Insecure” connectivity method.)

### 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.

### How to use the Insecure Database Connectivity Method

From the phpbb_recent_topics admin / settings page, 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!

### The Callback function

To allow users to customize what is / can be displayed a callback function `phpbb_topics_callback`
has been implemented.

In ticket 1216 (https://plugins.trac.wordpress.org/ticket/1216) phil suggested that
the forum name should be displayed within the topic list; the following code is 
an example use of the new callback function and should be added to your themes functions.
php

    ```
    function phpbb_topics_callback($phpbbdb, $wpdb, $lnx_PRT_options, $topic) {

            // GET FORUM WHICH POST IS IN - Phil Ewels, 26/09/2010
            $sql_query = "SELECT * FROM $lnx_PRT_options[prt_phpbb_ft] WHERE forum_id=" . $topic->forum_id. " LIMIT 1";

            # Run Query
            if ($lnx_PRT_options['prt_phpbb_dbinsecureon'] == "1") {
                    $forum = $phpbbdb->get_row($sql_query);
            } else {
                    $forum = $wpdb->get_row($sql_query);
            }

            echo "<br /><small>" . $forum->forum_name . " </small>";

    }
    ```

The following variables can be used within your callback function:
 * $wpdb ** If
using Secure Connectivity this is a connection to your PHPBB Database ** If using
Insecure Connectivity this is the standard WordPress Database * $phpbbdb ** If using
Secure Connectivity this will be NULL ** If using Insecure Connectivity this is 
a connection to your PHPBB Database * $lnx_PRT_options ** An array of the phpbb-
recent-topics settings * $topic ** The current topic, with associated attributes.

## Screenshots

 * [[
 * The Admin interface, where you set up the magic !

## Installation

 1.  Setup your Database Connection, see Other Notes
 2.  unzip phpbb_recent_topics.zip in your `/wp-content/plugins/` directory. (You’ll
     have a new directory, with this plugin in `/wp-content/plugins/phpbb_recent_topics`)
 3.  Activate the plugin through the ‘Plugins’ menu in WordPress
 4.  Configure the plugin, you need to tell wordpress about phpbb, this is done in 
     the wordpress menu ‘Settings’ -> ‘phpBB Recent Topics’
 5.  The following Settings are required:
 6.      ```
         * 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"
         ```
     
 7.  Hit ‘Update Options”
 8.  To output the list of topics in a page or post…
 9.      ```
         * create a new page/post, type `{phpbb_recent_topics}` , hit 'Publish' or 'Create new page'
         ```
     
 10. 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…
 11.     ```
         * edit sidebar.php and inside `<div id="sidebar">` type...
     
             <?php
                         if (function_exists('phpbb_topics')) {
                             phpbb_topics();
                         } 
                     ?>
         ```
     

## FAQ

  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')) {
                    phpbb_topics(3);
                } 
            ?>
    ```

  Can I exclude a certain forum from the list ?

Yes, use the new 0.5.x feature in the admin settings

  Why do I get – Sorry you do not have access to this page?

You’re not an Administrator

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

The date settings effect both the template tag and the widget

  What is Insecure MySQL Connectivity ?

Some people cannot GRANT priveliges from one DB to another; insecure connectivity
allows you to store the phpbb database credentials within the WordPress database.

  Why is Insecure MySQL Connectivity Insecure?

The phpbb database credentials are stored in the WordPress database in CLEAR TEXT,
this is bad, as anyone with access to the WP DB can get full access to phpbb. Another
reason is that usually the credentials given to the phpbb application are FULL access,
we only need to read the database, so it’s much better to restrict access.

  Can I connect to a phpbb databse on a different server?

Yes, use the Insecure Connectivity method, and change the host to the IP address
of the server

## Reviews

![](https://secure.gravatar.com/avatar/8f7322395be1b6bc23850973a848899c2dacda9a8ba70e37f59116cc4e621ca5?
s=60&d=retro&r=g)

### 󠀁[Requires a code fix to work with phpBB3.1, phpBB3.2](https://wordpress.org/support/topic/once-awesome-but-doesnt-work-with-phpbb-3-2-anymore/)󠁿

 [felr](https://profiles.wordpress.org/felr/) March 23, 2017

Using the plugin, it displays ‘PHP Error’ – hence it’s practically unusable now….
For a fix, please check: https://wordpress.org/support/topic/compatibility-with-
phpbb-3-2/

 [ Read all 2 reviews ](https://wordpress.org/support/plugin/phpbb-recent-topics/reviews/)

## Contributors & Developers

“phpbb_recent_topics” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ linickx ](https://profiles.wordpress.org/linickx/)

[Translate “phpbb_recent_topics” into your language.](https://translate.wordpress.org/projects/wp-plugins/phpbb-recent-topics)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/phpbb-recent-topics/),
check out the [SVN repository](https://plugins.svn.wordpress.org/phpbb-recent-topics/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/phpbb-recent-topics/)
by [RSS](https://plugins.trac.wordpress.org/log/phpbb-recent-topics/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.7.1

 * Last minute date fix!

#### 0.7

 * WordPress 3.1.4 Testing
 * CSS Styleable output
 * Plugin Options Modernisation
    ** Collapse multiple options into an array ** Implement
   register settings to close https://plugins.trac.wordpress.org/ticket/1217 ** 
   Implement upgrade.php to migrate all variable to new array form
 * Resolved: Missing argument 1 for phpbb_topics()
 * Code clean-up (Lots of changes)
 * Timezone/Off-Set fix (Reads +/- hours from WordPress Settings)
 * Localisation of date/time fix (https://plugins.trac.wordpress.org/ticket/1173)
 * Callback functionality
 * Contextual Help in the admin dashboard

#### 0.6

 * Code by Number3NL
    ** PHPBB Recent Posts ** 1st Draft – Tool Tip Feature ** SQL
   Query Re-Write / Improvement
 * Code Clean Up – Variables
 * Tool Tip Feature Improvement
    ** Custom Size ** Strip Tags 🙂
 * Uninstall compatability
 * Admin UI Improvements

#### 0.5.3

 * Minor Bug Fix for Error Msg: Invalid argument supplied on line 144

#### 0.5.2

 * 0.4.2 patch for WP 2.8.x Added to 0.5.x Branch
 * New Insecure Connectivity option added
 * Admin Settings page has CSS that matches WP 2.7/2.8 rather than 2.5 🙂
 * Only Approved posts allowed – creditz Ashish http://www.microstrategy101.com/

#### 0.5.1

 * Option for link to forum to be opened in new window added.

#### 0.5

 * New Exclude Forums functionality added

#### 0.4.2

 * Fixed for WordPress 2.8.x

#### 0.4.1

 * Widget fixed

#### 0.4

 * Plugin Tested with WP2.5 & PHPBB3
 * Quashed the install bug where by phpbb-recent-topics was confused with phpbb_recent_topics
 * Sidebar widget implemented
 * Editable Time & Date support added

#### 0.3

 * Admin Interface Added

#### 0.2

 * Internal Release, changed display method to fix compatability issue with other
   plugins

#### 0.1

 * First Release 🙂

## Meta

 *  Version **0.7.1**
 *  Last updated **15 years ago**
 *  Active installations **50+**
 *  WordPress version ** 2.0.9 or higher **
 *  Tested up to **3.2.1**
 *  Language
 * [English (US)](https://wordpress.org/plugins/phpbb-recent-topics/)
 * Tags
 * [forum](https://pcd.wordpress.org/plugins/tags/forum/)[phpbb](https://pcd.wordpress.org/plugins/tags/phpbb/)
   [posts](https://pcd.wordpress.org/plugins/tags/posts/)[sidebar](https://pcd.wordpress.org/plugins/tags/sidebar/)
   [topics](https://pcd.wordpress.org/plugins/tags/topics/)
 *  [Advanced View](https://pcd.wordpress.org/plugins/phpbb-recent-topics/advanced/)

## Ratings

 4 out of 5 stars.

 *  [  0 5-star reviews     ](https://wordpress.org/support/plugin/phpbb-recent-topics/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/phpbb-recent-topics/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/phpbb-recent-topics/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/phpbb-recent-topics/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/phpbb-recent-topics/reviews/?filter=1)

[Add my review](https://wordpress.org/support/plugin/phpbb-recent-topics/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/phpbb-recent-topics/reviews/)

## Contributors

 *   [ linickx ](https://profiles.wordpress.org/linickx/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/phpbb-recent-topics/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://www.linickx.com/donate)