Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 2,282 total)
  • Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Good idea – you can open an enhancement ticket here using the same user-name & pw you use for these forums.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Have you tried asking the creators of the Sahifa WP theme?

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    You can put it in your theme/functions.php or in bp-custom.php.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Try:

    function jawas_bp_remove_feeds() {
    	remove_action('bp_actions', 'bp_activity_action_sitewide_feed');
    	remove_action('bp_actions', 'bp_activity_action_personal_feed');
    	remove_action('bp_actions', 'bp_activity_action_friends_feed');
    	remove_action('bp_actions', 'bp_activity_action_my_groups_feed');
    	remove_action('bp_actions', 'bp_activity_action_mentions_feed');
    	remove_action('bp_actions', 'bp_activity_action_favorites_feed');
    	remove_action('bp_actions', 'groups_action_group_feed');
    }
    add_action('init', 'jawas_bp_remove_feeds');
    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    It won’t work unless you pass a ‘valid’ value. And you don’t have to use an array for a single value.
    So if you have not changed the option value ( via Users > Profile Fields ) to ‘Subscribe to Newsletter Digest’, it will fail.

    To ‘uncheck’ the box – just delete that row for that user in the _bp_xprofile_data table.
    xprofile_delete_field_data( field name or ID, $user_id )

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Please use the code button when pasting code.

    That code will remove all the feeds listed from all rss feeds – it isn’t specific to MailChimp.
    There may be a way to remove certain feeds from the MailChimp template – but you should ask them.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Did you try searching for info re BP rss feeds?
    Perhaps this will help:
    https://buddypress.org/support/topic/disable-all-rss-feeds-update/

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    I’m not aware of any set of plugins that will provide exactly what you need.
    There are plugins for some of your requirements.
    But you will need to provide custom code to bridge the gaps.
    So unless you are a developer, it will not be possible at free/low cost.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Please do not double post – your duplicate post has been deleted.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Unless you are explicitly using the bp-default theme, not recommended, you should always use these templates: buddypress\bp-templates\bp-legacy\

    iow. this members-loop:
    buddypress\bp-templates\bp-legacy\buddypress\members\members-loop.php

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Interesting… so the value is being cached somewhere… an object?

    As you may have noted, bp_get_member_profile_data does not require passing in the member ID – IF you are in a members loop. You can pass in the ID as an array argument.

    But xprofile_get_field_data can be used anywhere and always requires passing the ID.

    is there a reason not to do it that way?

    bp_get_member_profile_data will try to get the data from the global before resorting to a database call.
    xprofile_get_field_data will always make a database call – for each piece of data.
    So there would be some performance hit.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Thx @sm60. I’ve adjusted my answer and the codex entry.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Then there is some other issue specific to your install.
    I believe wpengine has aggressive caching turned on by default.

    Try:

    $your_name = false;
    $your_name = bp_get_member_profile_data( 'field=Your Name' );
    if ( $your_name != false && $your_name != NULL ) 
       echo $your_name;
    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    #2

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    To determine if the issue is in your theme, try switching momentarily to a WP theme like 2013.
    You’ll need to copy members-loop.php to a buddypress folder in that theme.

    You can only echo the data if it exists.
    Try:

    $your_name = bp_get_member_profile_data( 'field=Your Name' );
    if ( $your_name != false ) 
       echo $your_name;
    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    You mean the Groups component of BP?

    BP does not support specific themes.
    Themes can support BP if they choose to.
    You should contact the authors of your theme – there may be simple solution.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    It’s a delicate fix.
    Backup your database first.

    Then try this…

    Don’t delete the current field – Change it to a selectbox.
    Note the field_id ( in the wp-admin url )

    Then adapt and run this function to add countries:
    https://gist.github.com/shanebp/119ffd879acc56c324ab

    Use these parts:

    $countries = array( ... ); 
    
    foreach (  $countries as $country ) {
    	
    	xprofile_insert_field( array(
    		'field_group_id'	=> 1,
    		'parent_id'		=> 28,  // the field_id of the field
    		'type'			=> 'option',
    		'name'			=> $country,
    		'option_order'   	=> $i++
    	));
    	
    }
    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    It is always a bad approach to edit core files.
    That’s why a filter is provided to accomplished exactly the task described above.
    apply_filters( 'bp_user_can_create_groups', $can_create, $restricted );

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    When a xprofile field is deleted, the field meta data and each member’s data re that field is NOT deleted.

    But the data is orphaned – iow. the data is related to a field ID that no longer exists.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Delete the rest of the files.
    Only use overloads of the template files you want to change.
    Follow the directory structure used in bp-templates/bp-legacy/

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Try:
    add_action( 'wp_head', 'hide_bubble_logged_out' );

    https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Create a template overload of this file:
    buddypress\bp-templates\bp-legacy\buddypress\members\register.php

    And carefully adjust it to your needs.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    A lot, maybe most BP sites are not commercial.

    You may want to create a template overload of this file:
    buddypress\bp-templates\bp-legacy\buddypress\activity\entry.php

    To add content to the entries in the activity stream, use this hook in that file:
    do_action( 'bp_activity_entry_content' );

    If you need access to the activity content as part of your ad display decision chain, use the filter hook in buddypress/bp-activity/bp-activity-template/ :
    apply_filters_ref_array( 'bp_get_activity_content_body', array( $activities_template->activity->content, &$activities_template->activity ) );

Viewing 25 replies - 1 through 25 (of 2,282 total)
Skip to toolbar