Replies
- Alex on December 18, 2024 at 8:07 am in reply to: How to implement live notification from plugin into header? #53920
Dont using it but curios if you ve been able to fix the bug already? As said, another live plugin like yours having the same issue…
- Alex on December 18, 2024 at 8:05 am in reply to: [Resolved] Questions to your block user plugin #53919
Regarding my first question I am using another plugin now so this can be deleted. Secondly the guy who is making the bm plugin pointed me to the block function so I am hopeful to make it work by myself.
Thanks!
- Alex on November 20, 2024 at 11:04 pm in reply to: How to implement live notification from plugin into header? #53562
By the way, there is a problem/bug with the live notfication plugin.
1.Chose public message on someone’s profile.
2.Then select friendship from the dropdown on the right side
3.Write something in the text field and click update
4.On next page click “see acitiviy”
Then a button “undefined” occurs which counts up every 10 seconds or so. This happens only if your plugin is installed. Interesting, I tested this behaviour with another live bell plugin and it has the same bug.
If your or his plugin is deactivated everythings works and no “undefined” occurs.Tested with twenty twenty five theme, buddypress, buddypress classic and your plugin on a fresh wordpress installation.
Here a mp4 video about this (link is just viewable 24 hours)
https://jumpshare.com/s/7EDAITT7ST9YKQYh9bZS - Alex on October 14, 2024 at 10:49 am in reply to: How to make changes at the values from the invitations loop before output #53300
By the way. I tried to edit my post because I forgot the code blocks but it says you cannot create new topics??
add_filter(‘bp_get_the_members_invitation_property_’,function ($property,$value) { if ($property == ‘date_modified’){ $value= date(‘d.m.Y’,strtotime($value)); } return $value; },10,2);
- Alex on October 10, 2024 at 12:31 pm in reply to: [Resolved] Limit invitations to avoid beeing spammed #53290
I tried to overwrite the message with this filter below but inside the your surrounding filter it is not working. I suppose because the $message variable is unknown by the surrounding filter. But how can I solve this?
add_filter( ‘bp_user_can’, function ( $retval, $user_id, $capability, $site_id, $args ) {
if ( ‘bp_members_send_invitation’ !== $capability ) {
return $retval;
}$count = BP_Invitation::get_total_count( array(
‘inviter_id’ => $user_id
) );$max_allowed = 2;// change it.
if ( $count >= $max_allowed ) {
$retval = false;// overwrite message
add_filter(‘members_invitations_form_access_restricted’,’overwrite_message’);
function overwrite_message ($message) {
$message = ( ‘You have reached the limit of invitations.’);
return $message;
}}
return $retval;
}, 10, 5 );
- Alex on October 9, 2024 at 3:07 pm in reply to: [Resolved] Limit invitations to avoid beeing spammed #53287
So is there any possibility to change the error message at least?
- Alex on October 9, 2024 at 11:33 am in reply to: [Resolved] Limit invitations to avoid beeing spammed #53283This reply has been marked as private.
- Alex on October 9, 2024 at 11:22 am in reply to: [Resolved] Limit invitations to avoid beeing spammed #53282
Hi Brajesh,
it works. Great! Thank you.Just two more questions on this.
1. At the backend on the invitations table you can see that the date is saved under “date modified”. Is it possible to get this date and then add it to your function? To check if the count is more than the max_allowed FOR THE SAME DAY, then set $retval to false?
2. After the limit is reached the message pops up saying “you dont have the rights to send invitations”.
Am I able to manipulate this message saying something like “you have reached the daily limit on invitations! Try again later”?Regards
AlexPS: I really wonder why nobody has this implemented over the last years. Looks like buddypress core development slows down, which is not good.
- Alex on October 7, 2024 at 10:09 pm in reply to: [Resolved] PHP warning when activating plugin BuddyPress Profile Data Control #53266
Glad that you were able to fix it! Maybe I need it in the future again. 🙂
- Alex on October 7, 2024 at 9:07 pm in reply to: [Resolved] Limit invitations to avoid beeing spammed #53265
Or alternatively add Recaptche to the form…?