Hi,
sorry about the delay, please find the sample code below:
Spam provider registration
<
AntiSpam
>
<
providers
>
<
add
name
=
"Akismet"
type
=
"MonoSoftware.Web.AntiSpam.AntiSpamProviders.Akismet.AkismetAntiSpamProvider, MonoSoftware.Web"
apiKey
=
""
/>
<
add
name
=
"Defensio"
type
=
"MonoSoftware.Web.AntiSpam.AntiSpamProviders.Defensio.DefensioAntiSpamProvider, MonoSoftware.Web"
apiKey
=
""
/>
</
providers
>
</
AntiSpam
>
using
System;
using
System.IO;
using
System.Text;
using
System.Net;
using
System.Xml;
using
System.Xml.XPath;
using
System.Data;
using
System.Configuration;
using
System.Web;
using
System.Web.Security;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Web.UI.WebControls.WebParts;
using
System.Web.UI.HtmlControls;
using
System.Collections.Specialized;
using
MonoSoftware.Web;
namespace
MonoSoftware.Web.AntiSpam.AntiSpamProviders.MyProvider
{
/// <summary>
/// Implementation of anti spam provider interface for Defensio.
/// </summary>
public
class
MyProvider : IAntiSpamProvider
{
#region IAntiSpamProvider Members
#region Properties
private
IAntiSpamContent _content =
null
;
/// <summary>
/// Gets or sets content entity.
/// </summary>
public
IAntiSpamContent Content
{
get
{
return
_content;
}
set
{
_content = value;
}
}
private
decimal
_spaminess = 0;
/// <summary>
/// Gets Spaminess factor.
/// </summary>
public
decimal
Spaminess
{
get
{
return
_spaminess;
}
}
private
string
_signature =
string
.Empty;
/// <summary>
/// Gets content signature.
/// </summary>
public
string
Signature
{
get
{
return
_signature;
}
}
#endregion
#region Constructor
/// <summary>
/// Constuctor.
/// </summary>
/// <param name="apiKey">API key.</param>
public
MyProvider(
string
apiKey)
{
}
#endregion
#region Methods
/// <summary>
/// Checks spam.
/// </summary>
/// <returns>True if the comment is spam, false otherwise.</returns>
public
bool
CheckSpam()
{
if
(Content ==
null
)
return
false
;
}
/// <summary>
/// Announces content post.
/// </summary>
public
void
AnnoncePost()
{
if
(Content ==
null
)
return
;
}
/// <summary>
/// Reports spam.
/// </summary>
public
void
ReportSpam()
{
if
(Content ==
null
)
return
;
}
/// <summary>
/// Reports ham.
/// </summary>
public
void
ReportHam()
{
if
(Content ==
null
)
return
;
}
#endregion
#endregion
}
}
"
Also, is there a way to flag a particular user for moderation, so all his/her posts are ending up in the moderation queue?" - there is no such functionality at the moment, so you will have to implement this yourself.
Regards