Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 115 total)
  • Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    OK, maybe I could have administrator access to your site temporarily (or FTP access, whichever is easier for you)? You can find me on the buddypress channel in Slack, or email me at d_cavins76 [at] yahoo [dot] com.

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    You can remove the other statements if you want. We know what they’re doing. 🙂

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    We’re closing in on the problem, I think. One more debug addition, this time to bp-core/bp-core-cache.php:
    http://pastie.org/10965063#12-14

    Thanks!

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    Thanks again for your help troubleshooting. Can you add a couple of debug statements to the function prime_group_admins_mods_cache() in the same class? It looks like the cache item bp_group_mods is not being set properly; I’m trying to understand why that would be.

    Debug lines added here:
    http://pastie.org/10965044#11,35

    Thanks!

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    @jeffwilliams-1 Not at all! If you’re feeling like chasing it down, give it a try. When your code change last time failed, it was probably because somewhere along the line, a < was encoded for the web as

    & l t ;

    so make sure that the changes to the file look visually like <?php

    Thanks!

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    Hi @jaumearagay & @JeffWillia.ms-

    Thanks for posting the results of your testing. @jaumearagay, your results match what I expected. Can you try another test for me that checks the value after the foreach?
    http://pastie.org/10964506

    Thanks for your patience as we figure this one out.

    -David

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    HI @JeffWillia.ms-

    Can you do the troubleshooting step requested above?

    Thanks,

    -David

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    Hi @jaumearagay-

    Unhappily, I’m not able to reproduce your problem on my servers. Can you test something for me in your environment where we know the problem exists? I’d like to know what the value of $group_mods is before it’s passed to the foreach in get_group_moderator_ids().

    I’ve added a var_dump() in this snippet: http://pastie.org/10962912

    Please let me know what you find.

    Thanks!

    -David

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    Hi, you have to enable WP registration at Settings > General > Anyone Can Register:

    How to Allow User Registration on Your WordPress Site

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    Hi r083r7-

    Within the same site, you could write a short code that would render the profile. Outputting profile data is pretty straightforward: https://codex.buddypress.org/themes/guides/displaying-extended-profile-fields-on-member-profiles/

    One another site, I’m less sure. You’d need BP API or similar, which we’re just now writing.

    Check our Bowe Codes for some other useful short codes and examples for your own: https://wordpress.org/plugins/bowe-codes/screenshots/

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    I really have no idea, but checking the code base, that error is thrown when a field type supports options (like a dropdown or checkbox set) and the data posted at save is unpopulated or is not an array. If you’re familiar with the developer tools in Firefox or Chrome, visit that page and submit the form, then see what the $_POST payload looks like.

    Code reference: https://buddypress.trac.wordpress.org/browser/trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php#L1074

    I can’t see what moving hosts would change here, but the internet is a fragile thing. 🙂

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    Hi isavarg-

    You’ll have to be logged out to see the registration or activation page, otherwise they redirect to the home page. Have you tried it while logged out?

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    Since it’s theme specific, your best choice is to create a child theme and override that template part when you don’t want to see the image. (There are lots of conditional you can use, like is_buddypress() which returns true on a BP page.)

    It’s extremely unlikely that there will be a plugin that changes one aspect of a specific theme.

    Child themes: https://codex.wordpress.org/Child_Themes

    Hi Kineta-

    Your best bet is to start a new topic for support with your issue. In that topic, it would be helpful to know which version of bbPress you’re using, what version of BuddyPress you upgraded from (to 2.6.2) as well as the usual stuff.

    Thanks!

    -David

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    Visit a forum, like https://buddypress.org/support/forum/how-to/ and scroll to the bottom of the topic list. The new topic form should be down there.

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    wadece1979- You should start a new topic for your support request. In that topic, describe your WP setup (single site, multisite) and whether the problem persists if you use a different theme. Thanks!

    That’s the default behavior. If you’re not getting a list of matches, open your browser console to see what’s going wrong with the AJAX request that fetches the list of matches.

    Note that if you type the @ symbol, you won’t find matches, so just start typing the username or display name.

    Hi there-

    Yes, 2.6.1 (and 2.6.1.1) have a conflict with BP Group Hierarchy. The problem is caused by the addition of the autoloader check in bp-loader.php because BPGH instantiates its class before BP knows if the groups component is active or not. The short term fix is, unhappily, to change bp-loader.php. Comment out the line that reads return (add a // before return) here:
    https://github.com/buddypress/BuddyPress/blob/master/src/bp-loader.php#L621

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    @logicsystems & @houser: If you have any idea of what might be behind those errors, please let us know.

    @hamzacoding: Thanks for your report. I’ll look into it.

    To add your own create group button output function, unhook the current ones:

    remove_action( 'bp_groups_directory_group_filter', 'bp_legacy_theme_group_create_nav', 999 );
    remove_action( 'bp_groups_directory_group_filter', 'bp_group_backcompat_create_nav_item', 1000 );

    and add your own to bp-custom.php:

    add_action( 'bp_groups_directory_group_filter', 'my_dolla_bill_group_create_button', 82 );
    function my_dolla_bill_group_create_button() {
    	if ( dolla_bill_has_dollas ) { 
                 bp_group_create_nav_item();
            }
    }

    Your other issues can probably be solved in the similar way. Read up on hooks and actions in WP: http://blog.teamtreehouse.com/hooks-wordpress-actions-filters-examples

    Menus aren’t very php-friendly, usually, but you could do something like this:

    
    <?php
    if ( groups_is_user_member( bp_loggedin_user_id(), $group_id_of_group_A ) ) {
    	$group = groups_get_group( array( 'group_id' => $group_id_of_group_A ) );
    	?>
    	<li><a href="<?php echo bp_get_group_permalink( $group ) . 'forum/'; ?>"><?php bp_group_name( $group ) ?> Forum</a></li>
    	<?php
    }
    

    You may have to hook onto wp_nav_menu_items or similar to inject the link. It depends on your theme. That would look like:

    add_filter( 'wp_nav_menu_items', 'my_inject_group_forum_link_into_menu' );
    my_inject_group_forum_link_into_menu( $items ) {
    	if ( groups_is_user_member( bp_loggedin_user_id(), $group_id_of_group_A ) ) {
    		$group = groups_get_group( array( 'group_id' => $group_id_of_group_A ) );
    		$items .= '<li><a href="' . bp_get_group_permalink( $group ) . 'forum/">' . bp_get_group_name( $group ) . 'Forum</a></li>';
    		<?php
    	}
    	return $items;
    }

    I’m not sure what behavior you’re aiming for, but this snippet will disable the confirmation email and log the user in automatically upon successful registration.

    <?php 
    add_action( 'bp_core_signup_user', array( $this, 'disable_validation_of_new_users' ) );
    add_filter( 'bp_registration_needs_activation', '__return_false' );
    add_filter( 'bp_core_signup_send_activation_key', '__return_false' );
    
    function disable_validation_of_new_users( $user_id ) {
    
    	// Get the user's activation key for BP. This is the activation_key in user_meta, not the key in the user table.
    	$user_key = get_user_meta( $user_id, 'activation_key', TRUE );
    
    	// Activate the signup
    	$awuser = apply_filters( 'bp_core_activate_account', bp_core_activate_signup( $user_key ) );
    
    	// Automatically log the user in.
    	// Thanks to Justin Klein's  wp-fb-autoconnect plugin for the basic code to login automatically
    	$user_info = get_userdata($user_id);
    	wp_set_auth_cookie($user_id);
    
    	do_action( 'wp_signon', $user_info->user_login );
    
    	bp_core_add_message( __( 'Your account is now active!', 'my-plugin-slug' ) );
    
    	buddypress()->activation_complete = true;
    }

    @earl_d: No. The above snippets are added to a custom version of the buddypress/members/single/messages/compose.php file. Basically, if you add this file to your theme (following the structure buddypress/members/single/messages/), it will be used in preference to the one BuddyPress ships with. Read more about adding custom template parts: https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    Hi Ben,

    You are correct that it’s best to leave the bp stylesheet in place so that you get updates to that file. You can add a custom stylesheet, though, and increase the selector power of the rule, so that it overrides the bp.css rule, like .site #buddypress #item-body { border-left: none; }

    Here’s the basic concept.
    https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity

    Adding a stylesheet:

    Including CSS & JavaScript

    Profile photo of David Cavins
    David Cavins
    Moderator

    @dcavins

    Hi pckelly123: WP Better Emails works well for applying a template to all mail sent via the function wp_mail(), which is what the group email subscription plugin uses.
    https://wordpress.org/plugins/wp-better-emails/

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