Search Results for 'profile fields'
-
AuthorSearch Results
-
August 16, 2014 at 9:58 pm #187037
In reply to: [Resolved] No button for finishing registration
danbp
ParticipantDo you use a wordpress copy provided by your host ?
Do you use a child-theme ?
Do you use any shortcode on the register page ?Disallow blog creation for the moment and remove all xprofile fields to get only the default name field.
Also download a fresh copy of wordpress and upload the twenty twelve theme folder to your site. Maybe your’s is corrupted somewhere.August 16, 2014 at 3:43 pm #187012In reply to: Modifying The Member List
danbp
ParticipantYes, by creating a custom function.
Add custom filters to loops and enjoy them within your plugin
https://codex.buddypress.org/plugindev/using-bp_parse_args-to-filter-buddypress-template-loops/How to
https://wordpress.org/support/topic/display-profile-fields-in-the-members-directory-all-members
(2nd topic gives a technique you can use)August 16, 2014 at 10:08 am #186999In reply to: [Resolved] No button for finishing registration
1a-spielwiese
ParticipantAmendment:
I guess, connected with the above described problem is another problem.
In the meantime I have activated “Extended Profiles” and I created three profile field groups.
But only the fields of the first group are displayed – the fields of the field groups 2 und 3 not.
August 13, 2014 at 9:30 am #186516danbp
ParticipantHi @simpleone,
you can actually only hide xprofile fields. Hiding field groups is not possible, due to a bug.
But it is corrected for 2.1 and you’ll find a patch on the trac.You can already apply the patch to 2.0.2 bp-xprofile-classes.php and the above snippet will work. Add it to bp-custom.php or theme’s functions.php
To hide an xprofile group, use bp_parse_args like this:
function bpfr_make_profile_tab_members_only( $retval ) { // hide to non members if( !is_user_logged_in() ) { // exlude groups, separated by comma $retval['exclude_groups'] = '4,5'; // exclude fields, separated by comma $retval['exclude_fields'] = '1,39'; } return $retval; } add_filter( 'bp_after_has_profile_parse_args', 'bpfr_make_profile_tab_members_only' );August 13, 2014 at 12:19 am #186506shanebp
ModeratorTry this:
<?php /*** * If you want to show specific profile fields here you can, * but it'll add an extra query for each member in the loop * (only one regardless of the number of fields you show): * bp_member_profile_data( 'field=the field name' ); */ $data = bp_get_member_profile_data( 'field=Current Location' ); if( $data != false ) echo $data; ?>August 12, 2014 at 11:29 pm #186492shanebp
ModeratorAre 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,…’August 12, 2014 at 10:34 pm #186489alscott99
ParticipantThanks for your response, @shanebp.
That code still has the fields repeating, but perhaps I entered it wrong? Since you didn’t include the php tags I’m not sure where they go; I did it this way:
<?php $data = bp_member_profile_data( 'field=Current Location' ); ?> <?php if( $data != false ) ?> <?php echo $data; ?>August 12, 2014 at 8:03 pm #186484Joe
Participantwell i pasted the following code into the member-header.php file in buddypress where it says to add code and still no luck.
<div id="member_profile"> <div class="profile_fields">Position <span><?php bp_member_profile_data( 'field=Position' );?></span></div> </div> <?php /*** * If you'd like to show specific profile fields here use: * bp_member_profile_data( 'field=About Me' ); -- Pass the name of the field */ do_action( 'bp_profile_header_meta' ); ?> Any ideas?August 11, 2014 at 6:05 pm #186437Joe
Participant@butlerweb that’s a good call on the plugin Code Snippets — sounds like a really useful plugin.
Okay, so using the code from the link you gave me (which should be added to the buddypress member header file):
<div id=”member_profile”>
<div class=”profile_fields”>Category: <span><?php bp_profile_field_data( ‘field=Category’ );?></span></div>If the Category Field was an array (a multicheck boxes), would this code be different, do you know? Maybe this is the issue I’m running into to.
Thanks. –Joe
August 11, 2014 at 5:56 pm #186436ButlerWeb
ParticipantWhere are you putting your code? Directly in the template file or elsewhere?
And mine were Multiselect boxes, rather than checkboxes, but it should give you the same array output. For those, I had to parse the strings into something a bit more readable.
Again, I use xprofile fields, but this is what my code looks like:
<h4><strong>Arts Subcategories:</strong> <?php echo (implode( ', ', (array) xprofile_get_field_data ('Arts Subcategories'))); ?></h4>I did not want to edit template files so I used a plugin called ‘Code Snippets’ which allows me to write code without editing the theme’s functions.php file or, like I said, the BP template files. However, to add them to the pages I had to use the “add_action()” hook.
August 11, 2014 at 5:29 pm #186434ButlerWeb
ParticipantHaha I have about 47 different plugins installed into my site and it runs fairly smoothly. The only thing is my geolocation plugin causes my page to refresh the first time you view it.
Aside from that, I found this article: http://bp-tricks.com/snippets/displaying-certain-profile-fields-on-your-members-profile-page/
In step 2 it shows PHP code to grab profile field data. You’ll have to either edit the template you want or create your own tab if you want it on a new page besides one of the pages you already have up on your site.
As far as adding social icons, I used this tutorial: https://buddypress.org/support/topic/display-users-social-follow-buttons-in-profile/
But that one requires xprofile fields.Hope that helps some! 🙂
August 11, 2014 at 5:11 pm #186431ButlerWeb
ParticipantPossibly! what ‘current profile extension fields’ do you have or are you working with.
I only recommend xProfile Fields because I know how to use the hooks! Haha 🙂
August 11, 2014 at 5:08 pm #186430Joe
ParticipantHi @butlerweb thanks for the response!
I’m not using xprofile fields because I didn’t want to add a birthdate field and whatnot, just wanted to display my current profile extension fields. Is that not possible without the install of xProfile Fields?
Thanks.
August 11, 2014 at 5:05 pm #186429In reply to: Create a special profile section?
ButlerWeb
ParticipantDoes the area you want your users to write need to be like many different blog posts? Or just like a single biography section?
I can help you with code for a biography section. For that you need Xprofile Fields installed.For blog posts, the answer I’ve gotten for that is to activate a Multisite network and then get the plugin for front-end blog posting (look for one that is compatible with BuddyPress).
August 11, 2014 at 4:49 pm #186426ButlerWeb
ParticipantI did something similar to you, I made a whole new profile page though, for my users.
First off, do you have xProfile Fields installed and active? You’ll need that.Take a look at the page I’m working on currently: http://ishocase.net/members/chiherah/
August 11, 2014 at 4:42 pm #186424In reply to: Current way to Edit Profile Page Template
bluemuse
ParticipantI think this is what i’m looking for:
August 10, 2014 at 8:53 pm #186399Hudson Atwell
ParticipantSo far this is as close as I have gotten:
public static function get_extended_fields( $user_id ) { $fields = array(); /* Get User Extended Data */ $r = bp_parse_args( $args['args'], array( 'profile_group_id' => 0, 'user_id' => $user_id ), 'bp_xprofile_user_admin_profile_loop_args' ); $i = 0; if ( bp_has_profile( $r ) ) { while ( bp_profile_groups() ) { bp_the_profile_group(); while ( bp_profile_fields() ) { bp_the_profile_field(); $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() ); $fields[ $i ]['name'] = bp_get_the_profile_field_name(); $fields[ $i ]['id'] = bp_get_the_profile_field_input_name(); $fields[ $i ]['value'] = bp_get_the_profile_field_edit_value(); $i++; } } } return $fields; }August 9, 2014 at 11:02 am #186354In reply to: How to change buddypress profile fields text color
GKK
Participanti am using “fine pro” theme, the child theme was created as dafault, can i use this child theme for buddypress customization? , if yes, where can i find that text CSS CODES for changing style in table profile fields? I have searched for table profile fields CSS code in buddypress default.css, but i don’t know which code is related to profile field text.
August 7, 2014 at 11:28 pm #186247danbp
ParticipantHi @csimpson,
the answer is on the codex (bp_parse_args)
Add this to your theme’s functions.php or into bp-custom.php
function bpfr_make_name_members_only( $retval ) { //hold all of our info global $bp; // is xprofile active ? if ( bp_is_active( 'xprofile' ) ) // The user ID of the currently logged in user $current_user_id = (int) trim($bp->loggedin_user->id); // The author that we are currently viewing $author_id = (int) trim($bp->displayed_user->id); // user can see only his name && admin can see everyone if ($current_user_id !== $author_id && !current_user_can('delete_others_pages') ) { $retval['exclude_fields'] = '1'; } return $retval; } add_filter( 'bp_after_has_profile_parse_args', 'bpfr_make_name_members_only' );EDIT: this snippet does work only on BP 2.0+. Don’t use it with older versions.
August 7, 2014 at 12:24 pm #186090In reply to: Connect Extended Profile to WP Standard Profile
Hugo Ashmore
ParticipantWhat you ask would require some custom functions being created and that would require fairly extensive php skills and knowledge of BP.
There are some connect plugins around that are BP aware, nextend google connect springs to mind as one that does populate BP profile fields with user data so it may be worth hunting around for other plugins?
August 7, 2014 at 9:42 am #186082In reply to: Remove profile links
Nicole
Participant@matthew_radich you should check out the code Sharmavishal wrote, it works great, and I also use Buddypress Xprofile Custom Fields. 🙂
August 6, 2014 at 9:25 am #186016danbp
Participant
Did you tried this plugin or worse, for inspiration ?
https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-typeAugust 6, 2014 at 7:14 am #186010Ross Wintle
ParticipantThanks again Shane. I’ll try to explain again.
At high level, I want users, in their user profile, to be able to select one or more skills that they have. Skills are posts of a post type.
At lower level, I want, in a BP user profile, a field which is either a multi-select, or a set of checkboxes. The values selectable should be titles of posts from the “Skills” post type (I’ll actually save the IDs of the posts, but the titles should be displayed).
The user should be able to select these values both when registering and when editing their profile.
Possible implementations I can think of would be:
– Implement a new field TYPE called “skill”, create a field of that type in BuddyPress, and write some hooks that display and save the field.
– Add some custom code using action hooks to the bottom of the registration and edit profile screens.I know it’s kinda hard to explain in a short forum post. There just doesn’t seem to be some simple, documented hooks that a plugin can use to extend the user profiles with new custom fields of new types and I was looking for some guidance/best practice for doing this.
Thanks again for your help.
Ross
August 5, 2014 at 10:14 pm #185996shanebp
ModeratorI’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.
August 5, 2014 at 8:58 pm #185992Ross Wintle
ParticipantThanks Shane.
I was thinking more of something that’s like profile fields, that you edit in the member sign-up and profile edit screens, rather than creating new screens. What I’d REALLY like is something like the Group extension API for users. But instead the registration/register.php and /members/single/profile/edit.php templates seem to have a large amount of almost-duplicated code and inconsistent hooks.
Yeah, I know – if I want an extension system I should contribute it, right? 🙂
Any thoughts on adding profile fields with dynamic values in the way that I need? The best way would seem to be to use something like the bp_custom_profile_edit_fields and bp_signup_profile_fields action hooks, but I’m not sure that they are specific enough.
Thanks
Ross
-
AuthorSearch Results