Topic: [Tutorial] Show PunBB info in Wordpress
Things you need
PunBB 1.3.2 Installation
Wordpress 2.2.1+ Installation
Preparation: Install the "Widgetize Anything" Plugin
Download the plugin.
Extract its contents (a folder called "widgetize-anything") into 'wp-content/plugins/'.
Go to Plugins on your Wordpress dashboard.
Install the plugin.
Widgetize Anything: Adding more widgets
Go to Settings/Options»Widgetize Anything on your Wordpress dashboard.
Change the number to your needs.
Update the options.
Steps
Go to Appearance»Widgets (depends on your WP version) and add the "Widgetize Anything (number)" widget to your sidebar.
Edit the "Widgetize Anything (number)" widget.
Set the widget title to your liking.
If you want to show the forum's active topics, paste Code 1 into the text box. If you want to show how many online users there are, paste Code 2. If you want to show your board stats, paste Code 3.
Replace '{replace_this}' with the relative URI to your PunBB installation. See Example 1.
Save the changes.
Code 1:
$show = '10'; //How many active topics we want to show
define('FORUM_ROOT', '{replace_this}');
echo '<ul>';
echo file_get_contents(FORUM_ROOT . '/extern.php?show=' . $show);
echo '</ul>';
Code 2:
define('FORUM_ROOT', '{replace_this}');
echo '<ul>';
echo file_get_contents(FORUM_ROOT . '/extern.php?action=online');
echo '</ul>';
Code 3:
define('FORUM_ROOT', '{replace_this}');
echo '<ul>';
echo file_get_contents(FORUM_ROOT . '/extern.php?action=stats');
echo '</ul>';
Example 1:
You have Wordpress installed in www.example.com and PunBB on www.example.com/forums/. Your relative URI to PunBB will then be "./forums". If Wordpress is installed on www.example.com/blog/ and www.example.com/forums/, your relative URI to PunBB will be "../forums"
Advanced users:
Read the instructions found inside 'extern.php', edit the following code to your liking and use it on step 4.
$variables = ''; //Example: action=feed&fid=1&show=30
define('FORUM_ROOT', '{replace_this}');
echo '<ul>';
echo file_get_contents(FORUM_ROOT . '/extern.php?' . $variables);
echo '</ul>';
I hope you understood my messy tutorial