New message [[MediaWiki:Longpage-hint]] (empty per default) can be used instead.
Parameters: $1 shows the formatted textsize in Byte/KB/MB, $2 is the raw number of the textsize in Byte for calculation with PerserFunctions
(yes, I know that PerserFunctions are not in core, unfortunately, but every installation I know or attend have it)
* When viewing a redirect, the redirect arrow and redirection target are both
wrapped in a div that has the class "redirectMsg" so that the redirection
arrow can be customized with CSS
+* (bug 21911) Hard coded limit for long page warning removed. New message
+ [[MediaWiki:Longpage-hint]] (empty per default) can be used instead.
+ Parameters: $1 shows the formatted textsize in Byte/KB/MB, $2 is the raw
+ number of the textsize in Byte
=== Bug fixes in 1.17 ===
* (bug 17560) Half-broken deletion moved image files to deletion archive
}
if ( $this->tooBig || $this->kblength > $wgMaxArticleSize ) {
- $wgOut->addHTML( "<div class='error' id='mw-edit-longpageerror'>\n" );
- $wgOut->addWikiMsg( 'longpageerror', $wgLang->formatNum( $this->kblength ), $wgLang->formatNum( $wgMaxArticleSize ) );
- $wgOut->addHTML( "</div>\n" );
- } elseif ( $this->kblength > 29 ) {
- $wgOut->addHTML( "<div id='mw-edit-longpagewarning'>\n" );
- $wgOut->addWikiMsg( 'longpagewarning', $wgLang->formatNum( $this->kblength ) );
- $wgOut->addHTML( "</div>\n" );
+ $wgOut->wrapWikiMsg( "<div class='error' id='mw-edit-longpageerror'>\n$1\n</div>",
+ array( 'longpageerror', $wgLang->formatNum( $this->kblength ), $wgLang->formatNum( $wgMaxArticleSize ) ) );
+ } else {
+ $msg = 'longpage-hint';
+ $text = wfMsg( $msg );
+ if( !wfEmptyMsg( $msg, $text ) && $text !== '-' ) {
+ $wgOut->wrapWikiMsg( "<div id='mw-edit-longpage-hint'>\n$1\n</div>",
+ array( 'longpage-hint', $wgLang->formatSize( strlen( $this->textbox1 ) ), strlen( $this->textbox1 ) )
+ );
+ }
}
}
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see $1 for details).
'''Do not submit copyrighted work without permission!'''",
'editpage-tos-summary' => '-', # do not translate or duplicate this message to other languages
-'longpagewarning' => "'''Warning:''' This page is $1 kilobytes long;
-some browsers may have problems editing pages approaching or longer than 32kb.
-Please consider breaking the page into smaller sections.",
+'longpage-hint' => '-', # do not translate or duplicate this message to other languages
'longpageerror' => "'''Error: The text you have submitted is $1 kilobytes long, which is longer than the maximum of $2 kilobytes.'''
It cannot be saved.",
'readonlywarning' => "'''Warning: The database has been locked for maintenance, so you will not be able to save your edits right now.'''
'editpage-tos-summary',
'addsection-preload',
'addsection-editintro',
+ 'longpage-hint',
);
/** Optional messages, which may be translated only if changed in the target language. */
'copyrightwarning',
'copyrightwarning2',
'editpage-tos-summary',
- 'longpagewarning',
+ 'longpage-hint',
'longpageerror',
'readonlywarning',
'protectedpagewarning',