UPDATE: This Plugin has been updated, please download the update from http://wordpress.org/extend/plugins/phpbb-recent-topics/, and please comment on the new post, thanks.
It’s been a year since the last release so perhaps this version should be called “about time!” v0.4 has primarily been released as a bugfix version, if you’re happy with v0.3 and have it running fine then don’t bother, in fact edit phpbb_recent_topics.php so that WordPress stops complaining about finding a newer version.
Download phpBB_Recent_Topics_0.4 from wordpress.org
What’s New?
- Most importantly I have tested this plugin with phpBB3 and WP2.5 so I’ve updated the readme.txt to reflect this.
- I finally quashed the install bug where by phpbb-recent-topics was confused with phpbb_recent_topics.
- Sidebar Widget, yus for all you non-php people you have a widget to play with.
- Edit the Time & Date layout – leave blank to remove it completely
What’s Old? – aka: 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”
- 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(); } ?>
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.
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;
this can be achieved by logging into phpmyadmin as your phpbb user, selecting SQL and pasting the correct GRANT into the text box.
Frequently Asked Questions
- 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);
}
?>
- 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
- Can I exclude a certain forum from the list ?
- In this version, the only way to do that is to hack /wp-content/plugins/phpbb_recent_topics/display/display.php, change
$results = $wpdb->get_results("SELECT * FROM $TOPIC_TABLE ORDER BY topic_time DESC LIMIT $LIMIT");to
$results = $wpdb->get_results("SELECT * FROM $TOPIC_TABLE WHERE forum_id != 1 ORDER BY topic_time DESC LIMIT $LIMIT");to exclude forum 1 from the list. I plan to setup a proper solution to this in the next version.
- In this version, the only way to do that is to hack /wp-content/plugins/phpbb_recent_topics/display/display.php, change
- Why is the date config under settings not in the widget configuration?
- The date settings effect both the template tag and the widget
- The date settings effect both the template tag and the widget
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 tag wordpress forum posts with “phpbb-recent-topics” I’ll reply to you there, but we all have busy lives and I make no promises on how quickly I’ll reply to you.
EDIT: Found a link for posting in the correct phpbb-recent-topics forum
Finally Subversion
You also might be interested to know that I’ve been getting to grips with the wordpress plug-ins svn, so you can get work directly from here; and when wordpress.org re-crawls my readme the latest version will also be available on wordpress.org/extend/plugins/

Pingback: Recent phpBB Topics on Wordpress Plugin v0.3 - [LINICKX].com
Great to see an update! Will try it out
When I try to go to settings’ page, I receive a 404 page… What is wrong?
Regards!
@Rodrigo really?
I’ve just downloaded the plugin from wp.org (to check what is there is the same as what I have) and it works fine :s
Do you have v0.4?
I jsut downloaded plug in and I get an erorr
phpBB Error -phpbb_topics
Well I fixed the previous problem now I am just getting the date of 31/dec/69 5:ooPm
Yes, Nick, I’ve downloaded it from wp.org, and I’m using latest version (0.4). By the way, when I installed previous version, 0.3, I had that problem, but I just re-send files to server, and everything worked well. I tried this again, but now doesn’t work.
I really don’t know what can be…
Regards.
@Rodrigo
Can you tell me what you have in your apache error_log?
@Dan
What do you have as your date setting?
I am using the Premium News theme (http://support.premiumnewstheme.com/) and WP 2.5. When I enable recent-phpBB it doesn’t show up and throws the rest of page off. This is a really imporant plug-in for me as I have a 100,000+ member forum and this it would be sick to have the last 10 posts up on the site – !
Hi Steve,
Unfortunately I don’t have access to the premium news theme to help diagnose your issue; I would suggest that you check it works properly in kuberick and then troubleshoot the theme.
If you’re having problems displaying widgets in your theme you could always try editing your sidebar.php to include….
<?php
if (function_exists(’phpbb_topics’)) {
phpbb_topics(3);
}
?>
hth.
Any way to show posts slug also ? :3
Hi Jowah,
I don’t think the default install of phpBB supports post slugs.
Do this plugin support non-english characters or written accents? I’m getting this symbol (�) on accents. Thank you.
Pingback: punbb recent topics wordpress pluging « varios2
Ok I have looked everywhere in my phpbb admin panel for anything that looks like SQL to GRANT but I ain’t seeing nothin’. If somebody could point me in the right direction I would sure appreciate it.
Hi John,
The SQL GRANT thing isn’t within phpBB, it’s an actual SQL command. If you host your own server you can use the command line interface (mysql), if you’re on a shared hosting program ask you provider about phpMyAdmin (or similar).
hth,
Nick
Thanks Nick, I knew I should have had a cup of coffee before sitting down in front of the computer this morning!
Went to my phpMyAdmin and followed your directions but I keep getting this:
#1142 – SELECT,GRANT command denied to user ‘johnwrig’@'localhost’ for table ‘phpbb_topics’
Any idea what I am doing wrong?
No probs – I’m coffee fueled too!!
Have you logged into phpMyAdmin as your phpbb user? (i.e. the credentials in your phpbb config file)
hello, thx for your plugin Nick.
One question :
Is it possible to display list of the last topics answered ? and not recent topics..
because, i would like to see a list of last answers of topics, even the topic is old or new.
It’s hard for me to explain. I a have php code on my right sidebar wich does that but i would prefer use your pluging.
please go to http://www.theveils.net to see what i mean.
thanks
Nick, Would you mind explaining how I sign into phpmyadmin as the phpbb user. I access phpmyadmin through cpanel but once there I don’t see anywhere to login
Hey Nick
I had issues with displaying multi-lingual text using your plugin, but I fixed it by adding this query to the database.
SET NAMES ‘utf8′;
Since the data in phpBB is already stored in utf-8 it shouldn’t hurt to use UTF-8 =)
Thanks Scott, I’ve added this to my “todo list”
Scott, where exacly do you added this UTF-8 code? (I’m a little newbie in PHP
).
Thanks for your help!
[]‘s!
I was using the plugin without any problems but suddenly I’m getting the following error message before the list of posts:
Warning: Missing argument 1 for phpbb_topics() in /home/.dick/macmagazine/macmagazine.com.br/blog/wp-content/plugins/phpbb-recent-topics/phpbb_recent_topics.php on line 68
Any ideas?
@Rodrigo:
I added this line right after “#Run the query” and before the first query (on line 43)
$results = $wpdb->get_results(“SET NAMES ‘utf8′;”);
Hi Rafael,
Apologies for not being around to get back to you,
I’m wondering if something like you php version has changed or something?
If you change
phpbb_topics()forphpbb_topics("5")does that help?rgds,
Nick
Hi there!
I am using WP 2.5.1. with “prodown-10″ theme and when I enable recent-phpBB my lists of categories and tags (sidebar) disappear.
It’s really important for me to display posts from forum in my sidebar.
I tried to add this code (in my sidebar.php):
Can you help me?
Łukasz @ http://www.blogksiazki.pl
when i activate the plugin this error comes in my blog home.
“Fatal error: Cannot access empty property in /home/nintendo/public_html/sitio/wp-includes/user.php on line 309″
@Kruszek-zel6wa,
Does it work properly in Kubrick?
@SuriV,
Sounds like a plugin conflict, try disabling your other plugins.
@Nick
I am at work now.
I’ll try Kubrick when I get back home.
It’d be great if you could get UTF-8 support built into the plugin. I tried the fix noted in the comments above, and it worked great for the PHP bb topics but for some reason ended up screwing up the encoding of a bunch of other widgets…
i’ve tried to install it on http://www.paganconnection.org/ and it works except there is no title on the widget block! I’ve tried putting different things into the widget title and also leaving it blank. Can anyone suggest anything?
Hey,
Working great, just wondering how i would go about shorting the Title length it displays?
I’m getting the following error message before the list of posts:
Warning: Missing argument 1 for phpbb_topics() in /home/.dick/macmagazine/macmagazine.com.br/blog/wp-content/plugins/phpbb-recent-topics/phpbb_recent_topics.php on line 68
Any ideas?
@ORIOn
Just read a few threads upwards and you will see Nick’s reply for the exact same problem (had it myself and now I am here and found the answer).
Just edit the php insertion from
phpbb_topics()
to
phpbb_topics(“5″)
or whatever amount of posts you need.
Hope it will help you, too.
Worked for me
Thanks for that great Plugin.
@zweigelb
Sorry, it’s not that, i have tryed and it does not work :/
The error is:
Warning: Missing argument 1 for phpbb_topics(), called in /home/orion16/public_html/wordpress/wp-content/themes/LibertyWarez/header.php on line 181 and defined in /home/orion16/public_html/wordpress/wp-content/plugins/phpbb-recent-topics/phpbb_recent_topics.php on line 69
and if i put like you have sad it gives me another error:
Parse error: syntax error, unexpected T_LNUMBER, expecting ‘&’ or T_VARIABLE in /home/orion16/public_html/wordpress/wp-content/plugins/phpbb-recent-topics/phpbb_recent_topics.php on line 69
and it shows nothing, only the error…
Hi Orion, is there anything of use in your Apache Error_Log?
@Nick, i dont understand what you ha said…
Great plugin, Nick. I did a write-up on it at my site, WordPressIntoCMS.com.
In the post I mentioned the missing argument issue which I now see after reading these comments that others are having, too. Maybe you could include something in the documentation about it.
Now I am working on styling the output as an unordered list and I’m wondering if you have any tips on how to assign tags to each forum topic link.
I think with a little promotion and a couple of upgrades (maybe a fancy name, too) your plugin would become extremely popular. There are a lot of people out there looking for a solution like this but nobody has really taken the bull by the horns yet.
Thanks again for your work!
Pingback: Missing argument 1 for phpbb_topics() - [LINICKX].com
Thanks Brian, I’m glad you liked it, and thank you for your positive feedback.
I would guess the smart way to style the output would be to add a class to
~/phpbb-recent-topics/display/display.php, so perhaps changingecho "<ul>";for echo '<ul class="topics">';and adding a topics style to you css?rgds,
Nick
If I don´t want to show posts that are in private forums what I should do?
@Petrus
Yeah I want the same thing…
btw,
i’m still having the error…
I am having trouble implementing this plugin, all I get is a tiny unreadable link to a non-existent post and a date of 31/Dec/69 – 5:00 pm.
I’m pretty sure the problem is in the GRANT for the mysql database.
When i run the command:
GRANT SELECT ON phpbb_database_name.phpbb_topics TO wordpress_database_name@p50mysql203.secureserver.net;
i get this “#1142 – GRANT command denied to user ‘phpbb_database_name’@’68.178.254.44′ for table ‘phpbb_topics’ ”
i am sure the phpbbdatabasename and wordpressdatabasename are correct, and i am definitely logged into the phpbbdatabase, as it is displayed at the top of the phpmyadmin window.
i am using a shared hosting account on godaddy (thus the secureserver.net address), and on the phone with tech support they swear i am allowed to grant access to another database. maybe they are lying?
as a side note, the ’68.178.254.44′ does not match the ip for either database server. the ip where my phpbbdatabase resides is displayed as 10.6.171.64 at the top of phpmyadmin. of course, i did not enter the 68. number into the query, only entering the wordpress mysql server in place of @localhost. could this be the issue? and how can i resolve it?
another side note is that my wordpress is running on a mysql 5.0 and phpbb is running on mysql 4.1, problem?
thanks in advance for any help.
Well… i still cant get the grant access to work, but to solve it i just made them use the same DB…
Thanks for the plugin Nick…
is there a way to display who posted?
before_title, before_widget …
ist not working at dynamic sidebars.
Pingback: havvgs life » Allgemein » phpBB recent topics Widget - Toni Uebernickel
Comments Closed, please comment on new version: http://www.linickx.com/archives/682/phpbb_recent_topics-version-041