aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-10-17 14:54:27 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-10-17 14:54:27 -0700
commit1d2797dc1fb51311e2f566ae792ee1dbb03c315c (patch)
treea9eab658cea2a2425aae70f2b84120f185b56e41
parent4b984f98193d8f9fad4c89aade378e7df238a708 (diff)
downloadvolse-hubzilla-1d2797dc1fb51311e2f566ae792ee1dbb03c315c.tar.gz
volse-hubzilla-1d2797dc1fb51311e2f566ae792ee1dbb03c315c.tar.bz2
volse-hubzilla-1d2797dc1fb51311e2f566ae792ee1dbb03c315c.zip
bring back chat expiration setting and adjust chat size for our now smaller content region
-rw-r--r--mod/chat.php4
-rw-r--r--view/css/mod_chat.css2
-rw-r--r--view/tpl/chatroom_new.tpl1
3 files changed, 6 insertions, 1 deletions
diff --git a/mod/chat.php b/mod/chat.php
index ef9089b6f..79a5c050b 100644
--- a/mod/chat.php
+++ b/mod/chat.php
@@ -59,6 +59,9 @@ function chat_post(&$a) {
$arr = $acl->get();
$arr['name'] = $room;
+ $arr['expire'] = intval($_POST['chat_expire']);
+ if(intval($arr['expire']) < 0)
+ $arr['expire'] = 0;
chatroom_create($channel,$arr);
@@ -204,6 +207,7 @@ function chat_content(&$a) {
$o = replace_macros(get_markup_template('chatroom_new.tpl'),array(
'$header' => t('New Chatroom'),
'$name' => array('room_name',t('Chatroom Name'),'', ''),
+ '$chat_expire' => array('chat_expire',t('Expiration of chats (minutes)'),120,''),
'$permissions' => t('Permissions'),
'$acl' => populate_acl($channel_acl,false),
'$submit' => t('Submit')
diff --git a/view/css/mod_chat.css b/view/css/mod_chat.css
index 58680baec..99037aeef 100644
--- a/view/css/mod_chat.css
+++ b/view/css/mod_chat.css
@@ -6,7 +6,7 @@
#chatTopBar {
float: left;
height: 400px;
- width: 650px;
+ width: 400px;
overflow-y: auto;
}
diff --git a/view/tpl/chatroom_new.tpl b/view/tpl/chatroom_new.tpl
index c02e55c25..1317b672b 100644
--- a/view/tpl/chatroom_new.tpl
+++ b/view/tpl/chatroom_new.tpl
@@ -2,6 +2,7 @@
<form action="chat" method="post" >
{{include file="field_input.tpl" field=$name}}
+{{include file="field_input.tpl" field=$chat_expire}}
<button id="dbtn-acl" class="btn btn-default" data-toggle="modal" data-target="#aclModal" onclick="return false;" >{{$permissions}}</button>
{{$acl}}
<div class="clear"></div>