1<?php
2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
3//
4// All Rights Reserved. See copyright.txt for details and a complete list of authors.
5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
6// $Id$
7
8if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
9	header("location: index.php");
10	exit;
11}
12
13/**
14 * @return array
15 */
16function module_xmpp_info()
17{
18	return [
19		'description' => tra('Hold a chat session using XMPP (uses the ConverseJS client).'),
20		'name' => tra('XMPP'),
21		'params' => [
22			'show_controlbox_by_default' => [
23				'name' => tra('Show controlbox on load'),
24				'description' => tra('If controlbox should be shown after page load'),
25				'default' => 'y',
26				'filter' => 'alpha',
27			],
28		],
29		'prefs' => ['xmpp_feature'],
30		'title' => tra('XMPP'),
31		'type' => 'function'
32	];
33}
34
35/**
36 * @param $mod_reference
37 * @param $module_params
38 */
39function module_xmpp($mod_reference, &$module_params)
40{
41	TikiLib::lib('xmpp')->render_xmpp_client($module_params);
42}
43