Skip to:
Content
Pages
Categories
Search
Top
Bottom

Admin Bar topics to Nav Bar

  • Avatar of ScottWatson
    ScottWatson
    Member

    @scottwatson

    Okay, I have spent most of this evening trying to work this one out and I did find a few useful things on the community already that helped to get over hurdle number 1 – thank you.

    I want to be able to deactivate the Adminbar on my site, however I need some of the key components such as “My Profile”; “Inbox” etc… to appear on the Themes Nav Bar. I used the following code (courtesy of the posters on here) to place Profile into my Nav Bar. However I am having issues getting Inbox in there – what do I need to do to this code to make this happen?


    `<li class=”selected”>`
    `<a href="” title=””>`
    ``

    I know that the code “bp_loggedin_user_domain” has to change to point in the right direction, I just don’t know where to find a list of these that tell me what the ones for Inbox etc… are.

    Can anyone help with this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of Virtuali
    Virtuali
    Participant

    @gunju2221

    So, are you talking a additional tab in the admin bar with sub-nav links like “My Account”?

    Avatar of ScottWatson
    ScottWatson
    Member

    @scottwatson

    I want to get rid of the admin bar altogether and place some of the items from the My Account menu onto my themes Nav Bar – please excuse the terms if they are incorrect; still learning!

    Avatar of Virtuali
    Virtuali
    Participant

    @gunju2221

    Got it.

    Now what I need to know is if your using a default theme, or custom theme.

    Doing this could simple as transferring some code snippets from bp-core/adminbar.php, but I am not extremely code savy myself :)

    Avatar of ScottWatson
    ScottWatson
    Member

    @scottwatson

    I am using the jarrah custom theme, that I adapted to work with BuddyPress using the BP Compatibility plugin. However the themes appear to be fairly similar in the back end with regards to this particular change, as the code provided above is supposed to work with the default theme, and I didn’t alter it at all from its original form to get it to work on the custom theme.

    Avatar of Virtuali
    Virtuali
    Participant

    @gunju2221

    Could be something related to: but It isn’t guaranteed to work, might need to play around with it..

    `function bp_adminbar_account_menu() {
    global $bp;

    if ( !$bp->bp_nav || !is_user_logged_in() )
    return false;

    echo ‘

  • ‘;

    echo __( ‘My Profile’, ‘buddypress’ ) . ‘‘;
    echo ‘

      ‘;
      }`
Avatar of ScottWatson
ScottWatson
Member

@scottwatson

That looks about right – but I think I’m not explaining myself properly. I have already managed to get the Mr Profile section to appear on the Nav Bar y inserting the initial code I provided into my themes header.php, but I also want to have the Inbox option appear in the Nav Bar also as a seperate entity. However I am not sure how to change the initial code that I provided to point towards the Message Inbox instead of a Users Profile page.

Avatar of Virtuali
Virtuali
Participant

@gunju2221

– if you want just a nav item for inbox messages, than a simple slug would be easy to add.

If you want the entire notification tab there… same type of thing as before,

`function bp_adminbar_notifications_menu() {
global $bp;

if ( !is_user_logged_in() )
return false;

echo ‘

  • loggedin_user->domain . ‘”>’;
    _e( ‘Notifications’, ‘buddypress’ );

    if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>

    <?php`

  • Avatar of ScottWatson
    ScottWatson
    Member

    @scottwatson

    Ahh okay, how would I go about adding the slug then if you don’t mind me asking? Thank you for your help on this btw, very much appreciated

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

    You must be logged in to reply to this topic.