From 479a29f09dc477abefd991741f40f4a10933a8be Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 8 May 2013 03:37:54 -0700 Subject: [PATCH] Chatbox BC Template fix. --- e107_plugins/chatbox_menu/chatbox_menu.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/e107_plugins/chatbox_menu/chatbox_menu.php b/e107_plugins/chatbox_menu/chatbox_menu.php index b5133427d..ee8bb29c3 100644 --- a/e107_plugins/chatbox_menu/chatbox_menu.php +++ b/e107_plugins/chatbox_menu/chatbox_menu.php @@ -69,7 +69,7 @@ if(!class_exists('chatbox_shortcodes')) class chatbox_shortcodes extends e_shortcode { - function sc_username($parm='') + function sc_cb_username($parm='') { list($cb_uid, $cb_nick) = explode(".", $this->var['cb_nick'], 2); if($this->var['user_name']) @@ -85,13 +85,13 @@ if(!class_exists('chatbox_shortcodes')) return $cb_nick; } - function sc_timedate($parm='') + function sc_cb_timedate($parm='') { return e107::getDate()->convert_date($this->var['cb_datestamp'], "relative"); } - function sc_message($parm = '') + function sc_cb_message($parm = '') { if($this->var['cb_blocked']) { @@ -295,8 +295,12 @@ if(!$text = $e107cache->retrieve("nq_chatbox")) if($CHATBOXSTYLE) { + $legacySrch = array('{USERNAME}','{MESSAGE}','{TIMEDATE}'); + $legacyRepl = array('{CB_USERNAME}','{CB_MESSAGE}','{CB_TIMEDATE}'); + + $CHATBOX_TEMPLATE['start'] = ""; - $CHATBOX_TEMPLATE['item'] = $CHATBOXSTYLE; + $CHATBOX_TEMPLATE['item'] = str_replace($legacySrch,$legacyRepl,$CHATBOXSTYLE); $CHATBOX_TEMPLATE['end'] = ""; } else // default chatbox style @@ -306,9 +310,9 @@ if(!$text = $e107cache->retrieve("nq_chatbox")) $CHATBOX_TEMPLATE['start'] = "