vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Daily Short Term Banning by BOP5 (Ban users during part of the day or night) (https://vborg.vbsupport.ru/showthread.php?t=298126)

BirdOPrey5 05-12-2013 10:00 PM

Daily Short Term Banning by BOP5 (Ban users during part of the day or night)
 
1 Attachment(s)
Brought to you by BirdOPrey5 / Qapla.com.

So lets say you have a member who is only disruptive at night, perhaps after they've had a few drinks, but actually contribute during the day so you don't want to ban them all day long... Or you have a user who is so addicted to your forum they literally beg you to ban them so they aren't tempted to waste time during school or work- now you have an easy way to do so.

This mod is designed to allow you to make regular short term bans of specific users... You specify the user (by username or userid), the start time of the ban, the end time of the ban, and optionally the days of the week of the ban (by default the ban reoccurs every day.)

The user will get a message explaining they have been banned from the forum only during the specific hours you have set and advise them to return during a time they aren't banned.

Tapatalk and ForumRunner Compatible!

Because vBulletin doesn't honor the time zone settings of banned users all ban times are based off the server time. In the settings page the current server time is displayed to make figuring out the hours you wish to ban them easier.

Remember the Server Time may not be your local time zone either.

I have tried to make setting this up as easy as possible- You can specify the ban by either userid or username, however in the rare case a username is only numbers or has a | in it then you must use the userid only.

You can specify the ban time in 24 hour or 12 hour format so 18:00 or 6:00 PM are both fine and valid to use as times.

Both same day bans (example- 1PM to 5PM) and overnight bans (example- 10PM to 5AM) are allowed.

Days of the week are specified by an optional 4th parameter in the ban settings, in this case a number is assigned to each day of the week, 0 = Sunday, 1 = Monday... and so on until 6 = Saturday. You simply include a list of numbers for specific days.

Examples of ban settings:

Code:

BirdOPrey5 | 8:00 PM | 10:00 PM | 0456
The above means the user BirdOPrey5 will be banned from 8PM to 10 PM on Sundays, Thursdays, Fridays, and Saturdays

Another example:

Code:

501 | 20:00 | 5:00
The above means the user with userid 501 will be banned between 8PM and 5AM every day of the week.

Just be careful when doing "overnight" bans along with specific days of the week... Because if the day of the week isn't listed the overnight ban will end at 11:59PM regardless the time chosen if the next day is not listed as a ban day.

See Post #6 on how to ban guests.

This version is only compatible with VB 4.x.x. Tested on VB 4.2.x. Will not work on VB 3.x or 5.x.

Demo: http://www.qapla.com/mods/
Username: ShortBanTest
Password: iwasbanned
The above user is banned from 12:01 AM to 11:59 PM so you can see the error message you will get, and confirm it works on ForumRunner and Tapatalk as well.

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

Please "Mark as Installed" if you use this. :)
Donations always appreciated. :up:
Nominate MOTM if you LOVE it! ;)

BirdOPrey5 05-13-2013 08:51 PM

Reserved.

RichieBoy67 05-13-2013 09:54 PM

Great Idea!

djbaxter 05-14-2013 01:18 AM

Taking vB4 where no vB4 has gone before! :D

RichieBoy67 05-14-2013 05:14 PM

Nice to see you here Dj!!

I really like this! I am trying to figure out a crafty way to incorporate this :)

BirdOPrey5 05-14-2013 05:23 PM

An unintended feature, you can disable guest access (essentially ban guests) during certain hours by banning userid 0 on one of the lines.

Regular users will still be able to log in via the regular login form at the top of the page.

Example:

Code:

0 | 6:00 PM | 11:59 AM | 12345
The above will ban guest access from 6PM to 11:29 PM on weekdays.

QBart2011 05-14-2013 06:59 PM

I guess you can also throw members into the "Moderated" user group as well between certain hours from the look of the Mod..

Hence until a Moderator / Admin has had a chance to review their posts they don't get the privileged to show up.

Snowhog 05-15-2013 01:12 AM

I like this idea. Kinda like limiting your kids access to the TV or the Internet. Good job.

Snowhog

BirdOPrey5 05-15-2013 11:42 AM

Quote:

Originally Posted by QBart2011 (Post 2422063)
I guess you can also throw members into the "Moderated" user group as well between certain hours from the look of the Mod..

Hence until a Moderator / Admin has had a chance to review their posts they don't get the privileged to show up.

I can confirm that does indeed (at least mostly) work- Another unintended feature!

Create a usergroup called "Moderated Users" based off "Registered Users" - change all "Moderation" options to NO (there are a bunch, forum, photos, visitor messages, etc...) and save the Moderated Users group.

Then in this mod choose the "Ban Group" in settings to be "Moderated Users" - rather than being banned between certain hours the users will simply be moderated. :up:

I will have to do some more extensive testing to be sure... Curious how it would affect Tapatalk/ForumRunner and Error Messages (which are set to say Banned by the mod) but probably could work out any kinks in a future version.

QBart2011 05-15-2013 07:53 PM

Thanks I would always look at Banning as a last option.. Even if it's only temporary.. I would rather Moderate and this Mod seems perfect for that. Great unintended work.. :D

Thanks again.. Great stuff as I will keep checking in to see when it is fully tested for Moderation and will install it on my board..


All times are GMT. The time now is 11:39 AM.

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.01036 seconds
  • Memory Usage 1,741KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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