Expansion
UseMod:Wikipatch/AutoSignature, inspired about
http://www.oddmuse.org/cgi-bin/wiki/Signature_Extension.
{
my $signature = &GetParam("username", "");
my $linkedsig = "[[$signature]]";
+ my $timestamp = &TimeToText($Now);
if ( $signature eq "" ) {
$signature = "Guest" ;
$linkedsig = "''Guest''";
}
for ( $string ) {
s[ ^(:*)\s*~~~~ ][\n$1'''$signature $timestamp:''' ]xmg;
s[ ^(:*)\s*~~~ ][\n$1'''$signature:''' ]xmg;
+ s[ ~~~~\s*$ ][ -- $linkedsig $timestamp]xmg;
s[ ~~~\s*$ ][ -- $linkedsig ]xmg;
+ s[ ~~~~ ][ '''$signature $timestamp''' ]xg ;
s[ ~~~ ][ '''$signature''' ]xg;
+ s[ /metime (?!\w) ]['''$signature $timestamp''']xg; # You may want to comment out this one.
s[ /me (?!\w) ]['''$signature''']xg; # You may want to comment out this one.
}
}
--
JuanmaMP