1
figu78
Private messages
  • 2008/4/5 22:23

  • figu78

  • Just popping in

  • Posts: 60

  • Since: 2006/8/19


Hi guys,

This is very important for me, I wonder if there is a way to hide a user or a group of users in the private message users list.

What i want is to hide a user in the dropdown list that you see when you want to send a private message.

Is it possible??

Is very important, It will be great if someone could help me.

Thanks in advance,

David.

2
Anonymous
Re: Private messages
  • 2008/4/5 22:39

  • Anonymous

  • Posts: 0

  • Since:


Straight out of the box? I don't think so.

Can you be a little more specific as to what you want/need? Do you want to exclude users from the list by default or exclude certain users from the drop-down list on a user-by-user basis?

Do you want the drop-down list to be an "opt in" user setting?

3
figu78
Re: Private messages
  • 2008/4/6 15:55

  • figu78

  • Just popping in

  • Posts: 60

  • Since: 2006/8/19


well,

The situation is like this:

A user of my web (that i dont want to reject or delete) is sending abusive messages to another user. what i want is remove the user (the second one) from the private messages drop-down list so the first user will not be able to send more messages to the second one.

If you can't see the user, you can't see the message to that user.

Thanks JAVesey.

4
Runeher
Re: Private messages
  • 2008/4/6 16:33

  • Runeher

  • Module Developer

  • Posts: 825

  • Since: 2008/1/24


Yes, a 'block user' button would be a great feature.

5
Anonymous
Re: Private messages
  • 2008/4/6 17:48

  • Anonymous

  • Posts: 0

  • Since:


What about going about it the other way...... stop the person sending the messages from having the ability to do so? This way you'd be punishing the (guilty) sender rather than the (innocent) recipient and who could still receive PMs from other users.

You could:

1. Clone the "User Menu" Block, editing-out the link to the Inbox/PM system
2. Create a new user-group and put the offending poster in it.
3. Give all access to modules and blocks as per the Registered User group except......
4. Deny access to the normal User Menu block for this new group and ...
5. Give access to the cloned User Menu block (without the link to the Inbox) to this new user-group.


This way you'd have in place a system for dealing with others who abuse the PM system, i.e. move them from the Registered Users group to the new group.

HTH

6
Will_h2
Re: Private messages
  • 2008/4/6 18:41

  • Will_h2

  • Just popping in

  • Posts: 1

  • Since: 2008/4/6 1


I would use a little smarty to remove their ability to send pms.

<{if $xoops_uid == '10024' or $xoops_uid == '10'}>
<{
php}>die('You are not allowed to use this feature');<{/php}>
<{else}>
original template here
<{/if}>


You could even add a little redirect, or javascript return.

What this does is check the xoops-uid, and if it is "10024" or "10" they will not be able to access that part of the site...

get it?

7
Anonymous
Re: Private messages
  • 2008/4/6 19:14

  • Anonymous

  • Posts: 0

  • Since:


Quote:
Will_h2 wrote:

get it?


Oh yes!!

Much more elegant than my solution where a small number of users are involved.

Very many thanks

8
Will_h3
Re: Private messages
  • 2008/4/6 19:55

  • Will_h3

  • Just popping in

  • Posts: 2

  • Since: 2008/4/6 1


Sure np.

9
Will_h3
Re: Private messages
  • 2008/4/6 20:19

  • Will_h3

  • Just popping in

  • Posts: 2

  • Since: 2008/4/6 1


This would be the js way.

<{if $xoops_uid == '10024' or $xoops_uid == '10'}>
<
script>history.go(-1);</script>
<{else}>
original template here
<{/if}>


This would just cause them to be sent back to the page they came from.

10
figu78
Re: Private messages
  • 2008/4/7 11:37

  • figu78

  • Just popping in

  • Posts: 60

  • Since: 2006/8/19


Where should I add this piece of code??

FYI, I've found another solution using database triggers, if your database is MySQL 5.0.2 or later, you can use triggers, so you can do something like that:

create trigger whatever after insert on xoops_priv_msgs
for each row begin
update xoops_priv_msgs
set to_userid = 1001
where from_userid = 72;
end;

With this code, everytime that user 72 sends a message, this message will be send to a fake user (to_userid=1001)that you can create as a mailbox. Using this method you can store the messages as a clue that this users is sending "abusive messages" instead of block this user.

Right now my hosting has an older version of MySQL so i will use your method by now

Thanks a lot guys.

Login

Who's Online

195 user(s) are online (87 user(s) are browsing Support Forums)


Members: 0


Guests: 195


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits