[geeklog-cvs] geeklog-1.3/plugins/spamx Developer.txt,1.1,1.2

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Wed Jan 26 06:19:55 EST 2005


Update of /var/cvs/geeklog-1.3/plugins/spamx
In directory www:/tmp/cvs-serv10019

Modified Files:
	Developer.txt 
Log Message:
Updated documentation to use the PLG_checkforSpam API call.


Index: Developer.txt
===================================================================
RCS file: /var/cvs/geeklog-1.3/plugins/spamx/Developer.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Developer.txt	3 Oct 2004 18:28:11 -0000	1.1
--- Developer.txt	26 Jan 2005 11:19:53 -0000	1.2
***************
*** 4,17 ****
  The code from comment.php can be used as an example of the call.
  
! // Let plugins have a chance to decide what to do before saving the comment.
! $someError = PLG_commentPreSave($comment,$_CONF['spamx']);
      
! // If a plugin returned an error, return it
! if ($someError) {
!     return $someError;
  }
  
  All that is required is to send the comment to spamx with the
! PLG_commentPreSave call.  The two parameters are the comment text itself and
  an action number with tells spamx what actions to take if spam is found. 
  You can use the built in actions by passing the sum of the numbers of the
--- 4,20 ----
  The code from comment.php can be used as an example of the call.
  
! // Let plugins have a chance to check for SPAM
! $result = PLG_checkforSpam ($comment, $_CONF['spamx']);
      
! // Now check the result and redirect to index.php if spam action was taken
! if ($result > 0) {
!     // notice no return value here to prevent spam based denial of service attack
!     echo COM_refresh ($_CONF['site_url'] . '/index.php?msg='
!                       . $result . '&plugin=spamx');
!     exit;
  }
  
  All that is required is to send the comment to spamx with the
! PLG_checkforSpam call.  The two parameters are the comment text itself and
  an action number with tells spamx what actions to take if spam is found. 
  You can use the built in actions by passing the sum of the numbers of the




More information about the geeklog-cvs mailing list