mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Fixes #951 - Chatbox and emote issues.
This commit is contained in:
@@ -1292,6 +1292,9 @@ class e_form
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$labelClass = (!empty($options['inline'])) ? 'checkbox-inline' : 'checkbox';
|
||||
|
||||
$options = $this->format_options('checkbox', $name, $options);
|
||||
|
||||
$options['checked'] = $checked; //comes as separate argument just for convenience
|
||||
@@ -1300,7 +1303,9 @@ class e_form
|
||||
|
||||
$active = ($checked === true) ? " active" : ""; // allow for styling if needed.
|
||||
|
||||
$pre = (vartrue($options['label'])) ? "<label class='checkbox".$active."'>" : ""; // Bootstrap compatible markup
|
||||
|
||||
|
||||
$pre = (vartrue($options['label'])) ? "<label class='".$labelClass.$active."'>" : ""; // Bootstrap compatible markup
|
||||
$post = (vartrue($options['label'])) ? $options['label']."</label>" : "";
|
||||
unset($options['label']); // not to be used as attribute;
|
||||
|
||||
|
@@ -109,26 +109,35 @@ $sql->select("chatbox", "*", "{$qry_where} ORDER BY cb_datestamp DESC LIMIT ".in
|
||||
$obj2 = new convert;
|
||||
|
||||
$chatList = $sql->db_getList();
|
||||
$frm = e107::getForm();
|
||||
foreach ($chatList as $row)
|
||||
{
|
||||
$CHAT_TABLE_DATESTAMP = $obj2->convert_date($row['cb_datestamp'], "long");
|
||||
$CHAT_TABLE_DATESTAMP = $tp->toDate($row['cb_datestamp'], "relative");
|
||||
$CHAT_TABLE_NICK = preg_replace("/[0-9]+\./", "", $row['cb_nick']);
|
||||
$cb_message = $tp->toHTML($row['cb_message'], TRUE,'USER_BODY');
|
||||
|
||||
if($row['cb_blocked'])
|
||||
{
|
||||
$cb_message .= "<br />".CHATBOX_L25;
|
||||
}
|
||||
|
||||
if(CB_MOD)
|
||||
{
|
||||
$cb_message .= "<br /><input type='checkbox' name='delete[{$row['cb_id']}]' value='1' />".LAN_DELETE;
|
||||
$id = $row['cb_id'];
|
||||
$cb_message .= "<div class='checkbox'>";
|
||||
|
||||
$cb_message .= $frm->checkbox('delete['.$id.']',1, false, array('inline'=>true,'label'=>LAN_DELETE));
|
||||
|
||||
if($row['cb_blocked'])
|
||||
{
|
||||
$cb_message .= " <input type='checkbox' name='unblock[{$row['cb_id']}]' value='1' />".CHATBOX_L7;
|
||||
$cb_message .= $frm->checkbox('unblock['.$id.']',1, false, array('inline'=>true, 'label'=> CHATBOX_L7));
|
||||
}
|
||||
else
|
||||
{
|
||||
$cb_message .= " <input type='checkbox' name='block[{$row['cb_id']}]' value='1' />".CHATBOX_L9;
|
||||
$cb_message .= $frm->checkbox('block['.$id.']',1, false, array('inline'=>true, 'label'=> CHATBOX_L9));
|
||||
}
|
||||
|
||||
$cb_message .= "</div>";
|
||||
}
|
||||
|
||||
$CHAT_TABLE_MESSAGE = $cb_message;
|
||||
|
@@ -5,25 +5,24 @@ if (!defined('e107_INIT')) { exit; }
|
||||
// ##### CHAT TABLE -----------------------------------------------------------------------------
|
||||
if(!$CHAT_TABLE_START){
|
||||
$CHAT_TABLE_START = "
|
||||
<br /><table style='width:100%'><tr><td>";
|
||||
<br /><table class='table table-striped' style='width:100%'>";
|
||||
}
|
||||
if(!$CHAT_TABLE)
|
||||
{
|
||||
//TODO review bullet
|
||||
$CHAT_TABLE = "
|
||||
$CHAT_TABLE = "<tr><td
|
||||
<div class='spacer'>
|
||||
<div class='{CHAT_TABLE_FLAG}'>
|
||||
<img src='".THEME."images/bullet2.gif' alt='bullet' />
|
||||
<b>{CHAT_TABLE_NICK}</b> ".CHATBOX_L22." {CHAT_TABLE_DATESTAMP}
|
||||
<br />
|
||||
<div class='defaulttext'><i>{CHAT_TABLE_MESSAGE}</i></div>
|
||||
</div>
|
||||
</div>";
|
||||
</div></td></tr>";
|
||||
|
||||
}
|
||||
if(!$CHAT_TABLE_END){
|
||||
$CHAT_TABLE_END = "
|
||||
</td></tr></table>";
|
||||
</table>";
|
||||
}
|
||||
// ##### ------------------------------------------------------------------------------------------
|
||||
|
||||
|
@@ -808,14 +808,20 @@ $(document).ready(function()
|
||||
|
||||
|
||||
function expandit(e) {
|
||||
|
||||
|
||||
|
||||
|
||||
// var href = ($(e).is("a")) ? $(e).attr("href") : '';
|
||||
if($(e).is("a"))
|
||||
{
|
||||
var href = $(e).attr("href");
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
var href = '';
|
||||
}
|
||||
|
||||
if(href === "#" || e === null || href === undefined)
|
||||
{
|
||||
idt = $(e).next("div");
|
||||
@@ -824,8 +830,9 @@ $(document).ready(function()
|
||||
return false;
|
||||
}
|
||||
|
||||
var id = "#" + e;
|
||||
|
||||
var id = "#" + e;
|
||||
|
||||
|
||||
|
||||
$(id).toggle("slow");
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user