Installing a module is easy: Create a modules subdirectory in your data directory, and put the Perl file in there. It will be loaded automatically.
I wrote my first module for OddMuse today, the Antispam Module. It is designed to locate email addresses within pages, and replace them with a masked version that will at least keep a few spambots off your back for a while. It isn’t foolproof, but it helps, and it is invisible to human visitors.
Whenever you include an email address:
It is replaced with an encoded version:
This encoded version is displayed normally by your web browser, but MIGHT be able to fool a few spambots…
Additionally, you can have the module automatically create mailto links for each address.
(In live use, this would be encoded, of course.)
Additionally, you can create more complicated links:
<a href="mailto:firstname.lastname@example.org">Email Me</a>
Currently, the regexp used to match email is:
$EmailRegExp = '[\w\.\-]+@([\w\-]+\.)+[\w]+';
I am sure that there is room to improve this…
If enabled, any email address found, not just those inside BracketText, will be masked
If enabled, any email address found, not just those inside BracketText, will be converted into a mailto link.