Search Results for 'notification user id'
-
AuthorSearch Results
-
October 11, 2011 at 4:33 pm #123108
In reply to: Couple Thoughts
alanchrishughesParticipant@boonebgorges I’m also using BP 1.5 (fresh out of the box installation) and it does work to an extend, it removes the notifications from the top, but adds them to the bottom of the activity stream like I described on the trac page, and it breaks the reply button until your refresh the page. I’ve tried both pasting your code in my functions.php file and creating a bp-custom.php plugin file. Both have the same results.
This fix, and a comment form on friends pages, would be the only two little tweaks it would take to reproduce a fb experience, right now it is reproducing the twitter experience so it is already copying something anyways, giving both options to BP users would be great. And with what you just suggested Boone people could say “oh they’re just trying to copy digg” which I understand would be frustrating, but it honestly isn’t that big of a deal, you would be copying the system but people would be implementing it to their own little situations and needs which would be completely authentic and new. Like comparing tv stations to youtube, it is copying the idea but at the same time it is completely unique because you are bringing the tv station to the users to create more diverse content.
October 10, 2011 at 8:16 pm #123312In reply to: Issue Friend Requesting
MCas86MemberI fixed it by commenting out all the instances of it. go through each folder within your buddypress plugin and comment out the lines that have
$settings_link = bp_core_get_user_domain( $receiver_user_id ) . bp_get_settings_slug() . ‘/notifications/’;
or similar. I just went through each one and searched for “bp_get_settings_slug”, commenting out everytime it was found.
Hope this helps someone until there is a fix.
Thanks.
October 5, 2011 at 3:15 am #122478In reply to: Profile Fields show on email to admin?
saijin_nxtoyouMemberI tried xprofile_get_field_data() but it didn’t work, maybe I’m just too dumb..
So I tried it using MySQL, here is my function wp_new_user_notification, I edit wp-includes/pluggable.php
function wp_new_user_notification($user_id, $plaintext_pass = ”) {
$user = new WP_User($user_id);$user_login = stripslashes($user->user_login);
$user_email = stripslashes($user->user_email);
$buddypress_fields = $user_id;// The blogname option is escaped with esc_html on the way into the database in sanitize_option
// we want to reverse this for the plain text arena of emails.
$blogname = wp_specialchars_decode(get_option(‘blogname’), ENT_QUOTES);$message = sprintf(__(‘New user registration on your site %s:’), $blogname) . “rnrn”;
$message .= sprintf(__(‘Username: %s’), $user_login) . “rnrn”;
$message .= sprintf(__(‘E-mail: %s’), $user_email) . “rnrn”;// Add Custom Fields from buddypress table to admin email – Start
$buddypress_result_ = mysql_query(“SELECT
wp_bp_xprofile_fields.name,
wp_bp_xprofile_data.value
FROM wp_bp_xprofile_fields, wp_bp_xprofile_data
WHERE
wp_bp_xprofile_data.user_id = $user_id
AND
wp_bp_xprofile_fields.id = wp_bp_xprofile_data.field_id
ORDER BY
wp_bp_xprofile_data.field_id”);while($buddypress_row = mysql_fetch_array($buddypress_result_))
{
$fields = $buddypress_row;
$fields_value = $buddypress_row;
$message .= $fields . “: rn”;
$message .= $fields_value . “rnrn”;
}// Add Custom Fields from buddypress table to admin email – End
@wp_mail(get_option(‘admin_email’), sprintf(__(‘[%s] New User Registration’), $blogname), $message);
if ( empty($plaintext_pass) )
return;$message = sprintf(__(‘Username: %s’), $user_login) . “rn”;
$message .= sprintf(__(‘Password: %s’), $plaintext_pass) . “rn”;
$message .= wp_login_url() . “rn”;wp_mail($user_email, sprintf(__(‘[%s] Your username and password’), $blogname), $message);
}
September 25, 2011 at 9:25 pm #121086In reply to: Fishbook Help
favtmParticipantHey folks, I’m lost here. I have Fishbook installed with BuddyPress, and the only time I can see the admin bar (whatever menu name you want to give it, the one with My Account, Dashboard & Notifications) only shows up when I scroll down.
preview: http://myfilmnetwork.com/sample-page/
username: mfn
password: futureCurrently, 0 plugins installed, I reinstalled WordPress, then BuddyPress then Fishbook, and the issue remains. I did the trick of moving the header.php file from the BP Default folder into the Fishbook folder (by the way the above file names are no longer correct since BP 1.5) but with or without the header file, the issue remains. I remember testing out BP several months ago, and I didn’t have this menu problem with Fishbook then. I vaguely remember having to install a plugin to customize the menu buttons, specifically for Fishbook, but I can no longer find that plugin.
Let me know your thoughts, thanks a lot.
September 14, 2011 at 10:22 pm #120086In reply to: Removing message notifications from buddypress bar
jetlejParticipantProgress: 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;
} `September 12, 2011 at 5:50 pm #119922In reply to: Can’t create a group after update
wendymerrittParticipant1. 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? LinuxSeptember 12, 2011 at 1:11 am #119898In reply to: Registration Approval Plugin
acurranMemberMy 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.
September 7, 2011 at 9:13 pm #119711In reply to: How To Change Default Email Notifications Setting?
r-a-yKeymasterVarious 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#L254August 16, 2011 at 9:08 pm #118553In reply to: Frisco Child Theme
David CarsonParticipantIf 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.
August 12, 2011 at 1:43 pm #118275staurandMemberSame 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);
July 28, 2011 at 2:05 am #117048r-a-yKeymasterTry this 3rd-party plugin:
July 26, 2011 at 11:30 pm #116981embergermediaMemberIs this the wrong forum to discuss this idea?
Anybody have any thoughts on this? Thanks
July 6, 2011 at 4:20 pm #115860In reply to: Change default notification settings
mistercyrilParticipantI 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.June 24, 2011 at 1:55 pm #115158In reply to: Random member – security query
MarianParticipantSo 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
MarianJune 24, 2011 at 12:44 am #115135In reply to: Notification on Profile Update
SteveParticipantHi 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,
SteveMay 20, 2011 at 12:41 pm #112709In reply to: Emails no longer sending
scrltotaraMemberI 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.
May 18, 2011 at 7:04 pm #112539pnergerMemberI 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.
May 12, 2011 at 5:06 pm #112144In reply to: Hi! I want to make a custom buddybar but..
@mercimeParticipant== 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.
May 11, 2011 at 12:45 am #112018embergermediaMemberPLEASE!!! 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
May 6, 2011 at 11:55 am #111706In reply to: Follow a Blog
NahumParticipanti 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.
April 28, 2011 at 8:49 pm #111274In reply to: Notifications Number not going away
BrookerMemberI 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’ );April 28, 2011 at 6:54 am #111232In reply to: Notification on Profile Update
r-a-yKeymasterThere’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#ActionsHere’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.
April 16, 2011 at 3:32 pm #110408In reply to: Blog Comments Notifications Plugin
NahumParticipantI 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!
April 6, 2011 at 5:25 pm #109676In reply to: Admin not receiving New User Registration emails
littletechgirlParticipantI 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?
April 5, 2011 at 5:35 am #109579In reply to: Buddypress Notifications Manager : My first plugin
stwcParticipantThanks 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?
-
AuthorSearch Results