Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
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)
Mod Version: 1.0.0, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Jun 2019 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (4 votes - 5.00 average) Installs: 17
Released: 13 May 2013 Last Update: Never Downloads: 35
Supported Uses Plugins Re-usable 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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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

Another example:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.
Nominate MOTM if you LOVE it!

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	dstb-banmessage-bop5.jpg
Views:	198
Size:	94.9 KB
ID:	145016   Click image for larger version

Name:	dstb-settings-bop5.jpg
Views:	129
Size:	116.7 KB
ID:	145017  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #16  
Old 17 Nov 2014, 23:42
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
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
__________________
Thanks for your help

J
Reply With Quote
  #17  
Old 18 Nov 2014, 12:58
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
What version of PHP are you running?
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #18  
Old 19 Nov 2014, 22:35
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
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.
__________________
Thanks for your help

J
Reply With Quote
  #19  
Old 20 Nov 2014, 11:53
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
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.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #20  
Old 26 Nov 2014, 17:37
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
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!
__________________
Thanks for your help

J
Reply With Quote
  #21  
Old 30 Nov 2014, 15:13
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Try this- in the Check if Banned - VB4 Code plugin

Find the line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Below that add the line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Save changes. See if that helps- it's the only thin I can imagine is that somehow a secondary group is overriding the ban so this will clear the secondary groups.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #22  
Old 04 Dec 2014, 17:17
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
Originally Posted by BirdOPrey5 View Post
Try this- in the Check if Banned - VB4 Code plugin

Find the line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Below that add the line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Save changes. See if that helps- it's the only thin I can imagine is that somehow a secondary group is overriding the ban so this will clear the secondary groups.
Thanks I shall try it!
__________________
Thanks for your help

J
Reply With Quote
  #23  
Old 20 Jan 2015, 00:21
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
Sorry that never worked, its still happening with Registered Only in a custom usergroup still being able to post in their banned time

13734 | 22:00 | 6:30

Registered user 13734 should be banned 10pm till 630am?

They have just posted at 120am
__________________
Thanks for your help

J
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 10:08.

Layout Options | Width: Wide Color: