Search Results for 'code'
-
Search Results
-
Topic: 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.
Hi,
I currently have an API problem fixing a plugin. Using mysql_query() will result in errors on some boards so I wanted to change this using $bbdb->get_results(). This works, but mysql_fetch_array will error things up now. What do I need to change to make this work correctly?
Current code (without using $bbdb->get_results()):
$r = mysql_query("SELECT * FROM $bbdb->menu
WHERE set = 'inactive' ORDER BY order ASC");
while($rw = mysql_fetch_array($r))I’ll probably copy this to TRAC but it’s good for a discussion here too?
I’ve been poking around the results using the query list plugin and something hit me.
Options are not being preloaded (ie. SELECT meta_value FROM $bbdb->topicmeta WHERE topic_id = 0)
However a few options, like active plugins MUST be loaded on every load. So the options table has to be queried at least once, usually two or three times. This causes extra queries.
So the question is, what’s slower, unserializing possibly serialized data in half a dozen to a dozen options, or making half a dozen to a dozen extra mysql queries?
Preloading could be a plugin, the cache code is already there. Just wondering if I should bother working on it given the above question.
I know the emails have to come from somewhere, but still… this was surprise.
Could there be a notice somewhere that the admin email is used to send every registration notification? Spambots are getting it too
I had expected that bbPress would use it only to send notifications to the admin.
what are possible reasons/conditions of getting this nonce message?
I gathered it could be issued by the
bb_check_admin_referer( 'create-post_' . $topic_id );
but what is it for?PS I saw there’s a similar title resolved thread, but it doesn’t make it clear.