Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'toolbar'

Viewing 25 results - 26 through 50 (of 803 total)
  • Author
    Search Results
  • #311509
    @mercime
    Keymaster

    @izzethan You can disable the admin toolbar for anyone who is not logged in simply by going to Settings > BuddyPress > Options tab, then make sure that “Toolbar – Show the Toolbar for logged out users” is not checked.

    #310283
    soopablogga
    Participant

    This question is basically impossible to answer without lots of other information. If your theme has a separate notification count code from the default one that shows up in the toolbar, you can rip that code out of the site and put it elsewhere — if not you’re going to have to learn to code it yourself or hire someone to do it for you.

    You could start with searching “how to add buddypress notifications to template”

    #308852
    Nahum
    Participant

    @brianstoiber do you happen to have woocommerce installed? I just noticed this myself. I turned off woocommerce and it revealed the toolbar.

    #308851
    brianstoiber
    Participant

    I am on the BuddyPress Settings page and under Options, the first one is

    Main Settings
    Tool Bar Show the Toolbar for logged out users

    https://imgur.com/76EN0i7

    #308849
    Nahum
    Participant

    “Show the Toolbar for logged out users” doesn’t sound like a wp or bp setting? Is that a setting of your theme or a plugin? I could be wrong of course but sounds like something to do with theme/plugin.

    brianstoiber
    Participant

    I have a site that checked the box next to Show the Toolbar for logged out users in the settings. However it doesn’t appear to do anything? When I visit the site, it does not show the tool bar for anyone other than logged in admins.

    #307509
    mysticsofthenight
    Participant

    My apologies to all. I found out how to fix the problem of not being able to add additional tabs to the profile section for users on a main social site empowered by BuddyPress. You have to go to WordPress admin > Users > Profile fields and you can add any fields to the profile section of your social site website that is empowered by BuddyPress. This allows users to add their name, bio, location, work, education and anything else you want them to be able to add in their profile on your social site empowered by BuddyPress instead of in the backend of the wordpress page. Also, you can install a plugin that prevents your users from clicking on the dashboard link in top left toolbar and going to backend profile of WordPress, which is called Remove Dashboard access Version 1.1.3 | By Drew Jaynes and can be found at https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/ That said, problem solved and may my solution fix this same users not being able to add more fields in their profile section on a main social website powered by BuddyPress that other admins encounter permanently.

    #307508
    mysticsofthenight
    Participant

    Nevermind all. I found out how to fix it. You have to go to WordPress admin > Users > Profile fields and you can add any fields to the profile section of the profile on your website. This allows users to add their name, bio, location, work, education and anything else you want them to be able to add in their profile on your site instead of in the backend of the wordpress page. Also, you can install a plugin that prevents your users from clicking on the dashboard link in top left toolbar and going to backend profile, which is called Remove Dashboard access Version 1.1.3 | By Drew Jaynes and can be found at https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/ That said, problem solved and may my solution fix this same users not being able to add more fields in their profile section on a main website powered by BuddyPress that other admins encounter permanently.

    rmchale
    Participant

    Hi,

    Is there a way to hide the rich text editor toolbar in a multi-line text area field based on the users role.

    I don’t want to have to create separate fields for each user role.

    Thank you

    #304717
    Venutius
    Moderator

    One way is to use the wordpress toolbar dropdown as I described earlier, there’s a profile option and in there you can select change profile image

    #304711
    Venutius
    Moderator

    Hi there, some answers:

    1. You can change the layout of profiles by overloading the profile files and css, see: https://codex.buddypress.org/themes/theme-compatibility-1-7/theme-compatibility-2/ it’s possibly a bit advanced for you right now but all the files in the plugins/buddypress/bp-templates/your-bp-theme/buddypress can be copied, modified and loaded from your child theme directory. Similarly you can overload the css to make styling and layout changes.

    1b. The default is for horizontal navigation unless you’ve changed it in Customizer>>BuddyPress.

    2. The BuddyPress extended profile is editable from the front end, and avatar too. It’s only the wordpress profile that’s enditable in admin and most BP sites don’t use that as t’s really set up for authors.

    3. I recently posted the code to combine all the profile activity feeds into 1, https://buddypress.org/support/topic/how-to-combine-activity-tabs-to-one/

    4. https://wordpress.org/plugins/cb-change-mail-sender/

    5+6 are bbPress questions, for the best answer you should post on their forum https://bbpress.org/forums/

    7. Assuming you have set up the groups directory page and enabled group creation by users in Settings>>BuddyPress>>Options, users will have the option to create groups on the Groups directory page and also from the Groups menu of the WordPress toolbar ( top right hand side of the screen, hover over your avatar image, drop down will appear one option will be groups.

    #304283

    In reply to: Creating groups

    Venutius
    Moderator

    So long as you have groups enabled then you should see create group in the Groups page, and also as an option in the WordPress toolbar under groups.

    #303892

    In reply to: WordPress Dashboard

    Venutius
    Moderator

    The basic option is to set up a redirect for anyone but admin, that would involve adding some code to your functions.php. There’s probably plugins that d it, but it’s quite simple with code if you are happy with that.

    That would not stop links from appearing in the WordPress admin-bar / toolbar. Would you still want to give them access to the BuddyPress menu options via the toolbar?

    I’ve recently launched a BP specific Front End editor and I’ve included all the various hide admin code in that. You can choose to hide the admin-bar altogether or prune out the menu items you don’t want to display, such as the +New menu item.

    Venutius
    Moderator

    Here’s how to remove forums from all users profile tabs and toolbar menu, this code would need to go in your child-themes functions.php:

    function venutius_remove_forums_on_usermenu() {
    global $wp_admin_bar;
    
    	if ( bp_use_wp_admin_bar() ) {
    		$wp_admin_bar->remove_node( 'my-account-forums' );
    	}
    
    }
    add_action( 'wp_before_admin_bar_render', 'venutius_remove_forums_on_usermenu' );
    
    function venutius_remove_profile_forums_tab() {
    
    	bp_core_remove_nav_item( 'forums' );
    
    }
    add_action( 'bp_actions', 'venutius_remove_profile_forums_tab' );
    #302937
    shanebp
    Moderator

    Untested, but try:

    function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    
        // New custom notifications
        if ( 'custom_action' === $action ) {
            
            $custom_title = "You have new custom notification";
            $custom_link  = get_permalink( $item_id );
            $custom_text  = "You have a new custom notification";
    
            // WordPress Toolbar
            if ( 'string' === $format ) {
                $return = apply_filters( 'custom_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
    
            // Deprecated BuddyBar
            } else {
                $return = apply_filters( 'custom_filter', array(
                    'text' => $custom_text,
                    'link' => $custom_link
                ), $custom_link, (int) $total_items, $item_id, $secondary_item_id );
            }
    
            return $return;
    
        }
    
    }
    add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 20, 5 );
    pavelmititel
    Participant

    I need some custom notifications in my website. I have my code bellow, all work correctly, notification is added into database and displayed at the recipient, but without notification text
    Bug view on frontpage

    How i can fix this?
    Thank you

    
    function custom_filter_notifications_get_registered_components( $component_names = array() ) {
    
        // Force $component_names to be an array
        if ( ! is_array( $component_names ) ) {
            $component_names = array();
        }
    
        // Add 'custom' component to registered components array
        array_push( $component_names, 'custom' );
    
        // Return component's with 'custom' appended
        return $component_names;
    }
    add_filter( 'bp_notifications_get_registered_components', 'custom_filter_notifications_get_registered_components' );
    
    function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    
        // New custom notifications
        if ( 'custom_action' === $action ) {
            
            $custom_title = "You have new notification";
            $custom_link = "domain.com";
            $custom_text = "You have new notification";
    
            // WordPress Toolbar
            if ( 'string' === $format ) {
                $return = apply_filters( 'custom_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
    
            // Deprecated BuddyBar
            } else {
                $return = apply_filters( 'custom_filter', array(
                    'text' => $custom_text,
                    'link' => $custom_link
                ), $custom_link, (int) $total_items, $custom_text, $custom_title );
            }
    
            return $return;
    
        }
    
    }
    add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 10, 5 );
    
    function bp_custom_add_notification( $receiver_user_id, $initiator ) {
    
        //$post = get_post( $comment_object->comment_post_ID );
        //$author_id = $post->post_author;
    
        bp_notifications_add_notification( array(
            'user_id'           => $receiver_user_id,
            'item_id'           => $initiator,
            'secondary_item_id' => $initiator,
            'component_name'    => 'custom',
            'component_action'  => 'custom_action',
            'date_notified'     => bp_core_current_time(),
            'is_new'            => 1,
        ) );
    
    }
    add_action( 'wp_insert_custom_notification', 'bp_custom_add_notification', 99, 2 );
    
    #302790
    hthornhillhww
    Participant

    Hi,

    I have created a custom notification for my site when a post is published, the code used to do this is :-

    // this is to add a fake component to BuddyPress. A registered component is needed to add notifications
    function custom_filter_notifications_get_registered_components( $component_names = array() ) {
        // Force $component_names to be an array
        if ( ! is_array( $component_names ) ) {
            $component_names = array();
        }
        // Add 'custom' component to registered components array
        array_push( $component_names, 'publishpost' );
        // Return component's with 'custom' appended
        return $component_names;
    }
    add_filter( 'bp_notifications_get_registered_components', 'custom_filter_notifications_get_registered_components' );
    
    // this hooks to post creation and saves the post id
    function bp_custom_add_notification( $post_id, $post ) {
            $post = get_post( $post_id );
            $author_id = $post->post_author;
    		
    		$blogusers = get_users( array( 'role' => 'staff' ) );
    		// Array of WP_User objects.
    		foreach ( $blogusers as $user ) {
    			bp_notifications_add_notification( array(
                'user_id'           => $user->id,
                'item_id'           => $post_id,
                'component_name'    => 'publishpost',
                'component_action'  => 'publishpost_action',
                'date_notified'     => bp_core_current_time(),
                'is_new'            => 1,
            ) );   
    		}        
    }
    add_action( 'publish_post', 'bp_custom_add_notification', 99, 2 );
    
    /**
     * Format the BuddyBar/Toolbar notifications
     *
     * @since bbPress (r5155)
     *
     * @package bbPress
     *
     * @param string $action The kind of notification being rendered
     * @param int $item_id The primary item id
     * @param int $secondary_item_id The secondary item id
     * @param int $total_items The total number of messaging-related notifications waiting for the user
     * @param string $format 'string' for BuddyBar-compatible notifications; 'array' for WP Toolbar
     */
    function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) 
    {
    // New custom notifications
        if ( 'publishpost_action' === $action ) {
    
            $post = get_post( $item_id );
    		$author_name = get_the_author_meta('display_name', $post->post_author);
            $custom_title = bp_core_get_user_displayname( $post->post_author ) . ' published a new post "' . get_the_title( $item_id ) . '"';
            $custom_link  = get_permalink( $post );
            $custom_text = bp_core_get_user_displayname( $post->post_author ) . ' published a new post "' . get_the_title( $item_id ) . '"';
            // WordPress Toolbar
            if ( 'string' === $format ) {
                $return = apply_filters( 'publishpost_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
            // Deprecated BuddyBar
            } else {
                $return = apply_filters( 'publishpost_filter', array(
                    'text' => $custom_text,
                    'link' => $custom_link
                ), $custom_link, (int) $total_items, $custom_text, $custom_title );
            }
    
            return $return;
    
        } 
    	
    	if ( 'bbp_new_reply' === $action ) {
    		$topic_id    = bbp_get_reply_topic_id( $item_id );
    		$topic_title = bbp_get_topic_title( $topic_id );
    		$topic_link  = wp_nonce_url( add_query_arg( array( 'action' => 'bbp_mark_read', 'topic_id' => $topic_id ), bbp_get_reply_url( $item_id ) ), 'bbp_mark_topic_' . $topic_id );
    		$title_attr  = __( 'Topic Replies', 'bbpress' );
    
    		if ( (int) $total_items > 1 ) {
    			$text   = sprintf( __( 'You have %d new replies', 'bbpress' ), (int) $total_items );
    			$filter = 'bbp_multiple_new_subscription_notification';
    		} else {
    			if ( !empty( $secondary_item_id ) ) {
    				$text = sprintf( __( 'You have %d new reply to %2$s from %3$s', 'bbpress' ), (int) $total_items, $topic_title, bp_core_get_user_displayname( $secondary_item_id ) );
    			} else {
    				$text = sprintf( __( 'You have %d new reply to %s',             'bbpress' ), (int) $total_items, $topic_title );
    			}
    			$filter = 'bbp_single_new_subscription_notification';
    		}
    
    		// WordPress Toolbar
    		if ( 'string' === $format ) {
    			$return = apply_filters( $filter, '<a href="' . esc_url( $topic_link ) . '" title="' . esc_attr( $title_attr ) . '">' . esc_html( $text ) . '</a>', (int) $total_items, $text, $topic_link );
    
    		// Deprecated BuddyBar
    		} else {
    			$return = apply_filters( $filter, array(
    				'text' => $text,
    				'link' => $topic_link
    			), $topic_link, (int) $total_items, $text, $topic_title );
    		}
    
    		do_action( 'bbp_format_buddypress_notifications', $action, $item_id, $secondary_item_id, $total_items );
    
    		return $return;
    	}
    }
    add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 1, 5 );

    How can i create the same for a new bbpress topic? i’m thinking i need to change this code section but not sure how

    
    // this hooks to post creation and saves the post id
    function bp_custom_add_notification( $post_id, $post ) {
            $post = get_post( $post_id );
            $author_id = $post->post_author;
    		
    		$blogusers = get_users( array( 'role' => 'staff' ) );
    		// Array of WP_User objects.
    		foreach ( $blogusers as $user ) {
    			bp_notifications_add_notification( array(
                'user_id'           => $user->id,
                'item_id'           => $post_id,
                'component_name'    => 'publishpost',
                'component_action'  => 'publishpost_action',
                'date_notified'     => bp_core_current_time(),
                'is_new'            => 1,
            ) );   
    		}        
    }
    add_action( 'publish_post', 'bp_custom_add_notification', 99, 2 );

    I am using woffice as the theme, bbpress version 2.5.14, buddypress version 4.1.0 and the latest version of wordpress

    Thanks

    #282429
    Venutius
    Moderator

    There’s a setting for that in Settings>BuddyPress>Options – Show Toolbar to logged out users.

    #276327
    bflexiblejanneke
    Participant

    Hi, I am a using a combination of WP Members and Buddypress.
    I use Buddypress for the activity registration and the extended profile fields.

    As an admin I can see and edit the extended profile field of my members, but they do not have the toolbar. How can I add a ‘my profile page’ where they can see and edit their extended fields and activities?
    They can now only see it when they click on their own picture at ‘who’s online’.

    Thanks for the help!

    #275639
    shanebp
    Moderator

    “Show Toolbar when viewing site” is a WP setting.
    Somebody probably has such a function.
    But you should ask a larger audience – try wordpress.org/support/

    #275637
    yusareba
    Participant

    I figured out the cause for this issue. When going to the user profile for each member, the check box “Show Toolbar when viewing site” is unchecked for all members. If there were only a few registered members I would just go back to each one and change them, however there are hundreds and would take quite a long time.

    Is there a function I can put in functions.php to override it and enable toolbar for everyone?

    It would be most helpful. Thank you.

    stevengnk88
    Participant

    Nah nah
    I just want to separate the notifications one by one.
    For example:
    Firstly, I receive a notification : You have 1 new reply on topic “A” from “username”.
    Next, a other user comment on my another topic, and I received: You have 2 new replies.
    That’s it.
    From the second notification, I cant get anything clearly from the notifications, y’know. The notifications which I mention are the notification bubble from admin toolbar and from The notifications Bell module, they have same result.
    Finally, I just want the notifications just show one by one, not grouped.

    pauapau
    Participant

    hey guys,
    when the user have read/clicked on a notification then the notifitcation should automatically delete. i want to do that with a ajax call.

    so my idea is to add a filter on the function bp_notifications_get_notifications_for_user() to manipulate the output.
    but i need for the ajax call a notification_id. so that he knows which notofiation he has to delete.

    add_filter( 'bp_notifications_get_notifications_for_user', 'bp_follow_notify_format_notifications', 9, 5  );
    function bp_follow_notify_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    		
    	if ( 'follow_new_post' === $action ) {
    		
    		if ( (int) $total_items > 1 ) {
    			$title = sprintf( __( '%d new posts have been published', 'bp-follow-notify' ), (int) $total_items );
    			$link  = bp_get_notifications_permalink();
    		} else {
    			$title = sprintf( __( '%s is kiteboarding.', 'bp-follow-notify' ), bp_core_get_user_displayname( $secondary_item_id ) );
    			$link = get_permalink( $item_id );			
    		}
    		
    		// WordPress Toolbar
    		if ( 'string' === $format ) {
    			$return = apply_filters('bp_follow_notify_notification', '<div onClick="clickedOnNotification('.$notificationID.')" title="' . esc_attr( $title ) . '">' . esc_html( $title ) . '"</div>', $title, site_url().$link );
    		
    		// Deprecated BuddyBar
    		} else {
    			$return = apply_filters( 'bp_follow_notify_notification', array(
    				'text' => $title,
    				'link' => $link
    			), $link, (int) $total_items, $title, $title );
    		}
    		
    		return $return;
    	}
    	return $action;
    }
    

    here is the important line.
    $return = apply_filters('bp_follow_notify_notification', '<div onClick=”clickedOnNotification(‘.$notificationID.’)”title="' . esc_attr( $title ) . '">' . esc_html( $title ) . '"</div>', $title, site_url().$link );

    cheers Pau

    #274218
    thedark52
    Participant

    I don’t think there is a problem with themes or plugin. The toolbar is correctly displayed to registered users.

    thedark52
    Participant

    Hi,

    i enabled the option that show the toolbar to the visitor of my website but it does not work. How i can resolve this problem?

    BuddyPress Plugin Version: 3.1.0
    WordPress Version 4.9.6-it_IT

Viewing 25 results - 26 through 50 (of 803 total)
Skip to toolbar