Search Results for 'notification user id'
-
Search Results
-
@slaffik is it possible to add ajax to update notifications when the user marks them as (Read, Unread, Delete) oppose to the page refreshing.The only way it seems for the notification count to go away is by page refreshing or visiting another page. The same situation for all notifications, like Friend Request and Messages. I see you posted a link to the Beta 2.8.0, I was wondering if this was addressed, didn’t see it in the list of updates.
I currently have the following in my bp-custom.php, which creates my welcome email.
add_action( 'bp_core_activated_user', 'bpdev_welcome_user_notification', 0, 3 ); function bpdev_welcome_user_notification( $user_id, $key = false, $user = false ) { if ( is_multisite() ) { return ;// we don't need it for multisite } //send the welcome mail to user //welcome message $welcome_email = __( 'Hi USER_DISPLAY_NAME, welcome to SITE_NAME. Thankyou for signing up and helping us grow our community. Your new account is all set up and ready to go, you can login with the following information: Username: USERNAME Please let us know if you have any issues using the site via the contact us page: http://mysite.com/contact-us/ The SITE_NAME Team' ); //get user details $user = get_userdata( $user_id ); //get site name $site_name = get_bloginfo( 'name' ); //update the details in the welcome email $welcome_email = str_replace( 'USER_DISPLAY_NAME', $user->first_name, $welcome_email ); $welcome_email = str_replace( 'SITE_NAME', $site_name, $welcome_email ); $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email ); $welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email ); //from email $admin_email = get_site_option( 'admin_email' ); if ( empty( $admin_email ) ) { $admin_email = 'support@' . $_SERVER['SERVER_NAME']; } $from_name = $site_name . "<$admin_email>" ;//from $message_headers = array( 'from' => $from_name, 'content-type' => 'text/plain; charset='. get_option('blog_charset') ); //EMAIL SUBJECT $subject = sprintf( __( 'Welcome to %1$s ' ), $site_name ) ; //SEND THE EMAIL wp_mail( $user->user_email, $subject, $welcome_email, $message_headers ); return true; }
As the action is set to bp_core_activated_user, any user that does not need to be activated will not receive an email.
What other functions are there that will allow me to send an email to all users, and not just those that have to activate their accounts? I know I’ve come across it before, but I can’t seem to find it nowI’ve seen a dozen support questions on this topic and the answer has always been “another plugin must be redeclaring wp_mail(), so on my test site I disabled every plugin except bbpress and buddypress (and akismet) and still emails are sent in plain text.
On my live site, the only way I can get the html emails sent is when I have the Buddypress Group Email Subscriptions plugin activated, and then, no matter what other email-related plugins I have active all buddypress emails are sent in html format.
But, the group subscription plugin has it’s own problem: slows down page-reload when replying if too many members are subscribed to a Topic (can take up to 30 seconds for the reply to process and page to reload on our site), and we haven’t found other solutions to that. So…. we want to disable that subscription plugin, but when we do we lose the html formatted emails.
Can someone please provide some kind of solution for this plain-text vs. html issue. Like I said, even with no other plugins active we’re still not getting html emails.
Thanks for the help.
Our info from our test site (when still getting plain text emails):
WP version 4.7
Theme Goodnews 5 Child Theme 1.0
PHP version 5.6.29
bbPress version 2.6-alpha-6091
site url http://staging-nexus.universaltheosophy.com
Active Plugins Name and Version
– p1 Akismet 3.2
– p3 bbPress 2.6-alpha
– p4 BuddyPress 2.7.4Our info from our live site:
WP version 4.7
Theme Goodnews 5 Child Theme 1.0
PHP version 5.6.29
bbPress version 2.6-alpha-6091
site url http://nexus.universaltheosophy.com
Active Plugins Name and Version
– p1 Adminimize 1.11.2
– p2 Akismet 3.2
– p3 All In One SEO Pack 2.3.11.1
– p4 bbP Toolkit 1.0.6
– p5 bbPress 2.6-alpha
– p6 Better Notifications for WordPress 1.6
– p7 BP Registration Options 4.3.1
– p8 BuddyPress Group Email Subscription 3.7.0
– p9 BuddyPress Sitewide Activity Widget 1.3.2
– p10 BuddyPress 2.7.4
– p11 Contact Form 7 4.6
– p12 Google XML Sitemaps 4.0.8
– p13 Header and Footer 2.0.3
– p14 Random Content 1.3.1
– p15 TinyMCE Advanced 4.4.3
– p16 User Role Editor 4.31.1
– p17 WP-Mail-SMTP 0.10.1Topic: delete notifications
if buddypress clear notifications plugin does not working for u , this is a solution how to do it ,we will add a button”clear all notifications” in the notifications nav menu , first we will edit a php script called test.php wich contain this code
<?php function clear_all_notifications() { require_once( 'wp-load.php' ); //put correct absolute path for this file $id = get_current_user_id(); // on se connecte Γ MySQL $db = mysql_connect('localhost', 'user', 'password'); //replace user and password mysql_select_db('name of database',$db); $requete = 'SELECT * FROM prefix_bp_notifications WHERE user_id='. $id ; // verify the name of table here prefix_bp_notifications can be wp_bp_notifications $sql = 'DELETE FROM prefix_bp_notifications WHERE user_id ='. $id ; // verify the name of table here prefix_bp_notifications can be wp_bp_notifications $reponse = mysql_query($requete); $resultat = mysql_num_rows($reponse); if($resultat > 0){ $req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error()); mysql_close(); echo "Notifications supprimees"; } else { echo $resultat ; echo "pas de notifications"; mysql_close(); } } clear_all_notifications(); ?> copy this script into ur document root where u have installed ur wordpress then add this code to wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/notifications.php under <?php bp_get_options_nav(); ?> line 13 <li id="notifications-my-notifications-personal-li" class="current selected"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script type = "text/javascript"> function myAjax () { $.ajax( { type : 'POST', data : { }, url : 'ur website adresse/test.php', // <=== CALL THE PHP FUNCTION HERE. success: function ( data ) { return 1; // <=== VALUE RETURNED FROM FUNCTION. }, error: function ( ) { return 1; } }); } //function execute_del(){ //myAjax(); //window.location.reload(); //} </script> <button onclick="myAjax();window.location.reload();">delete all notifications</button> <!-- BUTTON CALL PHP FUNCTION --> </li>
that’s all π
So we’re using the “BuddyPress Group Email Subscription” plugin, and are experiencing a bottleneck when members submit a reply to a topic within a BP group. It can take 15-30 seconds for the reply to finish, from the moment of clicking “reply” to page reload.
Looks like this is because the reply doesn’t finish posting until all notification emails are composed and sent. There’s a plugin to solve this for bbpress (AsynCRONous bbPress Subscriptions), but nothing I can find to solve the problem when it’s the BP email sending routine that’s being used.
Does anyone have a solution to eliminate the slow reply issue here? We want to continue using the subscriptions plugin for several other reasons, so eliminating it isn’t the solution we’re looking for.
Thanks for the help.
Plugin we’re using: https://wordpress.org/plugins/buddypress-group-email-subscription/
Other info:
WP version 4.7
PHP version 5.6.28Active Plugins
– p1 Adminimize 1.11.2
– p2 Akismet 3.2
– p3 All In One SEO Pack 2.3.11.1
– p4 bbP Toolkit 1.0.6
– p5 bbPress 2.6-alpha
– p6 Better Notifications for WordPress 1.6
– p7 BP Registration Options 4.3.0
– p8 BuddyPress Group Email Subscription 3.7.0
– p9 BuddyPress Sitewide Activity Widget 1.3.2
– p10 BuddyPress 2.7.3
– p11 Contact Form 7 4.6
– p12 Goodnews Shortcodes editor 1.0
– p13 Google XML Sitemaps 4.0.8
– p14 Header and Footer 2.0.3
– p15 TinyMCE Advanced 4.4.1
– p16 User Role Editor 4.31
– p17 WP-Mail-SMTP 0.10.1
– p18 WP Super Cache 1.4.8Topic: buddypress notifications
i want to know how to redirect all the notification of buddy press for a specific url , not the default url like site.com/memberes/id-user/notification-id/…. because when i click on a specific notification i get only empty page .thks
WP version: 4.6.1
BP version: 2.7.2Hi all. I’m surprised this solution isn’t easy to find as it seems like a lot of people would want to do this, but I guess most themes have it already. I’m trying to integrate BP into a theme that isn’t BP compatible. It works but isn’t styled for it.
I moved the user navigation menu from the admin bar to the header so I could get rid of the admin bar altogether. Everything works except the Profile menu item isn’t showing the sub-menu. All the links are under Settings so I could just remove the Profile item. I just don’t know where the code is. I believe it’s pulling from ‘bp_nav_menu’ but I don’t know which file to tweak. Could you tell me where to look?
Also, the main issue is the styling. I can’t seem to find the CSS code to modify the navigation menu. I’ve been messing with it but a few things I can’t seem to find.
The code I used was from answer #2 on this link. (#1 didn’t seem to work as well.)
The php code was fine but the CSS code was kind of a mess and needs a lot of padding and alignment adjustments. Mainly, could you tell me two things…
1. Where do you add the alignment so the menu items are flush left?
2. Which section is the styling for the individual menu items (Activity/Profile/etc.) in the dropdown? Thought I found it but the code doesn’t seem to be appearing.
I know we’re supposed to post the link to our site but the menu only shows when you’re logged in and I’m still working on it so I prefer not to post it.
Also, I’m not a programmer. I can use Firebug and tweak php code and CSS but I’m still learning a lot of the stuff you guys probably know really well. If I sound stupid, well, in a lot of things I am. π
Thanks for any help.
Hi, I have previously been asked to set my site up so that buddyprerss members’ profiles can not be found by search engines. They want theme to only be accessible by visiting the site. I have put a robots file on my site (see below) but am still getting profiles appearing in searches – please can you tell me if there is anything I need to add to the file. Thanks, Matt.
User-agent: *
Disallow: */activity/p/*
Disallow: /docs/
Disallow: *send-invites*
Disallow: */groups/*members*
Disallow: */groups/*media*
Disallow: *widget-title*
Disallow: *members/*activity*
Disallow: *members/*notifications*
Disallow: *members/*friends*
Disallow: *members/*groups*
Disallow: *members/*docs*
Disallow: *members/*media*
Disallow: *acpage*
Disallow: *messages*
Disallow: *friends*
Disallow: *settings*
Disallow: /*/comment-page*
Disallow: *register*
Disallow: *login*
Disallow: *profile*
Disallow: *admin*
Disallow: *includes*
Disallow: *content*Topic: Automatic Friend Requests
Every time I manually create a new user on my multisite (via the admin interface) the new user instantly gets THREE “friend requests” from existing users. The minute the new user logs in after registration, they already have these three notifications waiting.
I found one thread (3 years old) that describes something similar — but it’s related to the Invite Anyone plugin, the friend request comes from the Group Admin when a user responds to an invitation. I do use the Invite Anyone plugins, so I added this filter:
add_filter( βinvite_anyone_send_friend_requests_on_acceptanceβ, β__return_falseβ );
But it’s not changing anything as far as I can tell. I’m not even sure that the IA plugin is responsible. I’ve logged in as the users who are “sending” these automated friend requests, and I can’t find anything that they can do to force sending a friend request to new users.
Any ideas at all where I should look for the cause?
Hi
I just installed wordpress yaost seo on my website and I got this error message.
The error disapear whit I install buddypress.Could you please help pe to fix it?
Thanks
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘bp_admin’ not found or invalid function name in /homepages/4/s654646546/htdocs/mywebsite/wp-includes/plugin.php on line 524
Notice: bp_setup_current_user was called incorrectly. L’utilisateur actuel est en cours d’initialisation sans utiliser $wp->init() === Trace: #6 /homepages/4/s654646546/htdocs/mywebsite/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php(31): Yoast_Notification_Center->retrieve_notifications_from_storage() #7 /homepages/4/s654646546/htdocs/mywebsite/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php(49): Yoast_Notification_Center->__construct() #8 /homepages/4/s654646546/htdocs/mywebsite/wp-content/plugins/wordpress-seo/wp-seo-main.php(399): Yoast_Notification_Center::get() #9 /homepages/4/s654646546/htdocs/mywebsite/wp-includes/plugin.php(524): load_yoast_notifications(”) #10 /homepages/4/s654646546/htdocs/mywebsite/wp-settings.php(295): do_action(‘plugins_loaded’) #11 /homepages/4/s654646546/htdocs/mywebsite/wp-config.php(100): require_once(‘/homepages/4/d1…’) #12 /homepages/4/s654646546/htdocs/mywebsite/wp-load.php(39): require_once(‘/homepages/4/d in /homepages/4/s654646546/htdocs/mywebsite/wp-includes/functions.php on line 3996s654646546
Topic: Bp custom Menu
Hi there,
We recently updated BuddyPress 2.3.4 to 2.7.4 but we seem to have a problem with the mentions. Users used to get an notification-email when they were mentioned in the comments on one of our sites. That doesnt happen anymore. But the emails from private messages or replies on activity-updates do work, so it seems not a problem with the webserver or something like that.
I have searched a lot of files/source and it looks like the function bp_activity_sent_mention_email is responsible for these mails, but I cant find this function anywhere.. Does somebody know where I should look to find the problem? Where can i hook into the mention-emails to see whats wrong?
PS: I also added this code, but that didnt help