Check if the deprecated hit_doublecheck_referer setting is set and then do not disable the AppendHitLog event. Also removes the old setting.
Redefinition of:
- Plugin::AfterInstall()
- Event handler: Called after the plugin has been installed.
boolean apply_nofollow(
&$data,
$Comment
)
|
|
Do we want to apply rel="nofollow" tag?
Parameters:
API Tags:
void BeforeCommentFormInsert(
&$params
)
|
|
Check for duplicate comments.
Parameters:
Redefinition of:
- Plugin::BeforeCommentFormInsert()
- Event handler: Called before a comment gets inserted through the public comment form.
Disable/Enable events according to settings.
"AppendHitLog" gets enabled according to check_url_referers setting. "BeforeTrackbackInsert" gets disabled, if we do not check for duplicate content.
Redefinition of:
- Plugin::BeforeEnable()
- Event handler: Called when the admin tries to enable the plugin, changes its configuration/settings and after installation.
void BeforeTrackbackInsert(
&$params
)
|
|
- Check for duplicate trackbacks.
Parameters:
Redefinition of:
- Plugin::BeforeTrackbackInsert()
- Event handler: called before a trackback gets recorded.
void double_check_referer(
$referer
)
|
|
This function gets called (as a shutdown function, if possible) and checks if the referering URL's content includes the current URL - if not it is probably spam!
On success, this methods records the hit.
Parameters:
API Tags:
void FilterCommentAuthor(
&$params
)
|
|
If we use "makelink", handle nofollow rel attrib.
Parameters:
API Tags:
Redefinition of:
- Plugin::FilterCommentAuthor()
- Event handler: called to filter the comment's author name (blog name for trackbacks)
void FilterCommentAuthorUrl(
&$params
)
|
|
Handle nofollow in author URL (if it's made clickable)
Parameters:
API Tags:
Redefinition of:
- Plugin::FilterCommentAuthorUrl()
- Event handler: called to filter the comment's author URL.
void FilterCommentContent(
&$params
)
|
|
Handle nofollow rel attrib in comment content.
Parameters:
API Tags:
Redefinition of:
- Plugin::FilterCommentContent()
- Event handler: called to filter the comment's content
void GetDefaultSettings(
)
|
|
Redefinition of:
- Plugin::GetDefaultSettings()
- Define here default settings that are then available in the backoffice.
void GetSpamKarmaForComment(
&$params
)
|
|
Handle max_number_of_links_feedback setting.
Try to detect as many links as possible
Parameters:
Redefinition of:
- Plugin::GetSpamKarmaForComment()
- Event handler: Called to ask the plugin for the spam karma of a comment.
void is_duplicate_comment(
Comment
$Comment
)
|
|
Simple check for duplicate comment/content from same author
Parameters:
boolean is_referer_linking_us(
string
$referer, string
$uri
)
|
|
Check the content of a given URL (referer), if the requested URI (with different hostname variations) is present.
Parameters:
|
string |
$referer: |
|
|
string |
$uri: |
URI to append to matching pattern for hostnames |
Information Tags:
| Todo: | Use DB cache to avoid checking the same page again and again! (Plugin DB table) |
void ItemCanComment(
&$params
)
|
|
We check if this is an anonymous visitor and do not allow comments, if we're setup to do so.
Parameters:
Redefinition of:
- Plugin::ItemCanComment()
- Event handler: the plugin gets asked if an item can receive feedback/comments.
void PluginInit(
&$params
)
|
|
Init
Parameters:
Redefinition of:
- Plugin::PluginInit()
- Init the Plugin after it has been registered/instantiated.
true PluginVersionChanged(
&$params
)
|
|
A little housekeeping.
Parameters:
Redefinition of:
- Plugin::PluginVersionChanged()
- Event handler: Called when we detect a version change (in Plugins::register()).