<?php
// vim:filetype=php expandtab tabstop=2 softtabstop=2 shiftwidth=2 autoindent smartindent
// $Id: totoz.inc,v 1.9 2008/08/30 22:51:38 seeschloss Exp $
function tribune_coincoins_info() {
'description' => t("Highlights virtual ducks for more visibility"),
);
return $info;
}
function tribune_coincoins_filter_after(&$post, &$help) {
// if using the filter_after hook, the filter will be executed after the
// message is parsed, and will be able to add arbitrary HTML. The filter
// will also be executed when the admin hits the "Parse visible messages
// again" button and will not be able to post new messages.
// since this filter executes after a message is parsed, it has to use
// the 'parsed' index instead of the 'message' one.
$post['parsed'] = preg_replace(":((\\\\_([o0O@]|(ô)|(°)|(ø)|(ò)|(ó)|ô|°|ø|ò|ó)<)|(>([o0O@]|(ô)|(°)|(ø)|(ò)|(ó)|ô|°|ø|ò|ó)_/)|(coin ?! ?coin ?!)):",
"<em class='coincoin'>$1</em>",
$post['parsed']
);
}
function tribune_coincoins_help() {
drupal_add_css(drupal_get_path('module', 'tribune') .'/filters/coincoins.css');
return '';
}