Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Daily Short Term Banning by BOP5 (Ban users during part of the day or night) Details »»
Daily Short Term Banning by BOP5 (Ban users during part of the day or night)
Version: 1.0.0, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.x.x Rating:
Released: 05-12-2013 Last Update: Never Installs: 18
Supported Uses Plugins
Re-useable Code Translations  

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!

Download Now

File Type: zip Daily Short Term Bans by BOP5_v100.zip (5.3 KB, 51 views)

Screenshots

File Type: jpg dstb-banmessage-bop5.jpg (94.9 KB, 0 views)
File Type: jpg dstb-settings-bop5.jpg (116.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
4 благодарности(ей) от:
Bounce, goxy63, tbworld, TheLastSuperman

Comments
  #12  
Old 05-31-2013, 01:52 PM
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Location: Edinburgh,Scotland
Posts: 919
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BoP you are AWESOME

Thanks for giving me what i needed, bloody drunks lol
Reply With Quote
Благодарность от:
BirdOPrey5
  #13  
Old 10-21-2013, 01:30 PM
Matriosh Matriosh is offline
 
Join Date: Jul 2010
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And there is no similar fashion to vbulletin 3.8.X????
Reply With Quote
  #14  
Old 04-11-2014, 03:20 AM
QBart2011's Avatar
QBart2011 QBart2011 is offline
 
Join Date: Dec 2012
Location: Lower Mainland BC
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
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.
Hey BOP was this ever confirmed as a Moderation instead of Temp Ban ?

As I have posted before I would much rather Moderate than Temp Ban any poster.

Just curious as I see no other posts..
Reply With Quote
  #15  
Old 04-11-2014, 09:06 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, yes and no.

Yes it works if the user has no secondary (additional) usergroups.

Since the way VB permissions work anyone who has a YES in a secondary group will override a NO in a primary group, even if they are moved to moderated users their secondary groups would possibly override their forced moderation depending how you have the groups set up.
Reply With Quote
Благодарность от:
QBart2011
  #16  
Old 04-11-2014, 03:01 PM
QBart2011's Avatar
QBart2011 QBart2011 is offline
 
Join Date: Dec 2012
Location: Lower Mainland BC
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
Reply With Quote
  #17  
Old 11-17-2014, 10:42 PM
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Location: Edinburgh,Scotland
Posts: 919
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

This has stopped working and ive no idea why.

Only recent upgrade was patching VB to 4.2.2 Patch Level 2

Any ideas BoP
Reply With Quote
  #18  
Old 11-18-2014, 11:58 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What version of PHP are you running?
Reply With Quote
  #19  
Old 11-19-2014, 09:35 PM
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Location: Edinburgh,Scotland
Posts: 919
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
What version of PHP are you running?
5.3.17

I think its a usergroup problem as it works when banning an admin but not other users who also have additional usergroups.
Reply With Quote
  #20  
Old 11-20-2014, 10:53 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bounce View Post
5.3.17

I think its a usergroup problem as it works when banning an admin but not other users who also have additional usergroups.
Are you moving the user to the banned usergroup or are you moving them to some other usergroup? The banned usergroup overrides all other usergroups and will always ban the user.

If you're moving them to some other group though, such as to moderate their posts rather than ban them, then you have to deal with the fact other usergroups can override it.

I can probably add a line to fix this, as it wasn't the original intent of the mod I never thought about it before- let me know if you think that is the issue.
Reply With Quote
  #21  
Old 11-26-2014, 04:37 PM
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Location: Edinburgh,Scotland
Posts: 919
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
Are you moving the user to the banned usergroup or are you moving them to some other usergroup? The banned usergroup overrides all other usergroups and will always ban the user.

If you're moving them to some other group though, such as to moderate their posts rather than ban them, then you have to deal with the fact other usergroups can override it.

I can probably add a line to fix this, as it wasn't the original intent of the mod I never thought about it before- let me know if you think that is the issue.
Hi, sorry for the delay,

The user in question is in a registered usergroup plus additional VIP and Subscriber.

Im moving to the banned usergroup.

I did a test on myself - Admin usergroup only and it worked.

So it it because the user is in more than 1 usergroup?

Since then the user has been binned completely so hes not an issue now but would still like it to work for the future if required, most other users on the list are just in the one usergroup so assuming they get binned at their times!
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 09:34 PM.


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.05165 seconds
  • Memory Usage 2,354KB
  • Queries Executed 26 (?)
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_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (6)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete