Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 2,801 through 2,825 (of 3,820 total)
  • @shanebp

    Moderator

    A standard installation of BuddyPress does not do the things you describe.

    Try deactivating any other plugins you have running and see it that stops your issues.

    @shanebp

    Moderator

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

    And put what you want into it, such as a link to wp-admin/user/profile.php

    For example:

    if( bp_is_my_profile() ) { 
       global $current_user;
       get_currentuserinfo();
       $login_name = $current_user->user_login;
       echo '<a href="' . site_url() . '/wp-admin/' . $login_name . '/profile.php">Edit Your Profile</a>';
    }
    In reply to: Suggested Plugin

    @shanebp

    Moderator

    I’m not aware of such a plugin.

    And would be surprised if it exists, since you want something that adds bridge functionality to 2 specific plugins.

    You’ll probably need to write some custom code.

    You should ask on the support forums for those 2 plugins.

    @shanebp

    Moderator

    The event manager plugin has a search function.
    For additional questions about that plugin, you should use their support forums.

    @shanebp

    Moderator

    Perhaps those styles are no longer being used ?

    You can download older versions of BP here.

    Make a backup of your database.

    Then deactivate the BP plugin.
    Then upload another version of BP and activate.

    @shanebp

    Moderator

    Unless you are specifically use the BP default theme, BP will use the files in
    buddypress\bp-templates\bp-legacy\

    Are you sure that your theme or child-theme is not overloading those files?

    @shanebp

    Moderator

    The function works on a test site when I go to home_url() . '/groups/'

    You may need to put it in bp-custom.php.

    @shanebp

    Moderator

    My function was hooking too early.
    And using name instead of slug.

    Try:

    function my_group_forum_redirect() {
    
        if ( bp_is_groups_directory() ) {
           
    		$user_id = get_current_user_id();
    		
    		$args = array(
    			'user_id'           => $user_id,
    			'populate_extras'   => false
    		);
    		
    		$groups = groups_get_groups( $args );
    		
    		$groups = $groups['groups'];
    			
    		$group_slug = '';
    			
    		foreach( $groups as $group ) {
    			$group_slug = $group->slug;
    		}       
    	      
    		if( $group_slug != '' ) {
    			wp_redirect( home_url() . '/groups/' . $group_slug . '/forum/' );
    			exit;
    		}
        }
    }
    add_action( 'wp', 'my_group_forum_redirect' );

    @shanebp

    Moderator

    Can a user belong to more than one group?
    If not, try this (untested):

    
    function my_group_forum_redirect() {
    
        if ( bp_is_groups_directory() ) {
           
    	$user_id = get_current_user_id();
    	
    	$args = array(
    		'user_id'           => $user_id,
    		'populate_extras'   => false
    	);
    	
    	$groups = groups_get_groups( $args );
    	
    	$groups = $groups['groups'];
    		
    	$group_name = '';
    		
    	foreach( $groups as $group ) {
    		$group_name = $group->name;
    	}       
          
            if( $group_name != '' ) {
    	    wp_redirect( home_url() . '/groups/' . $group_name . '/forum/' );
                exit;
    	}
        }
    }
    add_action( 'init', 'my_group_forum_redirect' );
    

    @shanebp

    Moderator

    There are a few issues with that solution.
    1. ‘1’ can’t view their own profile
    2. What if there are multiple admins

    Suggestion:

    function hide_admin_profiles() {
    
        // Bail if this is not a profile.
        if ( ! bp_is_user_profile() )
            return;
    
        if ( ! is_super_admin() ) {
             if ( is_super_admin( bp_displayed_user_id() ) ) {
                 wp_redirect( home_url() );
                 exit;
             }
        }
    }
    add_action( 'init', 'hide_admin_profiles' );
    
    In reply to: BP Group Extension API

    @shanebp

    Moderator

    Where are you running your code?
    Try it in a plugin or in bp-custom.php

    Try this code.

    @shanebp

    Moderator

    Create a template overload of one or more of the files found here:
    \buddypress\bp-templates\bp-legacy\buddypress\members\single\

    In reply to: BP Group Extension API

    @shanebp

    Moderator

    Please note the edits made above.

    You’re saving a groupmeta field called ‘group_extension_ville_setting’
    but in display() and settings_screen() you’re asking for a groupmeta field called ‘group_extension_ville’ – so of course it will not work.

    In reply to: BP Group Extension API

    @shanebp

    Moderator

    Try:

    function display() {
         $town = groups_get_groupmeta( $group_id, 'town' );
         echo esc_attr( $town );
    }

    @shanebp

    Moderator

    1. No need to create register.php, just copy this file:
    buddypress\bp-templates\bp-legacy\buddypress\members\register.php
    into your theme/ child theme using this approach.

    Then adjust it accordingly.
    You don’t say whether ‘location’ is a required field – that will affect where in the file you make your adjustments.

    Will the values for ‘location’ change very often?
    If not, you can use code to create both the field and all the values, so you don’t have to manually enter all the values.
    And won’t have to overload register.php
    Example

    @shanebp

    Moderator

    @shanebp

    Moderator
    if( bp_is_my_profile()  || is_super_admin() )
        echo bp_displayed_user_id();

    @shanebp

    Moderator

    Create a template overload of this file:
    buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\edit.php
    and adjust it to fit your needs.

    @shanebp

    Moderator

    > Ideally we could filter what type of content triggers these push notifications.

    Use this hook:
    do_action( 'bp_activity_add', $r );

    In bp_activity_add() in bp-activity\bp-activity-functions.php

    @shanebp

    Moderator

    There are some plugins that export data.
    google: buddypress export members

    For example, for site admins:
    https://wordpress.org/plugins/export-user-data/

    For front-end, you could extend that plugin or find something else.

    @shanebp

    Moderator

    As part of your purchase of Paid Memberships PRO, you should receive support from them.

    Ask them if they have any email hooks that might over-ride BP or bbPress hooks.

    In reply to: Directory

    @shanebp

    Moderator

    Sounds like a checkboxes field in the ‘Base Group’ is what you want.

    Go to:
    /wp-admin/users.php?page=bp-profile-setup&group_id=1&mode=add_field

    Add a Field and select ‘checkboxes’ as the field type.

    @shanebp

    Moderator

    How many instances of a problem field, such as Zip, do you have in the database on the install that is causing problems?

    If there are more than one, then somehow multiple fields were created.

    @shanebp

    Moderator

    I’m not sure exactly what your issue is, but your function accepts only one parameter.
    But 3 are passed.
    Yours:
    function record_post_activity_content_update($content){

    The filter_hook:
    $activity->content = apply_filters( 'bp_blogs_record_activity_content', bp_create_excerpt( $post_content ), $post_content, (array) $activity );

    Notice that post_id is not in there.
    It might be in $activity.

    So try something like this:

    function record_post_activity_content_update( $excerpt, $post_content, $activity ) {
       $post_id = $activity->secondary_item_id;
       // or
       $post_id = $activity->item_id;
       // then build your string using $post_id rather than $post->ID
    

    @shanebp

    Moderator

    You are only filtering for new posts.

    Take a look at buddypress\bp-blogs\bp-blogs-functions.php

    Look for the filter hook you are using.
    Look for this filter hook too: bp_blogs_record_activity_content

Viewing 25 replies - 2,801 through 2,825 (of 3,820 total)
Skip to toolbar