About this plugin
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.
re going to need to GRANT the wordpress user read access to phpBB. )
How to GRANT wordpress read only access to phpBB?
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
phpbb_topics TO wp_user@localhost;
AND
phpbb_forums TO wp_user@localhost;
AND
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
Enable Insecure Database Connection. 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.
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.