From 77034990f107308ff23c41f215d0a7a0d8b2ae48 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 27 Mar 2009 20:22:52 +0000 Subject: [PATCH] * (bug 17163) Added MediaWiki:Talkpage which will be displayed when viewing talk pages This will be very use on the French Wikipedia to display links to realted pages, e.g. deletion request without having to add a template on every talk page --- RELEASE-NOTES | 2 ++ includes/Article.php | 7 +++++++ languages/messages/MessagesEn.php | 1 + maintenance/language/messageTypes.inc | 1 + maintenance/language/messages.inc | 1 + 5 files changed, 12 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0a70d97a76..783f35377f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -151,6 +151,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Add a class if 'missingsummary' is triggered to allow styling of the summary line * Add CSS defintion of the 'wikitable' class to shared.css +* (bug 17163) Added MediaWiki:Talkpage which will be displayed when viewing talk + pages === Bug fixes in 1.15 === * (bug 16968) Special:Upload no longer throws useless warnings. diff --git a/includes/Article.php b/includes/Article.php index 4bebaa4765..9f39d377a8 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -865,6 +865,13 @@ class Article { } } + # Allow a specific header on talk pages, like [[MediaWiki:Talkpagetext]] + if( $this->mTitle->isTalkPage() ) { + if ( wfMsgForContent( 'talkpageheader' ) != '-' ) { + $wgOut->addWikiMsgArray( 'talkpageheader', array(), array( 'content' ) ); + } + } + $outputDone = false; wfRunHooks( 'ArticleViewHeader', array( &$this, &$outputDone, &$pcache ) ); if( $pcache && $wgOut->tryParserCache( $this ) ) { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index be6408c5ff..8ee63de72b 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -692,6 +692,7 @@ XHTML id names. 'otherlanguages' => 'In other languages', 'redirectedfrom' => '(Redirected from $1)', 'redirectpagesub' => 'Redirect page', +'talkpageheader' => '-', 'lastmodifiedat' => 'This page was last modified on $1, at $2.', # $1 date, $2 time 'viewcount' => 'This page has been accessed {{PLURAL:$1|once|$1 times}}.', 'protectedpage' => 'Protected page', diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index d155db94ef..f5104b9e04 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -69,6 +69,7 @@ $wgIgnoredMessages = array( 'accesskey-watch', 'accesskey-upload', 'addsection', + 'talkpageheader', 'anonnotice', 'autoblock_whitelist', 'searchmenu-help', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 6f3abc1fc9..700a51e0fb 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -211,6 +211,7 @@ $wgMessageStructure = array( 'otherlanguages', 'redirectedfrom', 'redirectpagesub', + 'talkpageheader', 'lastmodifiedat', 'viewcount', 'protectedpage', -- 2.20.1