Extension:AIM

Please Upgrade to 1.0a or above from all version to prevent a XSS attack The AIM Button rendered inside MediaWiki Use Extension Talk:AIM for feedback
 * syntax:" "

 & released to the public domain.

// WikiMedia AIM Extension Ver 1.0a (http://www.mediawiki.org/w/index.php?title=Extension:AIM)

//setup default varibles $wgAimKey = 'AIM_KEY_HERE';

// set up MediaWiki to react to the " " tag $wgExtensionFunctions[] = "wfAIM";

function wfAIM { global $wgParser; $wgParser->setHook( "aim", "RenderAIM" ); }

// the function that reacts to " "

function RenderAIM( $input, $argv ) {

// set your defaults for the style and action (0 to 26) (add)

$style_default = "0" ; $action_default = "sendim" ;

// the varibles are: $input

// escape $input to prevent XSS $input = htmlspecialchars($input) ;

// test to see if the optinal elements of the tags are set and supported. if not set them to the defaults

if( isset( $argv['style'] ) ){ $style = $argv['style'] ; if( !($style >= "0" AND $style <= "0") ){ $style = $style_default ; }       } else { $style = $style_default ; }

if( isset( $argv['action'] ) ){ $action = $argv['action'] ; if( !($action == "sendim") ){ $action = $action_default ; }       } else { $action = $action_default ; }

// set the url to the image and the stype of the image global $wgAimKey; $image = ' ' ;

// start the rendering the html outupt $output = ''; $output .= ''.$image.''; $output .= '';

// send the output to MediaWiki return $output; } ?>

Installation
Now you can use the extension with  AIM-Username  in the wiki
 * 1) Copy the code into a file (e.g. aim.php)
 * 2) Change $wgAimKey to your AIM key (get an aim key here).
 * 3) Save the file in the extensions directory of your mediawiki folder
 * 4) Add the line   to the end of your LocalSettings.php file

example
See an example of this add-on in action at: Cubic Path Wiki (run by the author of this extension)