Hi im trying to do a check on a xprofile field “Gender” as i want to have a different default avatar depending on whether the user is male or female, i have the following code which doesnt seem to work (it displays female avatar for both).
Im guessing you cant check xprofile feilds like this in bp-custom.php, can anyone point me in the right direction on how i can accomplish this?
Thanks in adavnce for any help.
Regards
Tony
`function myavatar_add_default_avatar( $url )
{
global $bp;
if (bp_get_profile_field_data(‘field=Gender’) === “Male”) :
return get_stylesheet_directory_uri() .’/_inc/images/default_avatar_male.jpg’;
else:
return get_stylesheet_directory_uri() .’/_inc/images/default_avatar_female.jpg’;
endif;
}
add_filter( ‘bp_core_mysteryman_src’, ‘myavatar_add_default_avatar’ );`
I’m dealing with a very similar scenario. I have a similar amount of traffic, and will get some unexplained spikes in memory usage that take my server down.
It’s pretty much impossible to diagnose the problem in development, as it really seems to be tied to our peak traffic times.
Does anyone have any good direction they can point me for simulating load?
Good idea with the wp-cache concept. My database traffic doesn’t seem to be dreadful, but it couldn’t hurt to back-off on the queries.
Plugins are:
Akismet
AudioPlayer
BuddyPress
BuddyPress Profile Privacy
Featured Content Gallery
MagicFields
Gravity Forms
WP-FB-Autoconnect
Hi guys,
I LOVE the plugin, BP -Profile search.
It enables you to search for members across any number of profile fields and goes far beyond the normal search capabilities for BP.
The only thing is, on my site the search form is very large and takes up too much space.
See http://www.actonthis.co/members/
Is there anyway to control this form by ajax so that you click a button and then the form drops down? It would be exactly like posting a forum topic or creating a group from the forum or group directory so I know it’s possible, but i don’t know how to code it.
Does anyone know how to do this or indeed are willing to do it if we can get some funds together from the users of this plugin?
THANKS! 
I fixed most of mine by adding a few fields in the Profile Field Setup. I added City, State ( as a dropdown menu and a zipcode. I got rid of 70% just from this. also, I have seen in my log files they are searching for
“yes i d like to create a new blog”
“registering for this site is easy just fill in the fields below and we ll get a new account set up for you in no time yes i d like to create a new blog”
“intext yes i d like to create a new blog blog with wordpress inurl register”
“i d like to create a new blog”
maybe someone can tell us where this text lives so we can remove these tags from the search engines. just by this they are able to see all wordpress sites. I tried it with google and it does work.
There are 2 Blog topic plugins that I’ve seen for categorizing blogs…wpmudev’s Blog Types and the other Blog Topics. Can anyone give feedback, tips, helpful links, on applying either of these to a BP Multisite network. I’m trying to go the best way when it comes grouping, filtering, querying by Blog Type, (ex. get all posts from Lifestyle blogs. )
I’ve also tinkered with using the xprofile fields to group by blog since I only allow one blog per person…I can tie the xprofile category dropdown to the users blog. I’ve seen the forum threads around here about creating profile types and that sounds like an option but would be tougher since it’s on the back of profiles.
I also mentioned in an old thread that it would be nice to have the bp blogs component/directory function as the groups component does, and every blog have a “group-like” profile with its own activity stream and members,etc. So I guess that would even be a 4th option…and what i would consider the best option.
Anyway just looking to see if anyone can offer up some experience.
Hi Guys,
I am pretty new to php so perhaps one of you can help me out?
I’m trying to display custom profile fields site-wide.
I have added the following code to functions.php:
`
function get_user_type( $user_id ) {
global $bp;
$user_id = $bp->loggedin_user->user_id;
$isMember = xprofile_get_field_data( ‘Type’, $user_id );
return $isMember;
}
`
and the following to sidebar.php “eventually I want to add it to the bp-groups index.php, but the sidebar makes a nice site-wide test” :
`
global $bp;
$user_id = $bp->loggedin_user->user_id;
echo get_user_type( $user_id )
`
Thus far the sidebar only displays data on the profile page. Is this because I am using xprofile_get_field_data? And what should I do to use it sitewide?
Thanks in advance! GooseNL
It seems only happen on BuddyPress 1.2.6. Because after I upgrade to 1.2.6, the custom profile on my site disappeared.
Is this a bug?
I’m having the same problem. I added first and last name fields and it worked. After that, any additional fields I add don’t save or show.
After searching Google for hours I found your post, and was happy at least someone had the same issue.
Have you found a solution?
–> I found the same file and I have exactly the same issue –> and even though I added a text on my registration page right after that profile field to please add the http:// , many users still just type in www
–> hence their website link becomes a mixture of my mainblog and their address and their link doesn’t work, due to the this part I guess
in the “else” where the Members Slug is added. (I was thinking of just removing it, but I’m not sure)
I am not a developer and on my journey I found a solution in order to get rid of all profile links which didn’t make sense either but the issue with the website still remains. Maybe you found a solution and you can share it? I’d be really thankful.
Here is what I found in order to get rid of the profile links, thanks to Jeff Sayre:
1) add a file named bp-custom.php just to your plugins folder
2 ) with the content that I can’t insert here unfortunately but from the first post of Jeff Sayre on this link:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-get-rid-of-autolinking-on-profile-fields/?topic_page=2&num=15
That did it for me!
Bye
Sanny
Hi guys,
I have been developing a social community portal for myself and my friends. Everything was working perfectly till yesterday. But suddenly something went wrong and profile link, Edit link, change avtar link stopped working. They all started redirecting to home page.
I have added some custom fields to registration and changed base profile group name. I am not sure what else would be causing this error. I am using latest version of wordpress and was using olde version of buddypress but after this problem there was a suggestion about upgrading buddypress. I did so still the problem persists.
Please guide me what could be the problem. I have searched through the forum but i havent found any solution for this problem as such.
Regards,
Sam.
Thanks for the response, @nahummadrid.
I’m actually thinking about some data that the users wouldn’t input, but rather that would be generated by another process and linked to their account. I thought the profile would be an idea place to include that info.
you could try this https://buddypress.org/community/groups/bp-profile-privacy/ and set those two fields for just user view. I mean if you really don’t want user themselves to see something they’ve inputted I guess you could use CSS to display:none for that field.(thats not the best way) but I would want to know where information I input went to,
so in those 2 fields description you can say this is only visible to them from the profile page.
Hi, all. Sorry for the duplicate post. Realized that I put this in the wrong forum originally and don’t know how to delete that one.
Total BuddyPress noob here, so sorry if this is somewhere in the docs that I haven’t seen.
I’d like to create a couple of fields for all users that would never been visible, either to them or anybody else. Pretty much need to just store a couple bits of data for each user to drive another process. Can’t seem to figure out how to do this, though.
I saw this old forum post (http://buddypress.org/community/groups/requests-feedback/forum/topic/hidden-profile-fields/), but it was from nearly 2 years ago and I wasn’t sure if it was applicable at this point.
Any ideas?
Thanks.
Hi, all.
Total BuddyPress noob here, so sorry if this is somewhere in the docs that I haven’t seen.
I’d like to create a couple of fields for all users that would never been visible, either to them or anybody else. Pretty much need to just store a couple bits of data for each user to drive another process. Can’t seem to figure out how to do this, though.
I saw this old forum post (http://buddypress.org/community/groups/requests-feedback/forum/topic/hidden-profile-fields/), but it was from nearly 2 years ago and I wasn’t sure if it was applicable at this point.
Any ideas?
Thanks.
i’ve been using groups for this sort of thing. it would be cool to have xprofile fields for groups. a plugin perhaps.
it’s possible and I am sort of working on something like this but when I say working managing to map out all the problems I hadn’t envisaged. At the moment there is a manual-ish approach that can be taken where one (admin) can set profile fields check boxes that correspond to existing post tags, user makes a selection of the tags that interest them and then a post loop is run against the user id and the tags they have selected and posts displayed, I wanted to try and take that further and make it less manual but I may try to run up the widget first then try and build the rest around it
Hi, nice plugin, do you think it would be appropriate to use as a solution to the following:
I am using the “More fields” plugin to add some checkboxes to posts. These checkboxes will allow a post to be associated with genre of book.
I am also using buddypress. When a user registers I want to be able to give the user the option to choose which book genres they are most interested in, and then save it into their profile info. These genres obviously have to be the same as the genres which i am tagging my posts as (the custom field ive created in more fields).
Can anyone think of a way I can allow users to choose which genres (multiple checkboxes) they are interested in. I could of course create a profile field containing the book genres in the “profile field setup”, but then they wouldnt be the same as the checkboxes im using to “tag” posts with and therefore id be maintaining two sets of data which are in no way linked and would be useless for reporting purposes.
Thanks for any help, it would be much appreciated.
Hi beraike22
Thanks for this, unfortunately it doesnt really solve the problem. What this will do is allow users to register to a group on signup.
I want to store metadata in a users profile taken from a pre-populated custom field. So that I can use the same custom field to tag posts and therefore establishing a link between users and posts. So if a user says they are interested in science fiction books, then in theory I could present a list of pages tagged with science fiction can be displayed, etc,.. the dispalying isnt the hard part, its creating the metadata which is consistant throughout posts and users.
Thanks for your help
I’ve encounter the same requirements for a profile field to be editable only by admin that is non-editable by suscribers.
Someone could eventually commit a small plugin that allows this sort of administrative tagging.
Outside of buddypress perspective, I end up using wp_usermeta database table with a call to add_user_meta($user_id, $meta_key, $meta_value [, $unique] ) and when i need the info stored i use get_currentuserinfo()
references :
https://codex.wordpress.org/Function_Reference/add_user_meta
https://codex.wordpress.org/Function_Reference/get_currentuserinfo
Sure. I called xprofile_insert_field() passing in an array with all of the necessary parameters and when I reloaded the page I got “Fatal error: Call to undefined function xprofile_insert_field()”.
Jeff, what’s the solution then? Or how do we prevent this in the future? I read the ticket, but I’m at a loss. I’m encountering this problem right now, and I had to go into phpmyadmin to correct all the user_nicename fields to remove the -2 at the end. do we simply ask people not to put spaces in their usernames?
Im still struggling to find a suitable solution to this, any ideas?
Thanks
Can you elaborate on “it crashed the site”, please?
Hey.. Ilyarogov and I are both work on the same project.
To clarify, we are creating a plugin. We will not be using the back-end as fields would be created dynamically on plugin installation.
Thanks