mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 23:26:41 +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 = $this->format_options('checkbox', $name, $options);
|
||||||
|
|
||||||
$options['checked'] = $checked; //comes as separate argument just for convenience
|
$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.
|
$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>" : "";
|
$post = (vartrue($options['label'])) ? $options['label']."</label>" : "";
|
||||||
unset($options['label']); // not to be used as attribute;
|
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;
|
$obj2 = new convert;
|
||||||
|
|
||||||
$chatList = $sql->db_getList();
|
$chatList = $sql->db_getList();
|
||||||
|
$frm = e107::getForm();
|
||||||
foreach ($chatList as $row)
|
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']);
|
$CHAT_TABLE_NICK = preg_replace("/[0-9]+\./", "", $row['cb_nick']);
|
||||||
$cb_message = $tp->toHTML($row['cb_message'], TRUE,'USER_BODY');
|
$cb_message = $tp->toHTML($row['cb_message'], TRUE,'USER_BODY');
|
||||||
|
|
||||||
if($row['cb_blocked'])
|
if($row['cb_blocked'])
|
||||||
{
|
{
|
||||||
$cb_message .= "<br />".CHATBOX_L25;
|
$cb_message .= "<br />".CHATBOX_L25;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CB_MOD)
|
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'])
|
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
|
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;
|
$CHAT_TABLE_MESSAGE = $cb_message;
|
||||||
|
@@ -5,25 +5,24 @@ if (!defined('e107_INIT')) { exit; }
|
|||||||
// ##### CHAT TABLE -----------------------------------------------------------------------------
|
// ##### CHAT TABLE -----------------------------------------------------------------------------
|
||||||
if(!$CHAT_TABLE_START){
|
if(!$CHAT_TABLE_START){
|
||||||
$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)
|
if(!$CHAT_TABLE)
|
||||||
{
|
{
|
||||||
//TODO review bullet
|
//TODO review bullet
|
||||||
$CHAT_TABLE = "
|
$CHAT_TABLE = "<tr><td
|
||||||
<div class='spacer'>
|
<div class='spacer'>
|
||||||
<div class='{CHAT_TABLE_FLAG}'>
|
<div class='{CHAT_TABLE_FLAG}'>
|
||||||
<img src='".THEME."images/bullet2.gif' alt='bullet' />
|
|
||||||
<b>{CHAT_TABLE_NICK}</b> ".CHATBOX_L22." {CHAT_TABLE_DATESTAMP}
|
<b>{CHAT_TABLE_NICK}</b> ".CHATBOX_L22." {CHAT_TABLE_DATESTAMP}
|
||||||
<br />
|
<br />
|
||||||
<div class='defaulttext'><i>{CHAT_TABLE_MESSAGE}</i></div>
|
<div class='defaulttext'><i>{CHAT_TABLE_MESSAGE}</i></div>
|
||||||
</div>
|
</div>
|
||||||
</div>";
|
</div></td></tr>";
|
||||||
|
|
||||||
}
|
}
|
||||||
if(!$CHAT_TABLE_END){
|
if(!$CHAT_TABLE_END){
|
||||||
$CHAT_TABLE_END = "
|
$CHAT_TABLE_END = "
|
||||||
</td></tr></table>";
|
</table>";
|
||||||
}
|
}
|
||||||
// ##### ------------------------------------------------------------------------------------------
|
// ##### ------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -808,14 +808,20 @@ $(document).ready(function()
|
|||||||
|
|
||||||
|
|
||||||
function expandit(e) {
|
function expandit(e) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// var href = ($(e).is("a")) ? $(e).attr("href") : '';
|
// var href = ($(e).is("a")) ? $(e).attr("href") : '';
|
||||||
if($(e).is("a"))
|
if($(e).is("a"))
|
||||||
{
|
{
|
||||||
var href = $(e).attr("href");
|
var href = $(e).attr("href");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var href = '';
|
||||||
|
}
|
||||||
|
|
||||||
if(href === "#" || e === null || href === undefined)
|
if(href === "#" || e === null || href === undefined)
|
||||||
{
|
{
|
||||||
idt = $(e).next("div");
|
idt = $(e).next("div");
|
||||||
@@ -824,8 +830,9 @@ $(document).ready(function()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var id = "#" + e;
|
var id = "#" + e;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(id).toggle("slow");
|
$(id).toggle("slow");
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user