Extension:Jabber

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Jabber Button

Release status: beta

Implementation Tag
Description Render Jabber Button showing users online status
Last Version 0.0 (2006-07-30)
MediaWiki 1.5. X
License No license specified
Download see below

[edit] Installation

  1. Copy the code into a file (e.g. Jabber.php)
  2. Save the file in the extensions directory of your MediaWiki folder
  3. Add the line require_once('extensions/Jabber.php'); to the end of your LocalSettings.php file

Now you can use the extension with <jabber>JIM</jabber> in the wiki

[edit] Jabber Presence Plug-In

Create a file called Jabber.php in your extensions folder:

<?php
$wgExtensionFunctions[] = "wfJabber";
 
// Extension credits that show up on Special:Version
$wgExtensionCredits['parserhook'][] = array(
        'name' => 'Jabber',
        'author' => 'Guy Taylor',
        'url' => 'http://www.mediawiki.org/wiki/Extension:Jabber',
        'description' => 'Render Jabber Button showing users online status.'
);
 
function wfJabber() {
        global $wgParser;
        $wgParser->setHook( "Jabber", "RenderJabber" );
}
 
function RenderJabber( $input ) {
 
        // escape $input to prevent XSS
        $input = htmlspecialchars($input) ;
 
        $output  = '<img src="http://jabber.example.com:9090/plugins/presence/status?jid='.$input.'" border="0">';
        return $output;
}

NOTE #1 : Replace jabber.example.com with your hostname.
NOTE #2 : You must run Wildfire 3.1.1 in order to be able to use the Presence Plugin. Upgrade then install the wildfire presence plugin on your server.
NOTE #3 : You must setup the Presence Plugin through the Wildfire admin page in order to allow anybody tu see users's status.

Usage:

<Jabber>user@jabber.example.com</Jabber>

This works perfectly on MediaWiki 1.7.2.

[edit] Related extensions

Chat Extensions
AIM | ICQ | IM Status | Jabber | Skype | Yahoo
Personal tools