vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   An alternative to banning: Miserable Users (https://vborg.vbsupport.ru/showthread.php?t=49810)

cirisme 03-19-2003 09:46 PM

I love this hack. :D

Pikok 03-20-2003 06:50 PM

I love this hack, but I also use the ban by warning hack. Currently when a user reaches a preset number of warning points, they're moved to the banned by warnings group. What I need is to be able set a usergroup as miserable or not, rather than an individual user.

Users aren't allowed to see the warnings list, so they don't know how many points equals a ban. How would I set it up so that if a user is in the banned group they are miserable, but if not they aren't. I may sometimes unban a user (by moving them out of the banned usergroup) at which time I'd need for them to not be miserable any longer (only while in the banned usergroup).

Anyone know how to put an option in the usergroup section of the admin cp where I could set a certain group as miserable or not, as oposed to an individual user? I'd like to have the option listed when a usergroup is created/edited, much like the group permissions are.

Thanks for any help..

Zzed 03-20-2003 06:58 PM

Add this before the if($bbuserinfo[miserable] == 1) code in global.php

PHP Code:

if($bbuserinfo[usergroupid] == $banned_usergroupid) {
  
$bbuserinfo[miserable] = 1;


Where $banned_usergroupid is the usergroup number for your banned users.

It will make all the users who belong to that usergroup miserable as soon as they log into your site. ;)

Pikok 03-20-2003 07:07 PM

Thanks for the quick response! This is what my global.php looks like now:
PHP Code:

if($bbuserinfo[usergroupid] == 8) {
  
$bbuserinfo[miserable] = 1;
}
if(
$bbuserinfo[miserable] == 1) {
  
$glitch rand(60,120);
  for(
$x 0;$x $glitch;$x++) {
    echo 
" ";
    
sleep(1);
  }
  
$floodchecktime *=10;

  
$glitch rand(0,100);
  if(
glitch 90) {
    
$enablesearches  0;
  }

  
$glitch rand(0,100);
  if(
$glitch 75) {
    eval(
"standarderror(\"".gettemplate('error_toobusy')."\");");
    exit;
  }
  else {
    
$glitch rand(0,100);
    if (
$glitch 80) {
      if (
$glitch 50) {
        exit;
      }
      echo 
"<META HTTP-EQUIV=\"refresh\" CONTENT=\"5; URL=index.php\"> ";
    }
  }

  
$showforumusers  0;
  
$displayloggedin 0;


Just one more question though. If I later move a user out of the banned usergroup, will they automatically be not miserable or do need to add some sort of elseif statement to the usergroup part I just added that would setit to 0 rather than 1?

Zzed 03-20-2003 07:10 PM

Very cool. ;)

You won't have to do anything since the misery flag gets set if the user belongs to the banned group. moving them back to the registered user group will not set that flag anymore.

Pikok 03-20-2003 07:14 PM

Okay, thanks.. :D

This hack is pure evil!!! I love it!

Keep up the great work!

Zzed 03-20-2003 07:17 PM

Thank you for your kind words. https://vborg.vbsupport.ru/

Big Daddy Chemo 03-20-2003 07:43 PM

This hack will prove to be timeless... ;)

One request though -> can you offer some code that will give MODS the ability to toggle the misery setting as well?

Pikok 03-20-2003 07:53 PM

Quote:

Today at 09:43 PM Big Daddy Chemo said this in Post #108
This hack will prove to be timeless... ;)

One request though -> can you offer some code that will give MODS the ability to toggle the misery setting as well?

That would be a good option. Would need to be a way of also setting it so that mods couldn't set other mods and/or admins to miserable though.. Only admins or those with admin cpanel access would be able to make mods/admins miserable.

Zzed 03-20-2003 08:07 PM

Oh boy, I knew this was going to get me in trouble. :D

I have this hack in place on my site. But it combines 6 other hacks which gives the moderators the power to impose misery, starvation, and a couple other hacks on users for time periods of 1, 3, or 7 days. And after the "served time" the users go back to normal.

I need to think about how to do a partial release of what I have in place... :(


All times are GMT. The time now is 04:56 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.01633 seconds
  • Memory Usage 1,754KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete