Search Results for 'profile fields'
-
Search Results
-
Wordpress version 3.8, Buddypress 1.9, bbPress 2.5.1, Website: bekindtodogs.com
I am testing out the register page and my testers are all telling me they can’t get past the register page. They enter their info, do the spam test, and then it just loops back to Registration without moving on to the next step.
I am thinking there is something I need to do with my Activate page. I have a page called Activate, which is set in the Buddypress settings, but that page doesn’t have any bbPress Template like the Register page does. Isn’t there supposed to be a bbPress Activate Template?
I deactivated the plugins “Are You A Human?” and “Buddypress Xprofile Custom Fields Type” but that didn’t seem to matter.
Please help!
I’m getting a strange error while the code seem to be working fine.
” Missing argument 2 for wpdb::prepare() “
I’ve got Debug mode turned on in the config.php file and when I switch this mode off the error is gone but and everything is just working fine but I would like to know how bad this is.
The errors shows up when I was testing this.
<?php if ( bp_has_profile( array ( 'exclude_fields' => 15, 'exclude_groups' => 2 ) ) ) : ?>Is it bad coding to export all profile fields by a conditional tag instead of the default profile loop ?
Something like this..
<?php if ( $data = bp_get_profile_field_data( 'field=Country ' ) ) : ?> <div class="profile_fields"> Â Â Â Â Â Â Â Â Â Country: <span><a href="..../?s=<?php echo $data ?>" title="<?php echo $data ?>"> <?php echo $data ?></a></span> </div> <?php endif ?>This would give me ultimate control about the CSS and layout front-end of each field but how bad is it for performance of the site ?
Topic: How to Admin custom fields
I have custom fields, e.g. graduation year. The fields show up properly and the user can use profile / edit to go back in and correct data. But as Admin, how can I edit existing records for these non-standard fields? If I go into “All Members” I only see the base WordPress fields and not the custom fields. Have I missed setting up something that would allow me to edit this data? Thank you.
Topic: Comprehensive Member Search
Hey Guys,
Ok so I would have thought I’d have found something about this as it seems a pretty obvious addition to already awesome plugin.
I’m looking to allow my member to search one another, but not only by username, but also by profile fields, location etc.
I know there was once upon a time a plugin called member search, but I don’t know it’s status and I’m wondering if buddypress has yet implemented something inhouse?
any guidance on this would be awesome.
thanks guys
Hi all. Wanted to see if anyone had any ideas for these functions I need or if I need to code them in myself.
1. I need to be able to add child item/person profiles of sorts. So, using a child as an example, I would first create a new child (not literally) and then there would be profile fields I could add for it.
So there is me: Craigola
Then under me and showing up on my profile page would be
Child 1 – Age 89 Hobbies: Kittens, pickles, long parks in the walk.
Child 2 – Age 2 Hobbies: Turtles, Baba Ganouch,I could add photos of said children as well.
Any idears?
Thanks!
Craig
This topic has been always important to my community project. Throughout the last 4 years I’ve tried several ways to reach a way working with different user profiles. If you search the forums you’ll see that others also did and still do.
Maybe my approach/solution will fit some of the requests.
First of all, I’ve to say THANK YOU to the following people/users:@henrywright-1 for some hints into the right direction
donmik, publisher of the wonderful Buddypress Xprofile Custom Fields Type plugin
and Brajesh Singh @sbrajesh for his usefull code snippets.So, what I needed and what was the solution?
I’m working on a platform for musicians and music fans. To give both usertypes different capabilities in their profiles I decided to give them different user roles.
To achive this, there are several wordpress plugins. Below you will find a list of the plugins I use.
In earlier versions of Buddypress I’ve used the WP Roles at Registration plugin together with Buddypress xProfiles ACL plugin. So I had the possibility to make the user chose a role at registration and a way to define what buddypress profile groups are shown in the different profile types. Both plugins haven’t been updated in the last two years but both still work. xProfiles ACL needs to be hacked – see this support thread .So far so good. But there is no way to include the user role (in my case “band” and “fan”) in buddypress search. My first attempt was to include the user role via some code snippet in my member-loop, but that seemed a bit complicated to me. I wanted a conjunction between the user role and buddypress search. So there had to be a way to select the user role through a xprofile field, ’cause xprofile fields can be searched and also displayed in the member-loop in several ways.
To stop confusing you, here’s what I’ve done:
required plugins:
- Buddypress xProfiles ACL with the hack mentioned a few lines earlier.
- Capability Manager Enhanced to define custom user roles, if you’re not satisfied with the default wordpress roles (subscriber, contributor,…).
The first step is to create your user roles, modify the ACL plugin and define some profile field groups that can be finally added to the different user roles/types.
Create a xprofile field (selectbox) with the title “User Role” and name the options “Band Role” and “Fan Role” – in my case. You can call them whatever you want. Place this field in the “base” profile group, otherwise it won’t be shown during registration. Also make the field “required”. In my case the user can’t decide, if the visibility of the field can be changed.In a second step you need to create a bp-custom.php in the root of your wordpress plugin folder (if you haven’t done this yet, cause you have other custom functions).
Put the following snippet in your bp-custom:<?php function custom_bp_core_signup_user($user_id) { $user_role = strtolower(xprofile_get_field_data('User Role', $user_id)); switch($user_role) { case "Band Role": $new_role = 'band'; break; case "Fan Role": $new_role = 'fan'; break; } wp_update_user(array( 'ID' => $user_id, 'role' => $new_role )); } add_action( 'bp_core_signup_user', 'custom_bp_core_signup_user', 10, 1);As you can see, I’ve included the title of the xprofile field in line 3. It’s important to put in the exact title of your xprofile field. The case “Band Role” and case “Fan Role” is the place to put your select options of the field. Finally $new_role has to be filled with the wordpress or custom user roles – important, otherwise it won’t work: in lowercase letters – in my case “band” and “fan”.
Save your bp-custom.php and you’re nearly done.
In my case I want to prevent the users to change their user role after registration (if you want to give them the possibility to do so, more hacking has to be done – but I’m not sure how to). Put another snippet in your bp-custom.php://hide the user role select field in edit-screen to prevent changes after registration add_filter("xprofile_group_fields","bpdev_filter_profile_fields_by_usertype",10,2); function bpdev_filter_profile_fields_by_usertype($fields,$group_id){ //only disable these fields on edit page if(!bp_is_profile_edit()) return $fields; //please change it with the name of fields you don't want to allow editing $field_to_remove=array("User Role"); $count=count($fields); $flds=array(); for($i=0;$i<$count;$i++){ if(in_array($fields[$i]->name,$field_to_remove)) unset($fields[$i]); else $flds[]=$fields[$i];//doh, I did not remember a way to reset the index, so creating a new array } return $flds; }Again, fill in the title of the profile field (User Role), where it’s indicated in the code.
That’s it. I hope I haven’t been too confusing. Ask if you need help.
Topic: Hide xprofile data if 'x'
Hi guys
We have a sidebar custom plugin, where we return different user profile data based on the user type.
One of these fields returns one of 6 drop down options. However, what I want to do is only one of 5 of the options if selected, and not display the 6th if present. I still need the 6th option but just don’t want to show it in the sidebar.
Here is the line of code in the plugin to display this data:
echo " <h2 class='sidebarRole'>".xprofile_get_field_data( 'Role (architect)', get_the_author_id()) ."</h2>";Is there a way to say, if the returned result is ‘x’, then don’t display anything?
Thanks,
Ian
Topic: Search Form Question
I have a type of matchmaking site and want users to be able to search more than one field from a drop down. For example, If someone wants to search both males AND females, how can I do that? The ‘select matching fields’ area is where I’m using it. I’d like to use a ‘both’ option in the search form that would return male or female, but it will only search for the actual string ‘both’, which obviously nobody is going to put under gender in their profile. I tried using a multi-select box, but that field type won’t show up in the ‘select matching fields’ area. Any ways to do this?
Thanks!