Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1,826 through 1,850 (of 5,755 total)
  • Author
    Search Results
  • #231003
    worpress
    Participant

    I want to add a upload pdf,doc files in profile fields.

    Kookidooki
    Participant

    Hey guys,

    After I upgraded the WordPress version to 4.1 of my BP site it’s causing some weird behavior.

    Is there an incompatibilty between WP 4.1 and Buddypress cause:

    1. it’s duplicating my profile fields. For example: it’s now showing my name field twice..

    2. and the order of the groups are changing every time… Weird

    #231001
    Kookidooki
    Participant

    Hello Shanebp,

    This is what I mean:

    In Buddypress dashboard > Users > Profile Fields > Add New Field Group… it’s not creating a new group.

    Is there incompatibilty between WP 4.1 and Buddypress cause it’s duplicating my profile fields. For example: it’s now showing my name field twice.. and the order of the groups are changing every time…Weird

    #230940

    shanebp — I followed your suggestion and it worked like a charm. I also had to add some code to my functions.php file to be able to redirect calls to the WP Profile page to the BP Profile page because editing the the files you suggested didn’t affect restrict the fields on the WP Profile page (code for this below, if anyone wants).

    My only question is the following – would changes to the files in the bp-templates directory get overwritten if I update the BP plugin? If so, it would be nice to find an alternative way to do this, but otherwise I just need to know so I can incorporate a restore of the code changes from a backup to my upgrade workflow document for this site.

    Thanks,
    Michael

    add_action ('init' , 'prevent_profile_access');
     
    function 	prevent_profile_access(){
       		if (current_user_can('manage_options')) return '';  //if admin, exit
    		
    		//everyone else, redirect to the bp profile page, not the wp profile page!
       		if (strpos ($_SERVER ['REQUEST_URI'] , 'wp-admin/profile.php' )){
          		wp_redirect (bp_loggedin_user_domain());
     		 }
     
    }
    #230926
    stevehalwkings
    Participant

    i want to create Social Network field Group. in Social NEtwork Field Groupd i want to create One Custom Field Called LastFm

    i did try following code which gives error. it returns Multiple duplicate fields.

    check this screenshot: http://awesomescreenshot.com/035430kucd

    here is my code:

    add_action('bp_init', 'field_xprofile_twitter');
    
    function field_xprofile_twitter()
    {
    
       global $bp;
    $group_args = array(
         'name' => 'Social Networks'
         );
    $group_id = xprofile_insert_field_group( $group_args ); 
       $xfield_args =  array (
               'field_group_id'  => $group_id,
               'name'            => 'lastfm',
               'can_delete'      => false,
               'field_order'   =>  1,
               'is_required'     => false,
               'type'            => 'textbox'
        );
    
       xprofile_insert_field( $xfield_args );
    }
     

    Need Help to create Profile Field Programmaticaly.

    Looking forward to hearing from you.

    Thanks

    #230890
    chetanmadaan
    Participant

    Hi –

    I am working on a project where we just need profile custom fields for users to come in and register and put in their info.

    All other social network functions i.e. (adding friends, messages) disaled.

    I am new to WP; so, not sure if something like this can be turned off with a setting or something… I am sure with enough code edits we can make this happen.

    Tips, tricks?

    Also, there is any other program that would just allow custom fields for user profiles and searching them?

    #230838
    shanebp
    Moderator

    I cannot duplicate your issue.
    In wp-admin, Users > Profile Fields, are your fields part of the ‘Base’ group of fields?
    Or are they under another group, in another tab to the right of ‘Base’?

    btw: instead of bp_get_profile_field_data, you should use bp_get_member_profile_data
    That tutorial is for BP 1.5, very old.

    #230833
    mdory89
    Participant

    I should’ve explained more. In the WordPress admin panel, If you click Users-Profile Fields, the profile field created and placed into the member-header.php file doesn’t show at all.

    Here’s a tutorial I followed: http://code.tutsplus.com/articles/developing-buddypress-themes-part-3-buddypress-15-member-pages-the-overall-user-experience–wp-21856

    The code:

    <?php
       
      $favorite_spot = bp_get_profile_field_data( 'field=Favorite Camping Spot' ) ;
    echo '<p class="profile-fields">My Favorite Camping Spot: ' .$favorite_spot. '</p>';
       
      $necessary_item = bp_get_profile_field_data( 'field=One Necessary Item' ) ;
    echo '<p class="profile-fields">My One Necessary Item: ' .$necessary_item. '</p>';
     
      ?>
    #230831
    shanebp
    Moderator

    but not in the admin menu profile fields section

    What exactly are you referring to?
    The adminbar at the top of each page? If so, member-header.php does not affect that.

    mdory89
    Participant

    Hey everyone!

    I was following this forum post: https://buddypress.org/support/topic/resolved-how-to-add-certain-profile-fields-in-a-buddypress-member-profile-header/ to add custom profile fields to the member header in BuddyPress 2.1.1, the profile fields shows up on the page, but not in the admin menu profile fields section. Any help would be appreciated. And if there are posts related to my question, send em over! Thanks!

    #230801
    shanebp
    Moderator

    How will the ‘tags’ be used?
    As the basis for filtering members?
    Or just as ‘notes’ about each member?

    If the former, see the BP_User_Query codex page.

    If the latter, you could use this premium plugin: BuddyNotes

    Or you could simply create template overloads of these 2 files:

    buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\profile-loop.php
    buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\edit.php

    And check the fields via their id or name and then decide, based on who the logged-in user is, whether the fields should be displayed.

    #230754
    emidio007
    Participant

    Hello,
    I installed the plugin “Profile Search” and have created a search form. It works so far very good. But I would like to give the user the option to select the size (height) of the partner. e.g. (height) Size between 160cm and 180.

    The parameters are passed by Get. Can I add two new parameters? e.g. field_9 $ = 160 $ field_9 = 180 (height between 160 cm and 180 cm)

    hier are my parameters:
    ?field_3=&field_6=&field_2=18& ..etc

    Or should I create two fields for “the height from and the height to”?

    Maybe someone here can help here

    Thanks in advance

    Hi – this is in reference to https://buddypress.trac.wordpress.org/ticket/5317. I have a valid case requiring this feature – details on the case below. Can anyone tell me the status on this -whether it is a current or future feature, or if there is an alternative plugin I can use? Based on this conversation, the idea for this feature seems doa.

    Case Details:
    My client maintains a website. The site has a moderate sized community. Each member’s profile contains a number of BP xprofile fields. The client wants to have several additional xprofile fields that are viewable only to the admin, and not the user. The purpose of these additional, admin-only fields, is to make it easier for the admin to essentially ‘tag’ users as having a certain status (warning flag for inappropriate behavior, new member, etc. etc.) or being a member of certain interest groups (i.e. members who have pets, members who like hiking) without letting the user know that the admin/moderator has tagged them or even that there is tagging. The reason for doing it with BP xprofile fields, is that it provides such a simple, handy, and clean method for creating additional field in the WP context that it makes it easy for the non-technical admin to go in and edit member data.

    Thanks in advance,
    Michael

    #230724
    danbp
    Participant

    Sorry to answer you with a big laught, it’s not html but php. 😀
    You should also find the time to read more attentively the forum, or search by keywords.
    in this case: hide xprofile fields

    https://buddypress.org/support/search/hide+xprofile+fields/

    You’re welcome. Glad you got it. 😉

    #230718
    danbp
    Participant

    Hi @amic58, @tecca

    When BP is installed and xProfile is activated, the original WP profile settings are not accessible to user.

    The WP register process use only username, password and email and BuddyPress add by default a Name field as base for other extended profile fields.

    In short this means that username and name fields can contain a same information(a name, a pseudonym, a first or/and a last name). The plugin you mention is best for a WP install where user had choosen first/last name as output on post, comments, etc Once BP is activated, this became a little different.

    Now to the initial question.
    The CSS trick is a very inelegant solution as it lets everybody knowing how BP works to surround this invisibility. You’re also loosing any flexibility if you want to show some fields privately for example.

    You can do this properly with a little snippet, as explained here:

    Using bp_parse_args() to filter BuddyPress template loops

    Here’s an example which let you hide fields or fiels group to members, but not to site admin

    function bpfr_hide_profile_field_group( $retval ) {
    	if ( bp_is_active( 'xprofile' ) ) :	
    	
    	// hide profile group/field to all except admin	
    	if ( !is_super_admin() ) {		
    		//exlude fields, separated by comma
    		$retval['exclude_fields'] = '1';  
    		//exlude groups, separated by comma
    		$retval['exclude_groups'] = '1'; 			
    	} 
    	return $retval;		
    	
    	endif;
    }
    add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_field_group' );

    Add it to bp-custom.php or your child-theme functions.php

    Of course you can also choose to show a field or group, but remove the possibility for the user to edit it later. Simply add more conditionnal to the function.

    Here another example:

    function bpfr_hide_profile_edit( $retval ) {	
    	// remove field from edit tab
    	if(  bp_is_user_profile_edit() ) {		
    		$retval['exclude_fields'] = '54'; // ID's separated by comma
    	}	
    	// allow field on register page
    	if ( bp_is_register_page() ) {
    		$retval['include_fields'] = '54'; // ID's separated by comma
    		}		
    	
    	// hide the field on profile view tab
    	if ( $data = bp_get_profile_field_data( 'field=54' ) ) : 
    		$retval['exclude_fields'] = '54'; // ID's separated by comma	
    	endif;	
    	
    	return $retval;	
    }
    add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_edit' );

    Hope to be clear.

    #230708
    Amic58
    Participant

    Thank you very much! I was looking for the fix for so long, but I never found one, didn’t know it was that easy.
    Also, if it is possible to hide another ‘Base’ name fields.
    In extended profile, there is a similar function like in Profile page.
    On WordPress Dashboard, when you click Profile, there is a possibility to view Extended profile like on the page before. There is also possibility to change the name.
    I also would like to hide the field Name (required), as I don’t want to push people to use their real names.
    I use the plugin called Usernames only that eliminates possibility to use real names, but the problem is that people won’t like to add their real name during registration.

    #230638
    danbp
    Participant

    Add this snippet to your child-theme functions.php or bp-custom.php

    function bpfr_hide_profile_edit( $retval ) {	
    	// remove field from edit tab
    	if(  bp_is_profile_edit() ) {		
    		$retval['exclude_fields'] = '2'; // field ID's separated by comma
    	}	
    	// allow field on register page
    	if ( bp_is_register_page() ) {
    		$retval['include_fields'] = '2'; // field ID's separated by comma
    		}		
    	
    	// hide the field on profile view tab
    	if ( $data = bp_get_profile_field_data( 'field=2' ) ) : 
    		$retval['exclude_fields'] = '2'; // field ID's separated by comma	
    	endif;	
    	
    	return $retval;	
    }
    add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_edit' );
    Sterke-Jerke
    Participant

    I would like to make certain xprofile fields readonly or locked.

    The only solution I found was in this threat:

    https://buddypress.org/support/topic/resolved-buddypress-restrict-xprofile-field-to-read-only/

    Is that still the only way? Or can it be done in a UI?

    Thx

    #230605
    shanebp
    Moderator
    #230467
    Kekeli
    Participant

    Hi There,

    I have a large multisite installation that calls on xprofile fields for each user on a particular site in order to return users for a specific item. Due to all the sites having this info, but only needing to pull from users from each specific site, I used the code in the link below to make sure that the profiles aren’t syncing xprofile info between all the sites, problem is, the code supplied doesn’t work, here it is… https://codex.buddypress.org/themes/guides/segregated-x-profile-fields-for-multisite/

    I am getting a ton of error messages on the site and it has to do with these 4 lines,

    $bp->profile->table_name_data = $wpdb->prefix . ‘bp_xprofile_data’;
    $bp->profile->table_name_groups = $wpdb->prefix . ‘bp_xprofile_groups’;
    $bp->profile->table_name_fields = $wpdb->prefix . ‘bp_xprofile_fields’;
    $bp->profile->table_name_meta = $wpdb->prefix . ‘bp_xprofile_meta’;

    the error messages I keep getting (the lines correspond with those above) are:

    Warning: Creating default object from empty value in /*********/themes/Builder-Everett/functions-child.php on line 187

    Warning: Creating default object from empty value in /*********/themes/Builder-Everett/functions-child.php on line 188

    Warning: Creating default object from empty value in /*********/themes/Builder-Everett/functions-child.php on line 189

    Warning: Creating default object from empty value in /*********/themes/Builder-Everett/functions-child.php on line 190

    shanebp
    Moderator

    Read this for a better approach to your issue: Filtering by Xprofile fields

    Another approach: bp_user_query

    #230342
    Kekeli
    Participant

    Hi There,

    I have a (potentially) large multisite installation that calls on xprofile fields for each user on a particular site in order to return users for a specific item. Due to all the sites having this info, but only needing to pull from users from each specific site, I used the code in the link below to make sure that the profiles aren’t syncing xprofile info between all the sites, problem is, the code supplied doesn’t work, here it is… https://codex.buddypress.org/themes/guides/segregated-x-profile-fields-for-multisite/

    I am getting a ton of error messages on the site and it has to do with these 4 lines, looks like this code hasn’t been updated in a while, is there any way we can get an updated version that will work?

    $bp->profile->table_name_data = $wpdb->prefix . ‘bp_xprofile_data’;
    $bp->profile->table_name_groups = $wpdb->prefix . ‘bp_xprofile_groups’;
    $bp->profile->table_name_fields = $wpdb->prefix . ‘bp_xprofile_fields’;
    $bp->profile->table_name_meta = $wpdb->prefix . ‘bp_xprofile_meta’;

    Thanks,
    K

    #230338
    peti446
    Participant

    Hi,
    I have BuddyPress but i create some new fields in the profile and now i need that when a user register in that field he can put the same than other user how can i do it ?

    #230192
    Cartographer
    Participant

    Is there any way to make the icons following the privacy rules of the related profile fields?

    #230168
    Cartographer
    Participant

    Hi @danbp

    I tried the way you suggested and it works.

    I would like to ask if there is any way the social media icons to follow the privacy rules of the related custom profile fields.

    Thank you!

Viewing 25 results - 1,826 through 1,850 (of 5,755 total)
Skip to toolbar