URLess
Release 1.0
______________________________________________________________
DESCRIPTION
The URLess plugin provides a new comment policy option:
to disallow anonymous (unauthenticated) commenters from leaving
links within their comments. Since this is a common signature
of blog spam, this is an effective way to eliminate most all
comment spam you receive.
Anything that does get by this plugin will be filtered by MT's
regular antispam filters.
______________________________________________________________
REQUIREMENTS
This plugin is supported on Movable Type 3.3 and later.
If you are using an older version of Movable Type, we
strongly suggest upgrading to the latest release.
______________________________________________________________
INSTALLATION
To install URLess, install the following file within your MT
directory:
plugins/URLess/URLess.pl
Note that if you are upgrading from a previous release of this
plugin, you should remove the old version first to avoid having
two copies installed that may conflict with one another.
In addition to installing the plugin files, you should also
modify your weblog templates to hide the URL input field for
unauthenticated commenters and reveal it for authenticated
commenters once they sign in. The changes to MT's default
templates are as follows:
1) Wrap the "
" tag surrounding the "URL" input field
like so:
2) You may also want to customize the note displayed when
allowing HTML tags to specify that links are only permitted
for authenticated commenters:
(you may use HTML tags for style,
but you can only add links if you've signed in)
3) Update your Site Javascript template and the
"individualArchivesOnLoad" function in it to be like this:
function individualArchivesOnLoad(commenter_name) {
hideDocumentElement('comments-open');
hideDocumentElement('trackbacks-info');
if (commenter_name) {
hideDocumentElement('name-email');
// ONLY display the URL field for authenticated commenters
showDocumentElement('commenter-url');
showDocumentElement('comments-open-text');
showDocumentElement('comments-open-footer');
} else {
// Hide the URL field from anonymous commenters
hideDocumentElement('commenter-url');
hideDocumentElement('comments-open-data');
hideDocumentElement('comments-open-text');
hideDocumentElement('comments-open-footer');
}
// comments are allowed but not required
if (commenter_name) {
hideDocumentElement('name-email');
// ONLY display the URL field for authenticated commenters
showDocumentElement('commenter-url');
} else {
showDocumentElement('name-email');
// Hide the URL field from anonymous commenters
hideDocumentElement('commenter-url');
}
var mtcmtauth;
var mtcmthome;
if (document.comments_form) {
if (!commenter_name && (document.comments_form.email != undefined) &&
(mtcmtmail = getCookie("mtcmtmail")))
document.comments_form.email.value = mtcmtmail;
if (!commenter_name && (document.comments_form.author != undefined) &&
(mtcmtauth = getCookie("mtcmtauth")))
document.comments_form.author.value = mtcmtauth;
if (commenter_name && (document.comments_form.url != undefined) &&
(mtcmthome = getCookie("mtcmthome")))
// ONLY set the url from a cookie for trusted commenters!
document.comments_form.url.value = mtcmthome;
if (document.comments_form["bakecookie"]) {
if (mtcmtauth || mtcmthome) {
document.comments_form.bakecookie.checked = true;
} else {
document.comments_form.bakecookie.checked = false;
}
}
}
}
With these changes in place, enable the plugin within
the plugin listing for the weblog(s) you wish it to run
on.
4) Rebuild your Site Javascript template and individual
archives to publish these changes.
______________________________________________________________
UNINSTALLATION
To remove this plugin, just remove the directories and files above.
You will also want to revert the changes you have made to your
Individual Archive and Site Javascript templates.
______________________________________________________________
LICENSE
This plugin is released under the Artistic License.
The text of this license can be found in the LICENSE.txt
file included with this archive. It is also available here:
http://www.opensource.org/licenses/artistic-license.php
______________________________________________________________