User:LarryEitel/MSN Messenger

 
A proposal to move this page to MediaWiki.org was rejected.

<msn> Online Status Tag

edit

Users can just insert a tag like <msn>YourMessengerUserNameHere</msn> into any wiki page and will show a MSN status icon WITH a link for the user to click to dial.

Click here for our usage notes.

<?php
  $wgExtensionFunctions[] = "wfMSN";
 
 function wfMSN() {
     global $wgParser;
     $wgParser->setHook( "msn", "renderMSN" );
 }
 
 # The callback function for converting the input text to HTML output
 function renderMSN( $input, $argv ) {
     # $argv is an array containing any arguments passed to the extension like <example argument="foo" bar>..


	$usernameParts = explode( ',', $input);
	$username = '';
	
	for($i = 0; $i < sizeof($usernameParts ); $i++) {
		$username .= trim($usernameParts [$i]);
	}

     $output = '<A HREF="http://www.funnyweb.dk:8080/message/msn/' . $username . '">' . 
		'<IMG SRC="http://www.funnyweb.dk:8080/msn/' . $username . '/' . 
		'onurl=www.funnyweb.dk/osi/iconset1/msnonline.gif/' . 
		'offurl=www.funnyweb.dk/osi/iconset1/msnoffline.gif/' . 
		'unknownurl=www.funnyweb.dk/osi/iconset1/msnunknown.gif" ALT="MSN Instant Messenger Online Status Indicator - If Online, click to IM."></A>';
		
     return $output;
 }
?>