Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 926 through 950 (of 3,593 total)
  • Author
    Search Results
  • #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' );
    Quinn Goldwin
    Participant

    Never mind I used this css coding to add line breaks, still not perfect but it looks so much better than it used to!

    #buddypress table.profile-fields p {
    	margin-top: 10px !important;
    	margin-bottom: 10px !important;
    }
    
    Henry Wright
    Moderator

    Right. So it looks as though it could be something the BuddyPress core team might need to look at. Can you open a Trac ticket explaining how the profile fields are displaying in the wrong order? If you could provide as much info as you can that’d be great.

    You can use the same username and password as you use here in the forums.

    #241481
    whoaloic
    Participant

    Hello,
    actually I mean to merge content of members/single/settings/general.php and members/single/profile/edit.php.
    My idea is to get custom BP profile fields (username) along with the email and password fields in the general settings tab.
    When I copy plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/ to mytheme/buddypress/members/single/, those files don’t override plugin core files.

    #241425
    Anonymous User
    Inactive

    Hello danbp,

    So far i understand you use bbPress and now you want a members directory, and eventually some additionnal fields on userโ€™s profiles. And most of this should be private or โ€œmembers onlyโ€, right ?
    >> Correct, combined with private bbpress forums on a website with also public content.

    I have set the “members” page I created as private, but it is still displayed when I go on the page as a logged out user. Why is that so?
    Would it work if I would not connect the “members” page with BuddyPress in the settings, set the page to private and pull the dynamic content for the members list by a stortcode?

    I can read into the codex of course, but do I need to learn to code to use BuddyPress?

    Nicole

    #241424
    danbp
    Participant

    Hi @nmschaller,

    bbPress is a separate plugin and BuddyPress doesn’t manage bbPress. For questions about forum settings, you can use the bbPress support.

    When you use BP groups component, you can add a forum to each of them. In this case only, you have to install bbPress. Of course you can also use bbPress as standalone on a BP install, or use bbPress with WordPress, without BP.

    BP doesn’t use “pages” but templates, and the only pages created during installation are in for internal purpose. The “member” page is used to show the member directory, but also profiles or members activities. This dynamic content is displayed on different templates, depending the context, and using WP’s page system to fire all that via a same page slug (aka internal path).

    your-site/members/some/thing/ where /some/thing/ is using his own template part displayed on “members page”.

    So far i understand you use bbPress and now you want a members directory, and eventually some additionnal fields on user’s profiles. And most of this should be private or “members only”, right ?

    The main problem is that you want some custom behave that need some knowledge (you seem to have), but you cannot edit functions.php Unfortunately, this is the place where to add customisation. And what to tell about bp-custom, which is another crucial cusmisation file.

    You want to drive and have no steering wheel ! Annoying… ๐Ÿ˜‰

    The question is Do you need BuddyPress or can you use another solution ? ๐Ÿ™‚

    Depends your project, really. Members directory or extended profiles can be done with separate plugins.

    Read here:
    http://chrislema.com/best-wordpress-membership-plugin-2014/

    Or digg into the Codex if you decide to use BuddyPress.

    #241391
    shanebp
    Moderator

    There is a filter hook for displaying profile fields – so you don’t need to hack core files.

    apply_filters( 'bp_get_the_profile_field_value', $field->data->value, $field->type, $field->id );

    Use str_replace to insert your target blank string.

    function swiss_target_blank( $field_value, $field_type, $field_id ){
    	
    	if( $field_id == 123 ) { // get the field_id from edit field url in wp-admin
    
    		$field_value = str_replace('rel="nofollow"', 'rel="nofollow" target="_blank"', $field_value);
    	}
    
    	return $field_value;
    }
    add_filter('bp_get_the_profile_field_value', 'swiss_target_blank', 11, 3);
    danbp
    Participant

    How to create MT is explained above, and you’re lucky, as a brand new plugin was published a few days back by @offereins: BP XProfile Field For Member Types

    Proof of concept for the implementation of member-type specific profile fields in BuddyPress.

    https://github.com/lmoffereins/bp-xprofile-field-for-member-types

    Successfully tested with my custom code(in bp-custom.php), BP 2.3.2.1 and WP 4.2.2

    #241319
    danbp
    Participant

    See if this can help you:
    https://buddypress.org/support/topic/men-woman-couple/

    Also some topics about multi search criteria, like this one
    https://buddypress.org/support/topic/multiple-search_terms-displays-nothing/

    Note also that xprofile fields values are clickable by default. This let users get a list of members who entered same value.

    Field name > Gender, when male is clicked you get all males list.

    For more detailed result, you have to buid your own solution or to use a dedicated plugin. See
    https://wordpress.org/plugins/buddypress-global-search/

    #241298
    danbp
    Participant
    Aethermage
    Participant

    Thank you for your reply @danbp.

    I actually created the profile field myself in Dashboard > Users > Profile Fields to emulate a captcha plugin. For some odd reason it appears under Account Details instead of under Profile Details on the Register page and is missing from the backend so I am unable to edit/delete it.

    #241044
    shanebp
    Moderator

    If the role is set to vendor and xprofile fields are not involved, then there is a WP hook for that.

    Assuming the group_id is 8, try:

    function jeffery_join_vendor_group( $user_id, $role, $old_roles ) {
    	if( $role == 'vendor' ) {
    		groups_accept_invite( $user_id, 8 );
    	}
    }
    add_action( 'set_user_role', 'jeffery_join_vendor_group', 11, 3 );
    #241005
    danbp
    Participant

    When you use WordPress alone, you can use many plugins for registering.

    If you use BuddyPress, you also use his fonctionnalities.
    One of them, is Members, which comes also with extra components, like extended profile.

    When you use extended profile, it is like using a register plugin for WP, with his own extra fields you can create/add to the original WP registering process. After that, each user can handle/view these fields on his profile.

    Now you have to choose:
    – WP alone, with his poor profile fields
    – WP + BP, with rich profile fields
    – WP + BP, without xprofile component (and users go back to the original profile fields aera).
    – or ask on ninja plugin support for improvement guidance to apply with BuddyPress.

    #240969
    peter-hamilton
    Participant

    One of the few things I not tried much is the add profile fields option, this is where I guess that can be achieved

    Small example on my sites profile

    #240825
    ct25
    Participant

    Today I found there was a member-loop.php added to my theme files. Could this be part of the problem? Should I add the member template file to the theme as well?

    <?php
    
    /**
     * BuddyPress - Members Loop
     *
     * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
     *
     * @package BuddyPress
     * @subpackage bp-default
     */
    
    ?>
    
    <?php do_action( 'bp_before_members_loop' ); ?>
    
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?>
    
    	<div id="pag-top" class="pagination">
    
    		<div class="pag-count" id="member-dir-count-top">
    
    			<?php bp_members_pagination_count(); ?>
    
    		</div>
    
    		<div class="pagination-links" id="member-dir-pag-top">
    
    			<?php bp_members_pagination_links(); ?>
    
    		</div>
    
    	</div>
    
    	<?php do_action( 'bp_before_directory_members_list' ); ?>
    
    	<ul id="members-list" class="item-list" role="main">
    
    	<?php while ( bp_members() ) : bp_the_member(); ?>
    
    		<li>
    			<div class="item-avatar">
    				<a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a>
    			</div>
    
    			<div class="item">
    				<div class="item-title">
    					<a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a>
    
    					<?php if ( bp_get_member_latest_update() ) : ?>
    
    						<span class="update"> <?php bp_member_latest_update(); ?></span>
    
    					<?php endif; ?>
    
    				</div>
    
    				<div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div>
    
    				<?php do_action( 'bp_directory_members_item' ); ?>
    
    				<?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' );
    				  */
    				?>
    			</div>
    
    			<div class="action">
    
    				<?php do_action( 'bp_directory_members_actions' ); ?>
    
    			</div>
    
    			<div class="clear"></div>
    		</li>
    
    	<?php endwhile; ?>
    
    	</ul>
    
    	<?php do_action( 'bp_after_directory_members_list' ); ?>
    
    	<?php bp_member_hidden_fields(); ?>
    
    	<div id="pag-bottom" class="pagination">
    
    		<div class="pag-count" id="member-dir-count-bottom">
    
    			<?php bp_members_pagination_count(); ?>
    
    		</div>
    
    		<div class="pagination-links" id="member-dir-pag-bottom">
    
    			<?php bp_members_pagination_links(); ?>
    
    		</div>
    
    	</div>
    
    <?php else: ?>
    
    	<div id="message" class="info">
    		<p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p>
    	</div>
    
    <?php endif; ?>
    
    <?php do_action( 'bp_after_members_loop' ); ?>
    
    #240478
    patrix87
    Participant

    Same problem here,

    I’ve even tried to modify xprofile_filter_kses directly to add img tag without any success.

    Apparently the fields are being filtered more than once.

    here’s my modified code

    function xprofile_filter_kses( $content, $data_obj = null ) {
    	global $allowedtags;
    
    	$xprofile_allowedtags             = $allowedtags;
        $xprofile_allowedtags['a']['img']['rel'] = array();
    
    	$xprofile_allowedtags = apply_filters( 'xprofile_allowed_tags', $xprofile_allowedtags, $data_obj );
    	return wp_kses( $content, $xprofile_allowedtags );
    }
    
Viewing 25 results - 926 through 950 (of 3,593 total)
Skip to toolbar