Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Allow Mods a temporary ban of users Details »»
Allow Mods a temporary ban of users
Version: 1.00, by Hotte Hotte is offline
Developer Last Online: Jan 2006 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-06-2002 Last Update: Never Installs: 64
 
No support by the author.

Hi
I´ve wrote a little hack upon request of my "Main"-Moderators.
This hack allows them to temporary ban a given user per Userid. Simply userid, reason and how many hours. The banned user will see a modified no-permission screen when he tries to login. The User can automaticly access the board again, when the entered time is over.
For the other hackers: Feel free to modify the hack and distribute a "better" version of this if you want.

Sry for my bad english.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 06-10-2002, 12:01 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did you run the query on your database and add the template?
Reply With Quote
  #33  
Old 06-10-2002, 12:05 AM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes
Reply With Quote
  #34  
Old 06-10-2002, 12:41 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

from the bottom of the install text:
Quote:
Hint:
In banuser.php at line 10:
if ($bbuserinfo[userid]!=1 and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] and forumid=2")) {

This is the permcheck if the user who tries accessing this file is authorized. In this case if the user ist not the administrator who was createn by the vbulletin-installation and is not a moderator of forumid 2, the script will quit. Change it to whatever you want. In Example to allow all moderators access delete lines 10-13 from the script.

I know, this hack is not "the best way" to code something, but it works
Are you userid 1?
Reply With Quote
  #35  
Old 06-10-2002, 01:04 AM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok...that was it...


i tried using the format above to change it to look up for the usergroup for Admins and SuperModerators, but the only way it works is if i set it to allow the userid or else delete the permissions completely

any idea why the usergroup solution is bombing?
Reply With Quote
  #36  
Old 06-10-2002, 01:17 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Post #14 in this thread has the code to allow usergroups. That's what I am using.

Quote:
Originally posted by ladyfyre
ok...that was it...


i tried using the format above to change it to look up for the usergroup for Admins and SuperModerators, but the only way it works is if i set it to allow the userid or else delete the permissions completely

any idea why the usergroup solution is bombing?
Reply With Quote
  #37  
Old 06-10-2002, 01:41 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yea, I can't allow mods/supermods to use this until someone can post an update to the code to disallow banning of admins. The way it works now is any mod/supermod that has permissions to temp ban, can also temp ban an admin.
Reply With Quote
  #38  
Old 06-10-2002, 01:45 AM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is what i was using. I just get back:

Parse error: parse error in /banuser.php on line 13

Code used is:


PHP Code:
// HF-Mods perms
        
if_(    
        
____$bbuserinfo[usergroupid]!=
        
____and_$bbuserinfo
[usergroupid]!=5
        
____and_$bbuserinfo
[userid]!=44
        
____and_$bbuserinfo
[userid]!723
        
____and_$bbuserinfo
[userid]!=4267
        
{       
        
cpfooter();
        exit;


Line 13 is the one referring to usergroupid 6
Reply With Quote
  #39  
Old 06-10-2002, 02:16 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That doesn't seem to work here now. I went back to the original file and it works that way. I ran it from the admin directory though. I don't want any mods playing with it until I can get it working so no one can ban the admin.

Quote:
Originally posted by ladyfyre
That is what i was using. I just get back:

Parse error: parse error in /banuser.php on line 13

Code used is:


PHP Code:
// HF-Mods perms
        
if_(    
        
____$bbuserinfo[usergroupid]!=
        
____and_$bbuserinfo
[usergroupid]!=5
        
____and_$bbuserinfo
[userid]!=44
        
____and_$bbuserinfo
[userid]!723
        
____and_$bbuserinfo
[userid]!=4267
        
{       
        
cpfooter();
        exit;


Line 13 is the one referring to usergroupid 6
Reply With Quote
  #40  
Old 06-10-2002, 02:25 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you just insert your own userid, you can still run it from your mod/index.php This way it can be run from your forums options drop down box in the forum, bottom right. No one will be able to ban you, because it looks for that userid, and if its not the same one as the person trying to access the file, the script will not run.
Reply With Quote
  #41  
Old 06-10-2002, 02:58 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, you lost me here. What do I need to do where to do what?

Quote:
Originally posted by Smoothie
If you just insert your own userid, you can still run it from your mod/index.php This way it can be run from your forums options drop down box in the forum, bottom right. No one will be able to ban you, because it looks for that userid, and if its not the same one as the person trying to access the file, the script will not run.
Reply With Quote
  #42  
Old 06-10-2002, 03:05 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the banuser.php file, I think its around line 10, where it says userid 1. If thats your userid, that no one else will be able to run the script.
Reply With Quote
  #43  
Old 06-10-2002, 05:54 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about the ismod part in that same line? I just want to make it so the admin and the supermod and whichever userid I want to enter can use it. That code they gave me in the earlier post doesn't work.

Quote:
Originally posted by Smoothie
In the banuser.php file, I think its around line 10, where it says userid 1. If thats your userid, that no one else will be able to run the script.
Reply With Quote
  #44  
Old 06-10-2002, 08:18 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would be great if the person who created this hack could lend some assistance. I would like for my mods to be able to temp ban without the risk of one of them banning me.
Reply With Quote
  #45  
Old 06-11-2002, 02:37 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^bump^
Reply With Quote
  #46  
Old 06-11-2002, 03:22 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What does the "bump" mean? I have always wondered that every time I see it.

Quote:
Originally posted by Smoothie
^bump^
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:20 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.06263 seconds
  • Memory Usage 2,366KB
  • Queries Executed 30 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete