Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • calvinhsu
    Participant

    @calvinhsu

    19.6.1 works

    2.0.1 gives following error log:
    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1000 bytes) in /Users/Calvin/Sites/wordpress/hezii_dev/wp-includes/pomo/entry.php on line 204


    calvinhsu
    Participant

    @calvinhsu

    Same problem with MAMP Pro 2.0.1 on Lion. WP works but activating BP leads to error.

    Redownloading 1.9.6.1 now…


    calvinhsu
    Participant

    @calvinhsu

    @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 !


    calvinhsu
    Participant

    @calvinhsu

    What I need is re-creating the notification menu while disabling other parts of the adminbar, that is, a notification label with a count of new notifications, and when moused over, it shows a dropdown list of those nitifications.

    Since it’s no easy work building a global inbox page, such a notification menu would still help a lot.


    calvinhsu
    Participant

    @calvinhsu

    @acaps2007

    I think I’ve find an easy way to provide the effect you mentioned. It’s rather a css trick than a php-code way. Below is what I’ve find during this process:

    First, I find the function bp_adminbar_notifications_menu() in bp-core-adminbar.php, but it only works when adminbar is enable, and it simply lists out all notifications rather than the “mouse-over” effect we want. It seems admin-bar.js is also required, which is totally beyond me.

    So I realized that since it already requires adminbar to be enable in the first place, why are we bothering to duplicate this item, especially in so complex a way?

    We just need to hide all other items in adminbar, and re-position the notification menu.

    So finally I come up with this:

    /** Play with admin-bar to grab notification menu */
    
    #wp-admin-bar {
    position: absolute;
    }
    
    #wp-admin-bar .padder {
    background: none;
    }
    
    #wp-admin-bar .padder #admin-bar-logo, #wp-admin-bar .padder ul #bp-adminbar-account-menu, #wp-admin-bar .padder ul #bp-adminbar-blogs-menu, #wp-admin-bar .padder ul #bp-adminbar-thisblog-menu, #wp-admin-bar .padder ul #bp-adminbar-authors-menu, #wp-admin-bar .padder ul #bp-adminbar-visitrandom-menu {
    display: none;
    }

    Now we have notification menu there, and it’s no longer a “always-in-the-front” item. What remains to be done is further defining the style of this little baby, its position, background color, font color, etc.

    Hope this would do some help.


    calvinhsu
    Participant

    @calvinhsu

    @Paul Gibbs
    Glad to hear that.

    Right now I’m thinking of grabbing the “Notification” item in bp default adminbar, which would at least be better than having four separate links to messages/friend-requests/group-membership-requests/group-invites.

    Do you have an answer how to achieve this?

    @acaps2007 has also mentioned this here:
    https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-move-adminbar-links-to-sidebar/?topic_page=1&num=15#post-86623


    calvinhsu
    Participant

    @calvinhsu

    @acaps2007
    @ScottWatson
    the post linked below says how to display the number of unread messages.

    https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-moverelocate-the-links-in-the-admin-bars-my-account-individuallyseparately-to-the-sidebar/

    But I would prefer the idea @acaps2007 has proposed, that’s the “notification” item and the mouse over effect, since in a buddypress community, we would have
    1. private messages
    2. friend requests
    3. group requests
    4. group invites
    5. mentions

    Although the last one is not included in the default bp notification count, combining the previous four in one place would still help a lot.


    calvinhsu
    Participant

    @calvinhsu

    @r-a-y
    I haven’t tried what you said since I find disabling bp would make it work. Maybe I’ll try later.

    But even if manually uploading would work, it would be annoying uploading them every time they get upgraded.


    calvinhsu
    Participant

    @calvinhsu

    @paulhastings0

    Hi, I used this method before, and I even moved <li id="activity-all"> to the end of all tabs.

    But after this, although it appears the preferred tab(“My friends” or “my groups”) is selected, the actual activities automatically loaded below the tabs are still all members’ activities.

    So it seems the class="selected" is just for defining css style, it does not change the default activity sream loaded.


    calvinhsu
    Participant

    @calvinhsu

    @mercime
    the default one. I disabled global forum directory in backend Buddypress->general setting.


    calvinhsu
    Participant

    @calvinhsu

    Hi guys, I just searched and followed the links here.

    I tried moving the code for the “All activity” tab in a child theme, and managed to move the tab to the right of “@mentions” tab.

    The problem is although “My friends” tab is now the first tab and appears to be active by default (I added class=”selected” for it), but the rss feed area still displays sitewide activties.

    In my understanding, buddypress loads “all activities” when the activity page is opened, and by clicking tabs or setting filter in the dropdown menu, it filters the loaded activites.

    So I guess if there is code for filtering and displaying only “my friends” activities, so we could add the code right after bp loads all activities.

    Does this sounds reasonable? Anyone has any idea?


    calvinhsu
    Participant

    @calvinhsu

    @socialpreneur, that’s right. I finally solved this by going into the database and fixed the bbp tables.


    calvinhsu
    Participant

    @calvinhsu

    I suggest password function for album or for each picture, since sometimes maybe we just want to share pictures with some people rather than all the friends or members.

Viewing 13 replies - 1 through 13 (of 13 total)
Skip to toolbar