Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'notification user id'

Viewing 25 results - 701 through 725 (of 1,091 total)
  • Author
    Search Results
  • #147460
    #147032
    shanebp
    Moderator

    Too bad about the release timing, but good work David.

    #147028
    David Hunt
    Participant

    Well, after being driven almost bonkers, I have solved this — and found what I think is a bug in BuddyPress 1.6.1.

    I went with @shanebpx’s great suggestion of using a get_var query:


    $content_id = $args['id'];
    global $wpdb;
    $content = $wpdb->get_var( $wpdb->prepare("SELECT content FROM ".$wpdb->prefix."bp_activity WHERE id = %d;", $content_id ) );
    $message .= wpautop($content);

    However, I was baffled by the fact that $content kept coming up empty. Until I finally took a look at how BuddyPress was calling do_action( 'bp_before_activity_delete', $args ); in /bp-activity/bp-activity-functions.php:


    if ( !$activity_ids_deleted = BP_Activity_Activity::delete( $args ) )
    return false;

    // Check if the user's latest update has been deleted
    if ( empty( $args['user_id'] ) )
    $user_id = $bp->loggedin_user->id;
    else
    $user_id = $args['user_id'];

    do_action( 'bp_before_activity_delete', $args );

    Yup, it’s apparently doing the bp_before_activity_delete action after BP_Activity_Activity::delete!

    I have edited my copy of /bp-activity/bp-activity-functions.php to put the do_action before the deletion.


    do_action( 'bp_before_activity_delete', $args );
    if ( !$activity_ids_deleted = BP_Activity_Activity::delete( $args ) )
    return false;

    // Check if the user's latest update has been deleted
    if ( empty( $args['user_id'] ) )
    $user_id = bp_loggedin_user_id();
    else
    $user_id = $args['user_id'];

    and at last, my email function works!

    Now, how do I go about submitting this as a bug…?

    #147006
    shanebp
    Moderator

    Yeah, those fields will be empty unless the values are passed by whatever is calling the function that has the do_action ‘bp_before_activity_delete’

    Iffy, but try adding this to the top of your function:
    global $activities_template;

    and then revert to:
    $message .= bp_get_activity_content_body();

    There is definitely some BP way to get the activity content… sometimes it takes some real searching.

    And since the activity id is being passed, there is always the custom query approach.
    If you don’t know how to do that, take a look at $wpdb and get_var
    https://codex.wordpress.org/Class_Reference/wpdb#SELECT_a_Variable

    The query will something like this:
    $content_id = $args[‘id’];
    $content = $wpdb->get_var( “SELECT content FROM wp_bp_activity WHERE id = $content_id” );

    #147001
    David Hunt
    Participant

    I guess the delete button only passes user_id and id to $args…

    #147000
    David Hunt
    Participant

    @shanebpx: Thanks for that suggestion — it’s beautifully simple. Unfortunately, it appear as though $args['content'] is empty? (But there’s definitely content in the test activity I am deleting!)

    For debugging, I tried $message .= print_r($args, true);, which gave:

    Array
    (
    [id] => 31
    [action] =>
    [content] =>
    [component] =>
    [type] =>
    [primary_link] =>
    [user_id] => 52
    [item_id] =>
    [secondary_item_id] =>
    [date_recorded] =>
    [hide_sitewide] =>
    )

    I admit I’m a little bewildered as to why all those values appear empty.

    David Hunt
    Participant

    Hi,

    I’m trying to create a new action which sends an email to the relevant user when his/her activity is deleted by a moderator. So far I have:

    add_action( 'bp_before_activity_delete', 'pa_send_notification_email');
    function pa_send_notification_email( $args ) {
    // If current user deletes his/her own activity, do nothing
    if ($args['user_id'] != bp_loggedin_user_id()) {
    $ud = get_userdata($args['user_id']);
    $to = $ud->user_email;
    if (($to) && ($to != '')) {
    $subject = 'Your activity has been removed';
    $message = 'A moderator has removed your activity posting. If you want to know why, please contact the moderation team.';
    $message .= 'Original text:';
    $message .= bp_get_activity_content_body();

    //sends email
    wp_mail($to, $subject, $message, 'content-type: text/html' );
    }
    }
    }

    This works fine except for the line $message .= bp_get_activity_content_body();, which is attempting to include the original content of the activity (I want to include it so that the user knows exactly what was deleted).

    I’ve tried $message .= bp_get_activity_content_body($args['id']); but that didn’t work either.

    Does anyone know how I ought to be pulling in the activity content body text?

    David

    #146773
    Andrew Tibbetts
    Participant

    Okaaay, the plugin IS working. Does anyone know why an entry in wp_bp_notifications would not be showing up in notifications?

    entry in wp_bp_notifications:

    id user_id item_id secondary_item_id component_name component_action date_notified is_new

    196 4 209 0 pc_notifier new_post_comment_209 2012-12-07 17:08:16 1

    User id#3 is creating the comment and user id#4 is not receiving the notification in the top bar. Anyone know why?

    #146765
    Andrew Tibbetts
    Participant

    Ok, I think I’ve narrowed it down to this function in the plugin. I know that the function that it is hooking into works. Anyone know why this would fail?

    function pc_notifier_notify($activity_id) {
    global $bp;

    $activity = new BP_Activity_Activity($activity_id);
    $comment = get_comment($activity->secondary_item_id);
    $users = pc_notifier_find_involved_persons($comment->comment_post_ID);
    $link = get_permalink($comment->comment_post_ID);

    if($activity->hide_sitewide) return;

    if(!in_array($activity->user_id, $users)&&($bp->loggedin_user->id!=$activity->user_id)) array_push ($users, $activity->user_id);

    foreach((array)$users as $user_id){
    bp_core_add_notification( $activity_id, $user_id, $bp->pc_notifier->id, 'new_post_comment_'.$activity_id );
    }

    }
    add_action("bp_blogs_comment_recorded","pc_notifier_notify",10,1); // hook to bp_blogs_comment_recorded for adding notification

    #146721
    Andrew Tibbetts
    Participant

    Actually, this function is working—it is creating activity items based on blog posts and comments. I found out that it’s my custom plugin that is supposed to hook into this custom post or comment action to create a notification. Here is the plugin. I know no one will even try to tackle this but I have to post this because it’s my only option and I one for due diligence…

    /**
    * Plugin Name:BuddyPress Post Comment Notifier
    * Description: Mod of Brajesh Singh's BuddyPress Activity Comment Notifier to work for Blog Post Comments
    *
    */

    // we are not much concerned with the slug, it is not visible
    define("BP_COMMENT_NOTIFIER_SLUG","pc_notification");

    //register a dummy notifier component, I don't want to do it, but bp has no other mechanism for passing the notification data to function, so we need the format_notification_function
    function pc_notifier_setup_globals() {
    global $bp, $current_blog;
    $bp->pc_notifier=new stdClass();
    $bp->pc_notifier->id = 'pc_notifier';//I asume others are not going to use this is
    $bp->pc_notifier->slug = BP_COMMENT_NOTIFIER_SLUG;
    $bp->pc_notifier->notification_callback = 'pc_notifier_format_notifications';//show the notification
    /* Register this in the active components array */
    $bp->active_components[$bp->pc_notifier->slug] = $bp->pc_notifier->id;

    do_action( 'pc_notifier_setup_globals' );
    }
    add_action( 'bp_setup_globals', 'pc_notifier_setup_globals' );

    /**
    * storing notification for users
    * notify all the users who have commented, or who was the original poster of the update, when someone comments
    * hook to bp_blogs_comment_recorded action
    */
    function pc_notifier_notify($activity_id) {
    global $bp;

    $activity = new BP_Activity_Activity($activity_id);
    $comment = get_comment($activity->secondary_item_id);
    $users = pc_notifier_find_involved_persons($comment->comment_post_ID);
    $link = get_permalink($comment->comment_post_ID);

    if($activity->hide_sitewide) return;

    if(!in_array($activity->user_id, $users)&&($bp->loggedin_user->id!=$activity->user_id)) array_push ($users, $activity->user_id);

    foreach((array)$users as $user_id){
    bp_core_add_notification( $activity_id, $user_id, $bp->pc_notifier->id, 'new_post_comment_'.$activity_id );
    }

    }
    add_action("bp_blogs_comment_recorded","pc_notifier_notify",10,1); // hook to bp_blogs_comment_recorded for adding notification

    /** our notification format function which shows notification to user
    *
    * @global $bp
    * @param $action
    * @param $activity_id
    * @param $secondary_item_id
    * @param $total_items
    * @return
    * @since 1.0.2
    * @desc format and show the notification to the user
    */
    function pc_notifier_format_notifications( $action, $activity_id, $secondary_item_id, $total_items, $format='string' ) {

    global $bp;
    $glue = '';
    $user_names = array();
    $activity = new BP_Activity_Activity( $activity_id );
    $comment = get_comment($activity->secondary_item_id);
    $link = get_permalink($comment->comment_post_ID);
    $comment_post = get_post($comment->comment_post_ID);

    if ( $activity->user_id == $bp->loggedin_user->id ) $text = __("your post");
    else $text = sprintf(__("%s"), $comment_post->post_title);

    $pc_action = 'new_post_comment_'.$activity_id;

    if ( $action == $pc_action ) {

    $users = pc_notifier_find_involved_persons($comment->comment_post_ID);

    $total_user = $count = count($users);//how many unique users have commented

    if ( $count > 2 ) {
    $users = array_slice($users, $count-2);//just show name of two poster, rest should be as and 'n' other also commeted
    $count = $count-2;
    $glue=", ";
    }
    else if ( $total_user == 2 ) $glue = " and ";//if there are 2 unique users , say x and y commented

    foreach ( (array)$users as $user_id )
    $user_names[] = bp_core_get_user_displayname($user_id);

    if ( !empty($user_names) )
    $commenting_users = join($glue,$user_names);

    if ( $total_user > 2 )
    $text = $commenting_users." and ".$count." others commented on ".$comment_post->post_title;
    else
    $text = $commenting_users." commented on ".$comment_post->post_title;

    if ( $format == 'string' )
    return apply_filters('bp_activity_multiple_new_comment_notification','comment_ID.'">'.$text.'');
    else {
    $link .= '#comment-'.$comment->comment_ID;
    return array('link'=>$link,'text'=>$text);
    }

    }

    return false;

    }

    /*
    * Remove activity for the comments on new_blog_post & new_blog_comment activity item.
    * Since these items do not have a single activity view and are linked to the single post screen, we will do the needed on single post view
    */

    function pc_notifier_remove_notification_for_blog_posts(){
    if( !( is_user_logged_in() && is_singular() ) )
    return;

    global $bp,$wpdb;
    $blog_id = (int)$wpdb->blogid;
    $post = wp_get_single_post();
    $activity_id = bp_activity_get_activity_id(
    array(
    'user_id' => $post->post_author,
    'component' => $bp->blogs->id,
    'type' => "new_blog_post",
    'item_id' => $blog_id,
    'secondary_item_id' => $post->ID
    )
    );
    //delete the notification for activity comment on new_blog_post
    if( !empty($activity_id) )
    bp_core_delete_notifications_by_item_id( $bp->loggedin_user->id, $activity_id, $bp->pc_notifier->id, 'new_post_comment_'.$activity_id );

    //for replies on blog comments in activity stream
    $comments = pc_notifier_get_all_blog_post_comment_ids($post->ID);//get all the comment ids as array

    //added in v 1.0.3 for better database performance, no more looping to get individual activity ids
    $activities = pc_notifier_get_activity_ids(
    array(
    "type"=>"new_blog_comment",
    "component" => $bp->blogs->id,
    "item_id"=>$blog_id,
    "secondary_ids"=>$comments
    )
    );

    foreach( (array)$activities as $pc_id )
    bp_core_delete_notifications_by_item_id( $bp->loggedin_user->id, $pc_id, $bp->pc_notifier->id, 'new_post_comment_'.$pc_id );

    }
    add_action("wp_head","pc_notifier_remove_notification_for_blog_posts");

    /**
    * @since v 1.0.2
    * @desc delete notification when an activity is deleted, thanks to @kat_uk for pointing the issue
    * @param pc_ids:we get an arry of activity ids
    */
    function bp_pc_clear_notification_on_activity_delete($pc_ids){
    global $bp;

    foreach ( (array)$pc_ids as $activity_id )
    bp_core_delete_all_notifications_by_type( $activity_id, $bp->pc_notifier->id, 'new_post_comment_'.$activity_id, $secondary_item_id = false );
    }
    add_action("bp_activity_deleted_activities","bp_pc_clear_notification_on_activity_delete");

    /************************************ HELPER FUNCTIONS ********************************************************/

    // find all users who commented on the post
    function pc_notifier_find_involved_persons($comment_post_ID){
    global $bp,$wpdb;

    return $wpdb->get_col($wpdb->prepare("SELECT DISTINCT(user_id) from {$wpdb->comments} where comment_post_ID=%d and user_id!=%d",$comment_post_ID,$bp->loggedin_user->id));
    }

    // return an array of comment ids for the post
    function pc_notifier_get_all_blog_post_comment_ids($post_id) {
    global $wpdb;

    return $wpdb->get_col($wpdb->prepare("SELECT comment_ID as id FROM {$wpdb->comments} WHERE comment_post_ID = %d AND comment_approved = '1' ORDER BY comment_date", $post_id));
    }

    // get activity ids when type, component, secondary_ids, item_id is specified
    function pc_notifier_get_activity_ids($params){
    global $bp,$wpdb;
    extract($params);
    $list="(".join(",", $secondary_ids).")";//create a set to use in the query;

    return $wpdb->get_col($wpdb->prepare("SELECT id from {$bp->activity->table_name} where type=%s and component=%s and item_id=%d and secondary_item_id in {$list}",$type,$component,$item_id));
    }

    Andrew Tibbetts
    Participant

    I have this function that I pieced together a few months back that worked until a recent WP or BP upgrade (not sure which or when). The function adds blog comments as activity items so that I can have them show up in notifications without actually using the activity feed. It no longer works. Does anyone know why this wouldn’t work anymore?

    function rt_bp_blogs_record_comment( $comment_id, $is_approved = true ) {
    global $bp;

    // Get the users comment
    $recorded_comment = get_comment( $comment_id );

    // Don't record activity if the comment hasn't been approved
    if ( empty( $is_approved ) )
    return false;

    // Don't record activity if no email address has been included
    if ( empty( $recorded_comment->comment_author_email ) )
    return false;

    // Get the user_id from the comment author email.
    $user = get_user_by( 'email', $recorded_comment->comment_author_email );
    $user_id = (int)$user->ID;

    // If there's no registered user id, don't record activity
    if ( empty( $user_id ) )
    return false;

    // Get blog and post data
    $blog_id = get_current_blog_id();
    $recorded_comment->post = get_post( $recorded_comment->comment_post_ID );

    if ( empty( $recorded_comment->post ) || is_wp_error( $recorded_comment->post ) )
    return false;

    // If this is a password protected post, don't record the comment
    if ( !empty( $recorded_comment->post->post_password ) )
    return false;

    // Don't record activity if the comment's associated post isn't a WordPress Post
    if ( !in_array( $recorded_comment->post->post_type, apply_filters( 'bp_blogs_record_comment_post_types', array( 'post' ) ) ) )
    return false;

    $is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) );

    // If blog is public allow activity to be posted
    if ( $is_blog_public ) {

    // Get activity related links
    $post_permalink = get_permalink( $recorded_comment->comment_post_ID );
    $comment_link = htmlspecialchars( get_comment_link( $recorded_comment->comment_ID ) );

    // Prepare to record in activity streams
    if ( is_multisite() )
    $activity_action = sprintf( __( '%1$s commented on the post, %2$s, on the site %3$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '' . apply_filters( 'the_title', $recorded_comment->post->post_title ) . '', '' . get_blog_option( $blog_id, 'blogname' ) . '' );
    else
    $activity_action = sprintf( __( '%1$s commented on the post, %2$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '' . apply_filters( 'the_title', $recorded_comment->post->post_title ) . '' );

    $activity_content = $recorded_comment->comment_content;

    // Record in activity streams
    $activity_id = bp_blogs_record_activity( array(
    'user_id' => $user_id,
    'action' => apply_filters_ref_array( 'bp_blogs_activity_new_comment_action', array( $activity_action, &$recorded_comment, $comment_link ) ),
    'content' => apply_filters_ref_array( 'bp_blogs_activity_new_comment_content', array( $activity_content, &$recorded_comment, $comment_link ) ),
    'primary_link' => apply_filters_ref_array( 'bp_blogs_activity_new_comment_primary_link', array( $comment_link, &$recorded_comment ) ),
    'type' => 'new_blog_comment',
    'item_id' => $blog_id,
    'secondary_item_id' => $comment_id,
    'recorded_time' => $recorded_comment->comment_date_gmt
    ) );

    // Update the blogs last active date
    bp_blogs_update_blogmeta( $blog_id, 'last_activity', bp_core_current_time() );
    }

    do_action('bp_blogs_comment_recorded',$activity_id);

    return $recorded_comment;
    }
    remove_action( 'comment_post', 'bp_blogs_record_comment', 10, 2 );
    remove_action( 'edit_comment', 'bp_blogs_record_comment', 10 );
    add_action( 'comment_post', 'rt_bp_blogs_record_comment', 10, 2 );
    add_action( 'edit_comment', 'rt_bp_blogs_record_comment', 10 );

    #32969
    danpkraus
    Participant

    Hi All,
    I need to completely revamp the user navigation. I don’t need all the top level and sub navigation. I want to create a single user navigation menu with the items in it I want to include.

    Here’s something along the lines of what I am looking to do:

    Activity
    Public Profile
    Edit Profile
    Friends
    Notifications
    Settings

    And that would be it in my user navigation. Any ideas on how I can get these individual nav items? I know I can add and remove items but I can’t find any info on getting certain or particular nav items.

    Thanks in advance!

    #32967
    thomas.fredriksen
    Participant

    How can I force email notifications for new messages and site notifications to be enabled for all users? I don’t want the users to be able to disable this. I’m creating a member site for a organization, and I want to use the message system to communicate with the members.

    I don’t mind adding/editing PHP code, but I would prefer to add outside the main plugin, to avoid having to do changes every time I update BuddyPress.

    Anyone able to help me?

    #144893

    In reply to: Settings template

    drrxa
    Participant

    Thanks for reply Paul. And yes, WP won’t check for that and if called twice there will be double headers and footers.

    What I have found that these settings files (located in `bp-themes/bp-default/members/single/settings/`) are not loaded by the file `members/single/settings.php` and that is maybe why they override the original layout (they have for example their own `get_header, get_footer`, and `get_sidebar`). I found that by commenting the block of code responsible for loading these files in `settings.php` file which is:
    `
    <?php
    /*
    if ( bp_is_current_action( ‘notifications’ ) ) :
    locate_template( array( ‘members/single/settings/notifications.php’ ), true );

    elseif ( bp_is_current_action( ‘delete-account’ ) ) :
    locate_template( array( ‘members/single/settings/delete-account.php’ ), true );

    elseif ( bp_is_current_action( ‘general’ ) ) :
    locate_template( array( ‘members/single/settings/general.php’ ), true );

    else :
    locate_template( array( ‘members/single/plugins.php’ ), true );

    endif;
    */
    ?>
    `

    And the file still loading correctly, while doing the same thing in `members/single/profile.php` will break the theme loading.

    I dont have specific need for that, but I am just curious about where these files are loaded from and why they dont follow the same procedure? I have made a custom header for logged-in users `get_heade(‘loggedin’)` and rather than only modifying the `home.php` file header only, I had to modify the header of these four settings files as well `capabilities.php, delete-account.php, general.php, notifications.php`.

    danzigism
    Participant

    Howdy folks. I’m currently using both BuddyPress and Gravity Forms. The problem lies when a user fills out a regular contact form built with Gravity Forms. The “Mail From” name shows up as my WP Site Title instead of the name of the user that fills out the form.

    The moment I disable BuddyPress, the GF notifications have the correct “Mail From” name.

    It seems that BP’s mailer is overriding the default WP mailer. Not sure if there’s a way to fix this or not? I’ve used a couple add-ons that let you change the from name and email address that BP notifications get sent from, but unfortunately it’s just a static setting. Thanks for any insight.

    #144412
    JPAres1
    Participant

    @mercime, thank you for your response. We were getting ready to try your suggestion when this happened:

    As you know, the registration emails going out from our site were working but then weren’t working. See previous email. Since then, we went into something we never before went into: Membership, Communications and created a test Welcome message. We registered as a new user and wouldn’t you know we received the registration activation email as that new user, the test Welcome message for the new user and the admin new user notification email. Then we deactivated the test Welcome message and went through the process again. It worked! We received two emails now (just like before the mysterious site-rendered email disappearance); the registration activation email as that new user and the admin new user notification email. We then completely deleted the test Welcome message so that the Membership, Communications was the same as before we started and again, we received the same two emails. Whatever did we reactivate?

    So, for whatever reason, the emails seem to be working again. However, this is a huge concern to us. This could happen again and we would have no idea why the emails stopped working and why it suddenly reset itself. We have repeatedly read in our research of this matter that WordPress uses PHPMail Sendmail. It has been mentioned more than once that making the emails go SMTP is better and more stable. We are of the belief that this may be the core issue here. Can anyone give input on this and guide us in the right direction? Is there anyone out there that can explain to us what may have happened and is there something we need to hard code so that it doesn’t happen again?

    Many thanks for your help and advice.

    #144393

    In reply to: 1.7 theme defined

    Famous
    Participant

    So from the explanation of both @modemlooper & @mercime the understanding in minimal terms is the following:
    Every BP page I drop into my WP child template will override the core file as it does presently. And in order to create my page I simply drop in shortcodes to develop my page.php, then I apply my CSS to style & design my page. Question – are there already shortcodes in place that I can create a page.php with?

    Please explain what @r-a-y is saying with using user_nicename. Why would someone want to create a template for a specific user?
    `/wp-content/themes/twentytwelve/buddypress/members/single/home-{user_nicename}.php`

    and how would you do that without making a huge mess in your template directory?

    Also this would explain how to create different templates for different groups?
    For instance:
    `/wp-content/themes/twentytwelve/buddypress/members/single/home-{group ID = 1}.php`

    Is that correct?

    Using these files one could create their own fully templated BP site?:
    `’activity/index’

    ‘blogs/index’
    ‘blogs/create’

    ‘registration/activate’
    ‘registration/register’

    /* Ignore these
    ‘forums/single/forum’
    ‘forums/single/topic’
    ‘forums/index’
    */

    ‘members/index’
    ‘members/single/activity/permalink’
    ‘members/single/home’
    ‘members/single/settings/capabilities’
    ‘members/single/settings/delete-account’
    ‘members/single/settings/general’
    ‘members/single/settings/notifications’

    ‘groups/create’
    ‘groups/index’
    ‘groups/single/home’
    ‘groups/single/plugins’`

    wpmirwin
    Participant

    Hello,

    First off, this question has already already been answered in the forum for BuddyPress v1.2.5.2, but the solution doesn’t seem to work in the latest version of BuddyPress (1.6.1).

    The previous thread can be found here:

    http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/hide-general-settings/

    I would like to do this exact same thing in BP v1.6.1.

    * Remove the “General Settings” subnav menu (currently the default)
    * Remove the “Delete Account” subnav menu (maybe not necessary since it can be disabled in the BP Plugin Settings)
    * Make “Notifications” the default (and only) subnav menu beneath Settings.

    NOTE: I can remove the Delete Account subnav menu with the following code (found in the BP forum also), but since General is the default subnav menu, it’s not so easy.

    `//Remove Settings->Notifications SubMenu
    function remove_notifications_subnav(){
    global $bp;
    if ( $bp->current_component == $bp->settings->slug ) {
    bp_core_remove_subnav_item($bp->settings->slug, ‘notifications’);
    }
    }
    add_action( ‘wp’, ‘remove_notifications_subnav’, 2 );
    ?>`

    If someone can help me I’d really appreciate it. I need to remove the ability to update email and password (WP Users are created and managed from elsewhere). I also need to remove the ability for an end user to delete his/her account (I realize that this can be done from the BP options).

    Best regard,
    Mike.

    #144027

    In reply to: Hookable Notifications

    Paul Wong-Gibbs
    Keymaster

    Best place for this is https://buddypress.trac.wordpress.org — log in with your username and password from this site. If you’ve got a patch, or more specific details on exactly what you want added, attach it to the ticket :)

    #32609
    marquex
    Participant

    Hi,

    I am trying to create a community using buddypress with live events, so everytime a friend login I get a push notification saying that he is online. The same happens when a friend is offline.
    This kind of notifications only have sense when the user is online, and I don’t want to store them as normal bp_notifications, but I do want bp_notifications to push live notifications.

    To do so, the easiest way would hooking an action when the bp_notification is created, but there are not hooks there :(

    Could you please add some actions or filters to bp_core_add_notification and bp_core_delete_notification functions in bp-members/bp-members-notifications.php file for some next version??

    I’ve already modified my bp to do so, but it would be great to have it out of the box.

    Cheers and thanks

    #32552
    lenglain
    Participant

    I am using the bp sliding login panel plugin and it’s amazing, unfortunately I noticed that it does not notify me or any user of friend requests. However the default admin bar (which I removed) does this perfectly. My solution? Since I’m not a coder, it was to locate the working code in the admin bar and try to make it work with the slider plugin.

    Problem is that I CANNOT find the code snippet for it. Right next to where notification number shows up there’s the “howdy admin!” text. I figured I would go open up every file and search for “howdy” but it is NOWHERE??!

    I’ts driving me nuts!

    Does anyone know where I can find the hard codes for the admin bar, AS WELL as the Nav bar in the latest buddypress? I wanted to change the labels for the nav items but all I can find online are functions that overwrite the labels, which is not what I want, I want to find the ORIGINAL and see how it was actually done. This not only allows me to modify what I want down to the smallest level of detail, but also to understand how this whole thing is built (I would like to learn to make my own themes in the future.)

    Sorry for using caps at times but it’s 4:59 in the morning and I realized that I just spent over 4 hours trying to locate various snippets of code with little success!

    I’m currently using wordpress 3.4.2
    Buddypress latest version.

    Cheers

    #143498
    trailmix5
    Participant

    Thanks @modemlooper

    I was able to comment out the entire form with /* and */, but the user is still directed to a general settings page (that is now blank except for the title “General Settings”). Granted this is better than having the password and email field, but is there a way for me to bypass that tab and go straight to the notifications?

    Also, I have settings checked in the admin panel because I want the user to be able to change the notification and privacy preferences. Is that correct?

    I’m not sure why I didn’t think of this before, but I could just hide the tab in CSS (like I did previously) and then use a 301 redirect match in my htaccess from settings to settings/notifications. Huh, is that a viable way to achieve this?

    #32429
    trailmix5
    Participant

    Hello,

    I am looking for a way to hide the settings/general tab without hiding the notification or privacy tabs. I have a membership plugin and I don’t want users to try to change their password on that screen. I’m pretty sure they are unable to change it due to my preferences, but it’s just confusing that it seems like an option on my site.

    I successfully hid the tab with some css, but unfortunately when a user clicks on the settings tab, it goes to the general page as a default even if the tab isn’t there. Ha…I almost had it.

    This was the css:

    /* Hide Certain Profile Icons */
    #general-personal-li {
    display: none;
    }

    What if I hid the css as I did above and then changed the code so it defaulted to the notification tab when the settings tab was clicked? Ha…not that I know how to do that, but I figured I’d put it out there.

    Please let me if anyone out there has an idea about how I can accomplish this. Thanks so much for your help!

    #143271
    Aron Prins
    Participant

    Hey @shatter_

    Thanks for your reply :D I love the snippit feature, but what I and i guess other users mean is if you could share the code used to build mashan.com

    I can imagine developers jumping for the notifications up top with the dropdowns and a few other features. Would that be possible to share :)?

    Cheers,
    Aron

    Devilish Concept
    Participant

    @naijaping i must admit im blown away with your customisations on that link, how have you done it i would love to see some tutorials as ive been failing with buddypress since i installed it

    heres what im trying to change so any help would be awesome

    – Buddypress links ie profile settings etc on my own toolbar
    – 100×100 user avatar on my header which when clicked goes to users profile page
    – Fix spacing problems on buddypress members menu
    – On profile & group pages i would like to add a widget space on the right hand side of the avatar and recent update message
    – I use custom post types i. reviews, videos and articles i would love to add these on the profile page menu so it shows what they have been the author of
    – i would also love to allow each group to have a about page with an option to add thier own facebook,twitter,google+1,YouTube and Email stuff to show up as default icons

    I now its kinda cheeky but any help would be truely amazing, also what plugins do you use with buddypress, im gonna go now an try and add this notifications code :)

Viewing 25 results - 701 through 725 (of 1,091 total)
Skip to toolbar