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
  #62  
Old 10-20-2002, 10:42 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Tha Rock
Erwin: I see you have modified this hack, please could you post up an updated super cool version?
I got your PM. My mods are customized specifically for my site, and won't make sense to anyone else's site. I don't have time to package it and release it as an add-on - the code is buried under a ton of modified hack, especially after several vB upgrades.
Reply With Quote
  #63  
Old 11-07-2002, 02:24 AM
wolfman wolfman is offline
 
Join Date: Aug 2002
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like it but how does a mod get access to the users ID to do the ban?
Reply With Quote
  #64  
Old 11-07-2002, 09:09 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I modified this hack to integrate it into the search feature in the Mod CP, using the username instead of the userid. It's not that hard to do. I can't post on how I did it, since it's all integrated with the rest of my banning system. But it can be done.
Reply With Quote
  #65  
Old 11-13-2002, 03:53 AM
themonarch's Avatar
themonarch themonarch is offline
 
Join Date: Jun 2002
Location: Orlando, FL
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great little hack! My only wish is to ban by username instead of the id...
Reply With Quote
  #66  
Old 11-13-2002, 03:54 AM
CRego3D CRego3D is offline
 
Join Date: May 2002
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin

Any way you can share this info ?, I am lookign for the same feature
Reply With Quote
  #67  
Old 11-13-2002, 04:26 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, this is what you do.

1) Upload banuser.php into your mod subdirectory

2) Edit your mod/user.php

Find:

PHP Code:
      echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1"<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\"><p>[ban]</p></a></td>""").iif($perms[ismoderator] or $ismod['canviewprofile']==1"<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\"><p>[view user]</p></a></td>""")."</tr>\n";
    } 
Replace with:

PHP Code:
      echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1"<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\">[ban]</a><br><a href=\"banuser.php?action=adminadd&userid=$user[userid]\">[Temp Ban]</a></td>""").iif($perms[ismoderator] or $ismod['canviewprofile']==1"<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\">[view user]</a><br><a href=\"banuser.php?action=remove&userid=$user[userid]\">[Remove Temp Ban]</a></td>""")."</tr>\n";
    } 
That's it!

Then what your mods can do is Search for a User using the normal search function in their Mod CP, and when they find the username, click on the "Temp Ban" or "Remove Temp Ban" links next to the username. And go from there!

My system is very different - so I can't test this, but it should work.
Reply With Quote
  #68  
Old 11-14-2002, 12:43 PM
CRego3D CRego3D is offline
 
Join Date: May 2002
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Erwin
Okay, this is what you do.

[...]

That's it!

Then what your mods can do is Search for a User using the normal search function in their Mod CP, and when they find the username, click on the "Temp Ban" or "Remove Temp Ban" links next to the username. And go from there!

My system is very different - so I can't test this, but it should work.
Thank you .. now, when I click on "temp ban" it leads me to the page to temp ban it, but still askign for the iser id (just leads me to the ban link in banuser.php) .. did I missed something ?
Reply With Quote
  #69  
Old 11-28-2002, 11:16 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I perform a temp ban I get;

Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site62/fst/var/www/html/bb/admin/adminfunctions.php:19) in /home/virtual/site62/fst/var/www/html/bb/mod/banuser.php on line 30

When I try to edit a ban I get;

Not Found
The requested URL /bb/mod/banuser.php.php was not found on this server.


--------------------------------------------------------------------------------

Apache/1.3.22 Server at www.domainname.net Port 80


Just why am I transfered to an URL ending with php.php?

(Other than this, it does initially work).

For the record, I'm using vBulletin ver 2.2.9.
Reply With Quote
  #70  
Old 12-03-2002, 12:40 AM
nimzie nimzie is offline
 
Join Date: Dec 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm new to this php stuff.

The instructions say to add error_nopermission_tempban template. Is that to say error_nopermission_tempban.php? In what directory?
I'm not sure what a template is..

Will this allow admins to be banned - or can I just not give the link to mods - and not put it in index.php?
Reply With Quote
  #71  
Old 12-21-2002, 12:09 AM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't put that template in the directory. Go to your admin cp and look down the left hand column near the bottom for 'templates'. .php files are put in the directory (FTP, whatever), but not templates.
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 05:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10323 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
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
  • (2)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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