Skype extension: Difference between revisions
Content deleted Content added
Thomas Klein (talk | contribs) No edit summary |
m {{MovedToMediaWiki}} |
||
(16 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{MovedToMediaWiki|Extension:Skype}} |
|||
{{extension |
|||
History imported. [[User:IAlex|<b><font color="#66A7CC">i</font><font color="#9966CC">Alex</font></b>]] 19:02, 8 November 2007 (UTC) |
|||
|name = Skype Button |
|||
|type = Parser extension |
|||
|maturity = Release |
|||
|mediawiki = 1.5.5 |
|||
|version = 1.0 |
|||
|update = 11-05-2006 |
|||
|description = Render Skype Button showing users online status |
|||
}} |
|||
Hopefully a collection of Skype extensions. To start off with the Skype Button. Feel free to add, edit and talk |
|||
=Skype Button= |
|||
The Skype Button rendered inside MediaWiki using the simple syntax of<br/> |
|||
:"<code><nowiki><skype>user_name</skype></nowiki></code>" |
|||
<br /> |
|||
'''Skype Privacy''': To enable your status to be shown online please select<br /> |
|||
Tools->Options->Privacy there is a button called "Allow my status to be shown on the web". Enable it |
|||
<br /> |
|||
<pre> |
|||
<?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 = '<!-- Skype "My status" button http://www.skype.com/go/skypebuttons -->'; |
|||
$output .= '<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>'; |
|||
$output .= '<a href="skype:'; |
|||
$output .= $input ; |
|||
$output .= '?call">'; |
|||
$output .= '<img src="http://mystatus.skype.com/bigclassic/'; |
|||
$output .= $input ; |
|||
$output .= '" style="border: none;" width="182" height="44" alt="My status" /></a>'; |
|||
return $output; |
|||
} |
|||
?> |
|||
</pre> |
|||
== Installation == |
|||
# Copy the code into a file (e.g. skype.php) |
|||
# Save the file in the ''extensions'' directory of your mediawiki folder |
|||
# Add the line <code>include('extensions/skype.php');</code> to the '''end''' of your LocalSettings.php file |
|||
Now you can use the extension with ''<skype>Skype-Username</skype>'' in the wiki |
|||
==Beta== |
|||
{{extension |
|||
|name = Skype Button |
|||
|type = Parser extension |
|||
|maturity = Beta |
|||
|mediawiki = 1.6.5 |
|||
|version = 1.1 |
|||
|update = 11-05-2006 |
|||
|description = Render Skype Buttons showing users online status |
|||
}} |
|||
Allow the "balloon" or "Classic" design to be used using: |
|||
:"<code><nowiki><skype style="style_name">Skype-Username</skype></nowiki></code>" |
|||
<br /> |
|||
<br /> |
|||
see [[Talk:Skype_extension]] for more information on the beta |
|||
<br /> |
|||
<pre> |
|||
<?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 ) { |
|||
if( !isset( $argv['style'] ) ){ |
|||
$skype_style = "bigclassic" ; |
|||
} else { |
|||
$skype_style = $argv['style'] ; |
|||
} |
|||
switch( $skype_style ){ |
|||
case "balloon": |
|||
$skype_width = 150 ; |
|||
$skype_height = 60 ; |
|||
break; |
|||
case "bigclassic": |
|||
$skype_width = 182 ; |
|||
$skype_height = 44 ; |
|||
break; |
|||
case "smallclassic": |
|||
$skype_width = 114 ; |
|||
$skype_height = 20 ; |
|||
break; |
|||
default: |
|||
$skype_style = "bigclassic" ; |
|||
$skype_width = 182 ; |
|||
$skype_height = 44 ; |
|||
} |
|||
$output = '<!-- Skype "My status" button http://www.skype.com/go/skypebuttons -->'; |
|||
$output .= '<!-- MediaWiki extension http://meta.wikimedia.org/w/index.php?title=Skype_extension -->'; |
|||
$output .= '<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>'; |
|||
$output .= '<a href="skype:'.$input.'?call">'; |
|||
$output .= '<img src="http://mystatus.skype.com/'.$skype_style.'/'.$input.'" ' ; |
|||
$output .= 'style="border: none; width: '.$skype_width.'px; height: '.$skype_height.'px;" alt="My status" /></a>'; |
|||
$output .= '<!-- end of skype button -->'; |
|||
return $output; |
|||
} |
|||
?> |
|||
</pre> |
|||
[[Category:MediaWiki extensions]] |
Latest revision as of 19:02, 8 November 2007
This page has been moved to Extension:Skype on mediawiki.org.
Any modifications or additions to this page should be made on mediawiki.org instead. |
History imported. iAlex 19:02, 8 November 2007 (UTC)