Forum Replies Created
-
In reply to: Buddypress privacy for tabs
BP Simple Private is not that granular – it makes all Profile pages either public or private.
And, more importantly, it only affects users who are not logged in.In reply to: Security issue: Need to contact devsThis site does not support PM.
BP uses the same method for reporting security issues as WP:
In reply to: Modify/Override Buddypress FunctionYou can’t ‘override/replace this function in my theme’s functions.php file’.
You can use the filter hook and write a function for use in theme/functions:
Something like:function jturet_group_front_template( $template_names ) { $template_names[1] = // make your changes return $template_names; } add_filter( 'bp_groups_get_front_template', 'jturet_group_front_template' );In reply to: Hide count – please help a PHP newbieif ( bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) != 0 ) $notif .= '<li class="notify"><a href=" ' .$notif_url. ' ">Notifications <div class="notifynumber topnavcount">'. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ).'</div></a></li>'; else $notif .= '<li class="notify"><a href=" ' .$notif_url. ' ">Notifications</a></li>';In reply to: Convert WP users to Buddypress usersAre you sure those members are all subscribers?
Remove your mu plugin.
Try this in your theme/functions.php or plugins/bp-custom.php
Remember to remove it when done.function mie_add_last_activity() { $subscribers = get_users( 'fields=ID&role=subscriber' ); foreach ( $subscribers as $user_id ) { bp_update_user_last_activity( $user_id, bp_core_current_time() ); } } add_action('bp_init', 'mie_add_last_activity' );In reply to: Convert WP users to Buddypress usersNote this
%inforeach (%bloguser as $user)and missings
It should be$blogusersIn reply to: Hide count – please help a PHP newbieTry:
function my_counter_nav_menu($menu) { $notif_url = bp_core_get_user_domain(bp_loggedin_user_id()) .'notifications/'; $friends_url = bp_core_get_user_domain(bp_loggedin_user_id()) .'friends/'; $msg_url = bp_core_get_user_domain(bp_loggedin_user_id()) .'messages/'; if (!is_user_logged_in()) return $menu; $notif = '<li class="notify"><a href=" ' .$friends_url. ' ">Connections <div class="friendnumber topnavcount">'.friends_get_friend_count_for_user( bp_loggedin_user_id() ) .'</div></a></li>'; if ( bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) != 0 ) $notif .= '<li class="notify"><a href=" ' .$notif_url. ' ">Notifications <div class="notifynumber topnavcount">'. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ).'</div></a></li>'; if ( bp_get_total_unread_messages_count( bp_loggedin_user_id() ) != 0 ) $notif .= '<li class="notify"><a href=" ' .$msg_url. ' ">Messages <div class="messagenumber topnavcount">'.bp_get_total_unread_messages_count( bp_loggedin_user_id() ) .'</div></a></li>'; $menu .= $notif; return $menu; } add_filter( 'wp_nav_menu_items', 'my_counter_nav_menu' );In reply to: Convert WP users to Buddypress usersi even run a script on my database
Show the script you ran. Use the
codebutton.In reply to: disable private messaging for specific userNo, you need to use
in_arrayfor that$block_ids = array( 666, 777 ); if ( in_array( $message_info->sender_id, $block_ids ) )In reply to: Notification emails after importRe WP cron jobs – use this to see what is running and scheduled:
https://wordpress.org/plugins/wp-crontrol/In reply to: disable private messaging for specific user[ sorry, I hit Edit instead of Reply. See above. ]
In reply to: Notification emails after importbp_notifications is still generating notifications on pre-import mentions.
That is so bizarre… I have no idea why.
Can you have your host check for processes that have been running for a looong time or using a lot of memory and kill them?Your db screenshots show some rows that look strange to me – the last 3 rows of the last graphic seem suspicious.
Personally, I would wipe the install and start over.
Or at least deactivate both BP and bbPress.
If emails keep arriving, then it’s WP or your server.In reply to: Notification emails after importDoes the notification table in the database contain POST-IMPORT entries ?
If so, can you tell if those entries relate to the importing?In reply to: disable private messaging for specific userYou could use this action hook, found in :
buddypress\bp-messages\classes\class-bp-messages-message.php
do_action_ref_array( 'messages_message_before_save', array( &$this ) );Untested, but try:
function block_the_jerk( $message_info ) { if( $message_info->sender_id == 666 ) // change 666 to jerk's user_id unset( $message_info->recipients ); return $message_info; } add_action( 'messages_message_before_save', 'block_the_jerk');This should remove all recipients – causing the send message function to return false.
I’m not sure what if any feedback the jerk will see.In reply to: Notification emails after importBecause emails are being sent, a lot of notifications were created too, correct?
Are the notifications being created in ‘batches’ ala the emails?
And were any activity entries created?afaik – BuddyPress only handles @ mentions in the context of activity, hence:
add_filter( 'bp_activity_do_mentions', '__return_false' );If true, then bbPress is parsing @ mentions in forum posts and creating BP notifications which result in emails being sent.
I don’t have a solution – just trying to outline the sequence.
Very curious to know why, given that the email server queue isn’t massive, there seems to be a throttle on the process.Have you tried asking bbPress about this?
You may need to open a ticket to get a useful response. If you do, please share it here.In reply to: BP loop not filtering on “load more”Try changing
'&object=activity'to'&action=activity_update'In reply to: PM username autocomplete without friend moduleAdd this to your bp-custom.php file:
define( 'BP_MESSAGES_AUTOCOMPLETE_ALL', true );In reply to: Private Site????For handling strictly non-logged-in users, this free plugin is now available here:
BP Simple PrivateAnd it will be in the WP Plugin Repo in a day or two.
A premium version of the plugin is available here:
BP Simple Private ProIn reply to: Notification emails after importWouldn’t your suggestion just turn off notification altogether?No, it would ( I think, but have not tested ) set all existing notifications > is_new to false.
Providing you with an untested mysql query that you will run on a production site is not something I am willing to do. If you have phpmyadmin installed on your host, try running queries via that interface. Start with SELECT. When you’re satisfied that it is returning the correct rows, then change it to DELETE. But make a backup of your database first!
In reply to: Notification emails after importLook at this table
{your prefix}_bp_notificationsand theis_newfield.Try running a query that sets that field in each row to
0, or maybe each row with a specificcomponent_name.In reply to: Error Activate|RegisterClosed – Please do not create duplicate topics.
Link to your existing thread:
https://buddypress.org/support/topic/save-button-not-showing/In reply to: Change Message Email SubjectThere is no such filter hook as
messages_notification_new_message.There is an email_subject filter hook:
$email_subject = apply_filters( 'messages_notification_new_message_subject', $email_subject, $sender_name, $ud );
But as you can see, the variables passed do not include the message subject.So, I don’t see a way to do what you want.
There is an enhancement ticket in the works
https://buddypress.trac.wordpress.org/ticket/6460
It might expose the fields you need.You aren’t alone in asking for a different filtering system:
https://buddypress.trac.wordpress.org/ticket/6460In reply to: Permalinks to custom activitiesHave you tried changing the
actionfield of your custom activity types ?
Also look at theprimary_linkfield – you may have to use it as part of filtering the activity loop.
But it’d be better to create the activity entry as you want it, rather than filter on display.In reply to: Permalinks to custom activitiesYou created a cpt named books.
When a book post is created, an entry is created in the activity stream.
When the book post is viewed, it used the single.php WP template.
Correct?The book post and the activity entry are 2 different things.
Why would you want to use an activity template to show the content from an instance of a post type?If you want to create a custom activity – then why create a custom post type?
How to add an activity entry:
In reply to: Custom profile, notifications and my groups linkUse
bp_loggedin_user_domain()
The result will be something like:
http://platformatrop.traweczka.pl/members/traweczka/So you could do this:
<a href="<?php echo bp_loggedin_user_domain() ?>profile/edit/">Edit Profile</a>