Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'notification user id'

Viewing 25 results - 601 through 625 (of 768 total)
  • Author
    Search Results
  • #120086
    jetlej
    Participant

    Progress: I found the BP function in the core and figured out how to alter it to achieve the effect, but I can’t figure out how to do this in the function.php file instead of altering the core file.

    The function:

    `function bp_core_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false ) {
    global $bp;

    if ( empty( $date_notified ) )
    $date_notified = bp_core_current_time();

    $notification = new BP_Core_Notification;
    $notification->item_id = $item_id;
    $notification->user_id = $user_id;
    $notification->component_name = $component_name;
    $notification->component_action = $component_action;
    $notification->date_notified = $date_notified;
    $notification->is_new = 1;

    if ( !empty( $secondary_item_id ) )
    $notification->secondary_item_id = $secondary_item_id;

    if ( !$notification->save() )
    return false;

    return true;
    }`

    and adding the following above return true; made it work:

    ` if ( $component_name == ‘messages’ ){
    return false;
    }

    if ( $component_action == ‘friendship_request’ ){
    return false;
    } `

    #119922
    wendymerritt
    Participant

    1. WordPress v. 3.2.1
    2. WordPress is the root install of my shared hosting package with Hostgator
    3. If a directory install, is it in root or in a subdirectory?
    4. I was already running the current version of WordPress
    5. Yes, everything was functioning correctly before the upgrade
    6. BuddyPress v. 1.2.10
    7. I think I was previously using BuddyPress v. 1.2.9
    8. The plugins that are currently active on the domain are:
    BuddyPress Announce Group
    E-Newsletter
    Social Profiles Widget
    WordPress Amazon Associate
    WP-Cycle
    The plugins that are currently active on the network are:
    Akismet
    BackupBuddy
    Biblefox for WordPress
    BP Groupblog
    BuddyPress
    BuddyPress Badge
    BuddyPress Classifieds
    BUddyPress Mobile
    BuddyPress Sitemap Generator
    Flexi Pages Widget
    Genesis Connect
    Genesis Favicon uploader
    Genesis Simple Edits
    Genesis Simple Menus
    Google Calendar Events
    Membership Premium
    Multisite User Management
    Tiny MCE Advanced
    WPMU DEV Update Notifications
    9. Genesis theme with the GenesisBuddy Add-on
    10. Have you modified the core files in any way? No
    11. Do you have any custom functions in bp-custom.php? No
    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? We don’t use bbPress
    13. Please provide a list of any errors in your server’s log files. My server Error Log file is empty
    14. Which company provides your hosting? Hostgator
    15. Is your server running Windows, or if Linux; Apache, nginx or something else? Linux

    #119898
    acurran
    Member

    My 3 step solution to this problem is as follows:

    1. Install plugin – BuddyPress Pending Activations (https://wordpress.org/extend/plugins/buddypress-pending-activations/)
    2. Make hack to plugin function bp_pending_activations_admin() so that it sends an email when a user is activated:
    $resendusers = $wpdb->get_results( $wpdb->prepare( “SELECT u.ID, u.user_login, u.user_email, m.meta_value FROM ” . CUSTOM_USER_META_TABLE . ” m, “. CUSTOM_USER_TABLE .” u WHERE u.ID = m.user_id AND m.meta_key = ‘activation_key’ AND u.ID IN ({$userids})” ) );

    foreach ( $resendusers as $resend ) {

    /* Activate the signup */
    $user = apply_filters( ‘bp_core_activate_account’, bp_core_activate_signup( $resend->meta_value ) );

    /* If there was errors, add a message and redirect */
    if ( $user->errors ) {
    echo ‘There was an error activating this account, please try again: ‘. $resend->user_login;
    } else {
    $to = $resend->user_email;
    $subject = “Your ?????? Account Has Been Activated!”;
    $message = “Your account has been activated. Go to http://??????/ and sign in with the username and password that you created when you signed up.nnWelcome to ?????!”;
    $admin_email = get_site_option( “admin_email” );
    $from_name = “??????????”;
    $message_headers = “MIME-Version: 1.0n” . “From: “{$from_name}” n” . “Content-Type: text/plain; charset=”” . get_option( ‘blog_charset’ ) . “”n”;
    wp_mail( $to, $subject, $message, $message_headers );
    }
    3. Redirect activation email to admin (to use as a noitification for admin instead of automatically sending activition key to user) by adding this to functions.php:
    function change_activation_email_to($content) {
    return get_site_option( “admin_email” );
    }
    add_filter( ‘bp_core_activation_signup_user_notification_to’, ‘change_activation_email_to’);

    So the when a new user signs up, they do not get any activation email. That goes to the admin instead. You will need to change the wording in your template to let the user know that they have to wait for manual approval. Admin logs in to WP admin and goes to Pending Activitations and activates the user. An email is sent to user to let them know they have been activated.

    #119711
    r-a-y
    Keymaster

    Various notification settings are scattered throughout the BuddyPress codebase; each setting is saved as user meta.

    To disable them, you have to set each one to “no” for each member.

    eg. To disable email notifications for a member, you can use:
    `update_user_meta( $user_id, ‘notification_messages_new_message’, ‘no’ );`

    You’ll have to pass the user’s ID for the `$user_id` variable.

    In BP 1.2.9, to find notification settings, try looking at /plugins/buddypress/bp-X.php, where X is each component’s main loader and search for “notification_settings”, then grab the meta key and rinse and repeat:
    eg. https://buddypress.trac.wordpress.org/browser/tags/1.2.9/bp-messages.php#L254

    #118553

    In reply to: Frisco Child Theme

    David Carson
    Participant

    If anyone can help test browser compatibility for this theme, especially IE 7/8/9, I’d be very grateful. You can report issues here or on GitHub at https://github.com/davidtcarson/frisco/issues

    P.S. I’m pinging you @InterMike just to make sure you get notified about my last post with theme options info and custom.css usage. … I messed up your username in that post so you probably didn’t receive notification.

    staurand
    Member

    Same issue here with BuddyPress 1.2.9 & WP 3.2.1

    The problem seems to come from this file :
    /buddypress/bp-groups.php
    which calls
    do_action( 'groups_promoted_member', $user_id, $bp->groups->current_group->id );

    before the file below is included
    /buddypress/bp-groups/bp-groups-notifications.php
    that should add the action to add the notification:
    add_action( 'groups_promoted_member', 'groups_notification_promoted_member', 10, 2 );

    Quick fix:

    function addGroupNotificationFile($user_id, $group_id)
    {
    require_once ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );
    }
    add_action('groups_promoted_member', 'addGroupNotificationFile', 100, 2);

    r-a-y
    Keymaster

    Try this 3rd-party plugin:

    BuddyPress User Notifications Widget plugin

    Is this the wrong forum to discuss this idea?

    Anybody have any thoughts on this? Thanks

    #115860
    mistercyril
    Participant

    I found a post written by Boone ( http://bpdevel.wordpress.com/author/boonebgorges/ ) where he says something about replacing all references to “$current_user” with “$bp->displayed_user” in order to allow super admins to have access to user settings.

    I am using BuddyPress v.1.2.8 and found this code in bp-core-settings.php…

    /***** NOTIFICATION SETTINGS ******/

    function bp_core_screen_notification_settings() {
    global $current_user, $bp_settings_updated;

    $bp_settings_updated = false;

    if ( $_POST ) {
    check_admin_referer('bp_settings_notifications');

    if ( $_POST ) {
    foreach ( (array)$_POST as $key => $value ) {
    update_user_meta( (int)$current_user->id, $key, $value );
    }
    }

    $bp_settings_updated = true;
    }

    add_action( 'bp_template_title', 'bp_core_screen_notification_settings_title' );
    add_action( 'bp_template_content', 'bp_core_screen_notification_settings_content' );

    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    }

    function bp_core_screen_notification_settings_title() {
    _e( 'Notification Settings', 'buddypress' );
    }

    function bp_core_screen_notification_settings_content() {
    global $bp, $current_user, $bp_settings_updated; ?>

    <form action="loggedin_user->domain . BP_SETTINGS_SLUG . '/notifications' ?>" method="post" id="settings-form">

    <input type="submit" name="submit" value="" id="submit" class="auto" />

    <?php
    }

    Can someone help me out with implementing this?
    Thanks,
    C.

    #115158
    Marian
    Participant

    @en0ch

    So sorry I didn’t see your request for more help. I have my settings to be notified of any @mentions and replies to my forum posts but for some reason I did not receive any notification that you had replied. Not sure if it’s a problem with BuddyPress.org notifications or what.

    Anyway, it’s probably too late and you hopefully found a solution already, but I’ll post this here just in case you or anyone else are still looking for a way to disable the random visit menu in the BuddyPress admin bar without disabling the admin bar itself.

    Rather than explain the inadequate solution of changing #bp-adminbar-visitrandom-menu display to none in the stylesheet, let me give the function override solution instead:

    In your theme’s footer.php file, right BEFORE it says “, add the following code:
    `
    <?php
    if (!is_user_logged_in()) {
    remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_random_menu’, 100 );
    }
    ?>
    `
    That’s if you want the random visit menu to be removed only for users who are not logged in.

    If you want it to be removed for all users, whether or not they’re logged in, use this simpler code instead:
    `
    <?php
    remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_random_menu’, 100 );
    ?>
    `

    I see that the font for the code I just posted is not clearly legible in places. Please note that the remove_action line ends with a semi-colon ;

    HTH
    :-)
    Marian

    #115135
    Steve
    Participant

    Hi r-a-y,

    Almost two months after implementing this I have developed it further and it’s working great! Thanks again for your help.

    However, I am struggling to work out how I can implement this same function for status updates in addition to profile updates? Using your code, how would I need to edit it and where would it need to go?

    `
    function my_update_profile_send( $id ) {
    $text = bp_core_get_user_domain( $id );
    wp_mail( ‘YOUR ADMIN EMAIL ADDRESS’, ‘Profile Updated’, $text );
    }
    add_action( ‘xprofile_updated_profile’, ‘my_update_profile_send’ );
    `

    Cheers,
    Steve

    #112709
    scrltotara
    Member

    I tested non-BP emails, like lost password, and got that just fine, so it’s just BP emails not sending. No user signup notifications or group digests at all, when they worked fine last week. I did nothing but upgrade the plugins since.

    pnerger
    Member

    I also had this problem and went through a deep analysis.

    The issue stems from the fact that Bluehost requires that the email be sent from an account that exists on the system. They do this as an anti-spam technique and they require this even if the mail is originating from within the system.

    Enter WordPress. PHP uses a mail function mail(). WordPress maps this to wp_mail() and pretty much everyone uses the wp_mail for the plugins within WordPress. This makes sense as it allows customization of WordPress mail at a relatively low cost of performance.

    Enter Buddypress. Buddypress places a filter upon wp_mail() such that all email originate from the user ‘noreply’ on the domain such that end users don’t reply to the notifications. Sounds cool.

    But remember that Bluehost does not allow email to be sent from non-accounts and that’s the catch.

    Using a foreign SMTP does not work for Bluehost blocks those ports. Using local SMTP will work but you need to provide the right setup and credentials. Finally, using mail-from plugin works since it filter’s the Buddyhost filter changing the email from address back to a valid Bluehost email account.

    Hopefully, this explains what is happening and you can choose which strategy you want to use to fix the problem.

    #112144
    @mercime
    Participant

    == All I want to do is to hide the “Dashboard” button ==

    Know that the “Dashboard” link in adminbar appears for logged-in users who have a role greater than Subscriber on your blog. If you still want to do this then if you don’t have one yet, create a bp-custom.php file, add the code below and upload to wp-content/plugins folder:
    `<?php
    remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_thisblog_menu’, 6 );
    ?>`

    == have Notifications and buttons like “Edit Profile” etc [in adminbar] ==

    Notifications link and “Edit Profile” buttons are already in adminbar for logged-in-users.

    PLEASE!!! My users are complaining loudly about this issue. Some of them have nearly a dozen un clearable notifications because of this issue! I can only imagine the chaos that will ensue once the community has been active for a year and they have dozens and dozens of notifications that won’t go away…

    And new users can’t find answers to these already answered forum topics!

    I think a simple solution would be to not allow forum topics to add to the activity stream. I can do this with a great plugin. But how do I clear all the notifications that users already have?? And besides, this is only a hack. I would like to keep forums updates in the activity stream, to encourage interaction.

    Thanks

    #111706

    In reply to: Follow a Blog

    Nahum
    Participant

    i did something like this in a real round about way using the Buddypress Followers plugin. I was able to modify to only show the Follow Button on profiles if the profile owned a blog — Note* this will only work where members are only able to have 1 blog. It will not work in case of an admin that has various blogs — I was also able to modify the plugin to only show Blog Posts in the Users “Following” tab activity stream. And finally I was able to put the Follow button in the user blog sidebar. I had to disable the Follow/Following buttons everywhere except for the member profile and their blog.

    I like you all have been looking for something like this too. I like the idea of adding notifications for bp and email when someone you follow has added a blog post.

    #111274
    Brooker
    Member

    I have 1.2.8 and having the same issue, i took a look into pb-friends.php and the code seems correct…
    global $bp;

    if ( isset( $_GET ) )
    bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->friends->id, ‘friendship_accepted’ );
    }
    add_action( ‘bp_activity_screen_my_activity’, ‘friends_clear_friend_notifications’ );

    @r-a-y @DJPaul?????

    #111232
    r-a-y
    Keymaster

    There’s a `do_action` hook you can use:
    `xprofile_updated_profile` (located in /buddypress/bp-xprofile.php.)

    You could potentially use the wp_mail() function to send an email to the admin with this hook.

    Don’t know what a `do_action` is and how to make use of it?

    If you’re familiar with a tiny bit of PHP, here’s some articles that will help:
    http://www.nathanrice.net/blog/an-introduction-to-wordpress-action-hooks/
    https://codex.wordpress.org/Plugin_API#Actions

    Here’s something quick you can try:

    `function my_update_profile_send( $id ) {
    $text = bp_core_get_user_domain( $id );
    wp_mail( ‘YOUR ADMIN EMAIL ADDRESS’, ‘Profile Updated’, $text );
    }
    add_action( ‘xprofile_updated_profile’, ‘my_update_profile_send’ );`

    Put the code snippet in your theme’s functions.php.

    #110408
    Nahum
    Participant

    I think still we’re off base with what I originally asked for. :) But that’s ok! All is welcome.

    In the new WP 3.1 Admin Bar, there is a “Comments” tab that lights up when there is a comment on the blog (i think) — I’m refereing to something like that integreated to bp_core_get_notifications_for_user( $bp->loggedin_user->id ) — to let blog owners on a multisite know that there have been comments made to their blog — the link then goes to edit-comments.php so the user can manage those new comments pending.

    *now that i’m revisting this thread, I’m remembering someone around here providing a tweak the bp-admin bar that added a flyout from the Blogs menu that did exactly this, I think. where are you thread!

    #109676
    littletechgirl
    Participant

    I am having this same issue. I get the email fine if the new user is created on the WordPress side, but if it is done through BuddyPress I do not get a notification. Any other ideas on this?

    #109579
    stwc
    Participant

    Thanks for this — a very good idea. Questions:

    Does setting various email notifications to disabled just a) set a default for all users or b) make it impossible for them to enable them? If (b), does it hide the option in the user-facing UI?

    #108486

    Problem is visible here: http://www.globalmeditationgroup[dot]com/groups/

    Platform 1.1.3 theme
    Wordpress 3.1
    Buddypress… whatever the newest version is, I installed it through wordpress… so I can’t imagine it would be in the wrong place.

    I haven’t done anything with multisite.

    Plugins:
    oh boy… here we go :)

    add new default avatar
    askimet
    all in one seo pack
    autochimp
    ban hammer
    bbpress integration
    bp group hierarchy
    bp xtra signup
    buddypress
    buddypress humanity
    comments cleaner
    dropdown menu widget
    feedburner feedsmith
    forum post notification
    google analytics for wordpress
    google xml sitemaps with multisite support
    gravatar signup encouragement
    login logger
    use google libraries
    user spam remover
    visitor maps and who’s online
    wordpress importer
    wp hide dashboard
    wp mail from

    Not sure what happened… any ideas would be most welcome! Thank you :)

    #108205
    Virtuali
    Participant

    @linkyou, add this to your theme’s css:

    `
    /* Inherit the default theme styles */
    @import url( ../../plugins/buddypress/bp-themes/bp-default/_inc/css/default.css );

    /* Inherit the default theme adminbar styles */
    @import url( ../../plugins/buddypress/bp-themes/bp-default/_inc/css/adminbar.css );
    `

    And put this in your functions.php

    `// Load the AJAX functions for the theme
    require_once( TEMPLATEPATH . ‘/_inc/ajax.php’ );

    // Load the javascript for the theme
    wp_enqueue_script( ‘dtheme-ajax-js’, get_template_directory_uri() . ‘/_inc/global.js’, array( ‘jquery’ ) );

    // Add words that we need to use in JS to the end of the page so they can be translated and still used.
    $params = array(
    ‘my_favs’ => __( ‘My Favorites’, ‘buddypress’ ),
    ‘accepted’ => __( ‘Accepted’, ‘buddypress’ ),
    ‘rejected’ => __( ‘Rejected’, ‘buddypress’ ),
    ‘show_all_comments’ => __( ‘Show all comments for this thread’, ‘buddypress’ ),
    ‘show_all’ => __( ‘Show all’, ‘buddypress’ ),
    ‘comments’ => __( ‘comments’, ‘buddypress’ ),
    ‘close’ => __( ‘Close’, ‘buddypress’ ),
    ‘mention_explain’ => sprintf( __( “%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.”, ‘buddypress’ ), ‘@’ . bp_get_displayed_user_username(), bp_get_user_firstname( bp_get_displayed_user_fullname() ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) )
    );
    wp_localize_script( ‘dtheme-ajax-js’, ‘BP_DTheme’, $params );`

    Should put styles of the buddypress default theme into your theme. I would go into plugins/buddypress/bp-themes/bp-default/_inc/css/default.css and remove all the contents of:

    `/* > Global Elements


    */
    /* > Admin Bar


    */
    /* > Header


    */
    /* > Navigation


    */
    /* > Container


    */
    /* > Sidebar


    */
    /* > Content


    */`

    #108049
    Pisanojm
    Participant

    Ok… so @brajesh was able to point be in the right direction on this…

    The problem is that I was looking for a user ID of the person that sent the request that was trying to join the group… what I needed to do was SEARCH for my User ID in the wp-bp-notification table… this had the user’s id making the request listed as an ITEM not a userID (as the user ID was mine)…. once I deleted that it went away…

    FYI: You can find User IDs in the tables themselves or you can use a plugin called REVEAL ID to find IDs in the WordPress back end…
    https://wordpress.org/extend/plugins/reveal-ids-for-wp-admin-25/

    Thanks Brajesh!

    #105425
    pcwriter
    Participant

    @jordynn

    To remove the notifications subnav item, add the following snippet to your functions.php file:

    `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 );`

    This is a simple function taken from this post by @mariochampion
    https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-remove-and-add-items-in-bp_get_displayed_user_nav/?topic_page=2&num=15#post-71265

    Hope this helps! :-)

Viewing 25 results - 601 through 625 (of 768 total)
Skip to toolbar