Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 326 through 350 (of 3,787 total)
  • @danbp

    Participant

    @dkelm,

    if you’ve found a bug, please refer it on Trac.
    Login with same credential as on this forum, describe the issue and give any details to reproduce it.

    https://buddypress.trac.wordpress.org/report

    @danbp

    Participant

    hi @matt2006,

    a partial solution could be https://wordpress.org/plugins/bp-auto-group-join/
    Total solution: the partial + premium complementary plugin.

    Or “do-it-yourself” by adapting auto group join for example.

    In reply to: Scroll down to…

    @danbp

    Participant

    @livingflame,

    the solution is as old as HTML: create an anchor at the start of the content to reach.
    To get this for the notification button for example, you have to remove the original and replace it by yours, containing the anchor call.
    It could be also that you have to take care of JS (don’t remember exactly how it works, out of head).

    @danbp

    Participant

    I don’t understandd this paranoĂ¯d question: So this is another case where they decided to leave out any option.

    – Who are “They” ?
    – What are the other case ?
    – Which options are leaved out ?

    Really mysterious, unless the truth is elswhere ? May be in the Twilight Zone ?

    You have the option to disable the Toolbar under Settings > BuddyPress > Options.
    You have the possibility to use BP’s login widget under Apparence > Widgets

    @danbp

    Participant

    Hi @vickievik,

    the right question here would be how to make my theme compatible with buddypress.

    The thing to understand is that BP use dynamic content for its page and that these page are NOT ordinaty WP pages.
    For each content, BP fires a so called template-part.
    Lets take as example a profile page

    The slug is /members/ which exist as “page” on wp’s page list. This wp page has no content and also no model or template. It’s just a “slug” in the wp ecosystem.

    When you’re on a profile you have the page(aka /members/) but also many template parts, depending what you’re doing on that profile. Aside the common parts header – content – footer, you’ll find also personnal activity, frineds, groups, mentions, notifications, messages and not the worst, profile settings. All this on the same “page”.

    Most theme mistakes are at this point. People try to design the page, instead to work the template parts.

    When you design a theme, you usually design something for a page, independantly from any plugin. This structure is used by any Twenty Theme and you can follow them as model, because these themes are bullet proof and systematically used by all wp devs when building (in our case) BuddyPress

    BP can be used with almost any existing theme, so far this theme is respecting WP’s coding standarts.

    If you have brocken elements, and specially thoose using JS, it could be due to missing ID or class or even more simple, some missing instructions/conditionnals in your theme.

    BP’s template parts are designed to fit with a majority of themes. The best to do, at least while creating your first theme, is to use BP “as is” and build your theme around thoose existing parts and not to remove/modifying BP arts to fit your creation.

    @danbp

    Participant

    Hi,

    the toolbar belongs to WordPress. How to remove items is explained here:
    https://codex.wordpress.org/Function_Reference/remove_node
    Searching the forum will certainly bring you some more hints too.

    @danbp

    Participant

    @masoud1111,

    You’re talking about 2 different things: profile and groups. Let me explain you a little…

    On the buddy nav bar, navigation looks similar but doesn’t work the same way on profile and on group page. While profile navigation use nav and sub-nav, the group navigation use only sub-nav.

    Also, as documented on codex, define('BP_DEFAULT_COMPONENT', '...' ); is a constant related to a component, not a sub-nav tab. It let you define the default landing component, but not the one or other sub-nav tab. For example on profiles, the component Activity has 4 sub-nav attached to it: personnal, mentions, favorites, friends, groups

    To get one of them, you need to specify a new default tab, not another component. đŸ™‚

    Buddybar main nav items on profile page
    Activity Profile Friends Groups Forums (if you use group forums)

    Default tab is Activity/personnal. To change it for “Friends” you use the constant:
    define('BP_DEFAULT_COMPONENT', 'friends' );

    To change the default landing tab from (Component/sub-tab). For example Activity/personnal to Activity/mentions, you define a new nav default tab with a function like this one:

    function bpex_set_member_default_nav() {
     
        bp_core_new_nav_default (
            array(
                'parent_slug'       => buddypress()->activity->id,
    	   // other "activity" sub_nav slugs : personal favorites friends groups
                'subnav_slug'       => 'mentions',
                'screen_function'   => 'bp_activity_screen_mentions'
            )
        );
    }
    add_action( 'bp_setup_nav', 'bpex_set_member_default_nav', 20 );

    For groups, it’s a similar technique, but a different syntax. The following example is a bit sophisticated, as it let you change the landing tab differently for each defined group.
    Depending each group activity or target, you can choose a different default tab.
    In this example, the kill bill group has Forum as landing tab, while Leon’s group use the group member directory.

    function bpex_custom_group_default_tab( $default_tab ){
    	/**
    	 * class_exists() is recommanded to avoid problems during updates 
    	 * or when Groups Component is deactivated
    	 */
    	if ( class_exists( 'BP_Group_Extension' ) ) : 
    	
    	$group = groups_get_current_group();//get the current group
    	
    	if( empty( $group ) ) {
    	 return $default_tab;
    	}
    		switch($group->slug){
    			
    			case 'kill-bill': // group name (use slug format)
    			$default_tab='forum';
    			break;
    			
    			case 'leon':
    			$default_tab='members';
    			break;
    			
    			default:		
    			$default_tab='home';// the default landing tab
    			break;
    			
    		}
    	
    	return $default_tab;
    	
    	endif; // end if ( class_exists( 'BP_Group_Extension' ) )
    }
    add_filter('bp_groups_default_extension','bpex_custom_group_default_tab');

    All this tested and working with BP 2.7.2 / Twenty Sixteen

    @danbp

    Participant

    Hi,

    no of course ! Read 2.7.2 changelog.

    If you use a child theme or a third party theme, ensure it is updated for BP 2.7+: verify the templates.

    Template Updates 2.7

    @danbp

    Participant

    Hi,

    all is explained in the doc !

    Changing Internal Configuration Settings

    Navigation API

    @danbp

    Participant

    Have you tested with a twenty theme ? To ensure that the profile hook is working, add this snippet directly to kleo’s functions.php. If it shows TEST, it’s ok and you can remove this snippet.
    Do the same from within bp-custom, should be ok too. If not, yo have to search what goes wrong.

    Activate also wp-debug in wp-config while testing.

    function swiftblack_test() {
    
    echo '<h2>TEST</h2>';
    }
    add_action( 'bp_profile_header_meta', 'swiftblack_test' );

    @danbp

    Participant

    It works for me…. where did you add that snippet ? And have you removed your previous custom work around this ?

    @danbp

    Participant

    hi,

    you did it wrong:
    localhost/répertoires-des-membres/members/%name%

    /localhost/ is where wp/bp are installed
    /rĂ©pertoires-des-membres/ can’t use accent
    and you have to choose between /répertoires-des-membres/ and /members/ as by default it is the same location.

    The normal setup for members is your-site/members/ (if you use an english page name) or your-site/repertoire-des-membres/ in french (or membres)… but not both !

    Check your settings and read here first.

    @danbp

    Participant

    HI,

    basically when outside of the members loop, you call a profile field value with xprofile_get_field_data() function.

    Positionning that information below a blog post depends of the theme (you’re using a premium one – so i ignore his code and can’t help). Usually, the post template has some action hooks where you can hook the bp function. If not, you create one via child-theme…

    And finally, assuming the field is called “Biography”, you have to write your own function containing at least something like:

    $user_id = get_the_author_meta( 'ID' );
    
    $bio = xprofile_get_field_data( 'Biography', $user_id );
    
    echo $bio;

    @danbp

    Participant

    Well, you now have to control your child theme and custom functions (if any).
    Seems that changes made in BP 2.7, 2.7.1 and 2.7.2 won’t apply to your case.

    Read also here.

    And if it doesn’t help, go to kleo support and ask there.

    @danbp

    Participant

    @manueldo, which bp version do you use ?

    @danbp

    Participant

    Why and how did you create a table for this verification ? Sounds to be a very customized situation. Sorry, can’t help in this case.

    @danbp

    Participant

    Gracias señor ! I changed the topic title by adding “Messages”, as your snippet related specifically to this component.

    @danbp

    Participant

    Give more details please.
    Should the icon be added to the field title or to the field value ?

    Also, depending the condition you want to use, it exist a plugin you could use.

    @danbp

    Participant

    The function is working but doesn’t remove the RSS buttons.
    You can hide them with CSS. Something like .feed {display:none!important;}

    @danbp

    Participant

    Hi @swiftblack,

    add this to bp-custom and give it a try.

    It will output on/offline on loggedin member friends profile (only).

    function swiftblack() {
    
    $is_friend = friends_check_friendship( bp_displayed_user_id(), bp_loggedin_user_id() );
    
    $last_activity = bp_get_user_last_activity( bp_displayed_user_id() );
    
    $curr_time = time(); 
    $diff = $curr_time - strtotime( $last_activity );
    $time = 10 * 60;  // 10mn - must be in seconds
    
    	if ( bp_is_user() ):
    
    		if( $is_friend && !bp_is_my_profile() && $diff < $time ) {
    			echo '<br/><span class="on-line">Online</span>'; 
    		//echo '<span class="genericon genericon-dot"></span>'; // see https://genericons.com/
    		} 
    
    		if( $is_friend && !bp_is_my_profile() && $diff > $time ) {
    			echo '<br/><span class="off-line">Offline</span>'; 
    		}
    
    	endif;
    }
    add_action( 'bp_profile_header_meta', 'swiftblack' );

    @danbp

    Participant

    @tranny,

    avoid to publish error message containing the absolute server path on public forums.
    I removed them for your security.

    @danbp

    Participant

    Hi @maccast,

    thank you for the tutorial and sharing your trick, but there is a little problem !

    bp_options_nav is deprecated since 2.6 – you can verify by enabling wp-debug in wp-config.php or by reading the doc.

    Get the right navigation solutions available for BP 2.6+ here:

    Navigation API

    @danbp

    Participant

    HI,

    BP use the same pagination system as WordPress. Here a tutorial to get this to work for WP

    And here a list of “pagination” related functions:
    http://hookr.io/plugins/buddypress/#index=a&search=pagination

    @danbp

    Participant

    Hi,

    you have to try with a twenty theme, to ensure that it is not the theme who generate an issue.
    And if it still occurs, you have to ask for help on mycred support. We can’t help you much with third party plugin or themes “who need BuddyPress”.

    In this particular case, is your theme updated for BP 2.7 ?
    Check first yourself and ask evtl. on the theme support

    Template Updates 2.7

    @danbp

    Participant
Viewing 25 replies - 326 through 350 (of 3,787 total)
Skip to toolbar