Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress notifications drop down and change notif


  • victord34
    Participant

    @victord34

    hello (im french),

    even if the plugin would be paying I take..

    i would like to make a drop down notification in wp-adminbar with numb (like buddypress.org)

    but I’d like to change notifications. exemple : (new page ‘cherry’ was created; page ‘chocolat’ was edit) only PAGES not articles or comment.

    its for a intranet, I want the user to be aware of new pages upload.

    i think @bphelp was talking of this subject in other topic.

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

  • Henry Wright
    Moderator

    @henrywright

    bp_notifications_add_notification() is used to add a notification. For example:

    if ( bp_is_active( 'notifications' ) ) {
        bp_notifications_add_notification( array(
            'user_id'           => $user_id,
            'item_id'           => $item_id,
            'secondary_item_id' => $secondary_item_id,
            'component_name'    => $component_name,
            'component_action'  => $component_action,
            'date_notified'     => bp_core_current_time(),
            'is_new'            => 1,
        ) );
    }

    See here for more info: https://codex.buddypress.org/developer/function-examples/bp_notifications_add_notification/


    victord34
    Participant

    @victord34

    yeah thanks. sorry i don’t know the Php (just a little). im webdesigner.

    so its possible to add notification page ? for all users admin/subscriber.
    (there are no anonymous users in my intranet)

    thanks


    victord34
    Participant

    @victord34

    and i must write it in ‘function.php’ in childtheme
    or directly in the file buddypress? (not erase in update ?)


    victord34
    Participant

    @victord34

    @henrywright

    do you have another exemple. to make page notif ?

    I try that, and many other setting… nothing appears.

    
    if ( bp_is_active( 'notifications' ) ) {
        bp_notifications_add_notification( array(
            'all'           => $user_id,
            'pages'          => $item_id,
            'pages/ edit' => $secondary_item_id,
            'component_name'    => $component_name,
            'component_action'  => $component_action,
            'date_notified'     => bp_core_current_time(),
            'is_new'            => 1,
        ) );
    }
    

    thank you


    victord34
    Participant

    @victord34

    please help 🙁

    thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘BuddyPress notifications drop down and change notif’ is closed to new replies.
Skip to toolbar