r100517 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100516‎ | r100517 | r100518 >
Date:21:19, 22 October 2011
Author:petrb
Status:deferred (Comments)
Tags:
Comment:
included pictures although the path is now taken with workaround as I couldn't find better way
Modified paths:
  • /trunk/extensions/OnlineStatusBar/20px-Ledgreen.svg.png (added) (history)
  • /trunk/extensions/OnlineStatusBar/20px-Ledorange.svg.png (added) (history)
  • /trunk/extensions/OnlineStatusBar/20px-Nuvola_apps_krec.svg.png (added) (history)
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php (modified) (history)
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.i18n.php (modified) (history)
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php
@@ -73,6 +73,14 @@
7474 return 0;
7575 }
7676
 77+ static function GetFileUrl($name)
 78+ {
 79+ // fix me
 80+ global $wgScriptPath;
 81+ $url = $wgScriptPath . "/extensions" . "$name";
 82+ return $url;
 83+ }
 84+
7785 static function GetStatus( $userID ) {
7886 global $wgOnlineStatusBarTable, $wgOnlineStatusBarModes, $wgOnlineStatusBarDefaultOffline, $wgOnlineStatusBarDefaultOnline, $wgDBname;
7987 $db = wfGetDB ( DB_MASTER );
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.i18n.php
@@ -13,6 +13,6 @@
1414 */
1515 $messages['en'] = array(
1616 'onlinestatusbar-desc' => "Status bar which shows whether a user is online, based on preferences, on their user page",
17 -'onlinestatusbar-line' => " is now ",
 17+'onlinestatusbar-line' => " is now",
1818 );
1919 ?>
Index: trunk/extensions/OnlineStatusBar/20px-Nuvola_apps_krec.svg.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/OnlineStatusBar/20px-Nuvola_apps_krec.svg.png
___________________________________________________________________
Added: svn:mime-type
2020 + image/png
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.php
@@ -36,15 +36,13 @@
3737 'hidden' => "Offline",
3838 'offline' => "Offline",
3939 );
40 -
4140 $wgOnlineStatusBarIcon = array (
42 - 'online' => "//upload.wikimedia.org/wikipedia/commons/thumb/c/cc/Ledgreen.svg/20px-Ledgreen.svg.png",
43 - 'busy' => "//upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Ledorange.svg/20px-Ledorange.svg.png",
44 - 'away' => "//upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Ledorange.svg/20px-Ledorange.svg.png",
45 - 'hidden' => "//upload.wikimedia.org/wikipedia/commons/thumb/6/60/Nuvola_apps_krec.svg/20px-Nuvola_apps_krec.svg.png",
46 - 'offline' => "//upload.wikimedia.org/wikipedia/commons/thumb/6/60/Nuvola_apps_krec.svg/20px-Nuvola_apps_krec.svg.png",
 41+ 'online' => OnlineStatusBar::GetFileUrl( "/OnlineStatusBar/20px-Ledgreen.svg.png" ),
 42+ 'busy' => OnlineStatusBar::GetFileUrl( "/OnlineStatusBar/20px-Ledorange.svg.png" ),
 43+ 'away' => OnlineStatusBar::GetFileUrl( "/OnlineStatusBar/20px-Ledorange.svg.png" ),
 44+ 'hidden' => OnlineStatusBar::GetFileUrl( "/OnlineStatusBar/20px-Nuvola_apps_krec.svg.png"),
 45+ 'offline' => OnlineStatusBar::GetFileUrl( "/OnlineStatusBar/20px-Nuvola_apps_krec.svg.png"),
4746 );
48 -
4947 $wgOnlineStatusBarColor = array (
5048 'online' => "green",
5149 'busy' => "orange",
Index: trunk/extensions/OnlineStatusBar/20px-Ledorange.svg.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/OnlineStatusBar/20px-Ledorange.svg.png
___________________________________________________________________
Added: svn:mime-type
5250 + image/png
Index: trunk/extensions/OnlineStatusBar/20px-Ledgreen.svg.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/OnlineStatusBar/20px-Ledgreen.svg.png
___________________________________________________________________
Added: svn:mime-type
5351 + image/png

Comments

#Comment by Reach Out to the Truth (talk | contribs)   21:55, 22 October 2011

You could use $wgExtensionAssetsPath in 1.16+.

#Comment by Petrb (talk | contribs)   08:44, 23 October 2011

That's what I tried but it didn't return anything (empty string)

#Comment by Reach Out to the Truth (talk | contribs)   15:06, 23 October 2011

Then you've either set it to an empty string, or you're using a version older than 1.16. 1.16 is the oldest version currently supported, so I should hope you're not using an older version.

#Comment by P858snake (talk | contribs)   15:12, 23 October 2011

Nikerabbit has done it in rev:100540

#Comment by Nikerabbit (talk | contribs)   15:13, 23 October 2011

It actually only works after my numerous follow ups :)

Status & tagging log