baptiste (@baptiste)

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 28 total)
  • In reply to: OpenID for bbpress

    Did anyone find that you could piggyback onto the WordPress integration/authentication when using the OpenID plugin? It didn’t work for me. I had the plugin activated on my WordPress site and was able to login and create users just fine, but bbPress didn’t know about the credentials and wouldn’t login.

    I need to get more familiar with how the integration is working – I thought it would work fine since it created a normal WordPress user record. But it kept saying the userid was unknown… Will probably dig into it later. The WP plugin is great – the persona fill in stuff is very cool. Only quirk was my ‘Display As’ defaulted to the userid even though a name was included. But I digress.

    Same here – works great

    In reply to: top 100 bbPress sites

    Not much traffic – but I’ve got Refresh going for my plugin blog and forums. Matches quite nicely – I mucked with the themes a bit but the ports were done by others thankfully. Getting the integration and WP sidebar on the forums took some fun mucking in the code…

    One of these days I’ll diff the changes I made to the Refresh port to get it to match the WP theme and have everything line up properly…

    This site is still under development:

    Still need to tweak the theme some, but I’ve made a variety of navigational changes. Click any topic and look at the meta section. Click on a forum and note the navigation links. Click on a subforum and note the breadcrumb trail. On the front page – I like having the latest posts first, but added a ‘Forums’ column to indicate where they were and make it easier for folks to jump into a forum (no scrolling down for active forums)

    Still a bit to do, but it’s working better each day. The theme will eventually be green – thus the green ads. I keep trying to convince myself NOT to shoehorn in AJAX posting – but I really miss it – something that made bbPress ‘cool’

    In reply to: Database error

    Are you running MySQL 3.23 or v4? v3.23 doesn’t support SQL_CALC_FOUND_ROWS – needs v4 or higher

    My favorite Captcha by far:

    May send your users into convulsions – but it’s hard as heck for bots to read! I used it for a phpBB forum I ran and users always managed to register – but stopped the bots cold.

    I put together a plugin that will allow you to include navigation links to flip forward or backward through forums and/or topics within a forum.

    This is a first stab. No online config, etc. yet – just the main code to get the right links and forum/topic IDs. I hope to add some things to it and improve the API a bit to let templates get individual ‘next’ or ‘previous’ links.

    I ended up having to do direct DB queries – I couldn’t find a way in the main bbPress code to get me the info I needed, but I’m not super familiar with the core code either so I may have missed something. But no functions or class methods jumped out at me.

    I’ll post the bbPress plugin URL for it once it’s approved, but you can download it from the link above.

    Here’s a look at what it does on a forum I’m still setting up/messing with.

    Topic Nav – look in the meta section under the RSS link:

    Forum Nav – look under the list of topics:

    Yes – I know the forum navigation disappears in forums with no posts – side effect of the action hook I used to insert (it seems to return without applying filters when there are no posts – which I guess makes sense if you’re figuring there’s nothing to ‘filter’. But many filers append :( )

    This definitely makes navigation for my setup much easier.

    This is definitely worth doing. bbPress needs to have template functions that allow you to get the ‘next’ or ‘previous’ forum and topic. This would allow themes to include nice navigation links like ‘Next Thread’, ‘Next Forum’ instead of always having to jump to the front. WordPress does this for posts.

    I’ve looked all around and I’m just not seeing anything like this.

    I’m going to mess around with some code – it looks like the BB_Walker has a stepping ability built in that SHOULD make this pretty trivial, but I’m still getting comfortable with the inner bbPress classes and such. I’ll post here if I come up with anything. If anyone else has tried this or knows of a plugin that exists already – let me know. I couldn’t find one. Again – this isn’t pagination when you have lots of posts/threads. This is when you are in a topic or post view, being able to navigate to the next post, thread, or forum – i.e. like flipping pages of a book.

    Ah – I moved it a bit lower (actually right before post_form) and the forum_id in the hidden variable is correct now, works great.

    Hmm – I assume you mean the forum.php file in the template itself. It’s not working for me at all. Still digging.

    I use this theme at:

    matching the site theme itself. Works great. I should put together a diff of the modifications I made to tweak things like removing the urchin code and fixing a few other quirks….

    Sweet! Thanks for the pointer. I’m trying out the one line fix to template-functions.php If that doesn’t work I’ll change the template file.

    Here’s the ticket – hopefully the function or some form of it will get added. Possible improvement would be to limit the depth for forums with deep children

    Not in production yet – still ironing out various bits, adding stuff that’s missing (oh how I miss AJAX posting), etc. But the breadcrumb stuff works for the forum and topic view.

    Yes. I figured that’s what it was called – I just couldn’t find it referenced in the source anywhere. I must have grepped badly. Will try that out.

    I brain locked. bb_head is probably too late for this. Is there an equivalent of the ‘init’ hook for bbPress? In WordPress, that filter hook gets run after the environment initializes. That’s when the code I included would need to be run. I can’t seem to find an applicable filter hook called that early.

    Would the solution be to execute a stripslashes_deep on GET, POST, etc if WP_BB is true? Seems kinda dangerous – but bbpress doesn’t expect this in a non-integrated environment, so undoing what wp-settings.php does (which gets run when you include wp-config to get the WordPress API) seems harmless enough.

    Maybe something along the lines of:

    function bb_undo_wp_slashes() {

    $_GET = stripslashes_deep($_GET );

    $_POST = stripslashes_deep($_POST );

    $_COOKIE = stripslashes_deep($_COOKIE);

    $_SERVER = stripslashes_deep($_SERVER);


    and call that as a filter for bb_head?

    if (defined('WP_BB') && WP_BB) add_action('bb_head', 'bb_undo_wp_slashes');

    I think bb_head is called after the environment is setup.

    I may give this a try. Thoughts from developers who know more about bbPress than I?

    Weird. I have magic quotes off. However, I notice that wp-settings adds slashes to EVERY request in wp-settings:

    // If already slashed, strip.

    if ( get_magic_quotes_gpc() ) {

    $_GET = stripslashes_deep($_GET );

    $_POST = stripslashes_deep($_POST );

    $_COOKIE = stripslashes_deep($_COOKIE);


    // Escape with wpdb.

    $_GET = add_magic_quotes($_GET );

    $_POST = add_magic_quotes($_POST );

    $_COOKIE = add_magic_quotes($_COOKIE);

    $_SERVER = add_magic_quotes($_SERVER);

    Is bbpress not expecting this? This might explain the double slashing even if magic quotes is off (I checked my php.ini – it is off)


    It is – and it will make your life a lot easier. Makes your config simpler too.

    I’m 90% sure this is related to the kses issue I’m looking into because kses has a strip slashes filter that I think is being used as well, but not 100% sure. The fact that it only happens on WP integration makes me pretty sure it’s kses.

    return stripslashes(apply_filters( 'get_topic_title', $topic->topic_title, $id ));

    Basically the part causing problems is using the require of wp-config. THis gets you the wordpress API in bbPress. I use this to have my widget sidebar in my bbPress pages. When you do this, bbPress uses the kses.php library from WordPress instead of bbPress. It makes sense – the library is generic. Why load it twice (plus the function names would conflict)

    But something with kses 0.2.2 is stripping out attribute lists. I’ve been debugging it all morning and I can’t figure out why. I get so far as to see in wp_kses_attr that after checking for allowed protocols, no attributes come back. Still digging.

    This is bizarre. If bbPress integrated is using the WordPress version of kses, you’d think the same problem with href disappearing would happen in WordPress too, but it doesn’t. I’m still digging, but this is really puzzling.

    I have confirmed, however, that ALL attributes are being stripped that should be allowed. href, rel, cite in blockquote, etc.

    I’m thinking this problem may be due to the WordPress integration stuff. Same thing with the slashes being included in the posts. I may mess around with the integration plugin a bit and see if including the wordpress APIs is the root cause and why.

    Easy fix (hack) in bb-includes/template-functions.php, update this function to look like this:

    function get_post_text() {

    global $bb_post;

    return stripslashes($bb_post->post_text);


    May be an artifact of the wordpress integration – not sure.

    The point of using a href is to hide the URL itself and have a clickable phrase. a is listed as an allowed tag and in kses it appears to be allowed. I can’t understand why it’s being stripped out of the post. It should not be

Viewing 25 replies - 1 through 25 (of 28 total)