Remove 'Message' from submenu unless friends...

How can we remove the 'Message' button from the submenu unless a member is an accepted friend of the chosen member?

Quote · 11 Dec 2012

you mean action block?

so much to do....
Quote · 11 Dec 2012

See attachment:

screencapture.png · 71.4K · 247 views
Quote · 11 Dec 2012

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....
Quote · 11 Dec 2012

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.

Quote · 11 Dec 2012

Question 1:
Is there a way to do this for the actions block too (when you hover the mouse over a member's avatar/name)?

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?

Quote · 11 Dec 2012

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....
Quote · 11 Dec 2012

 

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....
Quote · 11 Dec 2012

 

 

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.

Quote · 11 Dec 2012

 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....
Quote · 11 Dec 2012

OK I understand. 

Quote · 11 Dec 2012

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...
Quote · 4 Dec 2013

 

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
Quote · 4 Dec 2013

Can anyone help with this?

This is my signature, there are many like it but this one is mine...
Quote · 9 Dec 2013

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...
Quote · 30 Oct 2014

I'll get back with you next October.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 30 Oct 2014

 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...
Quote · 30 Oct 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.