User:LarryEitel/MSN Messenger

Blue Glass Arrow.svg MediaWiki-2020-logo.svg
This page should be moved to
Please do not move the page by hand. It will be imported by a administrator with the full edit history. In the meantime, you may continue to edit the page as normal.

<msn> Online Status TagEdit

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.

  $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="' . $username . '">' . 
		'<IMG SRC="' . $username . '/' . 
		'' . 
		'' . 
		'" ALT="MSN Instant Messenger Online Status Indicator - If Online, click to IM."></A>';
     return $output;