mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Issue #213 - Chatbox template BC issue.
This commit is contained in:
@@ -15,7 +15,12 @@
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!defined("USER_WIDTH")){ define("USER_WIDTH", "width:auto"); }
|
||||
if (!defined("USER_WIDTH"))
|
||||
{
|
||||
$uw = (deftrue('e_BOOTSTRAP')) ? "" : "width:97%";
|
||||
define("USER_WIDTH", $uw);
|
||||
}
|
||||
|
||||
|
||||
// global $usersettings_shortcodes, $pref;
|
||||
|
||||
|
@@ -64,9 +64,12 @@ $emessage='';
|
||||
|
||||
|
||||
// FIX - using generic sc names is affecting old installs/templates and global wrappers (e.g. sc_style[USERNAME])
|
||||
class chatbox_shortcodes extends e_shortcode
|
||||
if(!class_exists('chatbox_shortcodes'))
|
||||
{
|
||||
function sc_cb_username($parm='')
|
||||
class chatbox_shortcodes extends e_shortcode
|
||||
{
|
||||
|
||||
function sc_username($parm='')
|
||||
{
|
||||
list($cb_uid, $cb_nick) = explode(".", $this->var['cb_nick'], 2);
|
||||
if($this->var['user_name'])
|
||||
@@ -82,13 +85,13 @@ class chatbox_shortcodes extends e_shortcode
|
||||
return $cb_nick;
|
||||
}
|
||||
|
||||
function sc_cb_timedate($parm='')
|
||||
function sc_timedate($parm='')
|
||||
{
|
||||
return e107::getDate()->convert_date($this->var['cb_datestamp'], "relative");
|
||||
}
|
||||
|
||||
|
||||
function sc_cb_message($parm = '')
|
||||
function sc_message($parm = '')
|
||||
{
|
||||
if($this->var['cb_blocked'])
|
||||
{
|
||||
@@ -130,6 +133,7 @@ class chatbox_shortcodes extends e_shortcode
|
||||
return $bullet;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +150,6 @@ class chatbox_shortcodes extends e_shortcode
|
||||
|
||||
|
||||
|
||||
|
||||
if((isset($_POST['chat_submit']) || e_AJAX_REQUEST) && $_POST['cmessage'] != '')
|
||||
{
|
||||
if(!USER && !$pref['anon_post'])
|
||||
@@ -290,7 +293,6 @@ if(!$text = $e107cache->retrieve("nq_chatbox"))
|
||||
|
||||
global $CHATBOXSTYLE;
|
||||
|
||||
|
||||
if($CHATBOXSTYLE)
|
||||
{
|
||||
$CHATBOX_TEMPLATE['start'] = "";
|
||||
@@ -303,9 +305,9 @@ if(!$text = $e107cache->retrieve("nq_chatbox"))
|
||||
// FIXME - move to template
|
||||
$CHATBOX_TEMPLATE['start'] = "<ul class='unstyled'>";
|
||||
$CHATBOX_TEMPLATE['item'] = "<li>
|
||||
{CB_AVATAR} <b>{CB_USERNAME}</b>
|
||||
<small class='muted smalltext'>{CB_TIMEDATE}</small><br />
|
||||
<p style='margin-left:50px'>{CB_MESSAGE}</p>
|
||||
{CB_AVATAR} <b>{USERNAME}</b>
|
||||
<small class='muted smalltext'>{TIMEDATE}</small><br />
|
||||
<p style='margin-left:50px'>{MESSAGE}</p>
|
||||
</li>\n";
|
||||
|
||||
$CHATBOX_TEMPLATE['end'] = "</ul>";
|
||||
|
Reference in New Issue
Block a user