but before Mediawiki::performRequestForTitle()
* wgMainPageTitle variable now available to JavaScript code to identify the main
page link, so it doesn't have to be extracted from the link URLs.
+* (bug 16836) Display preview of signature in user preferences and describe its use
=== Bug fixes in 1.16 ===
);
}
- global $wgMaxSigChars;
+ global $wgMaxSigChars, $wgParser;
+
+ // show a preview of the old signature first
+ $oldsigtext = $wgParser->preSaveTransform( "~~~", new Title , $user, new ParserOptions );
+ $oldsig = $wgParser->parse( $oldsigtext, new Title , new ParserOptions );
+ $m = array(); // remove <p> created by the parser (looks better without <p>)
+ if( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $oldsig->mText, $m ) ) $oldsig->mText = $m[1];
+
+ $defaultPreferences['oldsig'] =
+ array(
+ 'type' => 'info',
+ 'raw' => true,
+ 'label-message' => 'tog-oldsig',
+ 'default' => $oldsig->mText,
+ 'section' => 'personal/signature',
+ );
$defaultPreferences['nickname'] =
array(
'type' => $wgAuth->allowPropChange( 'nickname' ) ? 'text' : 'info',
array(
'type' => 'toggle',
'label-message' => 'tog-fancysig',
+ 'help-message' => 'prefs-help-signature', // show general help about signature at the bottom of the section
'section' => 'personal/signature'
);
-
+
## Email stuff
global $wgEnableEmail;
'tog-enotifminoredits' => 'E-mail me also for minor edits of pages',
'tog-enotifrevealaddr' => 'Reveal my e-mail address in notification e-mails',
'tog-shownumberswatching' => 'Show the number of watching users',
+'tog-oldsig' => 'Preview of existing signature: ',
'tog-fancysig' => 'Treat signature as wikitext (without an automatic link)',
'tog-externaleditor' => 'Use external editor by default (for experts only, needs special settings on your computer)',
'tog-externaldiff' => 'Use external diff by default (for experts only, needs special settings on your computer)',
'yourrealname' => 'Real name:',
'yourlanguage' => 'Language:',
'yourvariant' => 'Variant:', # only translate this message to other languages if you have to change it
-'yournick' => 'Signature:',
+'yournick' => 'New signature:',
+'prefs-help-signature' => 'Comments on talk pages should be signed with "~~~~" which will be converted into your signature and a timestamp.',
'badsig' => 'Invalid raw signature.
Check HTML tags.',
'badsiglength' => 'Your signature is too long.