Showing your status on Jabber

Last edited by PivWan:
Replaces old-style internal links with new pipe-split links.
Fri, 20 May 2016 07:38 UTC [diff]

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: Jabber status for

Available iconsets

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.

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki