WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

phpbb_recent_topics

This plugin grabs your recent phpBB forum topics for you to display in wordpress.

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 (http://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.

Requires: 2.0.9 or higher
Compatible up to: 3.2.1
Last Updated: 2011-7-8
Downloads: 21,971

Ratings

4 stars
4.3 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2
40,5,2
100,4,4 100,1,1
100,2,2
100,3,3
100,1,1
33,3,1
33,3,1
100,1,1
100,3,3
0,1,0
0,1,0
100,1,1
0,1,0
100,1,1