summaryrefslogtreecommitdiff
path: root/plugins/Mollom
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2010-01-06 00:20:15 -0500
committerCraig Andrews <candrews@integralblue.com>2010-01-06 00:20:15 -0500
commit3b5299b5ca327bab1013e23b6284ce92bea6db04 (patch)
treeededcfb18bf1d1bae632d52e9e9304d02cc01495 /plugins/Mollom
parent76cc791642020084202ef261b3278eb99cf94ec7 (diff)
Use plugin configuration instead of common_config()
Diffstat (limited to 'plugins/Mollom')
-rw-r--r--plugins/Mollom/MollomPlugin.php16
-rw-r--r--plugins/Mollom/README14
2 files changed, 17 insertions, 13 deletions
diff --git a/plugins/Mollom/MollomPlugin.php b/plugins/Mollom/MollomPlugin.php
index f89910ae5..4c82c481a 100644
--- a/plugins/Mollom/MollomPlugin.php
+++ b/plugins/Mollom/MollomPlugin.php
@@ -69,13 +69,13 @@ define('MOLLOM_REDIRECT', 1200);
class MollomPlugin extends Plugin
{
- function __construct($url=null) {
- parent::__construct();
- }
+ public $public_key;
+ public $private_key;
+ public $servers;
function onStartNoticeSave($notice)
{
- if (common_config('mollom', 'public_key')) {
+ if ( $this->public_key ) {
//Check spam
$data = array(
'post_body' => $notice->content,
@@ -123,9 +123,9 @@ class MollomPlugin extends Plugin
}
// Construct the server URL:
- $public_key = common_config('mollom', 'public_key');
+ $public_key = $this->public_key;
// Retrieve the list of Mollom servers from the database:
- $servers = common_config('mollom', 'servers');
+ $servers = $this->servers;
if ($servers == NULL) {
// Retrieve a list of valid Mollom servers from mollom.com:
@@ -205,8 +205,8 @@ class MollomPlugin extends Plugin
*/
private function authentication() {
- $public_key = common_config('mollom', 'public_key');
- $private_key = common_config('mollom', 'private_key');
+ $public_key = $this->public_key;
+ $private_key = $this->private_key;
// Generate a timestamp according to the dateTime format (http://www.w3.org/TR/xmlschema-2/#dateTime):
$time = gmdate("Y-m-d\TH:i:s.\\0\\0\\0O", time());
diff --git a/plugins/Mollom/README b/plugins/Mollom/README
index 210e9000b..2b8c2d8a0 100644
--- a/plugins/Mollom/README
+++ b/plugins/Mollom/README
@@ -1,3 +1,5 @@
+The mollom plugin uses mollom.com to filter SN notices for spam.
+
== Dependencies ==
Your webserver needs to have xmlrpc php extention loaded.
This is called php5-xmlrpc in Debian/Ubuntu
@@ -5,11 +7,13 @@ This is called php5-xmlrpc in Debian/Ubuntu
== Installation ==
Add the following to your config.php
<?php
-addPlugin('Mollom');
-
-$config['mollom']['public_key'] = '...';
-$config['mollom']['private_key'] = '...';
-$config['mollom']['servers'] = array('http://88.151.243.81', 'http://82.103.131.136');
+addPlugin('Mollom',
+ array(
+ 'public_key' => '...',
+ 'private_key' => '...',
+ 'servers' => array('http://88.151.243.81', 'http://82.103.131.136')
+ )
+);
?>