Fancy sig option for the very nice folks who just aren't content with a user page...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 23 Dec 2004 08:40:51 +0000 (08:40 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 23 Dec 2004 08:40:51 +0000 (08:40 +0000)
includes/Parser.php
includes/SpecialPreferences.php
languages/Language.php

index 18e89d2..c06d5be 100644 (file)
@@ -2834,9 +2834,14 @@ class Parser
                        putenv( 'TZ='.$oldtzs );
                }
 
+               if( $user->getOption( 'fancysig' ) ) {
+                       $sigText = $k;
+               } else {
+                       $sigText = '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]]";
+               }
                $text = preg_replace( '/~~~~~/', $d, $text );
-               $text = preg_replace( '/~~~~/', '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]] $d", $text );
-               $text = preg_replace( '/~~~/', '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]]", $text );
+               $text = preg_replace( '/~~~~/', "$sigText $d", $text );
+               $text = preg_replace( '/~~~/', $sigText, $text );
 
                # Context links: [[|name]] and [[name (context)|]]
                #
index fa42656..fde18f2 100644 (file)
@@ -476,8 +476,10 @@ class PreferencesForm {
                        }
                }
                
+               $fancysig = $this->getToggle( 'fancysig' );
                $wgOut->addHTML("
                <div><label>$ynn: <input type='text' name=\"wpNick\" value=\"{$this->mNick}\" size='12' /></label></div>
+               <div>$fancysig<br /></div>
                <div><label>$yl: <select name=\"wpUserLanguage\">\n");
 
                /**
index 261e6bb..decf91d 100644 (file)
@@ -79,7 +79,8 @@ if(isset($wgExtraNamespaces)) {
        'enotifrevealaddr'      => 0,
        'shownumberswatching'   => 1,
        'rcusemodstyle'         => 1,
-       'showupdated'           => 1
+       'showupdated'           => 1,
+       'fancysig' => 0,
 );
 
 /* private */ $wgQuickbarSettingsEn = array(
@@ -155,6 +156,7 @@ define( 'MW_DATE_USER_FORMAT', true );
        'shownumberswatching',
        'rcusemodstyle',
        'showupdated',
+       'fancysig'
 );
 
 /* private */ $wgBookstoreListEn = array(
@@ -276,6 +278,7 @@ global $wgRightsText;
 'tog-shownumberswatching'      => 'Show the number of watching users (in recent changes view, watchlist and article page footers)',
 'tog-rcusemodstyle'            => 'Show recent changes in UseMod style: only the most recent change of any page is listed.',
 'tog-showupdated'              => 'Show update marker ',
+'tog-fancysig' => 'Raw signatures (without automatic link)',
 
 # dates
 'sunday' => 'Sunday',