INSTALLING SPAMCLEAR
==========================

1- unzip everything in ecrire/tools/spamclear
2- activate the plugin in dotclear administration panel and then click on it
3- the plugin will setup the database and ask you to replace dotclear files
4- IMPORTANT: make a backup of your original inc/classes/class.blog.php
5- replace class.blog.php with the one in setup/inc/classes/
6- click continue on spamclear installation link
7- train your database


IF SOMETHING GOT MESSED UP
==========================
1- get the original file class.blog.php and put it back
2- make sure you know how to use phpmyadmin (or any mysql client) before
proceeding to the next step
3- remove tables that look like xxx_spam_wordfreqs and xxx_spam_categories.
xxx depend on your dotclear configuration
4- remove two columns from the comment table : spam and trained. Be careful not
to remove the whole table as this will completely remove all your comments
and trackbacks.


WHAT DID YOU CHANGED IN class.blog.php ?
======================================
Here is the diff. This is mainly to be able to get spam/training status
without the need to rewrite everything. Those changes won't affect the work of any other plugin (providen the fact that it didn't make changes to the same thing)


@@ -24,0 +25,2 @@
+// spam clear
+require_once dirname(__FILE__).'/../../ecrire/tools/spamclear/functions.php';
@@ -1814 +1816 @@
-	function getComments($post_id='',$order='ASC',$limit=NULL)
+	function getComments($post_id='',$order='ASC',$limit=NULL, $where ='')
@@ -1834,0 +1837,2 @@
+				// spam clear
+				'spam, trained,'.
@@ -1840,2 +1844,2 @@
-				'WHERE P.post_id = C.post_id '.
-				$reqPlus.
+				'WHERE ( P.post_id = C.post_id '.
+				$reqPlus. ' ) ' . $where . ' ' .
@@ -1922,0 +1927,7 @@
+		$filter = new SpamClear($this->con);
+		$spam = '0';
+		if($filter->isSpam($auteur . " " . $content)) {
+			$spam = '1';
+			$pub = false;
+		}
+		
@@ -1950 +1961 @@
-				'comment_trackback) VALUES '.
+				'comment_trackback, spam) VALUES '.
@@ -1959 +1970,2 @@
-				(integer) $trackback.') ';
+				(integer) $trackback.',' . 
+				(integer) $spam . ') ';
@@ -2662 +2674 @@
-?>
\ No newline at end of file
+?>

