4 * Copyright (C) 2004 $ThePhpWikiProgrammingTeam
6 * This file is part of PhpWiki.
8 * PhpWiki is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * PhpWiki is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * A simple Jabber presence WikiPlugin.
25 * http://wiki.crao.net/index.php/JabberPr%E9sence/Source
26 * http://edgar.netflint.net/howto.php
29 * <<JabberPresence scripturl=http://edgar.netflint.net/status.php
30 * jid=yourid@jabberserver type=html iconset=phpbb >>
32 * @author: Arnaud Fontaine
35 if (!defined('MY_JABBER_ID'))
36 define('MY_JABBER_ID', $GLOBALS['request']->_user->UserName() . "@jabber.com"); // or "@netflint.net"
38 class WikiPlugin_JabberPresence
41 function getDescription()
43 return _("Display Jabber presence.");
46 // Establish default values for each of this plugin's arguments.
47 function getDefaultArguments()
49 return array('scripturl' => "http://edgar.netflint.net/status.php",
50 'jid' => MY_JABBER_ID,
52 'iconset' => "gabber");
55 function run($dbi, $argstr, $request)
57 extract($this->getArgs($argstr, $request));
58 // Any text that is returned will not be further transformed,
59 // so use html where necessary.
63 $html = HTML::img(array('src' => urlencode($scripturl) .
64 '&jid=' . urlencode($jid) .
65 '&type=' . urlencode($type) .
66 '&iconset=' . ($iconset),
76 // c-hanging-comment-ender-p: nil
77 // indent-tabs-mode: nil