r41708 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41707‎ | r41708 | r41709 >
Date:20:12, 5 October 2008
Author:siebrand
Status:old
Tags:
Comment:
* delay message loading
* update a few messages
* remove installation hint for more i18n
* remove trailing whitespace
* bump version
Modified paths:
  • /trunk/extensions/IMStatus/IMStatus.i18n.php (modified) (history)
  • /trunk/extensions/IMStatus/IMStatus.php (modified) (history)
  • /trunk/extensions/IMStatus/about.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/IMStatus/IMStatus.php
@@ -1,9 +1,7 @@
22 <?php
3 -
43 // Check to make sure we're actually in MediaWiki.
54 if (!defined('MEDIAWIKI')) die('This file is part of MediaWiki. It is not a valid entry point.');
65
7 -
86 /*********************************************************************
97 * IM Status - A MediaWiki extension which add tags for status buttons
108 * for various IM programs (AIM, Google Talk, ICQ, Skype, Xfire, Yahoo)
@@ -13,19 +11,19 @@
1412 * it under the terms of the GNU General Public License as published by
1513 * the Free Software Foundation, either version 3 of the License, or
1614 * (at your option) any later version.
17 -*
 15+*
1816 * This program is distributed in the hope that it will be useful,
1917 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2119 * GNU General Public License for more details.
22 -*
 20+*
2321 * You should have received a copy of the GNU General Public License
2422 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2523 *********************************************************************/
2624
2725 /*********************
2826 * Special thanks to:
29 -* - Jeffrey Phillips Freeman for his AIM extension (http://www.mediawiki.org/wiki/Extension:AIM),
 27+* - Jeffrey Phillips Freeman for his AIM extension (http://www.mediawiki.org/wiki/Extension:AIM),
3028 * licensed in the Public domain and on which I based this extention.
3129 * - Guy Taylor ("TheBigGuy"), who did a lot of work on various IM extensions (ICQ, Skype, also some work on AIM),
3230 * which helped me to find out some style and action options... it's a pity I had to rewrite these codes from the AIM one
@@ -41,11 +39,11 @@
4240
4341 $wgExtensionCredits['parserhook'][] = array(
4442 'name' => 'IM Status',
45 - 'version' => '1.2',
46 - 'author' => 'PatheticCockroach and various MediaWiki contributors',
47 - 'url' => 'http://www.patheticcockroach.com/mpam4/index.php?p=78',
 43+ 'version' => '1.3',
 44+ 'author' => array( 'PatheticCockroach', 'various MediaWiki contributors' ),
 45+ 'url' => 'http://www.mediawiki.org/wiki/Extension:IM_Status',
4846 'description' => 'Adds tags to show various IM online status (AIM, Google Talk, ICQ, MSN/Live Messenger, Skype, Xfire, Yahoo)',
49 - 'descriptionmsg' => 'imstatus_desc'
 47+ 'descriptionmsg' => 'imstatus-desc'
5048 );
5149
5250 //*********** MANDATORY parameters - start
@@ -55,7 +53,7 @@
5654 //*********** MANDATORY parameters - end
5755
5856 //Tag creation
59 -$wgExtensionFunctions[] = "wfIMStatusPCR";
 57+$wgExtensionFunctions[] = "wfIMStatusPCR";
6058 function wfIMStatusPCR()
6159 {
6260 global $wgParser;
@@ -66,7 +64,6 @@
6765 $wgParser->setHook( "skype", "RenderSkype" );
6866 $wgParser->setHook( "xfire", "RenderXfire" );
6967 $wgParser->setHook( "yahoo", "RenderYahoo" );
70 - wfLoadExtensionMessages('IMStatus');
7168 }
7269
7370 //NB: a nice list of styles and actions: http://cubicpath.syncleus.com/wiki/index.php/Cubicpath:Add-ons
@@ -80,9 +77,9 @@
8178 $style_default = "presence";
8279 // the variables are: <aim style="$argv['style']">$input</aim>
8380 // to get help as a user, use <aim help/>
84 -
 81+
8582 // sanitize input
86 - $input = htmlspecialchars($input,ENT_QUOTES);
 83+ $input = htmlspecialchars($input,ENT_QUOTES);
8784 // get custom parameters
8885 if( isset( $argv['style'] ) )
8986 {
@@ -90,10 +87,12 @@
9188 if( !in_array( $style, array("presence", "api") ) ) $style = $style_default;
9289 }
9390 else $style = $style_default;
94 -
 91+
9592 // prepares output
9693 if(isset($argv['help']))
9794 {
 95+ wfLoadExtensionMessages('IMStatus');
 96+
9897 $output = '<div><span style="color:blue;">'. wfMsg("imstatus_syntax") .': &lt;aim style="[style]"&gt;['. wfMsg("imstatus_your_name", "AIM") .']&lt;/aim&gt;</span>';
9998 $output .= '<ul><li>style: '. wfMsg("imstatus_style") .'. '. wfMsg("imstatus_possible_val") .': "presence" '. wfMsg("imstatus_or") .' "api". '. wfMsg("imstatus_default") .': '.$style_default.'.';
10099 $output .= '<ul><li>'. wfMsg("imstatus_aim_presence", "&#34;presence&#34;") .'</li>';
@@ -110,20 +109,19 @@
111110 $output = '<script type="text/javascript" src="http://o.aolcdn.com/aim/web-aim/aimapi.js"></script>';
112111 $output .= '<div id="AIMBuddyListContainer" wim_key="'.$wgAimKey_api.'"></div>';
113112 $output .= '<a href="nojavascript.html" onclick="AIM.widgets.IMMe.launch(\''.$input.'\'); return false;">';
114 - $output .= '<img src="http://api.oscar.aol.com/presence/icon?k='.$wgAimKey_presence.'&t='.$input.'" border="0"/>Send me an IM</a>';
 113+ $output .= '<img src="http://api.oscar.aol.com/presence/icon?k='.$wgAimKey_presence.'&t='.$input.'" border="0"/>Send me an IM</a>';
115114 break;
116 -
 115+
117116 default:
118117 case "presence":
119118 $output = '<a href="aim:GoIM?screenname='.$input.'"><img src="http://api.oscar.aol.com/presence/icon?k='.$wgAimKey_presence.'&t='.$input.'" border="0"/></a>';
120119 break;
121120 }
122 - }
 121+ }
123122 // sends output
124123 return $output;
125124 }
126125
127 -
128126 /**********************************************
129127 * the function that reacts to "<gtalk>"
130128 **********************************************/
@@ -138,10 +136,10 @@
139137 $height_max = 60;
140138 // the varibles are: <gtalk width="$argv['width']" height="$argv['height']">$input</aim>
141139 // to get help as a user, use <gtalk help/>
142 -
 140+
143141 // sanitize input
144 - $input = htmlspecialchars($input,ENT_QUOTES);
145 -
 142+ $input = htmlspecialchars($input,ENT_QUOTES);
 143+
146144 // get custom parameters
147145 if(isset($argv['width']))
148146 {
@@ -149,7 +147,7 @@
150148 if($width>$width_max || $width<$width_min) $width = $width_default;
151149 }
152150 else $width = $width_default;
153 -
 151+
154152 if(isset($argv['height']))
155153 {
156154 $height = intval($argv['height']);
@@ -160,21 +158,22 @@
161159 // prepares output
162160 if(isset($argv['help']))
163161 {
 162+ wfLoadExtensionMessages('IMStatus');
 163+
164164 $output = '<div><span style="color:blue;">'. wfMsg("imstatus_syntax") .': &lt;gtalk width="[width]" height="[height]"&gt;['. wfMsg("imstatus_gtalk_code") .']&lt;/gtalk&gt;</span>';
165165 $output .= '<ul><li>width: '. wfMsg("imstatus_gtalk_width") .' '. wfMsg("imstatus_default") .':'.$width_default.'; '. wfMsg("imstatus_min") .':'.$width_min.'; '. wfMsg("imstatus_max") .':'.$width_max.'.</li>';
166166 $output .='<li>height: '. wfMsg("imstatus_gtalk_height") .' '. wfMsg("imstatus_default") .':'.$height_default.'; '. wfMsg("imstatus_min") .':'.$height_min.'; '. wfMsg("imstatus_max") .':'.$height_max.'.</li>';
167167 $output .= '<li>'. wfMsg("imstatus_gtalk_get_code", '<a href="http://www.google.com/talk/service/badge/New">Google Talk chatback badge</a>') .'</li></ul>';
168168 $output .= '<span style="color:green;">'. wfMsg("imstatus_example") .': &lt;gtalk width="200" height="60"&gt;55gsrf9c1avkt0pub15rkiv9vs&lt;/gtalk&gt;</span></div>';
169 - }
170 - else $output = '<iframe src="http://www.google.com/talk/service/badge/Show?tk='.$input.'&amp;w='.$width.'&amp;h='.$height.'" frameborder="0" allowtransparency="true" width="'.$width.'" height="'.$height.'"></iframe>';
 169+ }
 170+ else $output = '<iframe src="http://www.google.com/talk/service/badge/Show?tk='.$input.'&amp;w='.$width.'&amp;h='.$height.'" frameborder="0" allowtransparency="true" width="'.$width.'" height="'.$height.'"></iframe>';
171171 // sends output
172172 return $output;
173173 }
174174
175 -
176175 /**********************************************
177176 * the function that reacts to "<icq>"
178 - ***********************************************/
 177+ ***********************************************/
179178 function RenderICQ( $input, $argv )
180179 {
181180 // set your defaults for the style and action (0 to 26) (add) - NB: action is useless ATM (only one option...)
@@ -203,10 +202,12 @@
204203 // prepares outupt
205204 if(isset($argv['help']))
206205 {
 206+ wfLoadExtensionMessages('IMStatus');
 207+
207208 $output = '<div><span style="color:blue;">'. wfMsg("imstatus_syntax") .': &lt;icq style="[style]"&gt;['. wfMsg("imstatus_icq_id") .']&lt;/icq&gt;</span>';
208209 $output .= '<ul><li>style: '. wfMsg("imstatus_icq_style") .' '. wfMsg("imstatus_default") .': '.$style_default.'.</li></ul>';
209210 $output .= '<span style="color:green;">'. wfMsg("imstatus_example") .': &lt;icq style="2"&gt;984231&lt;/icq&gt;</span></div>';
210 - }
 211+ }
211212 else $output = '<a href="http://www.icq.com/people/about_me.php?uin='.$input.'&action='.$action.'"><img src="http://status.icq.com/online.gif?icq='.$input.'&img='.$style.'" alt="ICQ status"/></a>';
212213 // sends output
213214 return $output;
@@ -222,9 +223,9 @@
223224 $style_default = "icon";
224225 // the variables are: <livemessenger style="$argv['style']">$input</livemessenger>
225226 // to get help as a user, use <livemessenger help/>
226 -
 227+
227228 // sanitize input
228 - $input = htmlspecialchars($input,ENT_QUOTES);
 229+ $input = htmlspecialchars($input,ENT_QUOTES);
229230 // get custom parameters
230231 if(isset($argv['style']))
231232 {
@@ -232,10 +233,12 @@
233234 if(!in_array($style,array("button","icon","window"))) $style = $style_default;
234235 }
235236 else $style = $style_default;
236 -
 237+
237238 // prepares output
238239 if(isset($argv['help']))
239240 {
 241+ wfLoadExtensionMessages('IMStatus');
 242+
240243 $output = '<div><span style="color:blue;">'. wfMsg("imstatus_syntax") .': &lt;livemessenger style="[style]"&gt;['. wfMsg("imstatus_live_code") .']&lt;/livemessenger&gt;</span>';
241244 $output .= '<ul><li>style: "button", "icon" '. wfMsg("imstatus_or") .' "window". '. wfMsg("imstatus_default") .': '.$style_default.'.</li>';
242245 $output .= '<li>'. wfMsg("imstatus_live_get_code", "http://settings.messenger.live.com/applications/CreateHtml.aspx", "invitee=", "@apps.messenger") .'</li></ul>';
@@ -255,14 +258,14 @@
256259 $output .= 'msgr:foreColor="#424542" msgr:conversationUrl="http://settings.messenger.live.com/Conversation/IMMe.aspx?invitee='.$input.'@apps.messenger.live.com&mkt=en-US"></div>';
257260 $output .= '<script type="text/javascript" src="http://messenger.services.live.com/users/'.$input.'@apps.messenger.live.com/presence?mkt=en-US&cb=Microsoft_Live_Messenger_PresenceButton_onPresence"></script>';
258261 break;
259 -
 262+
260263 case "icon":
261264 default:
262265 $output = '<a target="_blank" href="http://settings.messenger.live.com/Conversation/IMMe.aspx?invitee='.$input.'@apps.messenger.live.com&mkt=en-US">';
263266 $output .= '<img style="border-style: none;" src="http://messenger.services.live.com/users/'.$input.'@apps.messenger.live.com/presenceimage?mkt=en-US" width="16" height="16"/></a>';
264267 break;
265268 }
266 - }
 269+ }
267270 // sends output
268271 return $output;
269272 }
@@ -270,15 +273,15 @@
271274
272275 /**********************************************
273276 * the function that reacts to "<skype>"
274 - ***********************************************/
 277+ ***********************************************/
275278 function RenderSkype( $input, $argv )
276 -{
 279+{
277280 // set your defaults for the style and action (add, call, chat, sendfile, userinfo orvoicemail) (same + ballon, bigclassic smallclassic, smallicon or mediumicon) - options crawled from http://www.skype.com/share/buttons/
278281 $style_default = "smallclassic";
279282 $action_default = "chat";
280283 // the varibles are: <skype style="$argv['style']" action="$argv['action']">$input</skpye>
281284 // to get help as a user, use <skype help/>
282 -
 285+
283286 // sanitize input
284287 $input = htmlspecialchars($input,ENT_QUOTES);
285288 // get custom parameters
@@ -291,7 +294,7 @@
292295 }
293296 }
294297 else $style = $style_default;
295 -
 298+
296299 // if style is an action style, action should match it!
297300 if(in_array($style, array("add","chat","call","sendfile","userinfo","voicemail"))) $action = $style;
298301 else if(isset($argv['action']))
@@ -300,7 +303,7 @@
301304 if (!in_array($action, array("add","chat","call","sendfile","userinfo","voicemail"))) $action = $action_default;
302305 }
303306 else $action = $action_default;
304 -
 307+
305308 // creates image code
306309 switch($style)
307310 {
@@ -315,7 +318,7 @@
316319 case "call":
317320 $image = '<img src="http://download.skype.com/share/skypebuttons/buttons/call_blue_transparent_70x23.png" style="border: none;" width="70" height="23" alt="Skype Me"/>';
318321 break;
319 -
 322+
320323 case "sendfile":
321324 $image = '<img src="http://download.skype.com/share/skypebuttons/buttons/sendfile_blue_transparent_98x23.png" style="border: none;" width="98" height="23" alt="Send me a file"/>';
322325 break;
@@ -339,27 +342,29 @@
340343 case "smallclassic":
341344 $image = '<img src="http://mystatus.skype.com/smallclassic/'.$input.'" style="border: none;" width="114" height="20" alt="My status"/>';
342345 break;
343 -
 346+
344347 case "smallicon":
345348 $image = '<img src="http://mystatus.skype.com/smallicon/'.$input.'" style="border: none;" width="16" height="16" alt="My status"/>';
346349 break;
347 -
 350+
348351 case "mediumicon":
349352 default:
350353 $image = '<img src="http://mystatus.skype.com/mediumicon/'.$input.'" style="border: none;" width="26" height="26" alt="My status"/>';
351354 break;
352355 }
353 -
 356+
354357 // prepares outupt
355358 if(isset($argv['help']))
356359 {
 360+ wfLoadExtensionMessages('IMStatus');
 361+
357362 $output = '<div><span style="color:blue;">'. wfMsg("imstatus_syntax") .': &lt;skype style="[style]" action="[action]"&gt;['. wfMsg("imstatus_your_name", "Skype") .']&lt;/skype&gt;</span>';
358363 $output .= '<ul><li>style: '. wfMsg("imstatus_style") .'. '. wfMsg("imstatus_default") .': '.$style_default.'. '. wfMsg("imstatus_possible_val") .': "add","chat","call","sendfile","userinfo","voicemail","balloon","bigclassic","smallclassic","smallicon","mediumicon".</li>';
359364 $output .= '<li>action: '. wfMsg("imstatus_action") .'. '. wfMsg("imstatus_default") .': '.$action_default.'. '. wfMsg("imstatus_possible_val") .': "add","chat","call","sendfile","userinfo","voicemail".</li></ul>';
360365 $output .= wfMsg("imstatus_details_saa", '<a href="http://www.skype.com/share/buttons/wizard.html">Skype button wizard</a>'). '<br/>';
361366 $output .= wfMsg("imstatus_skype_nbstyle") .'<br/>';
362367 $output .= '<span style="color:green;">'. wfMsg("imstatus_example") .': &lt;skype style="mediumicon" action="chat"&gt;PatheticCockroach&lt;/skype&gt;</span></div>';
363 - }
 368+ }
364369 else
365370 {
366371 $output = '<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>';
@@ -381,9 +386,9 @@
382387 $action_default = "add";
383388 // the variables are: <xfire size="$argv['size']" style="$argv['style']" action="$argv['action']">$input</xfire>
384389 // to get help as a user, use <xfire help/>
385 -
 390+
386391 // sanitize input
387 - $input = htmlspecialchars($input,ENT_QUOTES);
 392+ $input = htmlspecialchars($input,ENT_QUOTES);
388393 // get custom parameters
389394 if(isset($argv['size']))
390395 {
@@ -398,7 +403,7 @@
399404 if (!in_array($style, array("bg","sh","co","sf","os","wow"))) $style = $style_default;
400405 }
401406 else $style = $style_default;
402 -
 407+
403408 if(isset($argv['action']))
404409 {
405410 $action = $argv['action'];
@@ -413,14 +418,14 @@
414419 $alt_txt = "View my Xfire profile";
415420 $link_url = "http://profile.xfire.com/".$input;
416421 break;
417 -
 422+
418423 case "add":
419424 default:
420425 $alt_txt = "Add me to Xfire";
421426 $link_url = "xfire:add_friend?user=".$input;
422427 break;
423428 }
424 -
 429+
425430 // set size and style of the image
426431 switch($size)
427432 {
@@ -436,41 +441,43 @@
437442 case 3:
438443 $image = '<img src="http://miniprofile.xfire.com/bg/'.$style.'/type/3/'.$input.'.png" style="border: none;" width="149" height="29" alt="'.$alt_txt.'"/>';
439444 break;
440 -
 445+
441446 case 4:
442447 default:
443448 $image = '<img src="http://miniprofile.xfire.com/bg/'.$style.'/type/4/'.$input.'.png" style="border: none;" width="16" height="16" alt="'.$alt_txt.'"/>';
444449 break;
445450 }
446 -
 451+
447452 // prepares outupt
448453 if(isset($argv['help']))
449454 {
 455+ wfLoadExtensionMessages('IMStatus');
 456+
450457 $output = '<div><span style="color:blue;">'. wfMsg("imstatus_syntax") .': &lt;xfire size="[size]" style="[style]" action="[action]"&gt;['. wfMsg("imstatus_your_name", "Xfire") .']&lt;/xfire&gt;</span>';
451458 $output .= '<ul><li>size: '. wfMsg("imstatus_xfire_size", "0", "4") .' '. wfMsg("imstatus_default") .': '.$size_default.'.</li>';
452459 $output .= '<li>style: '. wfMsg("imstatus_style") .'. '. wfMsg("imstatus_default") .': '.$style_default.'. '. wfMsg("imstatus_possible_val") .': "bg","sh","co","sf","os","wow".</li>';
453460 $output .= '<li>action: '. wfMsg("imstatus_action") .'. '. wfMsg("imstatus_default") .': '.$action_default.'. '. wfMsg("imstatus_possible_val") .': "add","profile".</li></ul>';
454461 $output .= wfMsg("imstatus_details_saa", '<a href="http://www.xfire.com/miniprofile/">Xfire - Miniprofile Instructions</a>') .'<br/>';
455462 $output .= '<span style="color:green;">'. wfMsg("imstatus_example") .': &lt;xfire size="3" style="bg" action="add"&gt;PatheticCockroach&lt;/xfire&gt;</span></div>';
456 - }
457 - else $output = '<a href="'.$link_url.'">'.$image.'</a>';
 463+ }
 464+ else $output = '<a href="'.$link_url.'">'.$image.'</a>';
458465 // sends output
459466 return $output;
460467 }
461468
462 -
 469+
463470 /**********************************************
464471 * the function that reacts to "<yahoo>"
465 - ***********************************************/
 472+ ***********************************************/
466473 function RenderYahoo( $input, $argv )
467 -{
 474+{
468475 // set your defaults for the action and style (addfriend, call or sendim) (0, 1, 2, 3 and 4) - options crawled from http://geocities.yahoo.com/v/ao/pre.html
469476 $style_default = 2;
470477 $action_default = "sendim"; // DO NOT enter an invalid value, since this value may be used as is in the final output -> TODO: use a switch to sanitize this one
471478 // the variables are: <yahoo style="$argv['style']" action="$argv['action']">$input</yahoo>
472479
473480 // sanitize input
474 - $input = htmlspecialchars($input,ENT_QUOTES);
 481+ $input = htmlspecialchars($input,ENT_QUOTES);
475482 // get custom parameters
476483 if(isset($argv['style']))
477484 {
@@ -495,7 +502,7 @@
496503 case "call":
497504 $alt_txt = "Call me";
498505 break;
499 -
 506+
500507 case "sendim":
501508 default:
502509 $alt_txt = "Send me an IM";
@@ -504,26 +511,26 @@
505512 // set image style
506513 switch( $style )
507514 {
508 - case 0:
 515+ case 0:
509516 $image = '<img src="http://opi.yahoo.com/online?u='.$input.'&m=g&t=0" style="border: none; width: 12px; height: 12px;" alt="'.$alt_txt.'" />';
510517 break;
511518
512 - case 1:
 519+ case 1:
513520 $image = '<img src="http://opi.yahoo.com/online?u='.$input.'&m=g&t=1" style="border: none; width: 64px; height: 16px;" alt="'.$alt_txt.'" />';
514521 break;
515522
516 - case 2:
 523+ case 2:
517524 $image = '<img src="http://opi.yahoo.com/online?u='.$input.'&m=g&t=2" style="border: none; width: 125px; height: 25px;" alt="'.$alt_txt.'" />';
518525 break;
519526
520 - case 3:
 527+ case 3:
521528 $image = '<img src="http://opi.yahoo.com/online?u='.$input.'&m=g&t=3" style="border: none; width: 86px; height: 16px;" alt="'.$alt_txt.'" />';
522529 break;
523530
524531 case 4:
525532 $image = '<img src="http://opi.yahoo.com/online?u='.$input.'&m=g&t=4" style="border: none; width: 12px; height: 12px;" alt="'.$alt_txt.'" />';
526533 break;
527 -
 534+
528535 case 5:
529536 default:
530537 $image = '<img src="http://opi.yahoo.com/online?u='.$input.'&m=g&t=5" style="border: none; width: 12px; height: 12px;" alt="'.$alt_txt.'" />';
@@ -533,16 +540,15 @@
534541 // prepares outupt
535542 if(isset($argv['help']))
536543 {
 544+ wfLoadExtensionMessages('IMStatus');
 545+
537546 $output = '<div><span style="color:blue;">'. wfMsg("imstatus_syntax") .': &lt;yahoo style="[style]" action="[action]"&gt;['. wfMsg("imstatus_your_name", "Yahoo") .']&lt;/xfire&gt;</span>';
538547 $output .= '<ul><li>style: '. wfMsg("imstatus_yahoo_style", "0", "2", "3", "4") .' '. wfMsg("imstatus_default") .': '.$style_default.'.</li>';
539548 $output .= '<li>action: '. wfMsg("imstatus_action") .'. '. wfMsg("imstatus_default") .': '.$action_default.'. '. wfMsg("imstatus_possible_val") .': "addfriend","call","sendim".</li></ul>';
540549 $output .= wfMsg("imstatus_details_saa", '<a href="http://geocities.yahoo.com/v/ao/pre.html">Yahoo! Presence</a>') .'<br/>';
541550 $output .= '<span style="color:green;">'. wfMsg("imstatus_example") .': &lt;yahoo style="2" action="sendim"&gt;PatheticCockroach&lt;/yahoo&gt;</span></div>';
542 - }
 551+ }
543552 else $output = '<a href="ymsgr:'.$action.'?'.$input.'">'.$image.'</a>';
544553 // sends output
545554 return $output;
546555 }
547 -
548 -
549 -?>
\ No newline at end of file
Index: trunk/extensions/IMStatus/about.txt
@@ -17,8 +17,6 @@
1818 2. Put IMStatus.php in your extensions folder (or in a subdirectory of it, as you want)
1919 3. Add the following code at the end of LocalSettings.php:
2020 require_once( $IP."/extensions/IM/IMStatus.php");
21 -4. (optional) For additional locales, grab the latest revision of IMStatus.i18n.php on:
22 - http://www.mediawiki.org/wiki/Extension:IM_Status/IMStatus.i18n.php
2321
2422 Usage:
2523 Once installed, the extension adds the following tags:
Index: trunk/extensions/IMStatus/IMStatus.i18n.php
@@ -4,11 +4,11 @@
55 *
66 * @ingroup Extensions
77 */
8 -
 8+
99 $messages = array();
10 -
 10+
1111 $messages['en'] = array(
12 - 'imstatus_desc' => 'Adds tags to show various IM online status (AIM, Google Talk, ICQ, MSN/Live Messenger, Skype, Xfire, Yahoo)',
 12+ 'imstatus-desc' => 'Adds tags to show various IM online status (AIM, Google Talk, ICQ, MSN/Live Messenger, Skype, Xfire, Yahoo)',
1313 'imstatus_syntax' => 'Syntax',
1414 'imstatus_default' => 'Default',
1515 'imstatus_example' => 'Example',
@@ -20,30 +20,32 @@
2121 'imstatus_action' => 'action when the button is clicked',
2222 'imstatus_details_saa' => 'For more details about all the styles and actions, see $1.',
2323 'imstatus_your_name' => 'your $1 name',
24 -
25 - 'imstatus_aim_presence' => '$1 shows your status with a link that will launch AIM (provided the user has it installed) to send you an IM.',
 24+
 25+ 'imstatus_aim_presence' => '$1 shows your status with a link that will launch AIM to send you an IM, provided the user has it installed.',
2626 'imstatus_aim_api' => '$1 shows your status with a link that will launch a <b>browser</b>, javascript version of AIM to send you an IM.',
27 -
 27+
2828 'imstatus_gtalk_code' => 'your google talk code',
2929 'imstatus_gtalk_get_code' => 'your google talk code: get it at $1.',
30 - 'imstatus_gtalk_height' => 'height of the box, in pixel.',
31 - 'imstatus_gtalk_width' => 'width of the box, in pixel.',
32 -
33 - 'imstatus_icq_id' => 'your ICQ id',
 30+ 'imstatus_gtalk_height' => 'height of the box, in pixels.',
 31+ 'imstatus_gtalk_width' => 'width of the box, in pixels.',
 32+
 33+ 'imstatus_icq_id' => 'your ICQ ID',
3434 'imstatus_icq_style' => 'a number ranging from 0 to 26 (yes, there are 27 available styles...).',
35 -
 35+
3636 'imstatus_live_code' => 'your Live Messenger website id',
37 - 'imstatus_live_get_code' => 'your Live Messenger website id: <strong>this is not your e-mail address</strong>, you need to generate one in
38 -<a href="$1">your live messenger options</a>. The id you need to provide is the numbers and letters between "$2" and "$3".',
39 -
40 - 'imstatus_skype_nbstyle' => 'NB: if you choose a style which is also an action, your action choice will be overridden by the action matching your chosen style.',
41 -
 37+ 'imstatus_live_get_code' => 'your Live Messenger website id: <strong>this is not your e-mail address</strong>, you need to generate one in
 38+<a href="$1">your live messenger options</a>.
 39+The id you need to provide is the numbers and letters between "$2" and "$3".',
 40+
 41+ 'imstatus_skype_nbstyle' => 'Note: If you choose a style which is also an action, your action choice will be overridden by the action matching your chosen style.',
 42+
4243 'imstatus_xfire_size' => 'the button size, from $1 (biggest) to $2 (smallest).',
43 -
 44+
4445 'imstatus_yahoo_style' => 'the button style, from $1 (smallest) to $2 (biggest), $3 and $4 are for voicemail.',
4546 );
 47+
4648 $messages['de'] = array(
47 - 'imstatus_desc' => 'F�gt Tags hinzu um den Online-Status verschiedener Instant-Messenger anzuzeigen (AIM, Google Talk, ICQ, MSN/Live Messenger, Skype, Xfire, Yahoo)',
 49+ 'imstatus-desc' => 'F�gt Tags hinzu um den Online-Status verschiedener Instant-Messenger anzuzeigen (AIM, Google Talk, ICQ, MSN/Live Messenger, Skype, Xfire, Yahoo)',
4850 'imstatus_syntax' => 'Syntax',
4951 'imstatus_default' => 'Standard',
5052 'imstatus_example' => 'Beispiel',
@@ -55,25 +57,24 @@
5658 'imstatus_action' => 'Aktion beim klicken des Buttons',
5759 'imstatus_details_saa' => 'F�r mehr Details zu den Stilen und Aktionen, siehe $1.',
5860 'imstatus_your_name' => 'dein $1 Name',
59 -
 61+
6062 'imstatus_aim_presence' => '$1 zeigt deinen Status mit einem Link der AIM startet (wenn er es installiert hat) um dir eine Nachricht zu senden.',
6163 'imstatus_aim_api' => '$1 zeigt deinen Status mit einem Link der eine <b>Browser</b>, JavaScript Version von AIM startet um die eine nachricht zu senden.',
62 -
 64+
6365 'imstatus_gtalk_code' => 'dein Google-Talk Code',
6466 'imstatus_gtalk_get_code' => 'dein Google-Talk Code kriegst du bei $1.',
6567 'imstatus_gtalk_height' => 'H�he der Box in Pixel.',
6668 'imstatus_gtalk_width' => 'Breite der Box in Pixel.',
67 -
 69+
6870 'imstatus_icq_id' => 'deine ICQ-UIN',
6971 'imstatus_icq_style' => 'eine Zahl zwischen 0 und 26 (ja, es gibt 27 verschiedene Styles...).',
70 -
 72+
7173 'imstatus_live_code' => 'deine Live Messenger Website Id',
7274 'imstatus_live_get_code' => 'deine Live Messenger Website Id: <strong>das ist nicht deine E-Mail-Adresse</strong>, du musst die eine in <a href="$1">deinen Live Messenger Optionen</a> generieren. Die Id die du ben�tigst sind die Zahlen und Buchstaben zwischen "$2" und "$3".',
73 -
 75+
7476 'imstatus_skype_nbstyle' => 'NB: wenn du einen Style aussuchst der auch eine Aktion beinhaltet wird deine Aktions-Auswahl durch die Aktions des Styles ersetzt.',
75 -
 77+
7678 'imstatus_xfire_size' => 'die Gr��e des Buttons, von $1 (gr��te) bis $2 (kleinste).',
77 -
 79+
7880 'imstatus_yahoo_style' => 'der Stil des Buttons, von $1 (kleinste) bis $2 (gr��te), $3 und $4 sind f�r Voicemail.',
7981 );
80 -?>
\ No newline at end of file

Status & tagging log