I have installed BBpress on my website and everything is working good.
But I want to have several divisions in the forum. On this forum (BBpress.org/forum) there is one division called “Main Theme”. I want to have more than one “Main Theme”, and I also want to change the name on these divions.
Is this possible? And how do I fix this?
/Martin, Sweden
Replying to myself: I installed on our live site and didn’t have the same problems, by copying the files onto a root with a non-bbpress name, and several levels down; maybe just a local server problem. I think the lesson is: install really basic, and play. Make up your mind what everything is going to be called and where it will go, and then start all over fresh.
At least now we don’t see bb-press named folders except in admin. But I agree, it would be neater to have all the bb-press functional stuff in a common place, called by as many installations as required, but I guess there is a single database / table registration in there.
Pretty neat though; I like it. Only problem is IE 6 messes it up in places (positioning, not showing all user tags etc.)
Unfortunately there’s little bbPress documentation right for developers. It’s very much like WordPress however, just different hooks (do_action, do_filter).
There’s no official list of functions but some people have generated xrefs for it, example:
http://phpxref.ftwr.co.uk/bbpress/nav.html?index.html
(unofficial)
I keep a database reference here:
http://bbshowcase.org/reference/
but it’s a little out of date for 1.0 alpha
To upload your plugin into the extend area, first you have to request a “slot” under Extend->add your plugin
https://bbpress.org/plugins/requests/
Then you’ll get an email when it’s approved in a few days (mdawaffe is distracted these days, it can take 1-5 days on average) Then you need to learn how to use SVN to upload your files into the system.
The steps are the same as for WordPress and here’s a good guide:
http://www.binarymoon.co.uk/2008/01/wordpress-plugin-subversion-guide/
only the svn url is different
https://plugins-svn.bbpress.org/
Any guide that is for WordPress plugins should work for bbPress, it’s just that bbPress’s “hooks” (do_action, do_filter) will be named differently.
bbPress is unfortunately too young to have decent documentation yet. WordPress itself didn’t really “take off” until 2.0 beta came out.
This is essentially the plugin framework you need:
<?php
/*
Plugin Name: My Tag Sort
*/
remove_filter('sort_tag_heat_map', 'bb_sort_tag_heat_map');
add_filter('sort_tag_heat_map', 'my_sort_tag_heat_map');
function my_sort_tag_heat_map( &$tag_counts ) {
// put your replacement code here
}
?>
Save it as my-tag-sort.php
, put it into the bbpress/my-plugins
folder, activate and you’re in business (well after you figure out the sort method).
Typically you’d have to do a return $tag_counts;
at the end of a filter but that &
on the &$tag_counts
means it’s “passed by refererence” which is a fancy way of using the original array directly without making a copy, so the original is changed at the source when you modify it. It’s a much faster way to move large amounts of info around.
Thank you.
I will look for those guides. (And re-do all the “hack”s if possible..)
Should’ve thought about looking for WordPress guides instead of bbPress ones.
I have a similar query: I can install into “/bbpress” on my web root, but the installation just won’t complete if install to deeper folders, eg: /network/members/bbpress where there is .ht access security.
Also, I’d rather it was all in /forum rather than /bbpress. Unless all hrefs, includes etc. are purely relative, that would require trawling all bbpress files for this reference to change it (?)
No – you can’t just rename the root after installation and return to reconfigure the install root setting: it all gets lost in itself.
bbPress uses the same concept as WordPress with add_filter and add_action so there are many guides out there as to how it works.
Essentially it’s a “hook” that allows you to intercept the process or results. The first part of the add_action/add_filter is the process name or trigger, the second part the the name of the function you want to process at that moment.
If there are existing filters/actions in place you can unhook them with remove_action or remove_filter.
Ran into a little trouble installing it… I’ll upgrade my bbpress version this weekend!
It’s a little tricky since we’ve integrated our bbPress with a WordPress and a MediaWiki installation… plus dozens of bbPRess plugins. But we’ll get it working soon, and I’ll send that donation off!
i’m also getting this warning message:
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/public_html/bbs08/phpbb2bbpress.php on line 922
can anyone answer the question regarding the “39816” error? i get up to step 8 and then that string of numbers shows up. i checked the new database and nothing has been pushed into it.
Ok so I’m not sure if this is the best way, but I turned on WordPress integration but without sharing database tables. Now I can access the cookies on any page that I include bb-load!
What version are you using? For older version, the bbPress plugin bbSync does what you want. For the newer alpha versions, there is bbPress live, a WordPress plugin.
https://bbpress.org/plugins/topic/bbsync/
https://wordpress.org/extend/plugins/bbpress-live/
I’m integrating a bbpress forum into a website and I need access to the bbpress user info and functions.
at the top of my php page i’ve done
require(“/path/to/forum/bb-load.php”);
This works great so far, I can load the forum, display topics etc. The only problem is that I can not maintain a user log in when I go from the forum to my new page. I’ve dumped the $_COOKIE var from my new page and the bbpress cookie is not present. If I dump $_COOKIE from a bbpress page its present.
Any idea?
Is there any way I can make the bbpress cookie available in my new page?
I’m wondering if this is possible-
We have our wordpress blog Feast of Fools tied together with bbPress forums, and I was wondering if there was a way for bbPress to treat the comments on a blog entry as a topic in the forums.
This way, popular blog entries would “float” to the top in the same way that bbpress forum entries do.
Any ideas? It this already a function we don’t know about?
I believe 1.0 specifically has some abilities to address such a desire but I am unfamiliar with them. Sam might know.
I started a thread of several issues I’m having with Alpha-2. I hope they’ll be fixed in Alpha-3.
Okay, having tested it a bunch of different ways, I can’t get it to work.
I want to make my own image the ‘default’ for the non-gravatard people (which works fine on WordPress).
In WordPress it’s this:
<?php echo get_avatar(get_comment_author_email(),50,'http://www.foo.com/gravatar.png');?>
For bbpress we have this post_author_avatar();
on post.php. Passing the URL into that, either on it’s own or as $default doesn’t work.
Using echo bb_get_avatar( bb_get_user_email(post_author()), 48, 'http://www.foo.com/gravatar.png' );
didn’t work.
I’m gonna keep tossing stuff up against the wall for now.
@sc0ttbeard: Hey Scott, take a look at a previous post of mine to hopefully jump-start your audit. I wonder if it’s a simple server config issue wrt cookie domain path… I’m going to RTFM.
@complex I think you’re mistaken. WP2.6.2 – WP2.6.3 did not have cookie-related modifications.
WP2.6.3 did not fix ‘cookie-related issues’. The edict still stands for bbPress 0.9x.
As I understand it, it is the move to bbPress 1.0 that uses the ‘new’ WP2.6x cookies.
If you find ‘old’ options they’re probably there to permit backwards-compatibility with plugins etc that have not been upgraded yet.
Okay this one is testing working.
For anyone else that wants to use this, you have to replace the domain name by hand. It’s hardcoded for speed, sorry.
All other target=”_blank” plugins should be uninstalled. Any existing links with target=”_blank” will be left in place for performance since target is not added by bbPress by default.
<?php
/*
Plugin Name: Target Nofollow External Only
Description: append target="_blank" and rel="nofollow" only on external links
Plugin URI:
Author: _ck_
Version: 0.0.1
*/
add_filter('post_text', 'target_nofollow_external_only',999); // unfortunately we have to do this on every page load and not in pre_post
function target_nofollow_external_only( $text ) {
$domain="travel-writers-exchange.com"; // domain to exclude from target and nofollow
$text = preg_replace('|<a (.*)rel=['"]nofollow['"](.+)?>|iU','<a $1$2>', $text); // strip ALL nofollow
$text = preg_replace('|<a (?
[^>]+http
//))(?!([^>]+'.$domain.'))(.+)>|iU', '<a $3 rel="nofollow" target="_blank">', $text); // add back in when needed
return $text;
}
?>
I’m not happy about the performance of this technique because it has to be done in post_text for every time a page is displayed, but there’s no other easy way around bbPress/WordPress’s unfortunate use of make_clickable with hardcoded “nofollow” in post_text.
Okay I’ll play with it some more and see what I can do.
update: the problem lies within make_clickable which has nofollow hard coded and impossible to “unfilter” at that level
I’ll have to come up with a way to do it at display time and cleanup the mess bbpress (actually wordpress functions) create
Moving topics is of course built in.
Moving posts should not be done even though there is an old plugin to do so.
The reason for this is because bbPress has no internal hooks to “announce” a post is being moved and it will break plugins that track data and count on posts remaining in their original topics. It can eventually cause some corruption.
If you don’t use plugins or don’t care about corruption, the old move-it plugin may do what you want, but strongly consider the warning.
I read a thread about moving posts dated about a year ago ( http://bbpress.org/forums/topic/moving-a-post#post-6175 ). Any news on a plugin for moving wrongly placed posts to another forum? This is an issue that comes up quite often with many forums posters not payimg attention to forum names.
You don’t normally need to set anything there. The installation will continue fine without it.
Every MySQL database uses character collation, but it’s normally hidden from sight. For my bbPress installation, the collation is utf8_general_ci
. But I didn’t have to set it, it’s already there. In a unique situation you might need to set it, but I’ve never messed with it.
Hmmm…..okay well I did add this code to bb_tweaks……I replaced the function bb_target_blank section with what you have here, and I removed the add_filter('pre-post','bb_rel_nofollow');
and added the remove_filter actions above…….but it did not seem to have any effect – bbPress still strips out any “target” reference and still adds the rel=”nofollow” to all links…..
I haven’t made any other tweaks to this….