Plugin: List Bookmarks
-
A lot of bbPress forums have taken advantage of easy user integration with WordPress. The next step to integrating a WordPress blog and bbPress Forum is to create a bbPress Theme to match your WordPress Theme. bbPress doesn’t ship with built-in support for a sidebar, although I found it trivial to add this with a small plugin. What I really missed was a lightweight way to access WordPress’ wp_list_bookmarks Template Tag function, which lets you display your WordPress Blogroll links.
To add this functionality, I wrote this bbPress List Bookmarks plugin. To install this plugin, download the zip and unzip it to your bbPress server under your /my-plugins folder. The zip should extract to a folder named “list_bookmarks”, so the location of these files should be /my-plugins/list_bookmarks. Then, in your bbPress theme, add a wp_list_bookmarks Template Tag with whatever parameters you want (just like you would when editing a WordPress Theme). You shouldn’t need to hack any of the plugin files to get this to work, although of course you’ll have to edit your bbPress Theme to take advantage of this plugin.
This plugin should work whether or not these WordPress tables are located in the same database as your bbPress tables, as long as your WordPress tables are located in the same database as your integrated user tables.
I’ve tested this plugin on my site, which currently uses bbPress v0.8.2.1 and WordPress v2.2.1. If you use WordPress 2.0 or earlier and you want to use this plugin, you should probably upgrade your WordPress first as wp_list_bookmarks is a new function introduced in WordPress v2.1. I don’t think it should matter what version of bbPress you use.
This plugin ships with a database class called bbwpdb.php that lets us access the WordPress database tables. The bbwpdb.php file is basically a clone of the bbPress /bb-includes/db.php file, edited to let us retrieve WordPress tables. The remaining files are simply three WordPress PHP pages needed (wp-admin/admin-db.php, wp-includes/bookmark-templates.php, and wp-includes/bookmark.php), with slight edits to make it use the bbwpdb database class, instead of the WordPress or bbPress database class. The last file (list_bookmarks.php) just glues everything together.
- You must be logged in to reply to this topic.