Skip to:
Content
Pages
Categories
Search
Top
Bottom

Messages Excerpts in Admin Bar Notifications


  • Osisis
    Participant

    @osisis

    Hoping someone may be able to point me in the right direction for this one if it’s even possible. I’ve already broken out the individual BP sub menu items and made them primary items. Now I would like to customize the way notifications show up under the “Messages” menu item. I would like it to appear more like LinkedIn or FB where you see an avatar of the person that sent the message as well as a message excerpt. Basically just taking the message page, minimize it and include it in the messages notifications. I’m using BP 2.2 and WP 4.2.2. I’ve overlapped the images of messages page and the messages notifications menu drop down just to give you a visual of what I’m trying to accomplish.

    Demo messages preview

    I know message notifications are formed in bp-messages-notifications.php. So how would I call the bottom half of the messages template page to be included in notifications? Hope this makes sense.

Viewing 4 replies - 1 through 4 (of 4 total)

  • Osisis
    Participant

    @osisis

    bump


    r-a-y
    Moderator

    @r-a-y

    You’ll have to create your own messages adminbar menu.

    You can create a new menu item using:
    https://codex.wordpress.org/Function_Reference/add_node

    Or if you’re not using the WP Adminbar and have hardcoded that menu by yourself, you do not have to do anything.

    Next, I would probably use JS to load the messages loop when you click on the “Messages” adminbar icon with AJAX.


    Osisis
    Participant

    @osisis

    @r-a-y I’m using the BuddyPress method of having my admin bar appear more as a menu. I had been playing with code for the past couple of days I’d tried.

    But that hadn’t worked as now no matter what my message notifications just keep saying no new notifications.

    message notifications

    Hadn’t thought to use JS… Will have to give that a try. Thanks!


    Osisis
    Participant

    @osisis

    once I get the files how then would I call them to my admin bar? I attempted adding a menu, but that doesn’t seem to be working.

     $pre_msg       = get_template_part( 'bp-preview-messages' );
    
    			$wp_admin_bar->add_menu( array(
    				'parent' => 'messages-personal-li',
    				'id'     => 'message-threads',
    				'title'  => $pre_msg,
    			) );
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Messages Excerpts in Admin Bar Notifications’ is closed to new replies.
Skip to toolbar