Forum Replies Created
-
I tested the code snippet in that template using the WP 2013 theme.
And it works as expected.So something else is going on.
You might try using pastebin to share all the code on that page, then share the link here.Those notices are about bbpress, not buddypress.
Try asking on the bbpress support forums.As I said, the problem is in those files.
Again… If you switch themes to a WP theme like 2013, do you still get those errors?
If you do, paste the errors in your reply.Then the problem is in those files.
There is no column ‘spam’, the column name is ‘is_spam’.If you switch themes to a WP theme like 2013, do you still get those errors?
Are you putting this code in the members-loop.php template?
Are you putting it in the designated area?
Look for this text: ‘If you want to show specific profile fields here you can,…’Try:
$data = bp_member_profile_data( 'field=Current Location' ); if( $data != false ) echo $data;Are you using a custom theme?
Try switching to a theme like WP Twenty Thirteen and see if the problem persists.Do you have any functions in plugins/bp-custom.php, if it exists.
In reply to: Need Help Setting up a new buddy press siteGoggle ‘wordpress membership plugin’.
There are several plugins that will allow you to set membership levels and assign members to them.This could be done, but it will require much more than a code snippet.
You’ll have to duplicate all the activity comment code for php, js & html.
Take a look at:
buddypress\bp-templates\bp-legacy\buddypress\activity\comment.php
to get an idea of what is involved.In reply to: Problems with "loggedin_user_id()" in code>my php-file doesn’t accept any WP ore bp functions
Why are you trying to load it outside WP?
Write your code as a BP plugin.
Sometimes it’s much easier to just write a custom query.
See: wpdbIn reply to: Register Page RedirectBecause you’re using a custom register page, you’re probably being redirected by WP rather than BP.
We don’t know what is on that custom page.
So figure out what WP does re logged-in visits to a register page.In reply to: Problems with "loggedin_user_id()" in codeUse WP to get the id:
get_current_user_id();Or avoid calling the bp global and use
bp_loggedin_user_id()In reply to: No option to Select who sees Name in Profile FieldTake a look at the post by henrywright on this page.
In reply to: No Idea how Buddy Press worksThere are plugins like Activity Plus that allow embedding things like a uTube link in the activity page on a member’s profile.
There are several pages in a member’s profile, including a profile page that has data describing that member. There ways to allow for what you want, but it would require some custom coding, iow. not an option out of the box, afaik.
In reply to: No option to Select who sees Name in Profile FieldWhen you say ‘Name appears in the Buddypress list’, by ‘list’ you mean the yoursite.com/members page?
The name field is how a member is identified, so it’s used in many places on many pages in BP.
Do you mean that you don’t want certain members to appear anywhere on the site ?
There are ways to make certain members only visible to site administrators, but it requires custom code.Accepted:
Use the do_action hook in function friends_accept_friendship in this file:
buddypress\buddypress\bp-friends\bp-friends-functions.phpfunction my_accepted_function( $id, $user_id, $friend_id, $friendship ) { // do something } add_action(''friends_friendship_accepted', 'my_accepted_function', 1, 4 );Removed:
Use one of the 3 do_action hooks in function friends_remove_friend in this file:
buddypress\buddypress\bp-friends\bp-friends-functions.phpWhich hook you use depends on what you want to do.
Create a separate function to hook to; something like ‘my_remove_function’.In reply to: 2.0.2 install troubleAre you sure you have the profile component activated?
If you do, then it’s a load order issue.
You’re calling the function before BP is fully loaded.Try moving that code into bp-custom.php.
If that doesn’t work, use pastebin or gist to share the code where you use xprofile_get_field_data, especially the action or filter hook.
In reply to: 2.0.2 install troubleI don’t see a function or function call for ‘wp_bp_xprofile_field_data’ in BP 2.0.2.
Can you provide the full error message?
And info about where / how you saw it?In reply to: Customize Request Membership TabTry this in your theme/functions.php or plugins/bp-custom.php
function demonja_group_requests( $request ) { $request = str_replace(array("\r\n", "\r", "\n"), "<br/>", $request); return '<br/>' . $request; } add_filter( 'bp_group_request_comment', 'demonja_group_requests', 1, 1 );I’m still not clear on what you’re trying to do.
Those hooks should provide a starting point.
But adding profile fields dynamically and adding/setting dynamic values to existing fields are 2 different things.See:
buddypress\bp-xprofile\bp-xprofile-admin.php
re adding adding profile fields dynamically.The latter item should be quite straightforward.
Then, as you point out, there is the lamentable difference between field handling in reg and profile.
In reply to: Customize Request Membership TabThe template is here:
buddypress\bp-templates\bp-legacy\buddypress\groups\single\request-membership.phpI don’t know of any plugins that handle customizing that area.
> Is there an easy way to customize this tab?
Easy?
Yes, fairly easy, if you have some skills as a WP / BP developer.You could write a new component.
But I usually just create a plugin.
Use bp_core_new_nav_item() and bp_core_new_subnav_item() to add tabs to a profile.Then use the ‘screen_function’ field to call functions that handle CRUD, etc for your cpt.
Re xprofile vs. usermeta, that’s your call. Either would work.In reply to: Ok Im Completely Lost Need Help PleaseI haven’t tried that plugin, but your assumptions seem logical.
Only way to find out is to try it.In reply to: Ok Im Completely Lost Need Help Please