Skip to:
Content
Pages
Categories
Search
Top
Bottom

Notifications Relocation


  • LwEEs
    Participant

    @menel001

    Hey guys, I’m currently murdering a version of the theme unplugged for buddypress, personally I like what I’m seeing, you be the judge, lwees.com. I have removed the navigation bar that appears on top of the site (I know I should know th damn name by now), but I would like to keep the notifications feature somewhere else.

    I know how to play with the coding to get it done but I would like ideas about where to do this, I was planning to do it in the sidebar just bellow the avatar of a logged in user but I’m unsure if that will break any functionality. Any ideas are extremely welcome.

    I’m using the latest of everything, WordPress MU, BuddyPress, and Latest Plugins. Thanks, Bye.

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

  • LwEEs
    Participant

    @menel001

    @Modemlooper thanks for pointing me out to BP-Notifications Widget, is the best option for what I wanted to do. Thanks a lot community.


    Mike Pratt
    Participant

    @mikepratt

    @LwEEs

    You can also place this code anywhere you want and style your own little Notifications Block:

    <!-- Notifications block -->
    <?php
    echo '<li id="notifications-menu"><span id="menu-title">
    <a href="' . $bp->loggedin_user->domain . '">';
    _e( 'Notifications', 'buddypress' );

    if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
    <span><?php echo '('.count($notifications).')' ?></span>
    <?php
    }
    echo '</a></span>';
    echo '<ul>';

    if ( $notifications ) { ?>
    <?php $counter = 0; ?>
    <?php for ( $i = 0; $i < count($notifications); $i++ ) { ?>
    <?php $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
    <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>
    <?php $counter++; ?>
    <?php } ?>
    <?php } else { ?>
    <li><a href="<?php echo $bp->loggedin_user->domain ?>">
    <?php _e( 'No new notifications.', 'buddypress' ); ?></a></li>
    <?php
    }
    echo '</ul>';
    echo '</li>';
    ?>


    LwEEs
    Participant

    @menel001

    Thanks Mike, I’m saving this code for later.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Notifications Relocation’ is closed to new replies.
Skip to toolbar