Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1,476 through 1,500 (of 5,755 total)
  • Author
    Search Results
  • djsteveb
    Participant

    @redgard
    seems to be a similar question with a couple of intersting answers here: https://buddypress.org/support/topic/html-or-wysiwyg-in-text-profile-fields/

    #246535
    Antipole
    Participant

    So I am getting my extra user data fields with a line like:
    echo '<div style="position: absolute; left:150px;">' , bp_get_member_profile_data('field=Ovni model'),'</div>';
    But I would like them to be search links as it is in an individual profile. I have achieved this with

    echo '<div style="position: absolute; left:60px;"><a href=', $bp->pages->members, '?s=', bp_get_member_profile_data('field=Ovni model'),' rel="nofollow">' , bp_get_member_profile_data('field=Ovni model'),'</a></div>';
    

    However, I am now also using the plugin Custom Profile Filters for BuddyPress, which lets me set which profile fields should not be search links and also allows users to spilt their data up, so a profile field “[ocean] and [coast]” gets two separate search links, one for ‘ocean’ and another for ‘coast’. Neat. It seems to do this by adding a filter to bp_get_the_profile_field_value.

    However, my manual addition of search links as above ignores these settings, and any [] in the fields comes through and are visible.

    It occurs to me that, rather than fetching the fields with bp_get_member_profile_data(), I would do better to get the data however it is got for the individual profile display, as this method puts the search links in and obeys the options set in Custom Profile Filters for BuddyPress. I have spent much of today trying to find how to call bp_get_the_profile_field_value. If I use
    echo '<div style="position: absolute; left:150px;">' , bp_get_member_profile_value('field=Ovni model'),'</div>';
    I get an invalid link. I suspect it need a data type argument to get a search link. I have tried to find how it is called to display the user profile, but failed to find it. In the BP Codex I have only found how to remove the filter that puts the links in.

    If someone could enlighten me it would be most helpful. Thanks.

    #246519
    Masterpef
    Participant

    Hello all,

    When I am trying to remove a xprofile field or/and group, he says it is succesfull removed.
    But when I refresh the page, the field comes back.

    It doesn’t help if I directly delete the field in the database.

    Does somebody know the solution?

    Best regards,
    Stef

    #246513
    ma3ry
    Participant

    Is there a plugin or custom css to allow (preferably) WYSIWYG, or at the very least, HTML in text fields?

    I have included an “About Me” profile field. Some of my members are practically writing a story about their lives and we are unable to put a blank line between paragraphs.

    Any suggestions?
    Thank you!

    #246500
    danbp
    Participant

    Hi @ma3ry,

    unable to visit the indicated page due to redirection… BP’s xProfile text box contains are autolinked by default for the 5 first words.
    This is handy when you use a field called city for example. The city name is autolinked and let each user click on it to find other who may entered the same name.

    Of course, an about me box with a long description, which several autolinked words has less interrest. Fortunately, you can deactivate xprofile autolinking.
    Two options for this: all or selected.

    Here 3 snippets. The first can be used if you want to completely remove autolink from all field values.
    The second is a new filter to let you choose the field(s) you want to deactivate. This need two snippet. The first to rewrite a filter and the second to remove / replace the existing BP filter.

    Add the snippet to bp-custom.php.

    // remove any autolink from profile
    function remove_xprofile_links() {
    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
    }
    add_action( 'bp_init', 'remove_xprofile_links' ); 
    
    // custom filter to selectively remove autolink
    function my_xprofile_filter_link_profile_data( $field_value, $field_type = 'textbox' ) {
    
        // Access the field you are going to display value.
        global $field;
    
        // In this array you write the ids (separated by comma) of the fields you want to hide the link.
        $excluded_field_ids = array(2);
    
        // If the id of this $field is in the array, we return the value only and not the link.
        if (in_array($field->id, $excluded_field_ids))
    	return $field_value;
    	
    	if ( 'datebox' == $field_type )
    	return $field_value;
    	
    	if ( !strpos( $field_value, ',' ) && ( count( explode( ' ', $field_value ) ) > 5 ) )
    	return $field_value;
    	
    	$values = explode( ',', $field_value );
    	
    	if ( !empty( $values ) ) {
    		foreach ( (array) $values as $value ) {
    			$value = trim( $value );
    			
    			// If the value is a URL, skip it and just make it clickable.
    			if ( preg_match( '@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', $value ) ) {
    				$new_values[] = make_clickable( $value );
    				
    				// Is not clickable
    			} else {
    				
    				// More than 5 spaces
    				if ( count( explode( ' ', $value ) ) > 5 ) {
    					$new_values[] = $value;
    					
    					// Less than 5 spaces
    				} else {
    					$search_url   = add_query_arg( array( 's' => urlencode( $value ) ), bp_get_members_directory_permalink() );
    					$new_values[] = '<a href="' . $search_url . '" rel="nofollow">' . $value . '</a>';
    				}
    			}
    		}
    		
    		$values = implode( ', ', $new_values );
    	}
    	
    	return $values;
    }
    
    /**
     * We remove the buddypress filter and add our custom filter.
     */
    function remove_xprofile_links() {
        // Remove the old filter.
        remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
        // Add your custom filter.
        add_filter( 'bp_get_the_profile_field_value', 'my_xprofile_filter_link_profile_data', 9, 2);
    }
    add_action('bp_setup_globals', 'remove_xprofile_links');
    #246484
    Antipole
    Participant

    Hi… I have a BP site with members’ directory here.

    I would much like to add to this directory list certain extra profile fields (not to the individual member’s entry).

    I have searched for a plugin without luck. I could attempt simple php mods if pointed in the right direction. I found this but it is some years old and I am not sure if it is the best place to start.

    Any help much appreciated.

    WordPress 4.3.1; BuddyPress 2.3.4; bbPress 2.5.8

    #246456
    buckyb
    Participant

    I’ve decided to try and put the fields in a separate custom editing page, and I’m searching for how to add each extended editable input xprofile field individually, with their id number. I think that will help solve the styling issue. I’ve been searching for something similar like this so I can see how to accomplish this, if anyone can suggest something I would greatly appreciate it! šŸ™‚

    #246415
    buckyb
    Participant

    Does anyone know how to style the custom xprofile fields that are displayed in the frontend in a different way, like in rows and tables? I have alot of them and would like to style them, to make it easier for the admin to edit, they are going to be admin edit only.

    #246393
    BeingPixels
    Participant

    Hello!

    Here is my site: http://www.beingpixels.com

    Just some quick background – I created my site via godaddy.

    I am just getting it set up and noticed under my “users” section there is a “profile fields” area. Now due to my inexperience, I clicked it thinking this was where I could add something more along the lines of a unique role for my community I hope to create – so I could create a moderator like role, but with a unique name to fit my site.

    But alas, that was not the case so now I have a mandatory profile field in my sign up that I don’t want there. The only option I have is edit, which only gives me an option to change the name and description of the field, but not get rid of it completely. Now I feel like I have broken my sites registration.

    Any help would be amazing on how to get rid of this field!

    Thanks.

    supaiku
    Participant

    I have a multisite. A couple of the sites on there I want to use Buddypress with, but they’re for different communities, and so require different profile specifics.

    I found this code for creating segregated profiles on multisite:

    Segregated X-Profile Fields for Multisite

    But it seems that it needs to be put in before the multisites are created. Is that true?
    Is this code up to date?

    Is there a way for me to add this code without re-creating the sites?

    Much appreciated!

    chriotte
    Participant

    Hi,
    I would like users to submit phone number on registration and automatically save it in a WordPress field.This should be only visible for admins, and therefore, the xProfile fields won’t work. To create a user the user fill out this form with password and email (Username is created programmatically).
    Registration
    I would like the phone number field there as well, but I’m not sure how to update the field at submission.
    I tried to add the field with this code: <input type="text" name="phone" id="phone" value="" class="regular-text" <?php bp_form_field_attributes('phone'); ?>
    But the field is blank when I check in WP admin. Any idea how I can do this?

    If i click to edit a user in WP admin I want the number to be added to this field.
    field in wp admin
    I followed a tutorial to create the field, and added it to my function file with this code:

    add_action( ‘show_user_profile’, ‘my_show_extra_profile_fields’ );
    add_action( ‘edit_user_profile’, ‘my_show_extra_profile_fields’ );
    function my_show_extra_profile_fields( $user ) { ?>
    <h3>Extra profile information</h3>
    <table class=”form-table”>
    <tr>
    <th><label for=”phone”>Telefon</label></th>
    <td>
    <input type=”text” name=”phone” id=”phone” value=”<?php echo esc_attr( get_the_author_meta( ‘phone’, $user->ID ) ); ?>” class=”regular-text” /><br />
    <span class=”description”>Vennligst angi ditt telefonummer slik ati </span>
    </td>
    </tr>
    </table>
    <?php }

    add_action( ‘personal_options_update’, ‘my_save_extra_profile_fields’ );
    add_action( ‘edit_user_profile_update’, ‘my_save_extra_profile_fields’ );

    function my_save_extra_profile_fields( $user_id ) {

    if ( !current_user_can( ‘edit_user’, $user_id ) )
    return false;

    update_usermeta( $user_id, ‘phone’, $_POST[‘phone’] );
    }`

    bloggenvick
    Participant

    Hi, I am trying to edit the User Profile fields to show the ability for a new member to upload their image and their friends image to show on the profile page.
    One will be the main member with a larger image and a smaller thumbnail image will be of the referring individual – both images will need to show up on the Users profile page.
    I cannot seem to do this. I tried the Types plugin but somehow I am not getting an update on the profile page. I cannot get the connection to each other.

    Also a related question I created a custom registration page. How do I get that one to display the User Profile fields and to function as the one that buddypress will utilize?
    Please help! I have a tight deadline.
    Thanks,
    Vicky

    paragbhagwat
    Participant

    Hello All,

    I added a few profile fields like
    Saluation -> dropdown
    First Name ->texbox
    Last Name ->textbox
    TOS-> checkbox

    When i look at the wp_usermeta table i do not see all these fields in meta key and what it seems to eb doing is that the existing nick name value its splitting in first name and last name.. so my first question is

    1) Am i looking at the correct table??? if not where is the data that a user enters on register page stored?

    I am also looking to override the activation email message by adding a filter for bp_core_signup_send_validation_email_message.. My code is

    add_filter( 'bp_core_signup_send_validation_email_message', 'RECN_CUSTOM_activation_message', 10, 3 );
    
    function RECN_CUSTOM_activation_message( $message, $user_id, $activate_url ) {
        $user = get_userdata( $user_id );
        return "Hello $user->salutation $user->first_name,$user->last_name.";
    
    Question 2:
    $user->salutation $user->first_name,$user->last_name all return empty string?

    Is that the correct way to retrieve that data?

    Thanks,
    Parag

    jasonqw1
    Participant

    Since WordPress already has its own Username field, it makes the registration and mention process very confusing to have two different username fields with the same label.

    I tried to remove the buddypress username field but it causes every existing user’s profile page to be blank, and new registration would also stop working (redirect to home page after submit).

    Any solution for this?

    #245801
    DanielNorris111
    Participant

    Hello there, I’m having issues showing all of my field groups, I have the base which I have at the back else the others won’t show at all and I have the 2 custom new ones at the front but only the first one will display, i have tried swapping them around but regardless, the first one will show in the front end and the second one will be missing. Any idea why this is happening?

    In addition, in the back end and going to profile extend to show the fields, it will only allow me to change user field data for the base and the first custom field group, which suggests it is not a theme/interface issue.

    I am using the Divi theme 2.4

    #245772
    shanebp
    Moderator

    can anyone tell me how i could for instance output only label for email?

    In register.php…

    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    
         if( 'Email' == bp_get_the_profile_field_name() )
            echo 'Email: this is the email field';
    
    //etc

    You could use that approach for xprofile fields.
    But ’email’ is not an xprofile field.
    It is hardcoded in register.php ~Line 77

    #245636
    danbp
    Participant

    xprofile component use his own tables:
    _bp_xprofile_data
    _bp_xprofile_fields
    _bp_xprofile_groups
    _bp_xprofile_meta
    See here for detailed structure: https://codex.buddypress.org/developer/buddypress-database-diagram/

    Somehow related to your question, this topic who explains how to use bp_update_user_meta (update_user_meta belongs to WP)

    LaurieDugdale
    Participant

    Hi,

    Is there a way to add the url of a users avatar to user meta? I’m not very good with php at all but so far I have this in member-header.php:

                $user_id = bp_displayed_user_id();            
                
                $avatarurl = bp_displayed_user_avatar( 'html=false' );
    
                $metadata = bp_update_user_meta( $user_id, 'avatar_url', $avatarurl );
    
    

    Also being able to add xprofile fields to user meta would be very useful.

    Any help greatly appreciated!

    #245577

    In reply to: Profile URLs

    Andrew
    Participant

    You need to add the target=”_blank” attribute to the profile field value anchors.

    I think the best way to do this is by using str_replace. Add this to your functions.php or bp-custom.php

    function profile_target_blank( $field_value, $field_type, $field_id ){
    	
       $field_value = str_replace('rel="nofollow"', 'rel="nofollow" target="_blank"', $field_value);
    
    	return $field_value;
    }
    add_filter('bp_get_the_profile_field_value', 'profile_target_blank', 11, 3);

    I’ve tested this and it works. This should open a new browser window/tab for all profile fields that have a URL’s.

    MamasLT
    Participant

    Hello. First of all, thank You very much guys for this great stuff!
    I do have one issue. I’m not sure if this is because of Ascent theme or because of BuddyPress. When I go to Account – Profile – View, the name of field (Base) is not showing properly, and all the fields bellow are white and displaced. In this picture you can see what I mean:
    Profile view issue
    Full image is here.
    As you can see i marked a bit of text, just to show that the rest of it is white and boxes are displaced.
    Any ideas how to solve that?

    Thank You very much!

    #245460

    Perfect! Works great! Thanks so much for the reply! šŸ™‚

    You mentioned there were other ways to display this?

    Can the user directly upload through profile fields & then automatically display in tabs like you showed without entering the url?

    #245458
    danbp
    Participant

    @canadianmusicnetwork,

    i never used BuddyForms, so i can’t help you with this. Ask on their support if a specific audio field exist or can be added, and how.

    That said, WP comes with all of this, but later. Meaning by this that a user will be able to upload an audio file once it is already registered.

    It is commonly accepted that nothing can be added to a site as long as a new user is not validated or pending.

    On a standart install, i would use a simple text field on a new field group named Audio. And, eg., if you allow 5 files, use 5 fields.

    BP strips HTML on prfoile fields, so it’ not possible by default to get the automatted embed like in a post. Why is unclear to me, as embed is implemented since BP 1.6 for activities, groups, but not profiles… Anyway, a little bp-custom snippet magic (here it is ! ) will let you do this.

    function set_audio_field( $field_value ) {
    	$bp_this_field_name = bp_get_the_profile_field_name();
    	// field name (case sensitive)
    	if( $bp_this_field_name == 'N° 1' || $bp_this_field_name == 'N° 2' ) {
    		$field_value = strip_tags( $field_value );
    		$field_value = '[audio mp3 ="'.$field_value.'"]';
    	}
    	return $field_value;
    }
    add_filter( 'bp_get_the_profile_field_value','set_audio_field');

    That’s it for site admin. Now for the user.

    The new user capability should be “author”, so he can upload files. This is default, but you can change that, if you search a bit on WP’s codex.

    First he have to upload his file. From Toolbar: Dashbord > Media > add new. Then he has to copy the file URL avaible on the media upload page, under “edit” and then in the right menu.

    User goes to his profile > edit > audio tab and paste the file URL into the audio field, save and voila ! Here the result:

    audio display on profile

    That’s only one possibility. the’re others, like custom post type…

    #245450

    Thanks so much for the professional reply. I really enjoy Buddypress & The Support Community. I suggest this service to everyone else in the Canadian Music Industry. Sorry about the capital lock! Didn’t proof read before hitting submit! Lesson Learned šŸ™‚

    Anyways, I want to be able to create a Profile Field when Users/Artists sign up where they can upload (2) mp3 files so it will automatically display in their profile. This is the main page where there (2) Featured Songs will be displayed. The rest will be displayed in RTMEDIA or BuddyMedia.

    I have some experience with coding, but was wondering how would I add a profile field that says audio to my drop down list in profile fields & output the mp3 player on the user end?

    First Example (Second To Follow)

    Second:

    Thanks in advanced!

    maelga
    Participant

    Hi everyone,

    When using APC object caching (set through w3tc) I am getting duplicated profile input fields on the Profile>Edit page and also on the /register page.

    By duplicated I mean the whole loop shows multiple time (i.e. xprofilefield1, xprofilefield2, xprofilefield3, and again xprofilefield1, xprofilefield2, xprofilefield3, etc.)
    On the registration page the fields are duplicated twice, while on the profile>edit page they show up 5 times!

    I have obviously tried clearing the cache but the issue remains, unless I disabled object caching altogether.
    Not sure what else I can test/change to make it work.

    I’m running all latest versions WP4.3.1, BP2.3.4 and W3TC0.9.4.1.

    Any advice or experience to share?

    Eladawien
    Participant

    Hi,
    I’ve created a BuddyPress site in the past that worked very well, so I’m even more irritated about why I cannot figure out this issue. I would really appreciate your help!
    When I open the member’s page, go to a member’s detail page and click on “Profile”, them I get directed back to the homepage instead of seeing the profile. Same happens with click on “Friends”, “Groups”,… My members have extended profile fields which aren’t shown.

    My site: http://www.business-whoiswho.com/
    WordPress version: 4.3.1
    BuddyPress version: 2.3.3

    I’m using a child theme of the Bounce theme provided by GhostPool. But the problem is not in the theme, as I deactivated it – activated 2 other themes – same problem.

    Example of a link that is supposed to open a profile: http://www.business-whoiswho.com/members/9734642/profile/

    Thank you very much in advance.

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