diff options
Diffstat (limited to 'include/widgets.php')
-rw-r--r-- | include/widgets.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php index efa350785..0151f7c27 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -576,3 +576,16 @@ function widget_menu_preview($arr) { require_once('include/menu.php'); return menu_render(get_app()->data['menu_item']); } + +function widget_chatroom_list($arr) { + require_once("include/chat.php"); + $r = chatroom_list(local_user()); + $channel = get_app()->get_channel(); + return replace_macros(get_markup_template('chatroomlist.tpl'),array( + '$header' => t('Chat Rooms'), + '$baseurl' => z_root(), + '$nickname' => $channel['channel_address'], + '$items' => $r, + )); +} + |