Search Results for 'bbpress'
-
Search Results
-
Which is best to use for registering and logging in and out (for integrated sites, of course), the WP or bbPress pages?
thx
I’m trying to be fairly aggressive with my bbPress integration into some WordPress pages. Our client wishes to see recent forum posts on specific subpages of the main site (which is WP). This works fine if I include bb-load in my wp-config.php file (as I’ve seen recommended) and then use some of the useful bbpress functions to integrate content. It works, that is, on the SUBPAGES.
Strangely, however, the site’s landing page blows up. It’s using the exact same header as the rest of the site’s subpages, and is not using any of bbpress’ functions itself (just includes the bb-load.php file because it’s in wp-config.php), but the same wp_list_pages function call in the header (used for navigation) that works just fine for the subpages gives me an infinite loop of this error on the landing page:
Warning: illegal offset type in [my-server-path-removed-here]/wp-includes/wp-db.php on line 252
Removing bb-load.php from the wp-config.php file fixes this immediately.
Note that I am using WP configured to use a STATIC page for the landing page. Both the home page template and the subpage template in question immediately call get_header(). Nothing happens before that.
For now what I figure I’ll do is remove bb-load.php from the wp-config.php file and just include it exclusively in the subpage template I’m using for the pages I need forum stuff to show up.
I googled and haven’t seen anything like the problem I’m having anywhere else. I kind of think it might be something getting upset during the walker class’ traversal. Anyone got any bright ideas?
I’ve gone over the configuration file, and it all looks correct. I am installing in forums.nerdgrind.com, which I gave it’s own directory, so there is no wordpress installation sharing the forums directory. I’m not sure why I keep getting this error:
bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ ”, , ”, ‘2008-01-16 00:57:55” at line 4]
INSERT INTO bb_topics (topic_title, topic_slug, topic_poster, topic_poster_name, topic_last_poster, topic_last_poster_name, topic_start_time, topic_time, forum_id) VALUES (‘Your first topic’, ‘your-first-topic’, , ”, , ”, ‘2008-01-16 00:57:55’, ‘2008-01-16 00:57:55’, 1)
The database is setup, and all other tables are created except this one. I am using the latest bbPress.
Topic: can’t access admin dashboard
Background: Installed WPMU (at “/”) and bbPress (at “/forums/”), followed integration instructions (and tweaked to get it all working). I used my WP theme header.php and footer.php as the basis for a bbPress theme, and loaded the full WP engine into bbPress by putting this code in my config.php
// Load WordPress so we can use the same templates.
define('WP_BB', 'true');
require_once dirname(dirname(__FILE__)) . '/wp-blog-header.php';Symptoms: Pages load just fine, and all appears successful, but, upon further inspection, all bbPress pages actually return a 404 error in the HTML headers (you can see this using FireBug, or using a HEAD command to the page). NOTE: This will also happen if you create custom pages (not WP “Pages”) that load the WordPress engine – they load fine, but actually throw a 404).
Explanation: What appears to be happening here, is that the page loads fine, because it is a real page. Internally however, WP doesn’t know about this page (because it’s a bbPress, or custom page), and so it assumes it’s a request for a permalink that it can’t resolve. Thus it throws a 404.
The internal rewrite system in WP allows you to add new rewrite rules, but appears to only like dealing with “internal” or WP-specific rules. If you add in what it refers to as “non_wp_rules”, then it doesn’t actually apply them (so it still throws a 404).
The FIX! on the code that I’m running, I have put the following WordPress plugin in place to add rules appropriate for my bbPress installation:
function mbob_flush_rewrites() {
global $wp_rewrite;
$wp_rewrite->flush_rules();
}
add_action('init', 'mbob_flush_rewrites');
function mbob_add_rewrites($wp_rewrite) {
add_rewrite_rule('forums/topic', 'forums/topic.php');
add_rewrite_rule('forums/forum', 'forums/forum.php');
add_rewrite_rule('forums', 'forums/index.php');
$wp_rewrite->rules = array_merge($wp_rewrite->non_wp_rules, $wp_rewrite->rules);
}
add_action('generate_rewrite_rules', 'mbob_add_rewrites');NOTE: I have removed a lot of my bbPress installation as part of my integration, so I didn’t require any other rules to handle things like profile pages or tags – you probably will need to add them if you use those features.
Hopefully this will help someone else and prevent you from beating your head against a wall like I almost did
Thanks to sambauers for helping me out with this in #bbpress as well.
Beau
Topic: New Green theme/forum!
I’d like to start off by saying what a fantastic piece of software bbpress is – I love the similarities with WordPress: clean HTML & CSS code. In my opinion it’s like a breath of fresh air compared to other forum software because you can easily customise it to fit your site. I just hope the clever designers and developers continue their excellent work with future releases.
…anyway enough of my rambling, here is my forum (still needs a few finishing touches):