Page 1 of 4

[ABD] Infractions

Posted: Fri Jun 27, 2014 8:34 pm
by rfdy
Extension Name: RFD/Infractions
Author:
RFDY RFDY area51

Extension Description:

Infractions extension allows setting custom numeric infraction or points for violation of forums rules. Infractions are set for a certain number of days. The extension allows for setting up rules to move users into various groups upon reaching infraction threshold.

Extension Version:

0.0.1

Requirements:

phpbb 3.1 RC2

Features:
  • Admin able to set infractions from the topic listing
  • Infractions can be set to any numeric value (points) and defined to persist for a specified number of days
  • Creating infractions rules which move people to phpbb groups once the user goes over pre-set number of points
  • Infractions show up on user info box (for admins) besides each post
  • Infractions administration panel for creating rules and setting up categories for often used infractions
  • User is PMed after an infraction is created
  • Admin can provide user details about the reason for infractions when issuing it
  • Admins have access to lists of infractions for easier management
Installation instructions:
  • create $phpbb_root/ext/rfd folder
  • cd $phpbb_root/ext/rfd
  • git clone https://github.com/rfdy/infractions.git
  • Go to admin panel -> customize -> extensions. Click on Enable for infractions
  • Go to user and groups -> infractions. Set rules URL to the correct value (used in the PM sent on an infraction)
  • Make sure your site name is set in General -> Board settings
Screenshots:

Creating an infraction
Image

Creating an infraction rule
Image

Listing infractions
Image

Creating an infraction type
Image

Seeing infractions on user's info section
Image

Extension Download: https://github.com/rfdy/infractions

Re: [DEV] Infractions

Posted: Fri Jun 27, 2014 11:03 pm
by Jessica
Great extension. Glad there's a 3.1 version

Re: [DEV] Infractions

Posted: Sat Jun 28, 2014 3:03 pm
by Darkness_demoN
Sounds interesting :) Cant wait to see it in action :)

Re: [DEV] Infractions

Posted: Sun Jun 29, 2014 8:07 pm
by rfdy
Thank you for the comments :) I've added images of what the interface looks like.

Re: [BETA] Infractions

Posted: Mon Jun 30, 2014 5:49 pm
by rfdy
Added URL to the code. The extension is now fully operational, please try, feedback is most welcome.

Re: [BETA] Infractions

Posted: Tue Jul 01, 2014 2:15 am
by Patrick W.
I would like to see this in action on my own board. What is the proper directory structure for this extension? Sorry if it is listed somewhere. I have looked and could not find anything

Re: [BETA] Infractions

Posted: Tue Jul 01, 2014 2:16 am
by rfdy
I've added it to the installation instructions on github, but I will add it to the top post as well, thanks for suggesting this!

Re: [BETA] Infractions

Posted: Tue Jul 01, 2014 7:57 am
by david63
I admit that I have not looked in detail at this extension but having just looked at the install instructions can I make a couple of suggestions.

1. The entering of the Forum Name in the language file should not be necessary as there is a config variable already there with that in it.

2. I would suggest that the other language edit, rules url, should be replaced by a config variable as there is a possibility that it will create problems with multiple language boards.

Also, as it is using the forum rules, will it integrate with EXreaction's Board Rules Extension?

Re: [BETA] Infractions

Posted: Tue Jul 01, 2014 10:57 am
by rfdy
Thanks David63.

The config consts are there only as a stopgap measure. This will be changed to take the values from config variables in the next revision of the extension. I wanted to get it out there faster for people to comment, and a bunch of hard coded values were noticed at the last second.

Using Board Rules Extension to get a forum rules url is an interesting suggestion, I will investigate to see how easy it will be to integrate.

Re: [RC] Infractions

Posted: Fri Jul 11, 2014 7:49 pm
by rfdy
New changes have been pushed to github. The main change was adding the option to configure rules url, the extension now also picks up the site name.

At this point the extension is functional according to the original features. I've changed it to RC.

Re: [RC] Infractions

Posted: Tue Jul 15, 2014 6:53 pm
by rfdy
Curious if anyone had a chance to try and if there is any feedback.

Re: [RC] Infractions

Posted: Tue Jul 15, 2014 7:35 pm
by tbackoff
Limited testing. I expect to be able to do some more in-depth testing later this week.

Re: [RC] Infractions

Posted: Tue Jul 15, 2014 8:29 pm
by rfdy
Thanks tmbackoff!

The extension is done, but we'll keep updating it as new 3.1 RCs are released.

Currently the only outstanding issue is with the cron. There is a jira against 3.1, because cli crons do not load extensions, which is needed to expire infractions.

Re: [RC] Infractions

Posted: Wed Jul 16, 2014 12:43 am
by Patrick W.
I have a few tests and I have found an issue.

I have an infraction, "Spamming". I have it set to give 10 points and expire in 8 days. When I go to apply this infraction to a user, the following come up when selecting "Spamming" from the list.

Points: 8
Expires in Days: 8

I have an infraction, "Posting Porn". I have it set to give 100 points and expire never. When I go to apply this infraction to a user, the following come up when selecting "Posting Porn" from the list.

Points: 0
Expires in Days: Greyed out with "Never expire" box checked

I have an infraction, "test". I have it set to give 120 points and expire in 10 days. When I go to apply this infraction to a user, the following come up when selecting "test" from the list.

Points: 10
Expires in Days: 10

It seems as though, from this test, that both fields are pulling from the expiration value. I am using the latest version of this extension and 3.1.

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

That being said, the group assignments work just as they should and apply the proper ranks and groups at the proper values. I had discounted this extension at the start but it seems like it can be a great addition!

Re: [RC] Infractions

Posted: Wed Jul 16, 2014 1:29 pm
by rfdy
Thanks Patrick,

We've recorded the issue and will post an update when resolved.