Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 1,924 total)
  • Profile photo of danbp
    danbp
    Moderator

    @danbp

    Cross posting !

    There is no problem with sending emails, the problem is around the activation key or perhaps a wrong message output due to language file…

    Forgot to tell you to revert site language to english while testing.
    Make a register test in english, if ok, change the language and re-test.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    I’m unable to tell what happens. I tried to register, received the mail, clicked on activation link and error message.
    Tried to login, and didn’t found the wp-login page.

    Some url’s are weird or wrong… and i suspect you haven’t correctly setup BuddyPress.

    Deactivate all plugins but BP
    Deactivate kleo theme and activate 2012 or 2014.

    Go to BP settings and check all pages. You need a page for each component. This page must only have a title and should be absolutely blank, without any template or page model assigned.

    Go to permalinks and select an option. Whatever except default. Save.

    Via FTP, delete wp-config.php and htaccess. This will not affect the DB content
    Run WP install again (yoursite.com/install). The goal is to generate a brand new htaccess and wp-config file.
    When you’re asked for, use salt key generator and copy/paste the result to wp-config

    If all went correctly, you have a fresh install.

    Return to BP settings and check that anything is still in place. Register and activation page maybe completed or not assigned. In this case, assign a page to each.

    Return to permalinks and simply save the page.

    Now you can test registering again. If it is ok, you activate kleo and re-test registering.

    Subsidiary question: have you installed WP manually or did you used a hosted automated package ?

    Check also kleo’s support about BP configuration.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Is site online ? Can you share the url ?

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Oh, ok, i see.
    You have 2 options
    1) use a type field for profiles and let the user choose the type,
    2) you don’t add this field to profiles and you add the type from within backend.

    if option 1, the type will show on the profile tab and on any other place of your choice.
    if option 2, the type will only be used for the typed directory.

    Depending on how you want to use this information, you use all or only a part of the different snippets, and one or both select boxes on backend. I haven’t experimented how to manipulate the built-in Member Type box.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Have you a forgotten custom function somewhere who automatically add users or used a plugin for this in the past ?
    Are you on a single or multisite install ?

    Ensure that brower cache is cleared before you add a test user. Sometimes, such manipulation is done by site admin and if you don’t loggout while adding the activation key for the fake user, a cookie conflict occurs.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Annoying issue, was initially reported for BP 1.7

    See https://buddypress.trac.wordpress.org/ticket/4948

    Reopen the ticket, give details and this topic url
    To login use same credentials as for here.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Have you cleared the cache before testing ?

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Please search before asking. Search: Remove Profile Links brings up:

    https://buddypress.org/support/topic/on-profile-base-answers-to-fields-works-as-links/

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Which plugins are installed/activated ?

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Get inspired by reading from here
    or try to develop something from here

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    @tstrickland415, do you use trunk version ?
    BuddyPress 2.3 introduces the member-type-specific directories. But at this time, we are still under BP 2.2.3.1 and my code is for 2.2.x only

    You have to find your own solution. I have no trunk install under hand at the moment, sorry.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Have you tried bp_get_activity_comment_date_recorded()

    See bp-activity-template.php:2396

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Do you want to
    1) show a picture in place of a radio button ?
    2) show a picture related to the radio button (if yes, show pic 1, if no show pic2) ?

    If option 1, see here, see also selectbox, etc
    If option 2, see here, at least for inspiration

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Please have a look to this ticket
    https://buddypress.trac.wordpress.org/ticket/6421

    Don’t hesitate to give more details or information to the devs. Login is using same credentials as on this forum.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Don’t know what you’re doing. The link doesn’t help.
    Or you publish your work as asked previously, or you ask on oauth plugin support or on the service support you try to connect… That’s not a BP issue

    Aside you have some errors on city4run.co

    Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init().

    Notice: Undefined index: WPOA wp-content/plugins/wp-oauth/wp-oauth.php on line 306

    You incorrectly use index.php there. Make your base install (wp/bp) work correctly first.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Is the member type supposed to show in backend under All Users?

    No !

    Member type is not a role, so it is not part of WP’s users admin interface.

    I’m always stuned how people are using documented solution they find on this forum. Have you read the codex articles i previouly indicated, specially th first one ?

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Have you set up each new user type ? When you create a new member in admin, you first have to create him, then add a type. This means 2 steps.
    1) add new user. Save.
    2) edit that user and visit the 2nd tab called xtended profile and adjust the type. Save !

    Or from front-end, go to the user edit profile and adjust the type. Save.

    Here’s what you have to get:
    member type directory screen

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    How to say ? No idea ! CSS issue probably, but as you don’t give any details about your site (url ?), theme, plugins you can’t expect a correct answer.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    That’s normal: page can’t walk, as they have no feet ! :)
    ça ne marche pas n’a pas le même sens en anglais. Ils disent ça ne travaille pas (does not work).

    You have to create these page manually. This is explained in Getting started guide, configuration section.

    https://codex.buddypress.org/getting-started/configure-components/#settings-buddypress-pages

    If you feel better in french, visit bp-fr.net

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Yes indeed, there is a way.

    Step by step tutorial with example code which you add to bp-custom.
    Note: use this code as is and follow the instruction. Once you understood what it does and how it works, you will be able to modify it to your needs.

    First, create a new xprofile field in the first group field (aka Base Group and containing Name as default field). Only fields created in that group are visible on the register page. Call it Type, enter description and choose multiselectbox as field type. Add operator, vendor, coach as select option.

    That’s all for the register part handled by BuddyPress.

    Now we need to declare the whole thing to get it work on front-end.
    Member-type is an additionnal functiony to select members by… type ! Not by role, not by latest, mst popular or anything else. Just (for the moment) by a custom type of your choice.

    We have to built a member directory for our types. We have 3 types and they will be shown on 3 new tabs on that directory.

    1) we formally declare the member types
    2) we count members by type (to stay correctly informative on the directory)
    3) we display the tabs

    function using_mt_register_member_types() {
    	bp_register_member_type( 'operator', array(
    		'labels' => array(
    			'name'          => __( 'Operators', 'using-mt' ),
    			'singular_name' => __( 'Operator', 'using-mt' ),
    		),
    	) );
    
    	bp_register_member_type( 'vendor', array(
    		'labels' => array(
    			'name'          => __( 'Vendors', 'using-mt' ),
    			'singular_name' => __( 'Vendor', 'using-mt' ),
    		),
    	) );
    
    	bp_register_member_type( 'coach', array(
    		'labels' => array(
    			'name'          => __( 'Coaches', 'using-mt' ),
    			'singular_name' => __( 'Coach', 'using-mt' ),
    		),
    	) );
    }
    add_action( 'bp_init', 'using_mt_register_member_types' );
    
    function using_mt_count_member_types( $member_type = '', $taxonomy = 'bp_member_type' ) {
    	global $wpdb;
    	$member_types = bp_get_member_types();
    
    	if ( empty( $member_type ) || empty( $member_types[ $member_type ] ) ) {
    		return false;
    	}
    
    	$count_types = wp_cache_get( 'using_mt_count_member_types', 'using_mt_bp_member_type' );
    
    	if ( ! $count_types ) {
    		if ( ! bp_is_root_blog() ) {
    			switch_to_blog( bp_get_root_blog_id() );
    		}
    
    		$sql = array(
    			'select' => "SELECT t.slug, tt.count FROM {$wpdb->term_taxonomy} tt LEFT JOIN {$wpdb->terms} t",
    			'on'     => 'ON tt.term_id = t.term_id',
    			'where'  => $wpdb->prepare( 'WHERE tt.taxonomy = %s', $taxonomy ),
    		);
    
    		$count_types = $wpdb->get_results( join( ' ', $sql ) );
    		wp_cache_set( 'using_mt_count_member_types', $count_types, 'using_mt_bp_member_type' );
    
    		restore_current_blog();
    	}
    
    	$type_count = wp_filter_object_list( $count_types, array( 'slug' => $member_type ), 'and', 'count' );
    	$type_count = array_values( $type_count );
    
    	if ( empty( $type_count ) ) {
    		return 0;
    	}
    
    	return (int) $type_count[0];
    }
    
    function using_mt_display_directory_tabs() {
    	$member_types = bp_get_member_types( array(), 'objects' );
    
    	// Loop in member types to build the tabs
    	foreach ( $member_types as $member_type ) : ?>
    
    	<li id="members-<?php echo esc_attr( $member_type->name ) ;?>">
    		<a href="<?php bp_members_directory_permalink(); ?>"><?php printf( '%s <span>%d</span>', $member_type->labels['name'], using_mt_count_member_types( $member_type->name ) ); ?></a>
    	</li>
    
    	<?php endforeach;
    }
    add_action( 'bp_members_directory_member_types', 'using_mt_display_directory_tabs' );

    We also need to sort the members list on each type tab using the loop scope.

    function using_mt_set_has_members_type_arg( $args = array() ) {
    	// Get member types to check scope
    	$member_types = bp_get_member_types();
    
    	// Set the member type arg if scope match one of the registered member type
    	if ( ! empty( $args['scope'] ) && ! empty( $member_types[ $args['scope'] ] ) ) {
    		$args['member_type'] = $args['scope'];
    	}
    
    	return $args;
    }
    add_filter( 'bp_before_has_members_parse_args', 'using_mt_set_has_members_type_arg', 10, 1 );

    And we finally clean the cache to stay up to date with the output

    function using_mt_clean_count_cache( $term = 0, $taxonomy = null ) {
    	if ( empty( $term ) || empty( $taxonomy->name ) || 'bp_member_type' != $taxonomy->name )  {
    		return;
    	}
    
    	wp_cache_delete( 'using_mt_count_member_types', 'using_mt_bp_member_type' );
    }
    add_action( 'edited_term_taxonomy', 'using_mt_clean_count_cache', 10, 2 );

    That’s all for a members directory page showing All Members and tabed Members by type.

    If you want to show the type of a member on his profile header, use this:

    function using_mt_member_header_display() {
    	$member_type = bp_get_member_type( bp_displayed_user_id() );
    
    	if ( empty( $member_type ) ) {
    		return;
    	}
    
    	$member_type_object = bp_get_member_type_object( $member_type );
    	?>
    	<p class="member_type"><?php echo esc_html( $member_type_object->labels['singular_name'] ); ?></p>
    
    	<?php
    }
    add_action( 'bp_before_member_header_meta', 'using_mt_member_header_display' );

    Or if you want to display the type under each user avatar on the member directory, you can use this snippet. Note: was originally made to add a geoloc shortcode below the member type. I let it as is, so you can see how it’s done.

    function who_are_you_directory() { // by member_type name + geoloc (wpgeo me)
    $user = bp_get_member_user_id();
    $terms = bp_get_object_terms( $user,  'bp_member_type' );
    
    	if ( ! empty( $terms ) ) {
    		if ( ! is_wp_error( $terms ) ) {		
    				foreach( $terms as $term ) {
    					echo '<p>' . $term->name . '</p>'; 					
    					echo do_shortcode('[gmw_member_info]');
    				}		
    		}
    	} 
    
    }
    add_filter ( 'bp_directory_members_item', 'who_are_you_directory' );

    Anything inspired by Codex and heavy topics reading.
    https://codex.buddypress.org/developer/member-types/
    https://codex.buddypress.org/developer/loops-reference/the-members-loop/#accepted-parameters

    May this help.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Don’t jump into other topics when you have an unrelated question to that topic.

    Activate 2015 theme and see if you get the missing radio buttons.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    You can remove the creation option from the template. You have to do this from within a child theme by using a template overload.

    Concerned file is bp-templates/bp-legacy/buddypress/groups/create.php

    Part to remove for the “hidden” option is

    <label>
    	<input type="radio" name="group-status" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> 
    	<strong><?php _e('This is a hidden group', 'buddypress' ); ?></strong>
    </label>
    	<ul>
    		<li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
    		<li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
    		<li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
    	</ul>
    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Ok, now we need more details about what is appearing on your register page.
    – do you use a register plugin ?
    – what is your theme name ?
    – which tool have you used to generate the mo file ?

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    Yeap, and is your WP setup for en_US ? See Settings > General > Site language

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