Search Results for 'profile fields'
-
AuthorSearch Results
-
January 30, 2010 at 5:03 pm #62017
In reply to: Move profile fields to another field group?
Devrim
ParticipantHi Peter, I had the same problem, here is the code that will move everything from group_id 1 to group_id 3
Check the id of the secondary group and change the number 3.
—
require_once(‘wp-blog-header.php’);
$x = $wpdb->get_results(“SELECT * FROM wp_bp_xprofile_fields WHERE group_id=1 and is_required=0”);
foreach($x as $k=>$v){
$wpdb->update(‘wp_bp_xprofile_fields’,array(‘group_id’=>3),array(‘id’=>$v->id));
}
January 29, 2010 at 11:48 pm #61999In reply to: Custom Signup Fields
hardlyneutral
ParticipantUpdate: Looks like the field needs to exist in wp_bp_xprofile_fields. I manually added it, but it would be nice to figure out how to do it dynamically.
January 27, 2010 at 5:26 am #61797In reply to: Profile Field adds Award
Nick Watson
ParticipantBy the way, I have no idea why there are all those breaks. Ignore all the breaks in the code:
this is the real code
<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
<?php if ( bp_get_the_profile_field_name() == 'Gender' ) {
if ( bp_get_the_profile_field_value() == 'Male' )
echo '<img src="male.jpg" alt="male" title="Male" />';
}
?>
etc etc etc
rest of the codeJanuary 27, 2010 at 2:28 am #61793In reply to: Profile Field adds Award
Nick Watson
ParticipantI trust your code works, but I think I just have no idea what I’m doing.
This is what my code looks like:
<br />
<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?><br />
<?php if ( bp_get_the_profile_field_name() == 'Gender' ) {<br />
if ( bp_get_the_profile_field_value() == 'Male' )<br />
echo '<img src="male.jpg" alt="male" title="Male" />';<br />
}<br />
?><br />
etc etc etc<br />
rest of the code<br />(I’ve tried with both lowercase and uppercase fields)
I’m just using the Gender one to test this out, I’ve tested it with all these other ones but none of them are working.
What am I doing wrong.
January 27, 2010 at 1:14 am #61791In reply to: Groups vs Roles vs Custom Profile Fields
designodyssey
ParticipantFirst, is it jjj or JJJ?
Second, is there some way to use the usermeta solution for groups?
Also, I want to change the display of everything (dropdowns, menus, labels, etc.) to account for the different user types (e.g. teachers, students, parents). That would also need to be the case for groups (e.g. classrooms, schools, departments). How would you suggest going about this?
Thanks
January 26, 2010 at 11:26 pm #61785In reply to: Profile Field adds Award
Nick Watson
Participantbp_the_profile_field_value displays ALL of the values of the fields within the group, and
bp_the_profile_field_name displays ALL of the names of the fields within the group.
I tried what you said with the <?php if ( bp_the_profile_field_name() == ‘color’ ) {
but that still just continues to display ALL of the fields. (And yes I changed the ‘color’ to the proper field name)
Anyone have ideas on how to get a profile fields output to display a picture instead of the text?
January 26, 2010 at 7:40 pm #61737In reply to: Profile fields empty on registration
John James Jacoby
KeymasterNewer versions of BP along with newer templates and MU have solved this by moving those hooks and actions into the template, and BP hijacks the registration before it happens.
It’s happening because of an outdated theme arrangement. I’m going through something similar also at the moment and will be tracking this down shortly.
@wekko, the reason those fields aren’t entered right away is because a registered user isn’t an actual activated user yet. They need to click the link or be activated by the site admin in order to actually get entered into the user tables. In either case, that xprofile data is moved into the xprofile tables when the activation occurs, not when they register.
January 26, 2010 at 7:34 pm #61735In reply to: Profile fields empty on registration
wekko
ParticipantI found the answer. It’s not Buddypress, it’s WordPress MU. See: https://mu.wordpress.org/forums/topic/15324 . Apparently, wp-activate.php doesn’t load the Buddypress login including the hooks. Weird thing it doesn’t happen to everyone..
January 26, 2010 at 3:37 pm #61685In reply to: How to make all links DO Follow
Tracedef
ParticipantDo follow is also a great way to encourage users to create and fill out a profile, specifically if you create custom fields for their “websites” in their profile. Spam registrations are already a major issue ( at least for us ) so that isn’t much of a deterrent for us at least.
January 26, 2010 at 12:59 pm #61674In reply to: Profile Field adds Award
Boone Gorges
KeymasterThe code that I listed will not work as is. You have to make sure that you fill in the correct filenames for images, the correct desired values for profile fields, and the correct field names. Also it looks like I messed up and forgot at least one parenthesis. That’s why I said you’d need to tweak it. It should give you an idea of which functions to use, though.
January 26, 2010 at 10:40 am #61662In reply to: Profile fields empty on registration
danbpfr
ParticipantYou can search here for answers :
January 26, 2010 at 7:26 am #61654In reply to: Profile fields empty on registration
wekko
ParticipantWell, that makes sense. Still, if it’s a bug and it’s fixed in newer versions…someone should know about it right?
January 26, 2010 at 2:05 am #61640In reply to: Profile Field adds Award
Boone Gorges
KeymasterIn [your-bp-theme-dir]/members/single/profile/profile-loop.php, you’ll see a profile loop beginning
while ( bp_profile_fields() ) : bp_the_profile_field();
. Inside of that profile loop you will be able to use various profile functions to test values. For instance,<?php if ( bp_the_profile_field_name() == 'color' ) {
if ( bp_the_profile_field_value() == 'red' )
echo '<img src="redbadge.png" />';
if ( bp_the_profile_field_value() == 'green'
echo '<img src="greenbadge.png" />';
// etc.
}
?>I have not tested this but it should work fine with some tweaking.
Your issue with appearance is a CSS thing, most likely that the ul elements are set to display: inline. Try setting them to display: block.
January 26, 2010 at 12:18 am #61633In reply to: Is there any way to stop spammers?
peterverkooijen
ParticipantThere was a new blunt solution here. Apparently having a couple of required custom profile fields also cuts down spam.
January 25, 2010 at 11:13 pm #61623In reply to: Profile fields empty on registration
Paul Wong-Gibbs
KeymasterTo be honest you aren’t going to get much/any support based on bugs in previous versions of BuddyPress as we may have fixed them in the more recent versions.
January 23, 2010 at 4:42 pm #61462In reply to: BP 1.2 : problem with bp_profile_group_has_fields()
Andy Peatling
KeymasterCan you post this in a ticket please?
January 23, 2010 at 3:25 pm #61457In reply to: BP 1.2 : problem with bp_profile_group_has_fields()
grosbouff
ParticipantOk, I founded out :
if ( bp_has_profile() ) {
while ( bp_profile_groups() ) : bp_the_profile_group();
global $group;
$one_group = array();
$one_group[‘id’] = $group->id;
$one_group[‘name’] = $group->name;
$groups[ $group->id ] = $one_group;
//if ( bp_profile_group_has_fields() ) {
while ( bp_profile_fields() ) : bp_the_profile_field();
//if ( bp_field_has_data() ) {
global $field;
$one_field = array();
$one_field[‘id’] = $field->id;
$one_field[‘name’] = $field->name;
$fields[] = $one_field;
//}
endwhile;
//}
endwhile;
}
Hope that it’s ok to comment those lines…
January 23, 2010 at 3:07 pm #61456In reply to: BP 1.2 : problem with bp_profile_group_has_fields()
grosbouff
ParticipantSeems this has something to do with function has_fields() :
function has_fields() {
$has_data = false;
for ( $i = 0; $i < count( $this->group->fields ); $i++ ) {
$field = &$this->group->fields[$i];
if ( $field->data->value != null ) {
$has_data = true;
}
}
if ( $has_data )
return true;
return false;
}
print_r($field) returns
teststdClass Object ( [id] => 1 [name] => Name [type] => textbox [group_id] => 1 ) stdClass Object ( [id] => 2 [name] => Name [type] => textbox [group_id] => 1 ) stdClass Object ( [id] => 3 [name] => First Name [type] => textbox [group_id] => 1 ) stdClass Object ( [id] => 4 [name] => Both Names [type] => textbox [group_id] => 1 )
print_r($field->data) returns FALSE…
January 21, 2010 at 7:11 pm #61303In reply to: Edit "Your Profile" on your "Profile" Page
Nick Watson
ParticipantOh yeah, I know that’s there, but that is only the Nickname thing from the wordpress.
I was wondering if there as anyway to edit the other fields (stored by wordpress) on the profile page.
January 21, 2010 at 10:52 am #61267In reply to: Edit "Your Profile" on your "Profile" Page
Brajesh Singh
ParticipantIt is already there.
But you may not edit the Fields which are stored by wordpress(If your User had registered before activating buddypress). Only Buddypress xprofile fields can be edited from profile page.
Under profile link, you will see edit profile which will allow you to change the basic details(xprofile fields).
Under settings->general you can change email/password.
January 19, 2010 at 6:03 pm #61130In reply to: Multiple user types – possible?
Paul Wong-Gibbs
KeymasterThe only thing you might want to look into is to show/hide specific xprofile fields for different groups. That’s more advanced and requires some new code to be written by someone
This is possible without too much effort, I have recently done it for a client. I considered using usermeta to indicate the type but it worked better for my client’s site to have it is an xprofile field. I wrote some code to not display or permit changes to it after registration, too.
January 19, 2010 at 4:34 pm #61123In reply to: Multiple user types – possible?
Anonymous User 96400
InactiveBowe, I’d store user types as usermeta. Might be a bit more work code-wise, but I think more flexible.
Showing certain profile fields by user-type with jQuery is just your basic conditional stuff. If this user-type is selected, then show these fields, if another type is selected show some other fields.
January 19, 2010 at 4:13 pm #61121In reply to: Multiple user types – possible?
Bowe
ParticipantI don’t have a solution for all your problems but assigning different “user” types to your site is easy:
– Create a xprofile field in your BuddyPress admin. For example: What kind of user are you:
a. Swimmer
b. Skater
c. Surfer
– Install the BP Member filter plugin: https://buddypress.org/forums/topic/bp-member-filter
– Users can now filter members on the member directory page to find certain usertypes
The only thing you might want to look into is to show/hide specific xprofile fields for different groups. That’s more advanced and requires some new code to be written by someone
Good luck!
edit: Maybe if you combine both tips from Boris and me you just got your solution
ps: I’m interested in the jquery profile fields stuff as well.. sounds handy!
January 19, 2010 at 4:12 pm #61120In reply to: Multiple user types – possible?
Anonymous User 96400
InactiveYou can just add to the existing registration process via the available hooks. So basically you add a dropdown field where the user has to select an option. Then you use a bit of jQueryness to display the various profile fields you want that user-type to fill in. I’ve done something similar for group types. Took about 20 minutes to code, so it’s not really hard
January 17, 2010 at 10:36 pm #60995In reply to: BP Member Filter
John James Jacoby
KeymasterThis plugin doesn’t perform logic searches within fields, but it does allow you to search for criteria in any xprofile field and any combination of them (except checkboxes at the moment.)
@michaelesenwasser, not yet that I know of.
-
AuthorSearch Results