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.
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.
Well we could cheat and make the plugin skip links that have your domain name or no http:// in it.
function bb_target_blank( $text ) {
$text = preg_replace('|<a (?=http
//)(?!travel-writers-exchange.com)(.+?)>|i', '<a $3 rel="nofollow" target="_blank">', $text);
return $text;
}
This is untested.
It’s a fancy regex feature called negative lookahead.
Try it and see what happens.
Doing nofollow for only externals is essentially the same thing, I’ve added it to the replacement above.Make sure you have no additional tweaks for nofollow. I don’t think it’s on by default? If so, try
remove_filter('post_text', 'bb_rel_nofollow');
remove_filter('pre_post', 'bb_rel_nofollow');
Sorry for the delay in responding – for some odd reason my primary (desktop) computer logged me out of this forum and would not let me log back in….tried many times making certain I was typing my username/password correctly…….so I had to go boot up my laptop…
Anyway, to answer your question, no – I read all the instructions on pretty permalinks and did not see that – I thought I read most of the posts on the issue but must have missed that. In any case it did not work for me….
I put $bb->mod_rewrite = "slugs"; into my bb-config.php and uploaded – this of course changed my default permalinks to the name-based ones (great) but when I click on the links, I get this error message:
Multiple Choices
The document name you requested (/Forum/topic/article-titles) could not be found on this server. However, we found documents with names similar to the one you requested.
Available documents:
/Forum/topic.php/article-titles (common basename)
Please consider informing the owner of the referring page about the broken link.
And of course if I have the .htaccess file uploaded, I still get the 500 Server error
Thanks for the response. You were exactly right: the theme that I’m modifying simply didn’t make use of those functions. Can’t find something that’s not there.
get_topic_author was exactly what I was looking for and it’s right there in the default theme. I should have known to look there.
Thanks again for taking the time to respond. It is greatly appreciated.
Cheers!
I’m sorry, I did something wrong when I added the plugin I was talking about to this site. Don’t know how to fix it, but you can find the file on this address:
http://www.samla.info/default-post-notification.zip
There is a chance your host has multiviews already turned on by default so let’s make sure it gets turned off.
At the start of the root .htaccess try putting
Options -MultiViews
Other than that, I’m out of ideas for today and will have to “sleep on it”.
I have bbPress 0.9.0.2 fully integrated with WP 2.5.1 using shared DB and tables. Everything seems to be working fine, except that when users register on bbPress they are shown as having “no role for this blog” on the WP side.
Role mapping defined in bbPress is: WP-Administrator==bb-Administrator, WP-Editor==bb-Moderator, WP-Author==bb-Member, WP-Contributor==bb-Member, WP-Subscriber==bb-Member.
I was expecting somemone who signs up to bbPress (with the default Member role) to be given Subscriber status in WP. I can see that there is an ambiguity as to which WP role should be chosen for a bbPress Member, but I guessed the one with lowest privilege, i.e. Subscriber, would apply.
I hope we see the plugin soon. It would be nice for it to happen automatically, since you want it to happen for everyone. Opt-out basically, rather than having them opt-in, or you opting them in.
Regarding this issue – I have just found that, as a forum administrator you have the option of turning on email notifications for any user. Although not perfect this feature does the job.
Hi.
I’ve written a plugin to do this. Hold on and I’ll post it.
I just installed this plugin http://bbpress.org/plugins/topic/post-notification/ that automatically adds new posts to an author’s favorites. However, in order for the post’s author to receive a notification email for a new post he/she must also turn on email notifications in the admin area.
My question: is there a way to change the code to have these email notifications turned on by default?
Those plugins come default for 1.0alpha2 under the plugins tab, you have to turn them on. I suspect it’s POSSIBLE if you downloaded the alpha version, they might work in a non-alpha install, but it’s untested.
But really, if you’re just moving your domain, you can pretty much do what you’d do for WordPress or any other PHP/SQL driven site. You have two basic options.
- Download a copy of the main bbpress files from your OLD server to your hard drive and edit wp-config.php to suit the new server.
- Go back to your OLD forum and go to options and change the url (both of them) to that of your new site.
- Download your database (but keep the old one just in case), upload this new database and the copy of the wordpress core files with the edited bb-config.php to your NEW server.
Or…
- Install a new forum on the new server.
- Export the forum content from the OLD server into a BBXF file
- Import the data into the new forum.
Hi, there.
I’m trying to figure out how to get my theme (http://agitainment.com/ics/forum/) to use the 404.php page that I’ve styled to fit with my theme. Currently all 404’s are using the default provided by my host or the bbPress die page.
Any ideas?
Cheers!
How about using the 1-column fixed bbPress raw theme and customizing it to look like your blog?
http://bbpressraw.com/bbpress_blank_themes/
I don’t think I’ve seen anything like Kubrick for bbPress at all yet.
I just installed BBPress and it’s working fine with the default numerical URLs. When I change the Permalink type to the 3rd one (textula URLs) all I get are 404 errors, even in the admin backoffice. What to do?
Thanks.
Dan
Can anyone point me at some instructions on how to create a bbPress theme that loosely matches the WordPress default (Kubrick) theme, i.e. 760 px wide with rounded page corners and space for a header image with rounded corners? Looking for a quick way to integrate bbPress so that it has the same look as the rest of my WordPress site.
What I meant by that is pretty-permalinks are not turned on by default.
i wonder if there’s bbpress plugin that can display graphical ranks (something like phpbb’s default stars under user’s nickname…)? if no – did anyone though about writing such plugin?
beernews: yes, that’s what pretty permalinks look like. Looks like the options in trunk are now:
None …/forums.php?id=1
Numeric …/forums/1
Name based …/forums/first-forum
It used to be “none, true, slugs” which correspond to the above options in order. I’m not sure if they’re on by default when you install the latest version. There was talk of creating the mod_rewrite rules automatically when turning permalinks on (like WordPress does right now), but I’m not sure if that happens automatically or not yet.
But, with name based (the old slugs option) I think the links would be pretty good for SEO. The slugs might still contain stop words or otherwise be too long, but, they’re still pretty good.
Looking into this now but your comment confuses me, Chris. Isn’t pretty permalinks on by default (even though the admin indicates that it is not in the options).
Is this not pretty permalinks?
Is bbpress SEO friendly???
Wouldnt it say https://bbpress.org/forums/topic/#thread-2342 or something like that if they weren’t on?
meitershaker – In theory, the principle that worked for Adding default Gravatars to WP 2.6 should work for bbPress.
Haven’t tested it yet.
@ctsttom – In order for a user that was registered in WordPress to have any authority in bbPress, they need to have the option ‘bb_capabilities’ in their user metadata. This does not have anything to do with the role maps in bbPress. Those role maps only affect users that are registered within bbPress that need to have capabilities inside WordPress. I think you are having the same problem that I had – you need to go the other direction. You need a default capability in bbPress for a new user registration in WPMU.
There are two ways to do this:
1) go to your bbPress admin panel, drill into each new user that was registered in WordPress, edit their profile, and assign them a ‘User Type’
2) use my shiny new WordPress plugin that creates a default capability of ‘member’ in bbPress for users that are registered in WordPress
https://bbpress.org/plugins/topic/wpmu-enable-bbpress-capabilities/
I would be interested in any feedback you have. There are two caveats to this plugin:
1) it does not handle any users registered in WordPress that existed before the plugin was activated, you’ll have to do that manually (but you get the idea and could handle this with a mass SQL)
2) there is no logic to determine which bbPress User Type to use, I just start with ‘member’ and assume that I’ll manually set admins/moderators, and further that everyone with a login should be able to post.
Let me know what you think!