Oh wait, here’s the broken part in bb-settings.php
do_action('bb_init', '');
if ( bb_is_user_logged_in() && bb_has_broken_pass() )
bb_block_current_user();
I don’t see how a user could both be logged in AND have a broken password. If their password is broken, they can’t login.
This might have broken during the radical password/cookie changes in >0.8
I opened a TRAC ticket
https://trac.bbpress.org/ticket/899
Block may never have worked like one would think.
I think it just treats them like “bozo” status.
It gives them the capability of “not_play_nice” = true
hmm actually…
function bb_block_current_user() {
global $bbdb;
if ( $id = bb_get_current_user_info( 'id' ) )
bb_update_usermeta( $id, $bbdb->prefix . 'been_blocked', 1 ); // Just for logging.
bb_die(__("You've been blocked. If you think a mistake has been made, contact this site's administrator."));
}
function bb_reset_password( $key ) {
global $bbdb;
$key = sanitize_user( $key );
if ( empty( $key ) )
bb_die(__('Key not found.'));
if ( !$user_id = $bbdb->get_var( $bbdb->prepare( "SELECT user_id FROM $bbdb->usermeta WHERE meta_key = 'newpwdkey' AND meta_value = %s", $key ) ) )
bb_die(__('Key not found.'));
if ( $user = new BB_User( $user_id ) ) :
if ( bb_has_broken_pass( $user->ID ) )
bb_block_current_user();
if ( !$user->has_cap( 'change_user_password', $user->ID ) )
bb_die( __('You are not allowed to change your password.') );
.
According to all that, their password should be scrambled and they should be unable to reset it – so they can’t log in.
But you can’t stop them from seeing the website.
There’s no IP based blocking (yet) in bbPress.
To really block an IP, you’d have to go into htaccess and add a “deny from” – at least for now.
I guess someone could write a plugin to block the IP of blocked users, perhaps for 48 hours or so. Since bbPress doesn’t store the last login IP for users by default, this makes it difficult, the plugin would have to start storing IPs on every login.
Right under the place roles are changed is the text:
Inactive users can login and look around but not do anything. Blocked users just see a simple error message when they visit the site.
However, when I made a test account and marked it as blocked, I could still log in with the account and there was no error message.
Why is this a problem and how can I fix this?
P.S. I tried this on a test install of trunk and a test install of 0.9.0.2, both gave the same result.
Edit: I just found out that blocking breaks passwords reversably, and only gives an error message if the user is already logged in.
Try this:
$this->random_state = microtime() . uniqid(rand(), true);
The warning is telling you the uniqid needs at least one parameter, so you should give it one.
http://us2.php.net/uniqid
I thought maybe the $ needed to be encoded, but it does not:
http://www.ietf.org/rfc/rfc1738.txt
Thus, only alphanumerics, the special characters
"$-_.+!*'(),", and reserved characters used for their
reserved purposes may be used unencoded within a URL.
So, it’s valid. Interesting.
cordoval, make this into a plugin:
//add target=_blank to post links
function bb_target_blank( $text ) {
$text = preg_replace('|<a (.+?)>|i', '<a $1 target="_blank">', $text);
return $text;
}
add_filter('pre_post', 'bb_target_blank');
Dollar sign might have to be urlencoded? Also you can integrate bbPress 0.9 with older versions of WordPress using these instructions:
https://bbpress.org/forums/topic/how-to-integrate-bbpress-09-with-wordpress-23-or-lower
771868Inactive
Hello,
I have a problem with links like this:
http://www.forestry.gov.uk/PDF/fcpn9.pdf/$FILE/fcpn9.pdf
In case it’s been stripped out here as well, there ought to be a dollar sign before FILE. It’s in the db, so it’s being taken out on output.
I’m probably being a bit simple, but I couldn’t find the code that was doing this – I’d guess it’s something on the post_text filter.
I’m using WordPress 0.8.3.1 with the bbPress integration and WordPress Integration plugins. I would upgrade, but I don’t want to use WordPress 2.5 yet.
Thanks, Mike.
O.K … thank you for your information … I’ve searched a lot and try to modify for myself the search function … but as you say it is not simple to do … so I hope for the future
– Thank you.
I uploaded that code to a test installation I have and it appears to work fine. Check it out:
http://riversideinfo.org/bbpress-0902/
Not yet. They may one day import the code from WordPress or eventually BackPress may solve the issue.
I’ve never used it but from what I can tell BuddyPress is more like LiveJournal than a forum based system where there are community blogs. It doesn’t actually have forum code.
767427Inactive
Nevermind, saw the fix in the trac. Nice job Nightgunner
767427Inactive
Fantastic! Can’t wait to see it Nightgunner
It’s true! Trunk does 
“would you be able to go into a category and see posts from all the sub-forums like a latest discussions list but limited to those few forums?”
Yes, as well as a listing of forums in that category.
I just put the code on a test site and it works for me.
Sub forums show, but not sub sub forums.
You used http://pastebin.com/m3cef6607 ???
The sub sub forums you are seeing are indented?
Make sure you uploaded and are using the correct file.
For reference, I just ran across this as well:
http://www.w3.org/TR/xhtml1/#prohibitions
form
must not contain other form elements.
755628Inactive
Hi,
Now the subforums’ subforums show, but along with the subforums. It displays just like the original forum.php now.
chrishajer, _ck_,
I’ll take a look at the templates. I’ve only just inherited the system, so I have no idea how it was setup.
Thanks for the help
Guy
EDIT: Yep, removing the nested form does the trick. I should have checked out the source code before bothering you, sorry. Thanks again for the help.
Hang on while I double check the code, apparently I guessed wrong somewhere or missed something.
update: perhaps it’s because $forum is not declared as a global in the template when when it loops through the forums it doesn’t see the changed parent.
Try this update:
http://pastebin.com/m3cef6607
Take a look at this source.
<form id='tag-form' method='post' action='http://support.westciv.com/tag-add.php'><fieldset>
<form method="post" action="http://support.westciv.com/tag-add.php">
<input name="tag" type="text" id="tag" size="10" maxlength="30" />
<input type="hidden" name="id" value="354" />
<input type="submit" name="Submit" id="tagformsub" value="Add" />
</form>
<input type="hidden" name="_wpnonce" value="907a29b341" /><input type="hidden" name="_wp_http_referer" value="/topic.php?id=354" /></fieldset></form>
I don’t think bbPress normally has a form within a form for adding a tag. Not sure if that’s a problem or not, but the hidden fields for_wpnonce and _wp_http_referer are outside the first form tag: maybe FF can handle it but other browsers cannot?
More data. Here is the request to add a tag when using FF3:
cookie=bbpress_a2763cd41fe17b461fa952334e00e45c%3Dchrishajer%257C1216783299%257Cb630b90e0e5d52cf8499cfbe58629223&action=add-tag&tag=style.css&id=350&Submit=Add&_wpnonce=bd6cc486c3&_wp_http_referer=%2Ftopic.php%3Fid%3D350&topic_id=350&_=
Here is the same request when using IE7:
tag=style.css&id=354&Submit=Add
FF3 works, IE7 does not.
Another data point: I was able to remove and add tags in FF3 but not with IE7. This is the failure message:
Your attempt to add this tag to this topic has failed.
The error messages are all found in bb-includes/functions.php starting at line 2320 (just so you can see what should fail and what message should be shown.)
In both IE7 and FF3, I get this error when trying to edit my profile:
Your attempt to edit this user's profile has failed
No difference between the two browsers, both fail.
755628Inactive
The code that was on my original forum.php is
http://pastebin.com/m3c1eab2b
_ck_’s version that I tried using (it didn’t pop up any forums at all when I tried it) is
http://pastebin.com/m6e93abf8