User:LarryEitel/Skype

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Blue Glass Arrow.svg MediaWiki logo.png
This page should be moved to MediaWiki.org.
Please do not move the page by hand. It will be imported by a MediaWiki.org administrator with the full edit history. In the meantime, you may continue to edit the page as normal.

Situation[edit]

Skype Web Plugin Get personalized Jyve Web Tools to integrate advanced Skype functions to your blog, website, or online community group. One feature allows you to show your current Skype status WITH an HTML link to allow the user to click to dial. See an example. Problem is you need to spit out some HTML to do this.

<skype> Tag[edit]

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

My First Extension!![edit]

<?php
  $wgExtensionFunctions[] = "wfSkype";
 
 function wfSkype() {
     global $wgParser;
     $wgParser->setHook( "skype", "renderSkype" );
 }
 
 # The callback function for converting the input text to HTML output
 function renderSkype( $input, $argv ) {
     # $argv is an array containing any arguments passed to the extension like <example argument="foo" bar>..
     $output = '<a href="CALLTO://' . $input . '"><img src="http://www.skypepresence.com/callbutton/' . $input . '.gif" border="0"></a>';
     return $output;
 }
?>