aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Chatroom_list.php
blob: e2aad0e0551be8a6088ff6ace3a61ac85abb2c3e (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
<?php

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')
			));
		}
	}
}