aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Chatroom_list.php
blob: 42b92ddb25718b33e1b5b4d2d54533b76c11b222 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

/**
 *   * Name: Chantroom list
 *   * Description: A menu with links to your chatrooms
 *   * Requires: chat, channel, articles, cards, wiki
 */

namespace Zotlabs\Widget;

class Chatroom_list {

	function widget($arr) {

		if(! \App::$profile)
			return '';

		$r = \Zotlabs\Lib\Chatroom::roomlist(\App::$profile['profile_uid']);

		if($r) {
			return replace_macros(get_markup_template('chatroomlist.tpl'), array(
				'$header' => t('Chatrooms'),
				'$baseurl' => z_root(),
				'$nickname' => \App::$profile['channel_address'],
				'$items' => $r,
				'$overview' => t('Overview')
			));
		}
	}
}