Description
The Trackback moderation plugin marks trackbacks as not approved before they can be displayed to the user. This allows you to control that trackbacks on your site adhere to your specific trackback policy for your blog.
Installation and Setup
In your global /WEB-INF/plugin.properties file, add the following line:
trackback-moderation=org.blojsom.plugin.trackback.TrackbackModerationPlugin
You may then add "trackback-moderation" to one of the flavor-based plugin chains. The plugin must be placed before the trackback plugin. These plugin chains can be found in the individual user's plugin.properties file. For example:
html.blojsom-plugin-chain=..., trackback-moderation, trackback, ...
Login to your blog and navigate to the Weblog Settings | Properties and make sure the Trackback Moderation Enabled? setting is set to true.
Usage and URL Parameters
There are no URL parameters to control the operation of the Trackback moderation plugin.
Usage
In your template when you are outputting the trackbacks for an entry, you can check the individual trackback's meta-data to see if the trackback is approved or not. For trackbacks attached to an entry that have not been processed by the trackback moderation plugin, this meta-data will not be present. In that case, you should print out the trackback.
#foreach ($trackback in $entry.getTrackbacks())
#set ($trackbackApproved = $!trackback.getMetaData().get("BLOJSOM_TRACKBACK_MODERATION_PLUGIN_APPROVED").equals("true")
|| (!$!trackback.getMetaData().get("BLOJSOM_TRACKBACK_MODERATION_PLUGIN_APPROVED")))
#if ($trackbackApproved)
## Output trackback contents
#end
#end
To approve blog trackbacks, edit the specific entry in the administration console. On the page to edit the blog entry, you will be able to select the trackbacks to approve or delete.
Meta-Data Attributes and Types
The trackback moderation plugin adds meta-data to the blog trackback under they key, BLOJSOM_TRACKBACK_MODERATION_PLUGIN_APPROVED. Its value is a string that will either be true or false. If the trackback was not previously processed by the trackback moderation plugin, its value will be null.