aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-20 21:37:18 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-20 21:37:18 -0700
commitd2565d0f61c139df6536ec9d90c10d7af29ef9e5 (patch)
tree1f21f01874913a3f5f1f86bdc857dccc143f6a3b
parent4fde0bf62e7ff0ad946eb76c7238402b2bdd6e85 (diff)
downloadvolse-hubzilla-d2565d0f61c139df6536ec9d90c10d7af29ef9e5.tar.gz
volse-hubzilla-d2565d0f61c139df6536ec9d90c10d7af29ef9e5.tar.bz2
volse-hubzilla-d2565d0f61c139df6536ec9d90c10d7af29ef9e5.zip
looks like chat has been neglected a bit recently
-rw-r--r--include/chat.php2
-rw-r--r--include/nav.php5
-rw-r--r--mod/chat.php2
-rw-r--r--view/tpl/bookmarkedchats.tpl2
-rw-r--r--view/tpl/chatroom_new.tpl2
-rw-r--r--view/tpl/chatrooms.tpl2
6 files changed, 7 insertions, 8 deletions
diff --git a/include/chat.php b/include/chat.php
index a0646265a..81c5c5d62 100644
--- a/include/chat.php
+++ b/include/chat.php
@@ -91,7 +91,7 @@ function chatroom_destroy($channel,$arr) {
return $ret;
}
- create_sync_packet($channel['channel_id'],array('chatroom' => $r));
+ build_sync_packet($channel['channel_id'],array('chatroom' => $r));
q("delete from chatroom where cr_id = %d",
intval($r[0]['cr_id'])
diff --git a/include/nav.php b/include/nav.php
index 59a7c83a3..972795e83 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -94,9 +94,8 @@ EOT;
require_once('include/chat.php');
$has_chats = chatroom_list_count(local_channel());
- if($has_chats) {
- $nav['usermenu'][] = Array('chat/' . $channel['channel_address'],t('Chat'),"",t('Your chatrooms'),'chat_nav_btn');
- }
+ $nav['usermenu'][] = Array('chat/' . $channel['channel_address'] . (($has_chats) ? '' : '/new'), t('Chat'),"",t('Your chatrooms'),'chat_nav_btn');
+
require_once('include/menu.php');
$has_bookmarks = menu_list_count(local_channel(),'',MENU_BOOKMARK) + menu_list_count(local_channel(),'',MENU_SYSTEM|MENU_BOOKMARK);
diff --git a/mod/chat.php b/mod/chat.php
index 9ad58bc32..ef9089b6f 100644
--- a/mod/chat.php
+++ b/mod/chat.php
@@ -67,7 +67,7 @@ function chat_post(&$a) {
intval(local_channel())
);
- create_sync_packet(0, array('chatroom' => $x));
+ build_sync_packet(0, array('chatroom' => $x));
if($x)
goaway(z_root() . '/chat/' . $channel['channel_address'] . '/' . $x[0]['cr_id']);
diff --git a/view/tpl/bookmarkedchats.tpl b/view/tpl/bookmarkedchats.tpl
index 7635bb826..ab4372c25 100644
--- a/view/tpl/bookmarkedchats.tpl
+++ b/view/tpl/bookmarkedchats.tpl
@@ -1,7 +1,7 @@
{{if $rooms}}
<div class="widget">
<h3>{{$header}}</h3>
-<ul class="bookmarkchat">
+<ul class="bookmarkchat nav nav-pills nav-stacked">
{{foreach $rooms as $room}}
<li><a href="{{$room.xchat_url}}">{{$room.xchat_desc}}</a></li>
{{/foreach}}
diff --git a/view/tpl/chatroom_new.tpl b/view/tpl/chatroom_new.tpl
index a559dba54..c02e55c25 100644
--- a/view/tpl/chatroom_new.tpl
+++ b/view/tpl/chatroom_new.tpl
@@ -2,7 +2,7 @@
<form action="chat" method="post" >
{{include file="field_input.tpl" field=$name}}
-<button id="dbtn-acl" class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" onclick="return false;" >{{$permissions}}</button>
+<button id="dbtn-acl" class="btn btn-default" data-toggle="modal" data-target="#aclModal" onclick="return false;" >{{$permissions}}</button>
{{$acl}}
<div class="clear"></div>
<br />
diff --git a/view/tpl/chatrooms.tpl b/view/tpl/chatrooms.tpl
index c3dae6627..836923231 100644
--- a/view/tpl/chatrooms.tpl
+++ b/view/tpl/chatrooms.tpl
@@ -2,7 +2,7 @@
{{if $is_owner}}
<p>
-<a href="{{$baseurl}}/chat/{{$nickname}}/new">{{$newroom}}</a>
+<span class="btn btn-default"><a href="{{$baseurl}}/chat/{{$nickname}}/new">{{$newroom}}</a></span>
</p>
{{/if}}