vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Keep 'em Seperated: The Admin enforced ignore (https://vborg.vbsupport.ru/showthread.php?t=74483)

memobug 01-16-2005 10:37 PM

Keep 'em Seperated: The Admin enforced ignore
 
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
PHP Code:

$doignore[uid] = array(ignoreid1ignoreid2);

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:
PHP Code:

$doignore[uid] = array(ignoreid1ignoreid2); 

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):

PHP Code:

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!


All times are GMT. The time now is 01:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01156 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete