\SSAkismet
The SSAkismet class provides spam detection for comments using http://akismet.com/.
In order to use it, you must get an API key, which you can get free for non-commercial use by signing
up for a http://www.wordpress.com account. Commercial keys can be bought at http://akismet.com/commercial/.
To enable spam detection, set your API key in _config.php.
The following lines should be added to **mysite/_config.php
(or to the _config.php in another folder if you're not using mysite).
<code>
SSAkismet::setAPIKey('<your-key>');
</code>
You can then view spam for a page by appending <i>?showspam=1</i> to the url, or use the in the CMS.
Synopsis
class SSAkismet
extends Akismet
{
- // methods
- public static void setAPIKey()
- public static void isEnabled()
- public static void setSaveSpam()
- public static void getSaveSpam()
- public void __construct()
- // Inherited methods from Akismet
- public void __construct()
- public void isCommentSpam()
- public void submitSpam()
- public void submitHam()
- public void setUserIP()
- public void setReferrer()
- public void setPermalink()
- public void setCommentType()
- public void setCommentAuthor()
- public void setCommentAuthorEmail()
- public void setCommentAuthorURL()
- public void setCommentContent()
- public void setAPIPort()
- public void setAkismetServer()
- public void setAkismetVersion()
Hierarchy
Extends
Members
private
- $apiKey
- $saveSpam
Methods
public
Inherited from Akismet
public
- isCommentSpam() — Tests for spam.
- setAPIPort() — Defaults to 80
- setAkismetServer() — Defaults to rest.akismet.com
- setAkismetVersion() — Defaults to '1.1'
- setCommentAuthor() — The name that the author submitted with the comment.
- setCommentAuthorEmail() — The email address that the author submitted with the comment.
- setCommentAuthorURL() — The URL that the author submitted with the comment.
- setCommentContent() — The comment's body text.
- setCommentType() — The type of comment being submitted.
- setPermalink() — A permanent URL referencing the blog post the comment was submitted to.
- setReferrer() — To override the referring page when submitting spam/ham later on
- setUserIP() — To override the user IP address when submitting spam/ham later on
- submitHam() — Submit ham that is incorrectly tagged as spam.
- submitSpam() — Submit spam that is incorrectly tagged as ham.