Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'notifications counter'

Viewing 16 results - 76 through 91 (of 91 total)
  • Author
    Search Results
  • Tyler
    Member

    First of all, loving the new release!

    The Notifications in the WP bar is AWESOME.

    I’ve encountered an error though that was not present prior to updating.

    Previously, if someone made an Activity Stream post, and another user commented on that post, the original author would get a BP Notification that a comment was added to their post.

    This is no longer happening. After replying to a stream post, the original poster still has 0 notifications.

    I do not know if this is also happening with other ‘events’ as well, but it certainly is with stream commenting.

    Advice please?

    Al B.
    Member

    This has to be a bug. I’ve encountered this with two separate installs of WordPress/BuddyPress. The first install was not done by me… I was hired by a client to test out the site. After spending more than a week on the error I decided to do a fresh install on my own server. I followed all Bp Install instruction… and I am very comfortable with doing Wp installs -can do them in my sleep…

    Please Read –
    Error that I am receiving: Page not found. We’re sorry, but we can’t find the page that you’re looking for. Perhaps searching will help.

    However, I do not receive this error on all pages… All my main Bp pages work as they should (on both installs)… HOME , ACTIVITY, GROUPS, MEMBERS… As well as pages (menu links) that are in the admin bar (top of site).

    Instead I get the PAGE NOT FOUND error on the following menu items:
    -Groups / Membership – http://design911.net/main/_client_work/groups/members/admin/groups/my-groups/

    -Groups / Invitations – http://design911.net/main/_client_work/groups/members/admin/groups/invites/

    I also get this errors when attempting to check notifications from Group Invites…

    Not sure what to do next. Please help.

    Micheal Kennedy
    Participant

    I’m trying to put the notifications in a new sub nav, but I can’t get it to work. This is what I have:

    add_filter('wp_nav_menu_items','custom_nav_items',10,2);
    function custom_nav_items($menu, $args) {
    global $bp;
    $args = (array)$args;
    if ( is_user_logged_in() ) {
    if ( $args != 'primary' )
    return $menu;
    $customNav = '<li class="menu-item menu-item-type-post_type menu-item-object-page ss-nav-menu-item-5 ss-nav-menu-item-depth-0 ss-nav-menu-reg ss-nav-menu-mega-alignRight customNav"><a>loggedin_user->domain .'">'. $bp->loggedin_user->fullname .'</a>
    <ul class="sub-menu sub-menu-1">
    <li class="menu-item menu-item-type-custom menu-item-object-custom ss-nav-menu-item-depth-1"><a>loggedin_user->domain .'">View Profile</a></li>
    <li class="menu-item menu-item-type-custom menu-item-object-custom ss-nav-menu-item-depth-1"><a>loggedin_user->domain .'profile/edit/">Edit Profile</a></li>
    <li class="menu-item menu-item-type-custom menu-item-object-custom ss-nav-menu-item-depth-1"><a>loggedin_user->domain .'settings/change-avatar">Change Photo</a></li>
    <li class="menu-item menu-item-type-custom menu-item-object-custom ss-nav-menu-item-depth-1"><a>loggedin_user->domain .'settings/">Edit Settings</a></li>
    <li class="menu-item menu-item-type-custom menu-item-object-custom ss-nav-menu-item-depth-1"><a href="'. wp_logout_url( bp_get_root_domain() ) .'">Logout</a></li>
    <ul>
    </li>
    <li class="menu-item menu-item-type-post_type menu-item-object-page ss-nav-menu-item-5 ss-nav-menu-item-depth-0 ss-nav-menu-reg ss-nav-menu-mega-alignRight"><a href="#">Notifications';
    if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) {
    '<span>' echo count($notifications) '</span>'
    }
    echo '</a>';
    echo '<ul>';
    if ( $notifications ) {
    $counter = 0;
    for ( $i = 0; $i < count($notifications); $i++ ) {
    $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';
    '<li>' echo $notifications[$i] '</li>'
    $counter++;
    }
    } else {
    '<li><a href="#">No new notifications</a></li>'
    }
    echo '</ul>';
    echo '</li>';
    if( function_exists('my_bp_adminbar_notifications_menu') ) my_bp_adminbar_notifications_menu();
    return $menu.$customNav;
    } else {
    $loggedoutNav = '<li class="menu-item menu-item-type-post_type menu-item-object-page ss-nav-menu-item-5 ss-nav-menu-item-depth-0 ss-nav-menu-reg ss-nav-menu-mega-alignRight"><a style="font-weight: bold;color: red" href="signup/">Sign Up!</a></li>';
    return $menu.$loggedoutNav;
    }
    }

    I’m also trying to stick “Messages (#)” up there, too, but haven’t tried yet.

    Anyone know why it’s not working?

    David Bisset
    Participant

    Since search is still down here, forgive me if this is a repeat topic. Basically wondering if anyone else has encountered this and can provide a solution. Basically install the BuddyPress Skeleton Component into WP 3.2 / BP 1.2.9.

    The example menu tab examples work EXCEPT for the example under the settings tab (where general and notifications are for the profile). The menu tab is visible, but click it and you get redirected on the homepage. Maybe this is due to some hooks being moved or switched around – I know the skeleton component is showing it’s age but wondering if perhaps anyone can point me in the right direction. OR if anyone knows of a plugin that currently adds a menu choice under user settings.

    #103479
    calvinhsu
    Participant

    @acaps2007
    What I’ve found finally:

    (It’s based on this article:
    http://easyoutsource.com/blog/how-to-code-a-custom-adminbar-in-buddypress/)

    So if you just set your adminbar to be hidden in css rather than completely disable it in the wp-config.php, you could use to call the notification menu.

    If you’ve completely disabled adminbar, then use the following code instead(it’s copied from bp-core-adminbar.php):

    <?php
    global $bp;
    
    if ( !is_user_logged_in() )
    return false;
    
    echo '<li id="bp-adminbar-notifications-menu"><a>loggedin_user->domain . '">';
    _e( 'Notifications', 'buddypress' );
    
    if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
    <span></span>
    <?php
    }
    
    echo '</a>';
    echo '<ul>';
    
    if ( $notifications ) {
    $counter = 0;
    for ( $i = 0; $i < count($notifications); $i++ ) {
    $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
    
    <li></li>
    
    <?php $counter++;
    }
    } else { ?>
    
    <li><a href=&quot;loggedin_user->domain ?>"></a></li>
    
    <?php
    }
    
    echo '</ul>';
    echo '</li>';
    ?>
    

    And as I have found out, the js effect (what you called the “mouse over” effect) is dealt automatically by bp-themes/bp-default/_inc/global.js

    In my case, I’m building a child theme of bp-default, so I don’t have to worry about js, just copy and paste css codes from bp-themes/bp-default/_inc/css/adminbar.css and adjust selectors accordingly.

    If you are not building a child theme of bp-default, then maybe you can try search in the global.js and make some copy and past.

    Good luck !

    #103461

    In reply to: Hide General Settings

    r-a-y
    Keymaster

    Add the following to your theme’s functions.php:

    `function ray_bp_remove_settings() {
    global $bp;

    // removing the existing settings tab
    bp_core_remove_nav_item( $bp->settings->slug );
    }
    add_action( ‘init’, ‘ray_bp_remove_settings’, 0 );

    function ray_bp_readd_settings() {
    global $bp;

    // add a new settings tab to use notifications as default tab
    bp_core_new_nav_item( array( ‘name’ => __(‘Settings’, ‘buddypress’), ‘slug’ => $bp->settings->slug, ‘position’ => 100, ‘show_for_displayed_user’ => false, ‘screen_function’ => ‘bp_core_screen_notification_settings’, ‘default_subnav_slug’ => ‘notifications’ ) );

    // bug in bp_core_remove_subnav_item(), we have to hack the screen function so it displays the notifications screen when you land on /settings/
    if ( $bp->current_component == $bp->settings->slug && $bp->current_action == ‘general’ )
    add_action( ‘wp’, ‘bp_core_screen_notification_settings’, 3 );

    // add back the subnav notifications tab
    $settings_link = $bp->loggedin_user->domain . $bp->settings->slug . ‘/’;

    bp_core_new_subnav_item( array( ‘name’ => __( ‘Notifications’, ‘buddypress’ ), ‘slug’ => ‘notifications’, ‘parent_url’ => $settings_link, ‘parent_slug’ => $bp->settings->slug, ‘screen_function’ => ‘bp_core_screen_notification_settings’, ‘position’ => 20, ‘user_has_access’ => bp_is_my_profile() ) );
    }
    add_action( ‘init’, ‘ray_bp_readd_settings’ );`

    Tested lightly. Encountered a few bugs, but this will work…

    #73847
    Gianfranco
    Participant

    I tried this, doesn’t print anything neaither:

    <ul id="user-menu">
    <li><a href="<?php echo bp_loggedin_user_domain() ?>/profile/edit/">My profile</a></li>
    <li>| <a href="<?php echo bp_loggedin_user_domain() ?>/messages/">My messages</a></li>
    <li>| <a href="<?php echo bp_loggedin_user_domain() ?>/groups/">My groups</a></li>
    <li>| <a href="<?php echo bp_loggedin_user_domain() ?>/friends/">My friends</a></li>
    <li>| <a href="<?php echo bp_loggedin_user_domain() ?>/photos/">My photos</a></li>
    <li>| <a href="<?php echo bp_loggedin_user_domain() ?>/settings/">Settings</a></li>

    <?php function my_bp_adminbar_notifications_menu() {
    global $bp;

    if ( !is_user_logged_in() )
    return false;

    echo '<li id="bp-adminbar-notifications-menu"><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>';
    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>';
    }
    ?>

    <?php if( function_exists('my_bp_adminbar_notifications_menu') ) my_bp_adminbar_notifications_menu(); ?>

    </ul>

    Is anything in there correct?

    #73834
    Gianfranco
    Participant

    @r-a-y I tried this:

    <?php function my_bp_adminbar_notifications_menu() {
    global $bp;

    if ( !is_user_logged_in() )
    return false;

    echo '<li id="bp-adminbar-notifications-menu"><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>';
    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>';
    }
    ?>

    Which is the same funtion except for the name “my_bp_adminbar_notifications_menu”.

    It doesn’t print anything.

    Probably something with the “bp_core_get_notifications_for_user” that is desabled because of my desabling the default Admin bar?

    I admit that I php is not my strong point at all.

    #73421
    r-a-y
    Keymaster

    Fixed in the 1.2 branch – courtesy Andy:

    https://trac.buddypress.org/changeset/2921

    [EDIT]

    For friend requests… haven’t encountered the other issues above yet.

    stwc
    Participant

    I’ve run in to this with importing a userbase to a Buddypress install. WordPress likes login names to be lowercase, with no spaces, and no non-alphanumerics (except, I think for dashes (‘-‘).

    Users can, of course, make their display name anything they like.

    The follow-on problem though, is with @username notifications in BP1.2+, which work on the login name and not the display name, so if a user has the login username johnsmith and the display name John, only @johnsmith will work.

    (I’ve also just recently encountered a problem in that usernames with dashes cause @notifications to fail. That is, if a username is johnsmith, @johnsmith works, but if his username is john-smith @john-smith fails.)

    #70457
    Mike Pratt
    Participant

    @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>';
    ?>

    #9746
    modemlooper
    Moderator

    I basically just want the notification to show an “button” instead of all the text. So if it’s a message it will have [1] <– The number only

    I copied the function over and renamed it.

    function bp_notifications_menu() {
    global $bp;

    if ( !is_user_logged_in() )
    return false;

    echo '<li id="bp-adminbar-notifications-menu"><a href="' . $bp->loggedin_user->domain . '">';
    _e( '', 'buddypress' );

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

    echo '</a>';
    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( '', 'buddypress' ); ?></a></li>
    <?php
    }

    echo '</ul>';
    echo '</li>';
    }

    ?>

    #60124
    kineda
    Participant

    Thanks. That clears things up. The only other problem I’ve encountered is after I deactivate the BuddyPress plugin and re-activate it, I’ll get the follow db errors:

    WordPress database error: [Duplicate key name ‘useritem’]

    ALTER TABLE wp_bp_notifications ADD KEY useritem (user_id, is_new)

    WordPress database error: [Table ‘wp_bp_activity’ already exists]

    RENAME TABLE wp_bp_activity_user_activity_cached TO wp_bp_activity

    WordPress database error: [Duplicate entry ‘1’ for key 1]

    INSERT INTO wp_bp_xprofile_groups VALUES ( 1, ‘Base’, ”, 0 );

    WordPress database error: [Duplicate entry ‘1’ for key 1]

    INSERT INTO wp_bp_xprofile_fields ( id, group_id, parent_id, type, name, is_required, can_delete ) VALUES ( 1, 1, 0, ‘textbox’, ‘Name’, 1, 0 );

    #6602
    gerikg
    Participant

    I dont like the buddybar but I do want to be able to notify on the sidebar that you have a new message.

    I thought this was the code but it doesn’t work with mail

    <strong>Notifications</strong> <?php echo ( count($notifications) > 0 && $notifications != false ) ? "(".count($notifications).")" : "" ?>
    <?php 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><?php _e( 'No new notifications.', 'buddypress' ); ?></li>
    <?php } echo '</ul>';?>

    #51652
    r-a-y
    Keymaster

    Just experienced the OP’s problem.

    I looked into it and found a tentative fix… though a BP dev will need to look at the code.

    In “bp-core/bp-core-notifications.php”, look for the bp_core_notifications_for_user() function.

    Then look for these lines:

    $item_id = ( 1 == $action_item_count ) ? $component_action_items[0]->item_id : false;
    $secondary_item_id = ( 1 == $action_item_count ) ? $component_action_items[0]->secondary_item_id : false;

    Change this to:

    $item_id = $component_action_items[0]->item_id;
    $secondary_item_id = $component_action_items[0]->secondary_item_id;

    I don’t know why there was a check done for only 1 item and then returning false for more than 1… if a BP dev can explain why, that’d be great.

    Let me know if anyone encounters any problems.

    Trac ticket made.

    #36748

    In reply to: Forum notifications

    fishbowl81
    Participant

    @gpo1

    Due to all communication of buddypress and bbpress being done over xmlrpc, the normal plugins most likely won’t work. I have been looking at ones like a view counter and they require massive modification of buddypress. Because of caching, the forums are not always pulled from bbpress. So it would produce falsely low view count.

    Also, group forums, are just a single forum in bbpress, this changes the administration and moderation of the forums and topics. If someone is a moderator on bbpress, they can moderate the whole site I believe, with buddypress a moderator is only a moderator of that group forum.

    Hope this helps,

    Brad

Viewing 16 results - 76 through 91 (of 91 total)
Skip to toolbar