Wiki source for JabberPresence

Show raw source

=====Showing your status on Jabber=====


>> Version: **0.5**>>

Idea taken from [[ | CraoWiki]], so "toute coincidence ne serait pas fortuite". It is based on [[ | Edgar]] script so will try to implement all its functionnalities.

The action will be written in this form:

""{{jabberpresence jid="" iconset="phpbb" type="html" iconset="phpbb"}}""

and result of this will be:

**** {{image alt="Jabber status for" title="Jabber status for" url=""}}

===Available iconsets===
- gabber: {{image url=""}}
- stellar: {{image url=""}}
- dudes: {{image url=""}}
- icq: {{image url=""}}
- licq: {{image url=""}}
- phpbb: {{image url=""}}
- invision: {{image url=""}}
- frickenhuge: {{image url=""}}

===The code===

* Jabber Presence Action
* Displays selected user jabber status.
* @version 0.5
* @filename: jabberpresence.php
* @author: PivWan (based on a CraoWiki plugin)
* @email:
* @date:
* @license: GPL
* @description: A small action (first one) to display your jabber status (any server) on wikka.
* @usage: insert {{jabberpresence jid=""}}
* @param jid (required): user's jid
* @param type (optionnal): displays status as image, text or both (default: both). Allowed values are "image", "text" and "html"
* @param iconset (optionnal): if type=image or html, displays icon from selected iconset (see edgar's homepage or wikka for examples) (default gabber)

// If you're using your own edgar install, change URI below
$base_edgar_uri = "";

// Default values.
(!empty($vars['type'])) ? $type=$vars['type']: $type="html";
(!empty($vars['iconset'])) ? $iconset=$vars['iconset']: $iconset="gabber";

// jid is required!
if($vars['jid']!='' && !empty($vars['jid']))
$edgar_uri = $base_edgar_uri."?jid=".$vars['jid']."&type=".$type."&iconset=".$iconset;
echo file_get_contents($edgar_uri);
echo $this->Action('{{image alt="Jabber status for '.$vars['jid'].'" title="Jabber status for '.$vars['jid'].'" url="'.$edgar_uri.'"}}');
echo "No JID defined.";

It's very simple, as this is my first action.

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki