Index: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -42,11 +42,20 @@ |
43 | 43 | $wgAutoloadClasses['DeviceDetection'] = $cwd . 'DeviceDetection.php'; |
44 | 44 | $wgAutoloadClasses['CssDetection'] = $cwd . 'CssDetection.php'; |
45 | 45 | |
| 46 | +/** |
| 47 | + * Path to the logo used in the mobile view |
| 48 | + * |
| 49 | + * Should be 22px tall at most |
| 50 | + */ |
| 51 | +$wgMobileFrontendLogo = false; |
| 52 | + |
| 53 | + |
46 | 54 | $wgExtMobileFrontend = new ExtMobileFrontend(); |
47 | 55 | |
48 | 56 | $wgHooks['BeforePageDisplay'][] = array( &$wgExtMobileFrontend, 'beforePageDisplayHTML' ); |
49 | 57 | |
50 | 58 | $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 'addMobileFooter' ); |
| 59 | +$wgExtensionFunctions[] = array( &$wgExtMobileFrontend, 'setDefaultLogo' ); |
51 | 60 | |
52 | 61 | /** |
53 | 62 | * Make the classes stripped from page content configurable. Each item will |
— | — | @@ -61,7 +70,7 @@ |
62 | 71 | ); |
63 | 72 | |
64 | 73 | class ExtMobileFrontend { |
65 | | - const VERSION = '0.5.36'; |
| 74 | + const VERSION = '0.5.37'; |
66 | 75 | |
67 | 76 | /** |
68 | 77 | * @var DOMDocument |
— | — | @@ -748,4 +757,14 @@ |
749 | 758 | |
750 | 759 | return $applicationHtml; |
751 | 760 | } |
| 761 | + |
| 762 | + /** |
| 763 | + * Sets up the default logo image used in mobile view if none is set |
| 764 | + */ |
| 765 | + public function setDefaultLogo() { |
| 766 | + global $wgMobileFrontendLogo, $wgExtensionAssetsPath; |
| 767 | + if ( $wgMobileFrontendLogo === false ) { |
| 768 | + $wgMobileFrontendLogo = $wgExtensionAssetsPath . '/MobileFrontend/stylesheets/images/mw.png'; |
| 769 | + } |
| 770 | + } |
752 | 771 | } |
Index: branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/_search_webkit.html.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -global $wgExtensionAssetsPath; |
| 3 | +global $wgExtensionAssetsPath, $wgMobileFrontendLogo; |
4 | 4 | |
5 | 5 | $searchField = self::$searchField; |
6 | 6 | $mainPageUrl = self::$mainPageUrl; |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | $searchWebkitHtml = <<<EOD |
14 | 14 | <div id='header'> |
15 | 15 | <div id='searchbox'> |
16 | | - <img alt='W logo' id='logo' src='{$wgExtensionAssetsPath}/MobileFrontend/stylesheets/images/w.gif' /> |
| 16 | + <img alt='Logo' id='logo' src='{$wgMobileFrontendLogo}' /> |
17 | 17 | <form action='{$scriptUrl}' class='search_bar' method='get'> |
18 | 18 | <input type="hidden" value="Special:Search" name="title" /> |
19 | 19 | <input type="hidden" value="Search" name="fulltext" /> |