Restrict PM:s

18 years 2 months ago #6692 by majje
Restrict PM:s was created by majje
I would like to remove the possibility to send messages to anyone, you should only be able to send messages to members you hava a connection with. Is it possible to hide the listbox with all users, when composing a message, and only show the contacts? I have problems with users that is spamming others with junk.

The possibility to send messages to other users should still be possible but only from their profile.

Please Log in to join the conversation.

18 years 2 months ago #6746 by benjamin
Replied by benjamin on topic Re:Restrict PM:s
Find the file includes.php in your uddeim folder.

Around line #624 you'll find:

echo "&nbsp;&nbsp;&nbsp;<a href=\"#\" onclick=\"javascript:document.sendeform.sendeform_showallusers.value='true'; document.sendeform.submit(); return false;\">"._UDDEIM_SHOWUSERS."</a>";


Commenting that line out will remove the "show all users" link. (Of course you can still enter any name in the form field.)

Please Log in to join the conversation.

18 years 2 months ago #6749 by majje
Replied by majje on topic Re:Restrict PM:s
Thank's!

Just what I needed. :)

EDIT: Actually I had that line on row #1247, but it works great.

Post edited by: majje, at: 2006/02/21 20:33

Please Log in to join the conversation.

18 years 2 months ago #6967 by batmon
Replied by batmon on topic Re:Restrict PM:s
Hi,

This works great. However, users can still enter any name in the form field as you mentioned. Is it possible to add codes so that it will reject sending out message if the receiver is not in his/her connection?

Thank you.

Please Log in to join the conversation.

18 years 2 months ago #6991 by benjamin
Replied by benjamin on topic Re:Restrict PM:s
Around line #607 auf the mentioned includes.php file, you can change the existing code
[code:1]echo '<input type="hidden" name="to_name" value="'.$recipname.'">&nbsp;';[/code:1]
to
[code:1]echo '<input type="hidden" name="to_name" value="'.$recipname.'" readonly>&nbsp;';[/code:1]
Around line #616 change
[code:1]echo '<input type="text" '.$errorstyle.'name="to_name" value="'.$recipname.'">&nbsp;';[/code:1]
to
[code:1]echo '<input type="text" '.$errorstyle.'name="to_name" value="'.$recipname.'" readonly>&nbsp;';[/code:1]
This is still not 100% safe, but at least an additional protection.
Code not tested.

Please Log in to join the conversation.

Moderators: beatnantslabbikrileon
Time to create page: 0.164 seconds