Forum Replies Created
-
In reply to: Some questions about BuddyPress friendships
Sorry we couldn’t be of more help. I am really perplexed about your situation. There must be a conflict with something else in your setup, as I have never heard of this kind of problem before. If you ever feel like sharing the code you wrote to replace it, feel free.
In reply to: Get member ID when viewing member pageTry `query_posts( ‘author=’ . $bp->displayed_user->id )`
Do you have a link and maybe a dummy login? If it’s a js/css problem, it shouldn’t be too hard to figure out from the front end.
In reply to: My 2 Cents1. If you don’t want the nav bar, you can suppress it with the following line in your wp-config.php file:
`define( ‘BP_DISABLE_ADMIN_BAR’, true );`
or you can manually unhook it with the following lines in your theme’s functions.php:
`remove_action( ‘wp_footer’, ‘bp_core_admin_bar’, 8 );
remove_action( ‘admin_footer’, ‘bp_core_admin_bar’ );`
No need to hack anything.2. A vanilla installation of BP, using the default theme, loads one stylesheet: style.css. That stylesheet includes two others: _inc/css/default.css and _inc/css/adminbar.css. There is also a stylesheet for the Dashboard view. If you are using the template pack and are finding too many stylesheets, it’s possible that your WP theme is to blame. In this respect, BP is being fairly austere in the number of CSS files it’s loading. If you want to override things, there’s no reason to “hack” – just put your own overriding styles after the import commands in style.css.
3. This is a great idea, I think. Perhaps you could file a formal enhancement request at trac.buddypress.org (same username/pw as this site)
4. The way that the default theme handles profile, activity, friends etc separately, provides a large amount of straightforward customization in child themes. If bp-default had them consolidated, child theme authors would have to rebuild the pages to make them separate. We are erring on the side of enhanceability. You are welcome to build a child theme that incorporates these parts of the profile into a single page – I bet a fair number of people would be interested in such a thing.
In reply to: Some questions about BuddyPress friendshipsI doubt it’s a problem with prepare() itself, since that method is used on nearly every query in BuddyPress and I have never heard of this problem before.
It could be the case that $loggedin_userid and $possible_friend_userid are improperly cast. Try switching %d with %s in check_is_friend() and see what happens.
In reply to: Some questions about BuddyPress friendshipsI realize that the query is with 0s. That is the problem. I am suggesting that even though you are “sure 100%” that you are passing the correct IDs to the function, the way that you are concatenating the query string might be corrupting it.
In any case, I am confused about what’s actually failing here. Are you using the function BP_Friends_Friendship::check_is_friend(), or are you writing your own function? If the former, change the `$result = ` line to the following
`$query = $wpdb->prepare( “SELECT id, is_confirmed FROM {$bp->friends->table_name} WHERE (initiator_user_id = %d AND friend_user_id = %d) OR (initiator_user_id = %d AND friend_user_id = %d)”, $loggedin_userid, $possible_friend_userid, $possible_friend_userid, $loggedin_userid );
print_r( $query );
$result = $wpdb->get_results( $query );`
so that you can see if the query is being put together correctly. If not, dump the contents of $loggedin_userid and $possible_friend_userid just before these lines to see if you are, in fact, passing values to the function.Off the top of my head, it could be that the theme author did not include the proper WP hooks in that particular template (wp_head) so that the stylesheet isn’t loading correctly. Or maybe something in the crop javascript is keeping styles on the rest of the page from being activated. It’s hard to tell without actually seeing the site. Have you tested to see whether the problem persists when using the BuddyPress Default theme?
In reply to: Some questions about BuddyPress friendshipsIf the last query reads 0s where there should be valid ids, you are probably not constructing the query correctly. Are you using $wpdb->prepare, with sprintf syntax?
`$query = $wpdb->prepare( ‘SELECT id, is_confirmed FROM {$bp->friends->table_name} WHERE (initiator_user_id = %d AND friend_user_id = %d) OR (initiator_user_id = %d AND friend_user_id = %d)’, $initiator_user_id, $friend_user_id, $initiator_user_id, $friend_user_id );`(I’m not sure if this is your exact query, but you get the idea.)
If it still isn’t working, then as an experiment, try passing the prepare() arguments as strings – replace %d with %s in the replacement patterns.
I suggest you dump your variables/query string just before AND just after the query is constructed in this manner, to see whether prepare() is causing the problem.
In reply to: Only Admin Account can Login to BuddypressAre you trying with different browsers? Maybe the cookies are not being flushed correctly
Happens to the best of us 
OK, I get why you might want BP_ENABLE_MULTIBLOG now. My bad.
I just did a test on a local installation and registration on subsites seemed to work fine – no redirects. Maybe I’m missing something? Here’s what I did:
1) enabled BP_ENABLE_MULTIBLOG in wp-config.php
2) created a secondary blog and enabled bp-default on that blog
3) Visited the secondary blog as a non-logged-in user
4) Clicked on “create an account” just above the login box (example.com/subsite/register)
5) The registration page loaded correctly – no redirect to the main blog. I filled out the registration info and submitted
6) Got an activation email and successfully activated my accountIs it possible that this is a theme issue? Do the BP themes that you are using for the portals have the necessary registration templates? (registration/activate.php and registration/register.php)
You’ll have to write a conditional in your theme’s groups/single/forum/topic.php that will echo ‘started’ when the post is the first one in the topic and otherwise says ‘replied’. You should be able to get the post’s position out of the $topic_template->topic global.
If you are using non-BP themes on subsites, then what is the purpose of having BP_ENABLE_MULTIBLOG enabled?
Please don’t bump your posts more than once every 24 hours.
You can remove the sidebar on individual group pages by modifying the groups/single/home.php template in your child theme. (If you don’t have a child theme, see https://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/) The sidebar file is included near the bottom – just delete those lines.
You can reduce the font using css. All groups pages have the body class “groups”, which should make it pretty easy to specify that you only want to change font sizes on those pages.
Do you have the following line in your wp-config.php or bp-custom.php?
`define( ‘BP_ENABLE_MULTIBLOG’, true );`If so, I suggest you comment it out:
`// define( ‘BP_ENABLE_MULTIBLOG’, true );`BP multiblog mode is only necessary if you want to have BP content (like members profiles, etc) available on all subsites. Regular WP multisite use does not require BP_ENABLE_MULTIBLOG.
If you absolutely need the BP_ENABLE_MULTIBLOG functionality, but you want to force all registration to happen on the main blog, then you will have to build your own redirects.
It sounds like you are trying to use BuddyPress with a version of WordPress less than 3.0. For a few months now, BuddyPress has required WP 3.0 or greater.
In your FTP client, navigate to the wp-content/plugins folder. Delete the buddypress folder. Then go to yoursite.com/wp-admin, and things should be back to life. You will have to upgrade to the latest WP before attempting to install BuddyPress again.
Same thing happened to me earlier tonight
In reply to: BuddyPress Alternative WP SymposiumI had a very brief look. It has the very big advantages of being easy to set up and integrate with one’s theme. It’ll be a nice choice for people who need something very quick and easy.
From a brief look, the code is written in such a way that doesn’t even make an attempt to be extensible for developers. In that sense it’s not even in the same league as BuddyPress.
I’m very glad to see that the market is fleshing out with fundamentally different kinds of solutions!
In reply to: BuddyPress Privacy: Can we get it in core?I agree 100% that some level of privacy control in the core is a very good idea. I’m just saying that the discussion about whether Jeff’s approach is right for the BP core is one that we can only have when the plugin is in our hands.
In reply to: BuddyPress Privacy: Can we get it in core?I guess so, but it’ll be much more productive if we wait until the community at large has had at least a week or two to play with it. Anything beyond that is speculation.
In reply to: BuddyPress Privacy: Can we get it in core?I think it can only be seriously discussed once we’ve seen the plugin. But certainly it is worth discussing.
In reply to: Adding meta data to activityKiller
In reply to: Adding meta data to activityI haven’t tested, but the addition of a function like the top one I’ve added here should do the trick:
http://pastebin.com/De0Ka1u7You’ll need a corresponding function to delete that activity meta.
In reply to: Adding meta data to activityI don’t see anything in your code that would actually save the activity metadata. Maybe you forgot to paste it in the pastebin? Where are the functions activity_remove_user_promoted() and activity_add_user_promoted() defined?