PDA

View Full Version : Keep 'em Seperated: The Admin enforced ignore


memobug
01-16-2005, 10:37 PM
Greetings,

I have some users that can't seem to get along. Toward others they are otherwise decent human beings, but they but heads whenever their paths cross.

. I am tired of separating them and dealing with it. So I have this idea for an admin enforced ignore. I would like to be able to force them onto each other's ignore lists The admin can add names to a user's ignore list. Users can see the names, but can't remove them. Otherwise it behaves like a regular ignore. I have never been able to use ignore being an admin so I don't know all its limitations, but I would like for them

1. not to be able to see the ignored user's posts
2. not to be able to pm the ignored user
3. not to be able to leave reputation for the ignored user.

possibly:

4. not to be able to see if the ignored user is online

Regards,

iforrage
01-27-2005, 09:29 PM
Hope someone picks up on this, as I could use it as well.

Andreas
01-27-2005, 10:29 PM
Cheepo solution:

Place this in phpinclude_start

$doignore[uid] = array(ignoreid1, ignoreid2);

if (array_key_exists($bbuserinfo['userid'], $doignore)) {
$bbuserinfo['ignorelist'] = implode(' ', array_merge(explode(' ', $bbuserinfo['ignorelist']), $doignore[$bbuserinfo['userid']]));
}


Where
uid is the UserID of the user wher you want to add entries to his ignorelist
ignoreid1, ignoreid2 are the User IDs of the users you want him to ignore, add as many as you need separated by comma.
If you got several ppl where you want to add entries: Repeat the $doignore line as often as needed and change the IDs.

Marco van Herwaarden
01-28-2005, 03:24 AM
Shouldn't there be an else branch like:
$doignore[uid] = array(ignoreid1, ignoreid2);

if (array_key_exists($bbuserinfo['userid'], $doignore)) {
$bbuserinfo['ignorelist'] = implode(' ', array_merge(explode(' ', $bbuserinfo['ignorelist']), $doignore[$bbuserinfo['userid']]));
}
else
{
$bbuserinfo['ignorelist'] = implode(' ', $doignore[$bbuserinfo['userid']]);
}

Andreas
01-28-2005, 03:31 AM
That doesn't make sense ... does it?
The if checks if the key exists (so the else-part will be executed if it does not exist):


else
{
$bbuserinfo['ignorelist'] = implode(' ', $doignore[$bbuserinfo['userid']]);
}

But you are using this key (which does not exist) here?

Marco van Herwaarden
01-28-2005, 03:52 AM
Lol, never mind, haven't finished my coffee yet, need to open my eyes. ;)

marcjd
03-06-2005, 06:06 AM
I like the idea. Is there a way of doing it so when you search for a member in admincp you can add the other member there and so on? I think it would be much easier than trying to change code manually, which can easily get out of hand and more time consuming. Thanks!

memobug
05-25-2005, 11:32 PM
I was never able to figure out what was ultimately suggested above, but is there some way this could be done so the code doesn't need to be executed with every page load?

I don't mind having an extra "mustignorelist" in the usertable I can load it up with phpmyadmin because there are only a few problem user combos, but I am not sure how and when to concatenate it with the existing user ignorelist?

Regards,

Matt

oldford
08-14-2005, 08:45 PM
Kirby's code does work, but it doesn't seem to affect PMs. As a test I put myself and another test account on each other's ignore list via the code above. But you can still send PM's to each other. When you go to view the PM is says "user is on your ingore list" but you can still click "view message" to see the PM.

Any thoughts on extending this to PMs? Thanks!