[Home]WikiPatches/AutoSignatureWithTimeStamp

UseModWiki | WikiPatches | RecentChanges | Preferences

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

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited November 22, 2009 9:03 am by JuanmaMP (diff)
Search: