aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-05 19:16:12 -0800
committerfriendica <info@friendica.com>2014-02-05 19:16:12 -0800
commit05a70a8760d705e80c548d96a9d083ab032dbd8b (patch)
tree5ebeac8669021d080eefc11118818ef669e099f9
parentcb6716a644dad4c7c196330cf945de36a000e5a3 (diff)
downloadvolse-hubzilla-05a70a8760d705e80c548d96a9d083ab032dbd8b.tar.gz
volse-hubzilla-05a70a8760d705e80c548d96a9d083ab032dbd8b.tar.bz2
volse-hubzilla-05a70a8760d705e80c548d96a9d083ab032dbd8b.zip
add chatroom links
-rw-r--r--include/conversation.php14
-rw-r--r--mod/chat.php11
2 files changed, 24 insertions, 1 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 633435871..77c7bac70 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1488,6 +1488,19 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
'id' => 'files-tab',
);
}
+
+ require_once('include/chat.php');
+ $chats = chatroom_list($a->profile['profile_uid']);
+
+ $tabs[] = array(
+ 'label' => t('Chatrooms') . '(' . count($chats) . ')',
+ 'url' => $a->get_baseurl() . '/chat/' . $nickname,
+ 'sel' => ((argv(0) == 'chat') ? 'active' : ''),
+ 'title' => t('Chatrooms'),
+ 'id' => 'chat-tab',
+ );
+
+
if($is_owner) {
$tabs[] = array(
'label' => t('Events'),
@@ -1506,6 +1519,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
);
}
+
if($is_owner && feature_enabled($a->profile['profile_uid'],'webpages')) {
$tabs[] = array(
'label' => t('Webpages'),
diff --git a/mod/chat.php b/mod/chat.php
index e79973aef..e3725830c 100644
--- a/mod/chat.php
+++ b/mod/chat.php
@@ -155,6 +155,15 @@ function chat_content(&$a) {
require_once('include/widgets.php');
- return widget_chatroom_list(array());
+ $o = replace_macros(get_markup_template('chatrooms.tpl'), array(
+ '$header' => sprintf( t('%1$s\'s Chatrooms'), $a->profile['name']),
+ '$baseurl' => z_root(),
+ '$nickname' => $channel['channel_address'],
+ '$rooms' => widget_chatroom_list(array()),
+ '$newroom' => t('New Chatroom'),
+ '$is_owner' => ((local_user() && local_user() == $a->profile['profile_uid']) ? 1 : 0)
+ ));
+
+ return $o;
} \ No newline at end of file