Yurik has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/98464


Change subject: Added a welcome message at the top of the landing page.
......................................................................

Added a welcome message at the top of the landing page.

Should carefully review the text before +2 :)

Change-Id: I944eec59eaf6e83a9828cb284fe8d21274e7151b
---
M ZeroRatedMobileAccess.i18n.php
M includes/ZeroSpecialPage.php
2 files changed, 7 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroRatedMobileAccess 
refs/changes/64/98464/1

diff --git a/ZeroRatedMobileAccess.i18n.php b/ZeroRatedMobileAccess.i18n.php
index 7b0c8b9..f0a27b3 100644
--- a/ZeroRatedMobileAccess.i18n.php
+++ b/ZeroRatedMobileAccess.i18n.php
@@ -15,6 +15,7 @@
  * @author Patrick Reilly
  */
 $messages['en'] = array (
+       'zero-landing-welcome' => 'Welcome to {{SITENAME}}!<br>Thanks to your 
mobile operator, there will be no data charges.<br><blockquote>Real knowledge 
never promoted either turbulence or unbelief; but its progress is the 
forerunner of liberality and enlightened toleration.<div style="padding-left: 
2em">—[[w:Henry Brougham, 1st Baron Brougham and Vaux|Henry 
Brougham]]</div></blockquote>',
        'zero-rated-mobile-access-sorry' => 'Sorry, zero.wikipedia.org is only 
supported by select mobile carriers and is not available from your mobile 
carrier.',
        'zero-rated-mobile-access-sorry-ip' => 'If you are contacting your 
mobile carrier, mention that your IP address $1 is not supported.',
        'zero-rated-mobile-access-sorry-goto' => 'Go to $1 (standard data 
charges may apply)',
@@ -54,6 +55,7 @@
  * @author Siebrand
  */
 $messages['qqq'] = array(
+       'zero-landing-welcome' => 'This welcome message is shown at the top of 
the landing (starting) page, and should be somewhat different based on 
language-specific culture and customs.',
        'zero-rated-mobile-access-sorry' => 'This message is followed by the 
following 2 messages:
 * {{msg-mw|Zero-rated-mobile-access-sorry-ip}}
 * {{msg-mw|Zero-rated-mobile-access-sorry-goto}}',
diff --git a/includes/ZeroSpecialPage.php b/includes/ZeroSpecialPage.php
index ded9779..d2e2b11 100644
--- a/includes/ZeroSpecialPage.php
+++ b/includes/ZeroSpecialPage.php
@@ -113,8 +113,12 @@
         */
        private function renderSpecialPage( $config ) {
                $output = '';
-               $languageNames = Language::fetchLanguageNames();
 
+               // CSS hack to get rid of the header that comes from the mobile 
frontend
+               $output .= '<style type="text/css">.header {display: 
none}</style>';
+               $output .= wfMessage( 'zero-landing-welcome' ) . Html::element( 
'hr' );
+
+               $languageNames = Language::fetchLanguageNames();
                $overrides = $config['langNameOverrides'];
                // Allow language name overrides, as requested by Orange Congo 
('kg' => 'Kikongo')
                // Do it one at a time to keep the original order of the array

-- 
To view, visit https://gerrit.wikimedia.org/r/98464
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I944eec59eaf6e83a9828cb284fe8d21274e7151b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess
Gerrit-Branch: master
Gerrit-Owner: Yurik <yu...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to