How can we remove the 'Message' button from the submenu unless a member is an accepted friend of the chosen member?
How can we remove the 'Message' button from the submenu unless a member is an accepted friend of the chosen member? |
you mean action block? so much to do.... |
See attachment: |
go to phpmyadmin->sys_objects_actions search for the caption "{cpt_am_profile_message}" replace all content in Eval field with this. if(!is_friends({ID}, {member_id})) { return; } return $GLOBALS['oTopMenu']->getUrlProfileMessage({ID});
Clear caches and it should work. so much to do.... |
Perfect, thanks a lot - great job! This is a really good modification to avoid those pesky members who join up only to spam-vertise other members without first adding them a friend. |
Question 1: |
search for "{cpt_get_mail}" in the same table and replace the Eval content with this if ({ID} == {member_id}) return; if(!is_friends({ID}, {member_id})) { return; } $bAnonymousMode = '{anonym_mode}';
if ( !$bAnonymousMode ) { return "$.post('freemail.php', { ID: '{ID}' }, function(sData){ $('#ajaxy_popup_result_div_{ID}').html(sData) } );return false;"; }
Good luck so much to do.... |
Question 2:
Also in the message area, when you're typing the recipient's name in the new message section, the 'auto search' uses member nicknames rather than the full name. Is this something that can be changed? Also, can this input box be limited to friends only rather than any member from the entire site? This requires lot of work. Should go in a custom job category. so much to do.... |
Question 2:
Also in the message area, when you're typing the recipient's name in the new message section, the 'auto search' uses member nicknames rather than the full name. Is this something that can be changed? Also, can this input box be limited to friends only rather than any member from the entire site? This requires lot of work. Should go in a custom job category. OK, I thought maybe it was a 'fault' as every other area of the site shows the member name as 'Full name', as selected in the admin area. |
Full name can't be used to identify users because they aren't unique. OK, I thought maybe it was a 'fault' as every other area of the site shows the member name as 'Full name', as selected in the admin area.
so much to do.... |
OK I understand. |
It makes sense that if a member can only send a message to their friends (using Prashank's method), then surely this also needs to apply to the compose message function also. Is there a way to close this loophole? Thanks This is my signature, there are many like it but this one is mine... |
It makes sense that if a member can only send a message to their friends (using Prashank's method), then surely this also needs to apply to the compose message function also. Is there a way to close this loophole? Thanks This should be a setting for the members; "Receive Messages:"; from everyone, from friends only, Has anyone done this? Geeks, making the world a better place |
Can anyone help with this? This is my signature, there are many like it but this one is mine... |
I can't get this to work. I changed it to the following as per Prashank's code - can someone pls check this? if(!is_friends({ID}, {member_id})) {return;}return $GLOBALS[''oTopMenu'']->getUrlProfileMessage({ID}); Thanks go to phpmyadmin->sys_objects_actions search for the caption "{cpt_am_profile_message}" replace all content in Eval field with this. if(!is_friends({ID}, {member_id})) { return; } return $GLOBALS['oTopMenu']->getUrlProfileMessage({ID});
Clear caches and it should work.
This is my signature, there are many like it but this one is mine... |
I'll get back with you next October. My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
Slow down HL, you're moving way too fast .. I'll get back with you next October.
This is my signature, there are many like it but this one is mine... |