Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1,501 through 1,525 (of 3,820 total)
  • In reply to: File Sharing Embedding

    @shanebp

    Moderator

    Try this: https://wordpress.org/plugins/buddydrive/

    Google this: buddypress file sharing

    Depending on your ability as a coder, you could adapt some code or write it from scratch.

    @shanebp

    Moderator

    …you are losing people and ultimately future profits and benefits

    BP is free open source code. There are no direct profits.
    These forums are moderated by volunteers.
    There is no promise, explicit or otherwise, that you will get an answer.

    How does someone who does not constantly do coding for a living really get BuddyPress to function?

    The primary intended audience for users of the BuddyPress codebase: Site Builders and WordPress Developers.

    The widgets and shortcodes you tried ( BuddyPress Sitewide Activity ? ) probably do not include the images because widgets generally output a compressed view and images can take a lot of screen area. It would be relatively simple to tweak such a widget to include activity images.
    If you don’t know how to code, you can post a job here.

    @shanebp

    Moderator

    I have been able to add it for everyone…

    How did you do that?
    Wrap it in a conditional: if ( bp_is_my_profile() ) {...}

    http://hookr.io/functions/bp_is_my_profile/

    @shanebp

    Moderator

    Please do not call out people directly unless they have already responded to your thread.

    You’re using a premium theme and one, maybe two, premium plugins.
    Your questions should be directed to the support provided by your purchases.
    You might find somebody here willing to help you.
    And you have a better chance of getting help if you show what you’ve already tried.
    ( Please use a service like gist when sharing code. )

    @shanebp

    Moderator

    Try the solution near the bottom of this codex page:
    https://codex.buddypress.org/emails/#filter-from-address-and-name

    add_action( 'bp_email', function( $email_type, $email_obj ) {
    $email_obj->set_from( "custom@example.com", "Custom Website Name" );
    }, 10, 2 );

    @shanebp

    Moderator

    What is thread_id? if(!thread_id) {
    Try removing that conditional.

    Please do not double post.

    @shanebp

    Moderator

    This works for me when pasted in either theme/functions.php or bp-custom.php
    And using the short code on a post or page.

    function sbp_show_number_of_members( $atts ){
    	$count_members = bp_get_total_site_member_count();
    	return $count_members;
    }
    
    function sbp_register_shortcodes() {
    	add_shortcode('member-count', 'sbp_show_number_of_members'); 
    
    }
    add_action('init', 'sbp_register_shortcodes');  

    @shanebp

    Moderator

    Try fixing the code first.
    Should be:

    function register_shortcodes() {
    	add_shortcode('member_count', 'show_number_of_members'); // fixed
    	add_shortcode( 'postcount', 'post_count_function' );
    }
    
    add_action('init', 'register_shortcodes');  // fixed
    In reply to: CAN BE DELETED

    @shanebp

    Moderator

    You’ll need to debug.
    Did you try switching from the groups component to members, as I suggested?

    echo bp_current_action(); shows the current action.

    echo bp_current_component(); shows the current component.

    Remove the call to send_transfer_offer() until you’re sure you’re checking for the correct conditions.

    In reply to: CAN BE DELETED

    @shanebp

    Moderator

    You need to check if the button was clicked.
    Try something like this:

    function jay_check_transfer_click() {
    	
        if ( !bp_is_groups_component() && !bp_is_current_action( 'transfer_offer' ) ) 
    	return false;
    	
         send_transfer_offer();
    	
    }		
    add_action( 'bp_actions', 'jay_check_transfer_click' );

    In all your code, you may want to reference the members component instead of groups.

    @shanebp

    Moderator

    Switch momentarily to a WP standard & free theme that comes with WP – like TwentyThirteen, etc.
    Then check to see if your issue still exists – if it doesn’t, then you know the issue is somewhere in your premium theme.

    @shanebp

    Moderator

    bp_member_profile_data() will echo the data, so you shouldn’t add an echo.

    Try:

    $originalDate = bp_get_member_profile_data( 'field=geboortedatum' );
    $newDate = date("d-m-Y", strtotime($originalDate));
    echo $newDate;

    More info on the php date function:
    http://php.net/manual/en/function.date.php

    In reply to: [Resolved] Last activy

    @shanebp

    Moderator

    Create a template over-load of this file:
    buddypress\bp-templates\bp-legacy\buddypress\members\single\member-header.php

    In the overload, remove the span that shows the last_activity blurb.

    In reply to: how to add new members

    @shanebp

    Moderator

    Re appearing on the members list, you can handle them has a batch; much faster than logging in as each member.

    For example, for all subscribers:

    function steve_add_last_activity() {
    
      $subscribers =  get_users( 'fields=ID&role=subscriber' );
      
       foreach ( $subscribers as $user_id ) {
    
            bp_update_user_last_activity( $user_id, bp_core_current_time() );
    
       }
    
    }
    //add_action('bp_init', 'steve_add_last_activity' );

    Uncomment the add_action ( iow. remove the // ) whenever you want to use the function.
    Put it in your theme functions.php or in bp-custom.php

    @shanebp

    Moderator

    A bit simpler approach is to create a variable:

    $display = false;
    if ( is_super_admin() || bp_is_my_profile() )
       $display = true; 

    Then use it:

    ...
    'show_for_displayed_user' => $display
    ...

    @shanebp

    Moderator

    Please use the code button when posting code.

    Try changing this: <? php
    To this: <?php

    In reply to: New Group -> 404

    @shanebp

    Moderator

    Testing will require a login.
    Can you post a user name / password for testing?

    Can you post the url that throws the 404?

    also – just curious – which plugin are you using to pull the Facebook feed in the footer?

    @shanebp

    Moderator

    In your filter functions, why not check for page_id or title – if not available, then just return.

    Without seeing the code, we cannot tell why your custom filters are being called on the default Members Directory page.

    If you want to share the code – please do not post it here.
    Instead, create a gist and share the link to that gist.

    @shanebp

    Moderator

    How are you loading your page template?
    Have you tried checking the page title?

    In reply to: the_ID = 0

    @shanebp

    Moderator

    The id is zero due to the way BP constructs those pages.
    The how and why is a long answer – you may want to look at the codebase to see the how.

    In any event, you will not be able to change that.
    Your best bet is to add to the display conditions the user has set.

    Perhaps…

    Give them an option to select the Groups Directory page.
    Then use bp_is_groups_directory() to check if they are on that page.

    Or maybe specific single groups.
    Then check to see if they are on a single group page by using groups_get_current_group().

    So the basic approach is to use template tags to find out where the user is and then show or not show an ad based on the the display conditions the user has set.

    In reply to: Members showing

    @shanebp

    Moderator

    You mean you’re using this [bp_members] as a shortcode?
    BuddyPress does not provide that shortcode, afaik.
    So, you are using some plugin that provides that shortcode.
    You need to pose your question the the author of that plugin.

    @shanebp

    Moderator

    Only members with the capability ‘bp_moderate’ will see that checkbox option.
    And only site administrators are given that capability.
    So unless you have a plugin that gives that capability to other members, nobody else can see that option. To check, log into your site as a non-admin.

    If you still want to remove it, create a template overload of this file:
    buddypress\bp-templates\bp-legacy\buddypress\members\single\messages\compose.php
    In your overload, remove this:

    <?php if ( bp_current_user_can( 'bp_moderate' ) ) : ?>
    	<p><label for="send-notice"><input type="checkbox" id="send-notice" name="send-notice" value="1" /> <?php _e( "This is a notice to all users.", 'buddypress' ); ?></label></p>
    <?php endif; ?> 

    @shanebp

    Moderator

    It is not stored in the database.
    It is constructed – for an example, see:
    http://hookr.io/functions/bp_core_get_user_domain/

    @shanebp

    Moderator

    Try:

    function communityprofile_screen() {
       bp_core_redirect( site_url( '/community/profile/' . bp_displayed_user_username() ) );
    }

    @shanebp

    Moderator

    Manually delete the existing entries.
    Place this in your theme/functions.php or in bp-custom.php to prevent creation of new entries.

    function bp_activity_do_not_save( $activity_object ) {
    	$exclude = array(
    	        'updated_profile',
    	        'new_member'
    	    );
    	
    	if( in_array( $activity_object->type, $exclude ) )
    		$activity_object->type = false;
    }
    add_action('bp_activity_before_save', 'bp_activity_do_not_save', 10, 1 );
Viewing 25 replies - 1,501 through 1,525 (of 3,820 total)
Skip to toolbar