Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F8258
b30118.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 11:56 PM
2014-11-21 23:56:20 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
b30118.patch
View Options
Index: views/layout/_search_webkit.html.php
===================================================================
--- views/layout/_search_webkit.html.php (revision 94783)
+++ views/layout/_search_webkit.html.php (working copy)
@@ -1,5 +1,5 @@
<?php
-global $wgExtensionAssetsPath;
+global $wgExtensionAssetsPath, $wgMobileFrontendLogo;
$searchField = (!empty($_GET['search'])) ? $_GET['search'] : '';
@@ -13,7 +13,7 @@
$searchWebkitHtml = <<<EOD
<div id='header'>
<div id='searchbox'>
- <img alt='W logo' id='logo' src='{$wgExtensionAssetsPath}/MobileFrontend/stylesheets/images/w.gif' />
+ <img alt='Logo' id='logo' src='{$wgMobileFrontendLogo}' />
<form action='{$scriptUrl}' class='search_bar' method='get'>
<input type="hidden" value="Special:Search" name="title" />
<input type="hidden" value="Search" name="fulltext" />
Index: MobileFrontend.php
===================================================================
--- MobileFrontend.php (revision 94783)
+++ MobileFrontend.php (working copy)
@@ -42,11 +42,18 @@
$wgAutoloadClasses['DeviceDetection'] = $cwd . 'DeviceDetection.php';
$wgAutoloadClasses['CssDetection'] = $cwd . 'CssDetection.php';
+/**
+ * Path to the logo used in the mobile view
+ *
+ * Should be 22px tall at most
+ */
+$wgMobileFrontendLogo = false;
+
$wgExtMobileFrontend = new ExtMobileFrontend();
$wgHooks['BeforePageDisplay'][] = array( &$wgExtMobileFrontend, 'beforePageDisplayHTML' );
-
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 'addMobileFooter' );
+$wgExtensionFunctions[] = array( &$wgExtMobileFrontend, 'setDefaultLogo' );
class ExtMobileFrontend {
const VERSION = '0.5.32';
@@ -735,4 +742,14 @@
return $applicationHtml;
}
+
+ /**
+ * Sets up the default logo image used in mobile view if none is set
+ */
+ public function setDefaultLogo() {
+ global $wgMobileFrontendLogo, $wgExtensionAssetsPath;
+ if ( $wgMobileFrontendLogo === false ) {
+ $wgMobileFrontendLogo = $wgExtensionAssetsPath . '/MobileFrontend/stylesheets/images/mw.png';
+ }
+ }
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7782
Default Alt Text
b30118.patch (2 KB)
Attached To
Mode
T32118: Custom project icon in MobileFrontend extension
Attached
Detach File
Event Timeline
Log In to Comment