1
0

Document changes in spamblock plugin

This commit is contained in:
Garvin Hicking
2009-01-19 11:57:03 +00:00
parent ed1bfd638a
commit 90e6b3ac25
4 changed files with 47 additions and 14 deletions

View File

@ -121,3 +121,10 @@
@define('PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL_VERIFICATION_ALWAYS', 'Immer best<73>tigen');
@define('PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL_VERIFICATION_MAIL', 'Sie erhalten nun eine E-Mail-Benachrichtigung, mit der Sie ihren Kommentar freischalten k<>nnen.');
@define('PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL_VERIFICATION_INFO', 'Um einen Kommentar hinterlassen zu k<>nnen, erhalten Sie nach dem Kommentieren eine E-Mail mit Aktivierungslink an ihre angegebene Adresse.');
@define('PLUGIN_EVENT_SPAMBLOCK_AKISMET_SERVER', 'Antispam-Server');
@define('PLUGIN_EVENT_SPAMBLOCK_AKISMET_SERVER_DESC', 'F<>r welchen Antispam-Server soll obiger API-Key gelten? Die anonymisierten Varianten bedeuten, dass alle <20>bertragenen Daten zu den Antispam-Servern keine Angabe von Name oder E-Mail-Adresse enthalten. Dies reduziert jedoch auch die Spam-Erkennungsrate.');
@define('PLUGIN_EVENT_SPAMBLOCK_SERVER_TPAS', 'TypePad Antispam');
@define('PLUGIN_EVENT_SPAMBLOCK_SERVER_AKISMET', 'Akismet');
@define('PLUGIN_EVENT_SPAMBLOCK_SERVER_TPAS_ANON', 'TypePad Antispam (anonymisiert)');
@define('PLUGIN_EVENT_SPAMBLOCK_SERVER_AKISMET_ANON', 'Akismet (anonymisiert)');

View File

@ -105,10 +105,6 @@
@define('PLUGIN_EVENT_SPAMBLOCK_HIDE', 'Disable spamblock for Authors');
@define('PLUGIN_EVENT_SPAMBLOCK_HIDE_DESC', 'You can allow authors in the following usergroups to post comments without them being checked by the spamblock plugin.');
@define('PLUGIN_EVENT_SPAMBLOCK_AKISMET_SERVER', 'Akismet server');
@define('PLUGIN_EVENT_SPAMBLOCK_AKISMET_SERVER_DESC', 'Which server is the above key registered for?');
@define('PLUGIN_EVENT_SPAMBLOCK_SERVER_TPAS', 'TypePad Antispam');
@define('PLUGIN_EVENT_SPAMBLOCK_SERVER_AKISMET', 'Original Akismet');
@define('PLUGIN_EVENT_SPAMBLOCK_AKISMET', 'Akismet API Key');
@define('PLUGIN_EVENT_SPAMBLOCK_AKISMET_DESC', 'Akismet is an anti-spam and blacklisting protocol. It can analyze your incoming comments and check if that comment has been listed as Spam. Two servers are supported: the original Akismet server, and the TypePad Antispam (TPAS) Open Source server. To use the Akismet server, you must register for an account at http://www.wordpress.com/. To use the TPAS server, you must optain a free key from http://antispam.typepad.com/. If you leave the key blank, Akismet will not be used to check spam.');
@define('PLUGIN_EVENT_SPAMBLOCK_AKISMET_FILTER', 'How to treat Akismet-reported spam');
@ -137,3 +133,10 @@
@define('PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL_VERIFICATION_ALWAYS', 'Confirm always');
@define('PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL_VERIFICATION_MAIL', 'You will now receive an email notification with which you can approve your comment.');
@define('PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL_VERIFICATION_INFO', 'To leave a comment you must approve it via e-mail, which will be sent to your address after submission.');
@define('PLUGIN_EVENT_SPAMBLOCK_AKISMET_SERVER', 'Anti-spam server');
@define('PLUGIN_EVENT_SPAMBLOCK_AKISMET_SERVER_DESC', 'Which server is the above key registered for? Anonymized means that all data submitted to the services is stripped of the usernames and mail addresses. This also reduces spam detection rates, though.');
@define('PLUGIN_EVENT_SPAMBLOCK_SERVER_TPAS', 'TypePad Antispam');
@define('PLUGIN_EVENT_SPAMBLOCK_SERVER_AKISMET', 'Original Akismet');
@define('PLUGIN_EVENT_SPAMBLOCK_SERVER_TPAS_ANON', 'TypePad Antispam (anonymized)');
@define('PLUGIN_EVENT_SPAMBLOCK_SERVER_AKISMET_ANON', 'Original Akismet (anonymized)');

View File

@ -39,7 +39,7 @@ var $filter_defaults;
'smarty' => '2.6.7',
'php' => '4.1.0'
));
$propbag->add('version', '1.71');
$propbag->add('version', '1.72');
$propbag->add('event_hooks', array(
'frontend_saveComment' => true,
'external_plugin' => true,
@ -263,10 +263,12 @@ var $filter_defaults;
// to akismet. Otherwise, encourage adoption of the Open
// Source alternative, TypePad Antispam.
$curr_key = $this->get_config('akismet', false);
$propbag->add('default', (empty($curr_key)?'akismet':'tpas'));
$propbag->add('default', (empty($curr_key) ? 'akismet' : 'tpas'));
$propbag->add('radio', array(
'value' => array('tpas', 'akismet'),
'desc' => array(PLUGIN_EVENT_SPAMBLOCK_SERVER_TPAS, PLUGIN_EVENT_SPAMBLOCK_SERVER_AKISMET)
'value' => array('tpas', 'akismet', 'anon-tpas', 'anon-akismet'),
'desc' => array(PLUGIN_EVENT_SPAMBLOCK_SERVER_TPAS, PLUGIN_EVENT_SPAMBLOCK_SERVER_AKISMET,
PLUGIN_EVENT_SPAMBLOCK_SERVER_TPAS_ANON, PLUGIN_EVENT_SPAMBLOCK_SERVER_AKISMET_ANON
)
));
$propbag->add('radio_per_row', '1');
@ -484,14 +486,28 @@ var $filter_defaults;
// where no server was set
$server_type = $this->get_config('akismet_server', 'akismet');
$server = '';
$anon = false;
switch ($server_type) {
case 'tpas':
$server = 'api.antispam.typepad.com';
break;
case 'akismet':
$server = 'rest.akismet.com';
break;
case 'anon-tpas':
$anon = true;
case 'tpas':
$server = 'api.antispam.typepad.com';
break;
case 'anon-akismet':
$anon = true;
case 'akismet':
$server = 'rest.akismet.com';
break;
}
if ($anon) {
$data['comment_author'] = 'John Doe';
$data['comment_author_email'] = '';
$data['comment_author_url'] = '';
}
if (empty($server)) {
$this->log($this->logfile, $eventData['id'], 'AKISMET_SERVER', 'No Akismet server found', $addData);
$ret['is_spam'] = false;