Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 926 through 950 (of 3,608 total)
  • Author
    Search Results
  • #243720
    shanebp
    Moderator

    You should remove that code as soon the field is created.
    If you edit the field name, then a new field will be created – if you don’t remove the code.

    They dont have a delete button and now I cannot remove any of the fields.

    That is because 'can_delete' => false, should be 'can_delete' => true,.
    I have corrected the gist.

    To delete the fields you already have, you can use a database tool like phpmyadmin.
    You need to find the row(s) in the bp_xprofile_fields table and for each row, change the can_delete field value to 1. Then a ‘Delete’ will appear for that field in wp-admin.

    #243595
    shanebp
    Moderator

    How about all other fields.

    Your best bet is to not nibble at the problem.
    Write a script to migrate all the WP profile fields & user data into BP xprofile fields & user data.

    #243430
    manicexpression
    Participant

    In the Dashbord, under users, go to profile fields, go to Add New Field, and in a box on the right there should be a requirement box, just switch it from Not Required to Required.

    #243426
    djsteveb
    Participant

    @katiemeeks
    someone posted a similar question 4 days ago ( https://buddypress.org/support/topic/i-want-to-nobody-can-not-change-own-gender/ )

    someone else answered to take a look at http://buddydev.com/plugins/bp-non-editable-profile-fields/

    I have not used this yet – but it sounds perfect for this kind of thing.

    #243408
    danbp
    Participant

    On a single install: danshboard > users > profile fields( your-site.com/wp-admin/users.php?page=bp-profile-setup).

    Base(primary)tab, then use Edit button.

    #243322
    danbp
    Participant

    Here an example for profile field lenght with some comments.

    function bpfr_custom_textfield_length() {	
    	
    	//Check if user is logged in & if xprofile component is activated
    	if ( is_user_logged_in() && bp_is_active( 'xprofile' ) ) :	
    	$my_custom_textfield = bp_get_member_profile_data( 'field=Brief Biography&user_id='.bp_get_member_user_id() );	
    	
    	/* 
    	 * The length = number of characters, not words.
    	 * Set the number of caracters to show. 
    	 * The 3 dots are the appended text ending the excerpt.
    	 * Don't remove the quotes if you change this
    	 * BuddyPress 2.1 will add new class and id for custom fields. 
    	 * The span can be omited to style this part. See ticket #5741
    	 */
    	if ( strlen($my_custom_textfield) > 20) :  //adjust to your need
    	$my_custom_textfield = substr($my_custom_textfield, 20).'...'; //adjust to your need
    	endif;
    	// uncomment the following line to get a span around the displayed field content
    	// echo '<span class="short-custom">'. $my_custom_textfield; .'</span>';
    	// comment the following line if you use the span
    	echo $my_custom_textfield;	
    	
    	endif; // is_user_logged_in
    }
    add_action( 'bp_directory_members_item', 'bpfr_custom_textfield_length' );

    Ticket #5741

    #243298
    Kailan Wyatt
    Participant

    You can try this plugin by BuddyDev

    BuddyPress Non Editable Profile Fields

    djsteveb
    Participant

    I would GUESS that you could edit that plugin to add in the code as mentioned above https://buddypress.org/support/topic/how-users-can-link-to-their-profile/

    Or ask the plugin author for clarification.

    I stopped using that plugin when they added the extra security stuff for strong passwords that broke things for me.. however the plugin’s support page is pretty active, and given that he/she has options for redirecting users after login based on role – there may be an easy way to add such functionality to the plugin by asking the plugin author.

    There is a bit of info with some of the functions here ->https://codex.buddypress.org/themes/members-navigation-menus/

    I see others are asking about bp xprofile fields and such within the them my login support forum,
    ( wordpress.org/support/plugin/theme-my-login )
    so hopefully this plugin author will add more and more BP options – I enjoyed using that plugin some time ago – hope it continues to mature.

    #243094
    djsteveb
    Participant

    @olliecard – I’m sure there are many ways to accomplish this, however I am not sure that buddypress is easily adaptable to some of the requirements – privacy for certain things, restricting profiles and such. I hope someone can chime in an share methods for using BP in this way, I’d love to see those options.

    You could play with things like s2member for some restrictions and payments even – but restricting BP stuff is a challenge I think. Using other member and restrictions plugins with regular wordpress is pretty solid.

    I believe you may be able to achieve your goal using some other WP plugins – there are many others that get into profiles, membership, restrictions, classifieds and such.

    It might be 50 hours of work to mash all the various components together in a perfect way – and if so you may want to look at what wpmudev has withe their “membership 2” plugin and others that mix with it. wpmudev peeps had quick answers and solutions for something similar I posted about there years ago. I think their prices are double what they should be – but the support there exists, and if you are looking at a serious project it may be best to get into a professional support system like that.

    Of course you would mix and match some of the free plugins in the wp-repo and probably come out with something – press permit, profile plugins, s2member – custom fields, tweak some themes – maybe even go WP-MS multi site for some semi-separated static things – and you may achieve what you are describing as well.

    I’d love to see others post about other options, and I’d love to see BP have more fine grained control over things – it’s moving in that direction with things like user levels and such so the future with bp is possible, I just don’t think it’s there yet, and likely won’t be playing well with others anytime soon – and getting code help with BP – even if you offer to pay for it – is not the easiest thing in the world.

    2 cents from a random user – not an expert

    #242856
    shanebp
    Moderator

    It’s much easier to hide profile groups that aren’t Base.
    Have you tried putting the Rider fields in another group?

    #242779
    Garrett Hyder
    Participant

    Thanks @shanebp,

    Sadly neither of these filters will allow me to modify the ‘(required)’ text itself which is what I’m looking for, I guess I’m a little off in my request encompassing the entire label text as you pointed out the field name is filterable it’s the required portion that is outside of it as you can see in the code snippet;

    <label for="<?php bp_the_profile_field_input_name(); ?>">
    	<?php bp_the_profile_field_name(); ?>
    	<?php if ( bp_get_the_profile_field_is_required() ) : ?>
    		<?php esc_html_e( '(required)', 'buddypress' ); ?>
    	<?php endif; ?>
    </label>

    And yes I realize I can replace it through the text-domain and a .po file, but I’d like to keep the (required) in the Buddypress Xprofile and target the inclusion of these fields specifically on the Woocommerce Checkout page where they’re included through the Buddypress for Woocommerce integration.

    I’ll open an enhancement request, thanks for pointing that out, and specify the targetting of the (required) portion of the label specifically.

    Appreciated,
    Cheers

    #242712
    startershut
    Participant

    There seems to be a gap between the two programs in terms of profile fields.

    When you create a custom field via Events Manager Form Editor it stores it on the Your Profile view under ‘Further Information”. Now this field is not available under the domain.com/members/user view to edit. It is available to edit in the admin view but I don’t want to expose that view to users.

    Is there a way to display these fields to user so they can edit them at domain.com/members/user

    sammjv
    Participant

    My coding skills are very less but want exactly what @Flush said I saw the code in bp but I don’t now what exact code to use to modify the above said piece of code.
    Will you guys provide the conditional statement to load two files based on created profile fields.

    I don’t know weather @andy277 also wants same.

    #242601
    djsteveb
    Participant

    I am interested in finding out what you come up with in regards to this.

    I tried to use something like:

    ‘field’ => 2,
    );

    (some info from https://codex.buddypress.org/themes/guides/displaying-extended-profile-fields-on-member-profiles/ )
    to replace the actual names I was using in a page title template thing, and never got it to work – but I have no idea what I am doing – trying to franken-hack a bit of code provided by one person and replace the field names with field numbers so the code would work with a different site I was playing with – when I tried replacing the name with this field number thing it did not work – but again I don’t understand php nor bp stuff well enough to know if I just missed a character, or something else was needed, or the function isn’t working as it should.

    rgrober
    Participant

    One last question. I appreciate your patience, as I am definitely nascent when it comes to this.

    The profile field I’m trying to display is a series of checkboxes. When I implement your code, the page is displaying “Array” for the field data.

    Can you direct me to a resource or method to allow checkbox fields to be displayed?

    Thank you again!

    #242561
    danbp
    Participant

    Custom code goes to bp-custom.php or child-theme’s functions.php
    Code on second answer shows an usage example, it’s not the code you have to use.

    As you asked for register details, i thinked you want a resume of the registration with all mandatory xprofile fields information…

    BP on a single install doesn’t sent a welcome email. This happens only on a MS install. But you add that manually. Read here:

    Send Welcome email to Users when they activate their account on WordPress & BuddyPress Based Social Network

    #242504
    danbp
    Participant

    biographical information, fax and maybe even addresses. These are WordPress or theme specific fields which are not visible on frontend profiles. BP doesn’t use them if you use the xtended profile component.
    Anyway…

    Try this snippet, and use it to your need from within your child-theme functions.php

    function remove_user_fields(){
    
    // Print jQuery that removes unneeded elements
      ?>
    
      <script type="text/javascript">
        jQuery(document).ready( function($) {
        // the magic goes here...
          var ids = ['#description', '#comment_shortcuts', '#color-picker']; // Check in page source for other ID's
          for (var i = 0; i < ids.length; i++) {
            $(ids[i]).closest('tr').remove();
          }
        });
      </script>
    
      <?php
    }
    
    add_action( 'admin_footer', 'remove_user_fields' );
    #241951
    djsteveb
    Participant

    @baldarab – well you can add some more original text to each of the “groups” and get some “Above the fold” – that may help a bit,
    some other problems..

    your sitemaps (http://www.freakyrivet.com/sitemap_index.xml ) (created by yoast) – are not showing any of your “activities / groups” – however if you create a sitemap with a tool like: https://www.xml-sitemaps.com/download/freakyrivet.15149203/sitemap.html?view=1

    It does show your groups pages in the sitemap created by an actual spider – so add this to another fail with BP and yoast not playing well. I am guessing same for members page since those are “pseudo pages”.

    Looking at how another sitemap maker sees your pages, it obvious that you should add some code to get original page titles and meta descriptions. You have about 70 or so pages with the same page title and description.

    I just tested that code from wpmudev that I posted above with a newer BP install / updated version and it is working for me. SO you could give that a go – although you will likely have to edit the code and change the name of the profile fields to match your site profile fields (for the code to pull and create info on the member’s pages)

    So – your pages are a bit thin on original content, especially above the fold, you have no or duplicate page titles and meta descriptions – and your site is instructing google and others that those pages are not important as they are not in your published sitemap.

    I would tell yoast to not make your sitemap and just upload your own.

    I would also – not sure why your yoast settings are having it makes mpas for categories and tags – I normally put settings to noindex nofollow all tags and category pages and author pages.. well that’s a lot of free advice – anyhow – hope that info makes sense / helps..

    #241895
    vince.fr
    Participant

    Hey Pixelguy,

    you raised an issue I had to tackled and thanks to @graylien it works fine.
    As you also mentioned I had the save button repeated each “tab” and I found a solution that seems working so far but I would love real tech guy to confirm it’s not a mistake 🙂

    at the end of the edit.php file we worked on you can find this :

    	<?php do_action( 'bp_after_profile_field_content' ); ?>
    
    	<div class="submit">
    		<input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?> " />
    	</div>
    
    	<input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_field_ids(); ?>" />
    
    	<?php wp_nonce_field( 'bp_xprofile_edit' ); ?>
    
    </form>
    
    <?php endwhile; endif; ?>
    
    <?php do_action( 'bp_after_profile_edit_content' ); ?>

    what I understand is that it says :
    – after the form you call bp_after_profile_field_content
    – then you show the button and the hidden fields
    – then you close the form
    – and you close the loop by endwhile – endif

    and @graylien gave us a trick to make the loop “looping” for every tab and not only just one so what I did was to take the endwhile -endif closing the loop inside the form and before the button so the button will remain in the form but not repeated as the loop is closed now.

    	<?php do_action( 'bp_after_profile_field_content' ); ?>
    
    	<?php endwhile; endif; ?>
    
    	<div class="submit">
    		<input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?> " />
    	</div>
    
    	<input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_field_ids(); ?>" />
    
    	<?php wp_nonce_field( 'bp_xprofile_edit' ); ?>
    
    </form>

    I hope that my trick is right and that my explanations are clear as I’m neither a developper nor an native english speaker 🙂

    Please come back to me wether if it works,

    Cheers,
    vincent

    #241848
    Quinn Goldwin
    Participant

    Thank you @djsteveb

    I just thought of a different way to word what I’m asking for.

    Is there any way to add @ mentions in xprofile fields? I can make an x profile field called A list team and would like users to add “ie. @jonhdoe so users can be directed to the profile.

    Thanks.

    #241844
    maelga
    Participant

    Do you guys have any snippet to display the xprofile fields ID in admin?
    The lesser I go to my db, the happier I am! 🙂

    #241742

    In reply to: Delete profile fields

    shanebp
    Moderator

    You can get the ids by going to .../wp-admin/users.php?page=bp-profile-setup
    Click or roll-over the Edit links for group or single field.
    And you’ll see group_id & field_id.
    btw – you can delete groups and / or single fields on that wp-admin page.

    #241741

    In reply to: Delete profile fields

    Henry Wright
    Moderator

    You could put it in your functions.php file, or even your bp-custom.php file if you have one. It only needs to be run once so make sure you remove it after visiting your website in a web browser.

    Finding the group ID or the field ID is something you’ll need to do yourself. Take a look in your database and find table bp_xprofile_fields. Then look for the id column and the name column. Say the name of the field you want to delete is ‘Social’. Just look for ‘Social’ in the name column and find the id of that particular row. Then you have your field ID.

    #241668
    stegtflesk
    Participant

    Thx for the replay, but its not the value of the field i need, but the array of options i have created in the wp backend.

    Ex.

    I have created a new profile field in the “User->profile fields” page in the wp backend. Calling it eyecolour.

    So i select the field to be a “select, dropdown” (still in the wp backend). I enter an array of eyecolours as options and saves the field and set the default colour as green. I am now able to extract the value of the field as you shown above. But i wanto get the full array of all the options of the field pref. as and array. Then i would be able to create the dropdown, dynamically in the frontend, using the options i allready created.

    psudocode example (i know its the wrong functions, its just to show the logic):

    $selectedOption = get_profile_field(‘eyecolor’);
    $possibleOptions = get_profile_field_options(‘eyecolor’); //this function i need!! 😛

    foreach ($possibleOptions as $option) {

    if ($option == $selectedOption) {

    echo ‘<option selected value=”‘.$option.'”>’.$option.'</option>’;

    } else {

    echo ‘<option value=”‘.$option.'”>’.$option.'</option>’;

    }

    hope this makes sense 😀

    #241617
    danbp
    Participant

    Hi

    instead using a link field type, use a normal text box and harcode the link to social account in the function. That way, the user has only to enter his account name and the link is build when the data is on front-end.

    profile fields are stripped
    profile datas are made clickable by default for search purpose in BP
    We don’t want this for icons or when linking to a social network.

    Here an usage example which use fontawesome to add the icons. That the general idea, change it to your need.

    function bpfr_socialize_profile () {	
    
    echo '<br>'; 
    
    if ( $data = bp_get_profile_field_data( 'field=Twitter ' ) ) : 
    ?>
    
    <a href="http://twitter.com/<?php echo xprofile_get_field_data( 'Twitter', bp_displayed_user_id() );?>/" target="_blank" title="Twitter"><i class="icon-twitter"></i><?php echo $data; ?></a>&nbsp;
    
    <?php endif;
    
    if ( $data = bp_get_profile_field_data( 'field=Facebook ' ) ) : 
    ?>
    
    <a href="http://facebook.com/<?php echo xprofile_get_field_data( 'Facebook', bp_displayed_user_id() );?>/" target="_blank" title="Facebook"><i class="icon-facebook"></i><?php echo $data; ?></a>		
    
    <?php		
    endif;
    }
    add_filter( 'bp_before_member_header_meta', 'bpfr_socialize_profile' );
Viewing 25 results - 926 through 950 (of 3,608 total)
Skip to toolbar