Skip to content

Commit

Permalink
Adding v0.7 from SVN.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jukka Svahn committed Feb 2, 2012
1 parent 29a30d4 commit d13001e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 22 deletions.
5 changes: 3 additions & 2 deletions code.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php ##################
#
# rah_comment_spam-plugin for Textpattern
# version 0.6
# version 0.7
# by Jukka Svahn
# http://rahforum.biz
#
Expand Down Expand Up @@ -76,7 +76,7 @@ function rah_comment_spam_install($event='',$step='') {
$textarray[$name] = $translation;
}

$version = '0.6';
$version = '0.7';

$current = isset($prefs['rah_comment_spam_version']) ?
$prefs['rah_comment_spam_version'] : 'base';
Expand Down Expand Up @@ -198,6 +198,7 @@ function rah_comment_spam_install($event='',$step='') {
*/

set_pref('rah_comment_spam_version',$version,'rah_cspam',2,'',0);
$prefs['rah_comment_spam_version'] = $version;
}

/**
Expand Down
63 changes: 43 additions & 20 deletions help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ h1. rah_comment_spam

p. Rah_comment_spam provides customizable anti-spam tools for "Textpattern's":http://www.textpattern.com comment system. Set minimum and maximum message length, filter spam words, validate email addresses, limit posting activity and set hidden spam traps. All from simple admin-side graphical user interface, no head first dive to code.

* Version: 0.6
* Updated: 2011/09/09 2:40 PM UTC
* Version: 0.7
* Updated: 2011/11/03 11:40 PM UTC

h3. Table of Contents

Expand Down Expand Up @@ -51,44 +51,67 @@ h3(#preferences). Preferences

p. Looking at the Preference's panel's _Comments_ section, you should see set of options that weren't there before. Those are the options that the plugin offers. In total, there should be around 18 new toggle-able items. The offered plugin's options are as follows.

p. *What to do comments detected as spam?* option sets the action that is taken towards to comments flagged as a spam. There are three options you can choose from. The default option is _Save to moderation queue_ which saves the comments to moderation queue. The detected comments won't be visible to public, but are saved to moderation queue, and can be manually confirmed. The second option _Ignore, do not save_ blocks the comments. The comments won't be saved and the user is greeted with the message set in _Message displayed to the user when the comment was blocked_ option. The third and last option _Save and flag as spam_ saves the detected comment to the database as spam.
p. *What to do comments detected as spam?*
The option sets the action that is taken towards to comments flagged as a spam. There are three options you can choose from. The default option is _Save to moderation queue_ which saves the comments to moderation queue. The detected comments won't be visible to public, but are saved to moderation queue, and can be manually confirmed. The second option _Ignore, do not save_ blocks the comments. The comments won't be saved and the user is greeted with the message set in _Message displayed to the user when the comment was blocked_ option. The third and last option _Save and flag as spam_ saves the detected comment to the database as spam.

p. *Message displayed to the user when the comment was blocked* sets the message that is shown to users when their comment is blocked by the filters. The message is only used when the protection method above is set to _Ignore, do not save_. With others, Textpattern's build in language strings are used.
p. *Message displayed to the user when the comment was blocked*
Sets the message that is shown to users when their comment is blocked by the filters. The message is only used when the protection method above is set to _Ignore, do not save_. With others, Textpattern's build in language strings are used.

p. *List of spam words* sets words/terms that are considered as something that spam would contain. Separate multiple words with commas (@,@). Used words are incase-sensitive. Example value: @viagra, wares, wowgold@.
p. *List of spam words*
Sets words/terms that are considered as something that spam would contain. Separate multiple words with commas (@,@). Used words are incase-sensitive. Example value: @viagra, wares, wowgold@.

p. *Search spam words from following fields* sets which fields are filtered for spam words. Use comma-separated list of field names. Available values are @name@, @email@, @web@ and @message@. Default option is @name, email, web, message@.
p. *Search spam words from following fields*
Sets which fields are filtered for spam words. Use comma-separated list of field names. Available values are @name@, @email@, @web@ and @message@. Default option is @name, email, web, message@.

p. *Maximum number of spam words until the comment is considered as spam* sets the maximum number of spam words a comment can have until it's considered as spam. The lower the number, the stricter the filter is. Recommended value is between 2 to 10.
p. *Maximum number of spam words until the comment is considered as spam*
Sets the maximum number of spam words a comment can have until it's considered as spam. The lower the number, the stricter the filter is. Recommended value is between 2 to 10.

p. *Number of allowed URLs* option sets comment message's URL limit. If a comment contains more URLs than the options allows, the comment is considered as spam.
p. *Number of allowed URLs*
Option sets comment message's URL limit. If a comment contains more URLs than the options allows, the comment is considered as spam.

p. *Minimum number of words* required minimum length of comment message in words. Shorter messages are considered as spam. Recommended value is @1@ to @3@.
p. *Minimum number of words*
Required minimum length of comment message in words. Shorter messages are considered as spam. Recommended value is @1@ to @3@.

p. *Maximum number of words* maximum length of comment message in words. Longer messages are considered as spam. Note that message's total size is limited to 65535 bytes (equals to around 65535 ASCII characters).
p. *Maximum number of words*
Maximum length of comment message in words. Longer messages are considered as spam. Note that message's total size is limited to 65535 bytes (equals to around 65535 ASCII characters).

p. *Minimum number of characters* required minimum length of comment in characters. Shorter messages are considers as spam. Recommended setting is @1@ to @10@.
p. *Minimum number of characters*
Required minimum length of comment in characters. Shorter messages are considers as spam. Recommended setting is @1@ to @10@.

p. *Maximum number of characters* maximum length of comment in characters. Longer messages are considers as spam. Note that message's total size is limited to 65535 bytes. Valid values range from 0 to 65535 (equals to around 65535 ASCII characters).
p. *Maximum number of characters*
Maximum length of comment in characters. Longer messages are considers as spam. Note that message's total size is limited to 65535 bytes. Valid values range from 0 to 65535 (equals to around 65535 ASCII characters).

p. *Name of hidden spam trap field* if set, adds spam hidden spam trap to the comment form. The field will be hidden with CSS, and if it is filled, the comment is considered as spam. Default is _phone_. Empty the field to disable the spam trap.
p. *Name of hidden spam trap field*
If set, hidden spam trap field is added to the comment form. The field will be hidden with CSS, and if the field is filled, the comment is considered as spam. Default value is _phone_. Empty the field to disable the spam trap.

p. *Use quotas, limit users' comment posting activity?* if set to _Yes_, users comment posting activity is limited. Comments going over the quota are considered as spam. Users are identified by IP addresses.
p. *Use quotas, limit users' comment posting activity?*
If set to _Yes_, users comment posting activity is limited. Comments going over the quota are considered as spam. Users are identified by IP addresses.

p. *Users' comment quota limit* sets the user's quota limit. Default is ten (@10@) comments per user.
p. *Users' comment quota limit*
Sets the user's quota limit. Default is ten (@10@) comments per user.

p. *Count users' comments towards quota in* sets which comments in which articles are counted towards the quota limit. By default user's comments in any article are taken into count. Available settings are _In all articles_, counts comments site-wide, and _In current article_ which counts only comments in the current article the new comment is being posted to.
p. *Count users' comments towards quota in*
Sets which comments in which articles are counted towards the quota limit. By default user's comments in any article are taken into count. Available settings are _In all articles_, counts comments site-wide, and _In current article_ which counts only comments in the current article the new comment is being posted to.

p. *Quota resets every number of seconds* sets the timespan used in the activity limiting. Comments older than this are not counted towards the quota limit. The time is set in seconds. For example setting the option to @600@, would count an user's comments from the last ten minutes, and if the number goes over the quota, then the comment is considered as spam.
p. *Quota resets every number of seconds*
Sets the timespan used in the activity limiting. Comments older than this are not counted towards the quota limit. The time is set in seconds. For example setting the option to @600@, would count an user's comments from the last ten minutes, and if the number goes over the quota, then the comment is considered as spam.

p. *Check email's DNS records?* if set _Yes_, email address' DNS records are checked. If the domain is found to be non-existent, the comment is considered as spam. The feature requires "checkdnsrr()":http://php.net/manual/en/function.checkdnsrr.php function and the server must be allowed to make outgoing connections.
p. *Check email's DNS records?*
If set _Yes_, email address' DNS records are checked. If the domain is found to be non-existent, the comment is considered as spam. The feature requires "checkdnsrr()":http://php.net/manual/en/function.checkdnsrr.php function and the server must be allowed to make outgoing connections.

p. *Check the time user spent writing the comment?* makes sure that the user spent set amount of time writing the comment. Instant posters will be treated as spammers. Usually it's recommended to keep this feature disabled. It can accidentally block fast writers if the required time is set to too high, but it can also successfully block spam bots which might try to post comments instantly, without interacting with the comment form. The time is counted from the initial article page load to the comment's submitting.
p. *Check the time user spent writing the comment?*
Makes sure that the user spent set amount of time writing the comment. Instant posters will be treated as spammers. Usually it's recommended to keep this feature disabled. It can accidentally block fast writers if the required time is set to too high, but it can also successfully block spam bots which might try to post comments instantly, without interacting with the comment form. The time is counted from the initial article page load to the comment's submitting.

p. *Minimum time required to be spent writing a comment?* sets the required interaction time in seconds. Default is @5@. Higher values are not recommended usability-wise. If you set the value higher than 5 seconds, consider adding JavaScript based counter to the comment form that informs the users how much they have to wait. For counters I recommend checking out "jQuery's plugin repository":http://plugins.jquery.com/plugin-tags/countdown.
p. *Minimum time required to be spent writing a comment?*
Sets the required interaction time in seconds. Default is @5@. Higher values are not recommended usability-wise. If you set the value higher than 5 seconds, consider adding JavaScript based counter to the comment form that informs the users how much they have to wait. For counters I recommend checking out "jQuery's plugin repository":http://plugins.jquery.com/plugin-tags/countdown.

h3(#changelog). Changelog

p. *Version 0.7*

* Fixed: Update cached version number after running the installer.
* Updated help file.

p. *Version 0.6*

* Fixed: Comment quota limit's _In current article_ option. Previously counting didn't work when the _in current article_ option was selected.
Expand Down

0 comments on commit d13001e

Please sign in to comment.