Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

    @shanebp

    I have a client using CBOX with latest BP & WP.
    Works fine.

    Best place to ask questions:

    https://wordpress.org/support/plugin/commons-in-a-box

    or

    http://commonsinabox.org/groups/help-support/

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    @hnla – maybe a sticky ?
    Or you could keep creating replies…

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    I’ve updated the groups loop codex page to include that usage.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Read the page in the codex.

    Try
    bp_has_groups( 'user_id=NULL' )

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    and ‘only admins’ to be able to edit the page.

    Do you mean site admins?
    If so, why enable group creation on the front end?

    If you need front end creation, you’ll need to manipulate the create steps.
    Use these hooks in function groups_action_create_group() in \bp-groups\bp-groups-actions.php

    do_action( 'groups_create_group_step_save_' . bp_get_groups_current_create_step() );
    do_action( 'groups_create_group_step_complete' );

    Or completely by-pass the BP create groups code with your own – not recommended.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Now in the WP plugin repo:
    https://wordpress.org/plugins/bp-local-avatars/

    And still available here: PhiloPress

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    bp_group_member_id() will echo the id.
    You want bp_get_group_member_id().

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    There is no limit on members per group.
    If you have a limit, then it is something particular to your installation.

    To manage any group, including add/remove users, go to DashBoard > Groups and roll-over a group name and click ‘Edit’.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    As you can tell by looking at the ticket in that thread, it was solved and closed 3 years ago.

    If you are having an issue, please be specific and follow these guidelines:
    How to Ask for Support

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    afaik, that data is not shown by default.
    It is something your theme is adding.
    You should ask the theme author how to change the display.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    The per_page sql is actually in $object->uid_clauses['limit'] as you can see by studying the BP_User_Query class.

    To get pagination to work, you need to filter on bp_ajax_querystring

    There is probably an easier way to do this, but this works for me: gist

    Note that per_page is hardcoded to 2, in two places.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    What plugin are you using to enable ‘followers’ ?
    What version of BP are you using?

    You could try this:

    function addy_remove_profile_nav($nav_array) {
    
         if( is_super_admin() ) 
              return $nav_array;
    
         if ( ! bp_is_my_profile() )
    	$nav_array = '';
    
         return $nav_array;
    }
    add_filter('bp_get_displayed_user_nav_followers', 'addy_remove_profile_nav', 10, 1 );
    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    This works for me. It’s basically just a cleaner version of what eberger3 did.
    You’ll have to hack the ‘where’ clauses if you want to include search terms.

    function add_sortby_price() { 
    ?>
    	<option value="price">Price</option>
    <?php
    }
    add_action( 'bp_members_directory_order_options', 'add_sortby_price' );
    
    function users_sortby_price( $object ) {
        global $wpdb, $bp;	
    	
        // Only run this if price option is selected
        if ( ! in_array( $object->query_vars['type'], array( 'price' ) ) ) 
    	return;
    	
    
        $field_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", $object->query_vars['type'] ) );
    		
         $object->uid_name = 'user_id';
         $object->uid_table = $bp->profile->table_name_data;
         $object->uid_clauses['select']  = "SELECT u.{$object->uid_name} as id FROM {$object->uid_table} u";
         $object->uid_clauses['where'] = " WHERE " . $wpdb->prepare( "u.field_id = %d", $field_id ); 
         $object->uid_clauses['orderby'] = "ORDER BY u.value";
         $object->uid_clauses['order']   = "ASC";		
    		
    }
    add_action( 'bp_pre_user_query', 'users_sortby_price' );
    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Note that right before the return, I switch to $ch_querystring['type'] = 'alphabetical';
    There is no ['type'] = 'price'; in the class.

    Not sure about this, but instead of
    $ch_querystring['include'] = $users_str;
    Try
    $ch_querystring['user_ids'] = $users_str;

    Read the very bottom of this page.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Did you try using the tools?
    In wp-admin, Tools > BuddyPress

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Did you look thru the files for BuddyPress Profile Search ?

    Did you notice this action in bp-profile-search\bps-search.php ? And what it does?
    add_action ('bp_after_members_loop', 'bps_remove_filter');

    Might be a clue.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    You don’t need to touch any core files to add an Order By.

    Example for adding a Contributor option, put in bp-custom.php or theme/functions.php

    // add order options to members loop
    function ch_member_order_options() {
    ?>
       <option value="contributing"><?php _e( 'Contributing Members', 'buddypress' ); ?></option>
    <?php
    }
    add_action( 'bp_members_directory_order_options', 'ch_member_order_options' );
    
    // filter ajax members by contributing
    function ch_filter_ajax_querystring( $querystring = '', $object = '' ) {
    
    	if( $object != 'members' )
    		return $querystring;
    
    	$defaults = array(
    		'type'            => 'active',
    		'action'          => 'active',
    		'scope'           => 'all',
    		'page'            => 1,
    		'user_id'         => 0,
    		'search_terms'    => '',
    		'exclude'         => false,
    	);
    
    	$ch_querystring = wp_parse_args( $querystring, $defaults );
    
    	if( $ch_querystring['type'] == 'contributing' ) {
    	
    // to get members by xprofile field, you need some custom sql here
    // here's an example: 
    //https://codex.buddypress.org/developer/loops-reference/the-members-loop/#code-examples
    
    		$users = get_users( array( 'fields' => array( 'ID' ), 'role' => 'contributor' ) );
    		
    		$users_str = '';
    		foreach ( $users as $user ) {
    	             $users_str .=  $user->ID . ',';
    	        }
    		$users_str = rtrim($users_str, ",");
    
    		$ch_querystring['include'] = $users_str; 
    		$ch_querystring['type'] = 'alphabetical'; 
    		
    		return $ch_querystring;
    		
    	}	
    	
    	else
    		return $querystring;
    			
    }
    add_filter( 'bp_ajax_querystring', 'ch_filter_ajax_querystring', 20, 2 );
    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Use this hook:
    do_action_ref_array( 'messages_message_before_save', array( &$this ) );
    In function send() in this file:
    buddypress\bp-messages\bp-messages-classes.php

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Members need to log in at least once before they appear on the front end.

    If you have questions about bbPress ( forums ), please ask on their support forum.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    You can’t pass an array of ids in that manner. Pass a csv string.
    For example, assuming $custom_ids is an array:

    $gsxrgeek = 'include=' . implode(",", $custom_ids);
    $gsxrgeek .= '&type=alphabetical';
    if ( bp_has_members( $gsxrgeek ) ) //etc

    More info.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    Take a look at this file:
    buddypress\bp-messages\bp-messages-actions.php
    In function messages_new_message there is this hook:
    do_action_ref_array( 'messages_message_sent', array( &$message ) );

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    It’s a very simple patch, so you can do it manually.
    Simply find and open the file that was changed.
    Then paste or type in the change.
    [The Line Numbers might be a little different in your file.]

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    The BBP_Forums_Group_Extension issue is known and there is a fix.
    See this ticket and link to patch.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    It’s not a bug. Read this.

Viewing 25 replies - 1 through 25 (of 1,349 total)