I use this to stop people accessing the profile page unless logged-in;
<?php if ( !bb_is_user_logged_in() ) {
show_error_page('log-in to access profiles');
exit;
} ?>
Something along those line should work with a link to somewhere else, assuming they’re in a bbPress page to begin with.
This is probably possible through a custom plugin. But you probably want to ask over at the Buddypress forums…
Is there a way to have the top navigation bar from BuddyPress (that shows My Account, Notifcations, etc.) also show when using the bbPress forum? It seems this makes sense if there were really integration between bbPress and BuddyPress.
Thanks
I’m trying to figure out how to verify a user is logged into BBpress before granting access on a non-bbpress page.
I’m currently trying to use: bb_auth() with limited success. It seems there are a lot of includes necessary. Is there a single file I can include that will load all of the mandatory functions for bb_auth?
Hi everyone,
I want to disable HTML codes in posts. I am using “BBcode Lite for bbPress” and I dont need html codes to edit my post. When my member want to add a HTML code that is useful to forums the code works and havent seen properly. How can I disable?
Now I get an odd behavior:
– if the user logs in inside WP, he appears logged in in both WP and BB, but he can’t post in BB. If he has admin rights, he can’t see bb-admin.
– if the user logs in inside BB, everything works ok in both WP and BB.
So I redirected all logins to BB.
In mu-plugins I added the following:
function rk_login_redirect() {
if (strpos($_SERVER['REQUEST_URI'], 'wp-login.php') !== false && $_GET['action'] != 'logout' ) {
$url = 'http://foros.ryuuko.cl/bb-login.php';
$redirect = urlencode(wp_get_referer());
$url = add_query_arg('redirect_to', $redirect, $url);
wp_redirect($url);
}
}
add_action('init', 'rk_login_redirect');
In a plugin in my-plugins I added:
add_filter('wp_redirect', 'rk_redirect_location');
function rk_redirect_location($location, $status = 302) {
$arr = array();
$ref = wp_get_referer();
$url_array = parse_url($ref);
parse_str($url_array['query'], $arr);
if (isset($arr['redirect_to']) && !empty($arr['redirect_to'])) {
$url = urldecode($arr['redirect_to']);
$url_array = parse_url($url);
if (strpos($url_array['host'], 'ryuuko.cl') !== false)
$location = $url;
}
return $location;
}
Quick answer as I’m here at the moment Andy. Yes, you can have both running at the same time, and integrated to use the same user log-in details as far as I can tell (I just use bbPress stand-alone, having no use for WordPress at the moment).
Have a read through the forum sections; there are tons of questions and answers under ‘integration’.
I’m looking for a solution to my problem, and not sure if this could be it.
At the moment I have my website on WordPress and I’ve been needing a forum board for users. But I’ve had to have it so you have a account with proboards and a seperate account with WordPress for the main website.
I want it so you have one account for both of them. While being able to comment on the boards and contribute on the main website.
will bbPress allow me to do this? If not, what will?
Thanks in advance
-Andy
I think maybe it’s a bug? The code at line 657 is:
return sprintf('<img src="$1%ssupport-forum-$2%s.png" alt="[$3%s]" title="[$3%s]" style="vertical-align:top; margin-right:0.3em; width:14px; height:14px; border-width:0;" />$4%s', $this->iconURI, 'sticky', __('sticky', 'support-forum'),$label);
Instead of $ 1 %
(added spaces so it’d render on bbpress) shouldn’t it be %1$
? c.f. http://us3.php.net/manual/en/function.sprintf.php
Likewise, replace all the other integers, e.g. it should be %2$.
Oddly, this function was changed in 3.0.2.
You can reverse the $ and % signs here and in the other function at line 680.
It’s a known bug with the plugin. There’s a patch posted on the plugin page, but it looks like it hasn’t been incorporated into the official distribution:
https://bbpress.org/plugins/topic/support-forum/page/3/#post-1565
i’ve installed on bbpress 1.0 rc-3 the fantastic plugin support forum version 3.0.6 but for sticky-important topic i’ve this error:
Warning: sprintf() [function.sprintf]: Too few arguments in /…/html/forums/my-plugins/support-forum/support-forum.php on line 657
Warning: sprintf() [function.sprintf]: Too few arguments in /…/html/forums/my-plugins/support-forum/support-forum.php on line 680
any idea why i’ve this problem? thanks for all the help
I don’t think there was a 404.php template until the 1.0 version. What did you do to create one and how did you expect it to work?
You could always do a custom error page with Apache and .htaccess, but I understand you wanting to create a 404.php template page (like WordPress and bbPress in the 1.0 series.)
If it doesn’t sound like a silly question… are you pointing the browser URL at the exact place you put the bbPress files?
I want to list the few tags that each topic has associated with it on the forum.php or front-page.php like how WordPress does with the_tags(), but not have the delete link or tags form. As it is right now I can’t find a function that will just list the topics tags outside of the topics.php, can someone help me please?
The new Freelance Switch bbPress forum is going live in 2 or 3 days and this is literally the last things that I need to do.
You have the latest stable bbPress then, 0.9.0.5? When you log in as keymaster, what version is shown at the bottom of the backend admin screens?
What is your database name and what is the table prefix from your bb_config.php?
I want to display a list of all the users on my blog (wbs80.com) and their profile information.
I have been looking at the bbpress code and trying several tests…but unfortunately without success.
My approach is to get the list of profile keys, get the list of users and for each user display the username and profile information. The code segment that I have is:
<?php
require_once (‘../../bb-load.php’);
global $bddb;
$profile_keys = get_profile_info_keys();
//print_r($profile_keys);
$userinfo = $bbdb->get_results(“SELECT * FROM $bbdb->users WHERE user_status = 0 ORDER BY ‘ID'”);
//print_r($userinfo);
foreach ($userinfo as $key) {
$metainfo = $bbdb->get_results(“SELECT * FROM $bbdb->usermeta WHERE user_id = $key->ID”);
// ???
}
?>
I don’t know how to use the “profile_keys” value(s) to access the “metainfo” data structure and extract the data.
Any help would be greatly appreciated!
This plugin should do something similar, and hopefully won’t give you any errors.
https://bbpress.org/plugins/topic/members-online/
I am using the latest bbpress i belive
and i have showavatar plugin enabled
it told me to put
<?php if(function_exists(‘pws_get_avatar’)) pws_get_avatar(); ?>
in post.php which i did, and the avatars started showing
but the database thing i do not get, i went to mysql admin and the database is their, and its bbph01
That table name looks wrong (based on the table name from the Simple Online List you posted in the other topic). What version of bbPress are you using and how are you getting the avatars to show? Plugin?
monstet5_bbp01.bb_online
Looks like monstet5_bbp01 is the database name, and bb_ is the table prefix, and online is the table name created by the Simple Online List?
If that’s the case there, how do you have an options table here with no table prefix, just a database name?
Unless you used bbp01.
as your table prefix instead of bbp01_
?
Also, can you get phpinfo() for your server? Just put this into a file and call it up in a browser:
<?php
phpinfo();
?>
If you save that as a file called info.php, you can load in your browser at http://www.example.com/info.php or http://www.example.com/bbpress/info.php depending on where you installed it.
Hi Sam,
Did the var_dump.
Here’s the result:
array(2) {
[0]=>
string(1) "2"
[1]=>
string(1) "1"
}
string(0) ""
[EDIT]
I should state that I forgot to clear the memcached service. How do I go about doing that?
bb_online looks like it’s from the Simple Online plugin?
https://bbpress.org/plugins/topic/simple-onlinelist/
If you deactivate the plugin, does the problem go away?
Shameless plug for a theme… I tried Vanilla for a while, along with everything else out there. I went for bbPress because everything worked or was easily modifiable (and I’m no PHP expert!)
I created a Vanilla-ish theme for bbPress as I loved its simplicity. You can get it it http://getfiles.letsdoo.org and see it in action (with restrictions) at http://mbforum.letsdoo.org.
I’m using “Human Test for bbPress” with RC3 and it’s working perfectly, spam bots has been stopped.