Firefox PHP

Module: Content Restrictions

Posted by sheik 
All files from this thread

File Name File Size   Posted by Date  
admin_screen_1.0.0.png 31.6 KB open | download sheik 10/17/2012 Read message
content_restrictions_1.0.1.zip 7.5 KB open | download sheik 10/29/2012 Read message
content_restrictions_1.0.3.zip 8.2 KB open | download sheik 08/20/2013 Read message
french.php 930 bytes open | download Yves Julien 01/13/2014 Read message
Module: Content Restrictions
October 17, 2012 06:54AM
Changelog::

2013-08-20 v1.0.3

- treat raw email addresses as hyperlinks

2013-08-20 v1.0.2

- bugged release, sorry!


2012-29-10 v1.0.1

- Added support to enter -1 to indicate no links are allowed


2012-17-10 v1.0.0

- Initial revision

From the ReadMe:

This module implements configurable features for enforcing message content restrictions,
for example, to stop new users spamming your forum with lots of links.

Restrictions are configurable based on three types of user:
- Unregistered
- Newly registered
- Registered

[notes on the design of this module can be seen at [www.phorum.org]]

Available restrictions are:

Number of hyperlinks in any one message
Please note, for the purposes of this module, hyperlinks are considered to be clickable links or non clickable strings of the form www.somesite... or test@domain.com

Size of message in bytes
Suggested values could be 5000, 10000 and 30000 for unregistered, newly registered and registered respectively.
For 8 bit encoded text, you can assume that bytes = characters, for unicode characters one character may equal more than one byte.
That is why I have specified "bytes" rather than "characters".

Just to confuse matters more, note if your host uses PHP's multibyte string overrides these values may represent characters instead of bytes.
However, Phorum's core uses the same method as I am (it tests against the hard-coded limit in constants.php, which defaults to 65000).


Remove Restrictions for Premium Subscribers
This option requires the Subscribers module to be installed.
If you have installed this module, presumably your Premium Subscribers are trusted, so you can choose to remove all of the restrictions from this module for those users.
If you haven't installed the subscribers module you can ignore this setting.

I'm interested to know if anyone uses this module, so please let me know by posting here.

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz




Edited 11 time(s). Last edit at 08/20/2013 10:34AM by sheik.


Attachments:
open | download - content_restrictions_1.0.1.zip (7.5 KB)
open | download - content_restrictions_1.0.3.zip (8.2 KB)
Re: Module: Content Restrictions
October 19, 2012 12:53PM
I'm thinking it would be a nice addition for this module to prevent newly registered users from making multiple posts within a configurable timeframe.

This would stop spammers using an automated script to flood a forum with dozens of posts per minute.

Even putting a 60 second restriction in place would slow down such a script.

Any thoughts?

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: Module: Content Restrictions
August 20, 2013 06:30AM
Can somebody please post some sample code to find out how many posts a registered user has made in the past x minutes?

Thanks,

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: Module: Content Restrictions
August 20, 2013 12:06PM
A minor new version for this module was released today, see first post for details.
I'd really like some pointers on how to pull back a given user's post count in the previous x minutes though as that would help prevent some recent spam floods I've been getting.

Can anyone help?

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: Module: Content Restrictions
August 20, 2013 01:49PM
Are you using the "Spam Hurdles Module"?
Has settings to prevent messages from being posted too quickly. Might be able to change the delay required with a (hack).
Has captcha that may be turned on.

Are you using the "Stop Forum Spam" module?
Checks for known spam email and IP's on registration. Note, this is intended for registrations only, not for every post. StopForumSpam's rule.

zbblock from Spambotsecurity.com (protects php scripts)
I recommend this for all Phorum installs. Over 8 months using, and I am comfortable with it.
Keeps a local database of spam IP's from StopForumSpam and prevents those users/bots from posting.
Stops injection (and other) attacks, and adds the IP to a permanent ban database.
Has the ability, and comes configured to block whole ranges of IP's known to host spammers (including China), other files available that don't block China and some other countries.
Checks photos and files for executable code and scripts.
Re: Module: Content Restrictions
August 22, 2013 05:08AM
Thanks Scott, I am using SpamHurdles and Stop Forum Spam.
I liked the idea of looking at the SpamHurdles code to achieve what I want but unfortunately the "delay check" code in that module is Javascript based, it doesn't look at the DB timestamps at all.

What I would like to be able to do is use the Phorum API to return the number of posts the user has made in the past x minutes. Unfortunately I don't have time right now to research this from scratch.
This would make the job of a manual spammer much more time-consuming (I'm pretty sure my current spam is coming from humans rather than bots)

I don't use zbblock, thank you for the recommendation. When I have more time I will check it out. It won't be a straightforward decision for me as it seems to ship by default with aggressive filtering for Chinese IPs. My site is a Chinese Learning one, so that isn't ideal! I see they offer alternative config files though so I will investigate.

Thanks again,

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: Module: Content Restrictions
August 22, 2013 01:18PM
zbblock has a registration limiting delay built in, by default it is off. It may be beneficial to modify it for posting.

I will enquire on heir forum.

Scott
Re: Module: Content Restrictions
September 11, 2013 04:52AM
Hi sheik!

Is it possible to add "activate moderation checkbox" to new users?
It will be nice to see what new users want to write before they post anything...

Tom
Re: Module: Content Restrictions
January 13, 2014 11:59AM
Hi Sheik,

I just install the module. It works, THANKS !

I translated the language file in French. Included is the french.php file.

Thanks for you help,

Yves



Edited 3 time(s). Last edit at 01/13/2014 06:52PM by Yves Julien.
Attachments:
open | download - french.php (930 bytes)
Sorry, only registered users may post in this forum.

Click here to login