Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 9,801 through 9,825 (of 69,119 total)
  • Author
    Search Results
  • allancaeg
    Participant

    On the profile page, the count of messages, notifications, etc are displayed:
    https://mercime.files.wordpress.com/2015/03/bpmenu-frontlinks.jpg

    Same goes for the BuddyPress header:

    View post on imgur.com

    BuddyPress has this menu feature:

    BuddyPress Links in WordPress Menus

    How do I add the notification count beside the menu item on the header navigation?

    #256461
    graeme_bryson
    Participant

    I’m currently trying to bring the number of comments shown below a post from 5 to 2. I’ve updated the following lines in ‘global.js’, but the feed still outputs 5 comments below each activity item.

    (global.js line 1490)
    if ( jq(this).children('ul').children('li').length < 5 ) return;
    to
    if ( jq(this).children('ul').children('li').length < 2 ) return;

    (global.js line 1502)
    if ( i < comment_lis.length - 5 ) {
    to
    if ( i < comment_lis.length - 2 ) {

    I’m running a vanilla install of BuddyPress 2.6.1.1 on WP 4.5.3, so I’m assuming my logic is incorrect in how I’m trying to bring the comment count down. Any help would be massively appreciated as I’ve hit a bit of a brick wall.

    Cheers, Graeme

    #256456

    In reply to: Members display name

    webexpression
    Participant

    Ahh yes I see. I’m not entirely sure. Apparently what I am in need of changing is code from BuddyPress.

    Does anyone know another way to get a problem fixed if you don’t get a response on here? I really need help.. oh and on my website also 😉

    #256453
    danbp
    Participant

    No, not for the moment. We’re handling here about profile and group nav, not about Group or Member Directory nav.

    If you have a snippet who works for the Directory, feel free to add it to the Nav Api examples. Codex Contributors are always welcome.

    #256451
    danbp
    Participant

    @socialc, since 2.6 and the new Nav API, there is a much simplier possibility as the translation file to change nav item names.


    @marcono
    , try this; not sure you learned, below snippet is on Nav API examples i indicated previously. 😉

    function bpcodex_rename_group_tabs() {
    
        if ( ! bp_is_group() ) {
            return;
        }
       
        buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Group Discussion', 'buddypress' ) ), 'forum', bp_current_item() );
    }
    add_action( 'bp_actions', 'bpcodex_rename_group_tabs' );
    
    function bpcodex_rename_profile_tabs() {
     
          buddypress()->members->nav->edit_nav( array( 'name' => __( 'My Buddy Forums', 'textdomain' ) ), 'forums' );
          buddypress()->members->nav->edit_nav( array( 'name' => __( 'My Buddy Groups', 'textdomain' ) ), 'groups' );
     
    }
    add_action( 'bp_actions', 'bpcodex_rename_profile_tabs' );
    #256450
    socialc
    Participant

    @marcono you might want to read this page and consider making a translation file of your own.

    danbp
    Participant

    Make sure you have pretty permalinks enabled on your WordPress install. (whatever except default) and save.

    And check your install again.
    Ray’s script is not a bug tracker, it gives only information about global variables which is usefull when you want to debug a custom script. If you seek for bugs – rarely the case on a new install -, activate wp_debug in wp-config.php

    https://codex.wordpress.org/Debugging_in_WordPress

    Configure BuddyPress

    tutorbe
    Participant

    Dear All,

    I hope someone can point me a clue regarding the following:

    I have just installed WP 4.5.3 along with only Buddypress 2.6.1.1 activated, when I tried to access members/admin/profile/, it just returned 404 page. I have tried with different themes, the same issue still existing.

    I tried to investigated the problem using the debug script from r-a-y, it just showed:

    Array
    (
        [component] => profile
    )

    Thanks and best regards,

    Jobi

    #256432

    In reply to: Custom post type

    jaaahaaa
    Participant

    Solved!!

    What I was testing was tracking comments. I realized that it worked by using the tutorial for tracking when new objects are created.

    However, comments did not work so I ended up editing the creation of the custom post type. Posting the full code here if anyone else googles ignitiondeck buddypress integration:

    ignitiondeck-admin.php line 5 to 46:

    add_action( 'init', 'ign_create_post_type' );
    function ign_create_post_type() {
    	require 'languages/text_variables.php';
    	$slug = apply_filters('idcf_archive_slug', __('projects', 'ignitiondeck'));
    	register_post_type( 'ignition_product',
    		array(
    			'labels' => array(
    				'name' => $tr_Projects,
    				'singular_name' => $tr_Project,
    				'add_new' => $tr_Add_New_Project,
    				'add_new_item' => $tr_Add_New_Project,
    				'edit' => $tr_Edit,
    				'edit_item' => $tr_Edit_Project,
    				'new_item' => $tr_New_Project,
    				'view' => $tr_View_Project,
    				'view_item' => $tr_View_Project,
    				'search_items' =>$tr_Search_Project,
    				'not_found' => $tr_No_Products_found ,
    				'not_found_in_trash' => $tr_No_Product_in_Trash,
    				'all_items' => __( 'All Videos' ),
    			),
                'public' => true,
    			'show_in_nav_menus' => true,
    			'show_ui' => true,
    			'publicly_queryable' => true,
    			'exclude_from_search' => false,
    			'hierarchical' => apply_filters('idcf_hierarchical', false),
    			'menu_position' => 5,
    			'capability_type' => 'post',
    			'menu_icon' => plugins_url( '/images/ignitiondeck-menu.png', __FILE__ ),
    			'query_var' => true,
    			'rewrite' => apply_filters('id_register_project_post_rewrite', array('slug' => $slug, 'with_front' => true)),
    			'has_archive' => apply_filters('id_register_project_post_has_archive', $slug),
    			'supports' => array( 'title', 'author', 'editor', 'thumbnail', 'revisions', 'comments', 'buddypress-activity' ),
    			'taxonomies' => array('category', 'post_tag', 'project_category'),
    			'bp_activity' => array(
    			    'action_id'         => 'new_ignition_product',
    			    'comment_action_id' => 'new_ignition_product_comment',
    			)
    		)
    	);
    }
    #256431
    socialc
    Participant

    … or just add a login link to your site anywhere in your theme files. e.g <a href="<?php echo wp_login_url(bp_loggedin_user_domain()); ?>"><?php _e('Login', 'buddypress'); ?></a>.

    This will redirect a user to their profile page after logging in.

    #256428
    danbp
    Participant

    Maybe Slava is busy ! Try to contact him on BuddyPress Slack or Twitter (@slaFFik).

    #256425

    In reply to: Errors after update

    danbp
    Participant

    [MOD] Topic moved to a more appropriate forum.

    The following plugins/widget are generating these error messages.

    bp-edit-group-slug

    BP_Toplevel_Groups_Widget

    BP_Group_Navigator_Widget

    bp-group-email

    bp-group-hierarchy

    You have to contact their authors via plugin support on WP repo.

    and on your side:

    The first step to getting rid of those Notices is identifying the source, so:
    – switch momentarily to a WP theme like 2016 and see if any persist
    – turn off plugins one at a time and see if any persist

    About the bbPress notice (bbp_setup_current_user was called incorrectly), read here:
    https://buddypress.trac.wordpress.org/changeset/10709/

    bbp_setup_current_user was called incorrectly

    #256419
    danbp
    Participant

    It’s the same principle, but not the same syntax since 2.6

    To hide tabs on groups, you need to specify the component. Note that all menu items (nav and subnav items) are considered as sub-nav, they have not the same distinction as on member or activity menus.

    Use another function for groups. Try this.

    function bpex_remove_group_tabs() {  
    
    	if ( ! bp_is_group() ) {
    		return;
    	}
    
    	$slug = bp_get_current_group_slug();
    
    		// hide items to all users except site admin
    	if ( !is_super_admin() ) {
    
    	//	bp_core_remove_subnav_item( $slug, 'members' );
    		bp_core_remove_subnav_item( $slug, 'send-invites' );
    	//	bp_core_remove_subnav_item( $slug, 'admin' );
    	//	bp_core_remove_subnav_item( $slug, 'forum' );
    	}
    
    }
    add_action( 'bp_actions', 'bpex_remove_group_tabs' );

    To get more usage examples, see here:

    Navigation API

    #256417
    danbp
    Participant

    When you copy/paste code you do not really control, try at least the original one first before adding wrong things to it.

    For the redirect link, use this syntax:

    return bp_core_get_user_domain( $user->ID ) .'/mypics';

    And please don’t double post. It’s annoying.

    #256416
    danbp
    Participant

    Do you mean also that members can’t access to their profile settings when they are on their profile page ?

    The BP usermenu on the Toolbar, under Howdy (top right) mimics the usermenu of the BuddyBar which is on each profile.

    Have you enabled Extended Profiles ?

    Or use this snippet to login redirect your users to their profile.

    ps: i removed your site url as it is locked to public – which doesn’t help no one to help you.

    #256415
    danbp
    Participant

    hi @earl_d,

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

    function bpex_redirect_to_profile( $redirect_to_calculated, $redirect_url_specified, $user ){
     
        if( empty( $redirect_to_calculated ) )
            $redirect_to_calculated = admin_url();
     
        // redirect logged in to his/her profile - except site admins
     
        if( isset( $user->ID) && ! is_super_admin( $user->ID ) )
            return bp_core_get_user_domain( $user->ID );
        else
            return $redirect_to_calculated; /* nada !*/
     
    }
    add_filter( 'bp_login_redirect', 'bpex_redirect_to_profile', 11, 3 );

    For the redirect URL error you mentionned here, use:

    return bp_core_get_user_domain( $user->ID ) .'/mypics';

    mypics is a slug, not a constant ( $user->ID ) .mypics

    #256411
    danbp
    Participant

    Add this snippet to bp-custom.php and give it a try.

    function bpex_hide_profile_menu_tabs() {
    
    	if( bp_is_active( 'xprofile' ) ) :
    
    	if ( bp_is_user() && !is_super_admin() && !bp_is_my_profile() ) {
    	//	BP's profile main menu items. Comment those to show.
    	//	bp_core_remove_nav_item( 'activity' );
    		bp_core_remove_nav_item( 'profile' );
    		bp_core_remove_nav_item( 'friends' );
    		bp_core_remove_nav_item( 'groups' );
    	//	exist only if you use bbPress
    		bp_core_remove_nav_item( 'forums' ); 
    
    	//	BP's profile main menu items. Comment those to show.
    	//	bp_core_remove_subnav_item( 'activity', 'personnal' );
    		bp_core_remove_subnav_item( 'activity', 'mentions' );
    		bp_core_remove_subnav_item( 'activity', 'favorites' );
    		bp_core_remove_subnav_item( 'activity', 'friends' );
    		bp_core_remove_subnav_item( 'activity', 'groups' );
    	}
    	endif;
    }
    add_action( 'bp_setup_nav', 'bpex_hide_profile_menu_tabs', 15 );
    5high
    Participant

    uh oh – just logged a php error for the new code. The error reported was this:

    PHP Parse error: syntax error, unexpected ‘endif’ (T_ENDIF) in /home/mysite/public_html/wp-content/themes/child-theme/buddypress/activity/index.php on line 34

    But when I look at this file I’m pretty sure it’s the same as what you posted =

    <?php if ( is_user_logged_in() && is_super_admin() ) ?>
    	 
    	   <?php bp_get_template_part( 'activity/post-form' ); ?>
    
    	<?php endif; ?>

    and line 34 is: <?php endif; ?> which I’m pretty sure I didn’t change!

    Can anyone spot what the problem is here?

    Many thanks, j

    #256397

    In reply to: Members display name

    webexpression
    Participant

    It seems that the comments and friendship function abilities are core things of buddypress not external plugins.

    Can anyone help with this?

    #256170
    danbp
    Participant

    BP files are very well commented actually. But reading through hundreds of files is not easy. Here a good ressource to find a function, hook by keywords. Still interesting even if related to BP 2.4.3
    Test and search for get_ to have an idea !

    #256169
    danbp
    Participant

    Guess you have to code it completely.

    A great and very complete tutorial is Creating Maintainable WordPress Meta Boxes

    And here an overview of almost all BP hooks and filters related to meta.

    #256168
    socialc
    Participant

    @danbp yeah, sorry about that :). Reason I went a bit further was when working on a theme earlier I was using a function get_displayed_group_id() or something with a similar name. I was expecting a return value but it was echoing no matter where I placed this.

    Ended up using a different method.

    Just wondered if there were other functions inside BuddyPress that looked like a return value but had output instead.

    #256167
    danbp
    Participant

    Maybe it’s me who’s wrong. I haven’t tested, but it’s how i used such a function in the past, called inside another one. I also wrote “something like”, which is very different of “use this”. It’s an example, not the absolute solution! 😉

    Let’s wait for Allan’s reaction before continuing this discussion. For the moment, the only important thing related to this post is:

    $goal = xprofile_get_field_data( 'Your goal', $user_id );

    Function reference.

    #256166

    In reply to: Custom post type

    danbp
    Participant

    Have you read this tutorial ?

    Note that most of BP custom functions for core are better handled when living in bp-custom.php. Sometimes also, a same function may work from within one file, but not from the other. In other case, which file has no real importance.
    Even if in background there is a hierarchy and a load order, to take in account for the file choice.

    That said, as it is related to CPT, bp-custom is the best place IMO.

    Theme’s functions.php contains functions related to theme, templating and evtl. wp stuff
    BP custom functions goes to bp-custom.php

    It’s also better for you to have such separated functions.

    #256158
    socialc
    Participant

    Inside your theme, make sure there is a file wp-content/themes/your-theme/buddypress/activity/post-form.php. If there is no file in that location copy this file wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/post-form.php into the first location.

    Then, look at line number 28 – 32 of post-form.php.

    From there, you will notice you can change this text for the activity update form which reads “What’s new in “GROUP NAME” if you’re on a group page posting the update or “What’s new USERNAME” if you’re any where else.

    So, to swap in a specific profile field you’d need to supply a bit more about the nature of your project and how it’s setup. You could simply drop in some static text, but if you want it to relate to a specific profile field in a dynamic way then please elaborate further.

Viewing 25 results - 9,801 through 9,825 (of 69,119 total)
Skip to toolbar