diff --git a/acp/ajaxchat_module.php b/acp/ajaxchat_module.php index 754a8d3..6a8e126 100644 --- a/acp/ajaxchat_module.php +++ b/acp/ajaxchat_module.php @@ -41,10 +41,27 @@ class ajaxchat_module /** @var string */ protected $php_ext; + protected $phpbb_log; + + protected $root_path; + public function main($id, $mode) { - global $phpbb_container, $table_prefix, $phpbb_root_path, $phpEx; + global $phpbb_container, $table_prefix, $phpbb_root_path, $phpEx, $phpbb_log, $root_path; + // Initialization + $this->auth = $phpbb_container->get('auth'); + $this->config = $phpbb_container->get('config'); + $this->config_text = $phpbb_container->get('config_text'); + $this->db = $phpbb_container->get('dbal.conn'); + $this->user = $phpbb_container->get('user'); + $this->template = $phpbb_container->get('template'); + $this->request = $phpbb_container->get('request'); + $this->phpbb_root_path = $phpbb_root_path; + $this->php_ext = $phpEx; + $this->phpbb_log = $phpbb_log; + $this->root_path = $root_path; + if (!defined('CHAT_TABLE')) { $chat_table = $table_prefix . 'ajax_chat'; @@ -57,20 +74,14 @@ public function main($id, $mode) } $this->id = $id; $this->mode = $mode; - // Initialization - $this->auth = $phpbb_container->get('auth'); - $this->config = $phpbb_container->get('config'); - $this->config_text = $phpbb_container->get('config_text'); - $this->db = $phpbb_container->get('dbal.conn'); - $this->user = $phpbb_container->get('user'); - $this->template = $phpbb_container->get('template'); - $this->request = $phpbb_container->get('request'); - $this->phpbb_root_path = $phpbb_root_path; - $this->php_ext = $phpEx; + if($this->request->variable('action', '')) + { + $this->action = $this->request->variable('action', '', true); + } + // Add the posting lang file needed by BBCodes $this->user->add_lang(array('posting')); - $this->u_action = $this->request->variable('action', '', true); - + $submit = ($this->request->is_set_post('submit')) ? true : false; $this->form_key = 'acp_ajax_chat'; add_form_key($this->form_key); @@ -95,31 +106,34 @@ public function main($id, $mode) 'status_online_chat' => ['lang' => 'STATUS_ONLINE_CHAT', 'validate' => 'int', 'type' => 'number:0:9999', 'explain' => true], 'status_idle_chat' => ['lang' => 'STATUS_IDLE_CHAT', 'validate' => 'int', 'type' => 'number:0:9999', 'explain' => true], 'status_offline_chat' => ['lang' => 'STATUS_OFFLINE_CHAT', 'validate' => 'int', 'type' => 'number:0:9999', 'explain' => true], - 'legend2' => 'AJAX_CHAT_LOCATION', + 'legend2' => 'AJAX_CHAT_LAYOUT', + 'ajax_chat_input_full' => ['lang' => 'AJAX_CHAT_INPUT_FULL', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => true], + 'ajax_chat_chatrow_full' => ['lang' => 'AJAX_CHAT_CHATROW_FULL', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => true], + 'legend3' => 'AJAX_CHAT_LOCATION', 'location_ajax_chat_override' => ['lang' => 'LOCATION_AJAX_CHAT_OVERRIDE', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => true], 'location_ajax_chat' => ['lang' => 'LOCATION_AJAX_CHAT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true], 'viewforum_ajax_chat_override' => ['lang' => 'VIEWFORUM_AJAX_CHAT_OVERRIDE', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => true], 'viewtopic_ajax_chat_override' => ['lang' => 'VIEWTOPIC_AJAX_CHAT_OVERRIDE', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => true], - 'legend3' => 'AJAX_CHAT_POSTS', + 'legend4' => 'AJAX_CHAT_POSTS', 'ajax_chat_forum_posts' => ['lang' => 'FORUM_POSTS_AJAX_CHAT', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], 'ajax_chat_forum_topic' => ['lang' => 'FORUM_POSTS_AJAX_CHAT_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], 'ajax_chat_forum_reply' => ['lang' => 'FORUM_POSTS_AJAX_CHAT_REPLY', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], 'ajax_chat_forum_edit' => ['lang' => 'FORUM_POSTS_AJAX_CHAT_EDIT', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], 'ajax_chat_forum_quote' => ['lang' => 'FORUM_POSTS_AJAX_CHAT_QUOTE', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => false], - 'legend4' => 'AJAX_CHAT_PRUNE', + 'legend5' => 'AJAX_CHAT_PRUNE', 'prune_ajax_chat' => ['lang' => 'PRUNE_AJAX_CHAT', 'validate' => 'bool', 'type' => 'radio:enabled_enabled', 'explain' => true], 'prune_keep_ajax_chat' => ['lang' => 'PRUNE_KEEP_AJAX_CHAT', 'validate' => 'int', 'type' => 'number', 'explain' => false], 'prune_now' => ['lang' => 'PRUNE_NOW', 'validate' => 'bool', 'type' => 'custom', 'explain' => false, 'method' => 'prune_chat'], 'truncate_now' => ['lang' => 'TRUNCATE_NOW', 'validate' => 'bool', 'type' => 'custom', 'explain' => false, 'method' => 'truncate_chat'], 'ajax_chat_counter' => ['lang' => 'CHAT_COUNTER', 'validate' => 'bool', 'type' => 'custom', 'explain' => false, 'method' => 'chat_counter'], - 'legend5' => 'ACP_SUBMIT_CHANGES' + 'legend6' => 'ACP_SUBMIT_CHANGES' ], ]; - #region Submit + //region Submit if ($submit) { - $submit = $this->do_submit_stuff($display_vars); + $submit = $this->form_submition($display_vars); // If the submit was valid, so still submitted if ($submit) @@ -127,7 +141,7 @@ public function main($id, $mode) trigger_error($this->user->lang('CONFIG_UPDATED') . adm_back_link($this->u_action), E_USER_NOTICE); } } - #endregion + //endregion $this->generate_stuff_for_cfg_template($display_vars); @@ -161,12 +175,12 @@ public function prune_chat($value, $key) { if (!confirm_box(true)) { - if ($this->u_action === 'prune_chat') + if (isset($this->action) && $this->action === 'prune_chat') { confirm_box(false, $this->user->lang['CONFIRM_PRUNE_AJAXCHAT'], build_hidden_fields([ 'i' => $this->id, 'mode' => $this->mode, - 'action' => $this->u_action, + 'action' => $this->action, ])); } } @@ -176,7 +190,7 @@ public function prune_chat($value, $key) { trigger_error($this->user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } - if ($this->u_action === 'prune_chat') + if ($this->action === 'prune_chat') { $sql = 'SELECT message_id FROM ' . CHAT_TABLE . ' @@ -185,8 +199,10 @@ public function prune_chat($value, $key) $row = $this->db->sql_fetchfield('message_id'); $this->db->sql_freeresult($result); $sql1 = 'DELETE FROM ' . CHAT_TABLE . ' - WHERE `message_id` <= ' . (int) $row . ''; + WHERE message_id <= ' . (int) $row; $this->db->sql_query($sql1); + // Add the log to the ACP + $this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'PRUNE_LOG_AJAXCHAT', time()); if ($this->request->is_ajax()) { @@ -195,7 +211,8 @@ public function prune_chat($value, $key) } } $this->id = str_replace("\\", "-", $this->id); - return ''; + + return ''; } /** @@ -209,12 +226,12 @@ public function truncate_chat($value, $key) { if (!confirm_box(true)) { - if ($this->u_action === 'truncate_chat') + if (isset($this->action) && $this->action === 'truncate_chat') { confirm_box(false, $this->user->lang['CONFIRM_TRUNCATE_AJAXCHAT'], build_hidden_fields([ 'i' => $this->id, 'mode' => $this->mode, - 'action' => $this->u_action, + 'action' => $this->action, ])); } } @@ -224,10 +241,12 @@ public function truncate_chat($value, $key) { trigger_error($this->user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } - if ($this->u_action === 'truncate_chat') + if ($this->action === 'truncate_chat') { - $sql1 = 'TRUNCATE ' . CHAT_TABLE . ''; + $sql1 = 'TRUNCATE ' . CHAT_TABLE; $this->db->sql_query($sql1); + // Add the log to the ACP + $this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'TRUNCATE_LOG_AJAXCHAT', time()); if ($this->request->is_ajax()) { @@ -235,9 +254,9 @@ public function truncate_chat($value, $key) } } } - $this->id = str_replace("\\", "-", $this->id); - $action = append_sid('?i=' . $this->id . '&mode=' . $this->mode . '&action=truncate_chat'); - return ''; + $this->id = str_replace("\\", "-", $this->id); + + return ''; } /** @@ -249,7 +268,7 @@ public function truncate_chat($value, $key) * @param array $special_functions Assoziative Array with config values where special functions should run on submit instead of simply save the config value. Array should contain 'config_value' => function ($this) { function code here }, or 'config_value' => null if no function should run. * @return bool Submit valid or not. */ - protected function do_submit_stuff($display_vars, $special_functions = []) + protected function form_submition($display_vars, $special_functions = []) { $this->new_config = $this->config; $cfg_array = ($this->request->is_set('config')) ? $this->request->variable('config', ['' => ''], true) : $this->new_config; @@ -314,6 +333,8 @@ protected function do_submit_stuff($display_vars, $special_functions = []) $this->new_config[$config_name] = $cfg_array[$config_name]; $this->config->set($config_name, $cfg_array[$config_name]); } + // Add the log to the ACP + $this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'AJAX_CHAT_UPDATED_SETTINGS', time()); return true; } diff --git a/adm/style/ajax_chat.html b/adm/style/ajax_chat.html index 701dd00..3ce1e35 100644 --- a/adm/style/ajax_chat.html +++ b/adm/style/ajax_chat.html @@ -10,25 +10,25 @@ -

{L_ACP_AJAX_CHAT}

+

{{ lang('ACP_AJAX_CHAT') }}

-

{L_ACP_AJAX_CHAT_EXPLAIN}

+

{{ lang('ACP_AJAX_CHAT_EXPLAIN') }}

-

{L_WARNING}

+

{{ lang('WARNING') }}

{ERROR_MSG}

- +
- {L_AJAX_CHAT_RULES} + {{ lang('AJAX_CHAT_RULES') }} -

{L_RULES_AJAX_CHAT_EXPLAIN}

+

{{ lang('RULES_AJAX_CHAT_EXPLAIN') }}

@@ -39,17 +39,21 @@

{L_WARNING}

- + - + - +
-
{L_OPTIONS}{L_COLON} {BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}
+
{{ lang('OPTIONS') }}{{ lang('COLON') }} {BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}
+

+   + +

@@ -62,7 +66,7 @@

{L_WARNING}

-

{options.TITLE_EXPLAIN}
+

{options.TITLE_EXPLAIN}
{options.CONTENT}
@@ -70,8 +74,8 @@

{L_WARNING}

-   - +   +

{S_FORM_TOKEN} diff --git a/adm/style/event/acp_users_prefs_append.html b/adm/style/event/acp_users_prefs_append.html index 263fcfb..79b23c2 100644 --- a/adm/style/event/acp_users_prefs_append.html +++ b/adm/style/event/acp_users_prefs_append.html @@ -1 +1 @@ - + \ No newline at end of file diff --git a/adm/style/ucp_ajax_chat.html b/adm/style/ucp_ajax_chat.html index 1458629..f8c805a 100644 --- a/adm/style/ucp_ajax_chat.html +++ b/adm/style/ucp_ajax_chat.html @@ -1,67 +1,74 @@
- {L_USER_AJAXCHAT_SETTINGS} + {{ lang('USER_AJAXCHAT_SETTINGS') }}
-
+
- - + +
-
+
- - + +
-
+
- - + +
-
+
- - + +
-
+
- - + +
-
+
- - + +
-
+
- - + +
-
+
- - + +
-
+
- - + + +
+
+
+
+
+ +
diff --git a/composer.json b/composer.json index 71d2606..0ea66cb 100644 --- a/composer.json +++ b/composer.json @@ -3,20 +3,25 @@ "type": "phpbb-extension", "description": "Chat for phpBB 3.1", "homepage": "http://www.livemembersonly.com", - "version": "3.0.15-BETA", - "time": "2016-02-21", + "version": "3.0.16", + "time": "2016-06-05", "license": "GPL-2.0", "authors": [{ "name": "spaceace", "email": "spaceace@livemembersonly.com", "homepage": "http://www.livemembersonly.com", - "role": "Lead Developer" + "role": "Extension Developer" + }, + { + "name": "kasimi", + "homepage": "https://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=1330603", + "role": "Extension Co-Developer" }, { "name": "Kevin Roy", "email": "royk@myraytech.net", "homepage": "https://myraytech.net", - "role": "Author" + "role": "Extension Co-Developer" }], "require": { "php": ">= 5.4", diff --git a/config/routing.yml b/config/routing.yml index d924b7c..68b4198 100644 --- a/config/routing.yml +++ b/config/routing.yml @@ -1,11 +1,31 @@ spaceace_ajaxchat_popup: path: /chat/popup - defaults: {_controller: spaceace.ajaxchat.chat.controller:index} + defaults: {_controller: spaceace.ajaxchat.chat.controller:defaultAction} spaceace_ajaxchat_archive: path: /chat/archive - defaults: {_controller: spaceace.ajaxchat.chat.controller:index} + defaults: {_controller: spaceace.ajaxchat.chat.controller:defaultAction} + +spaceace_ajaxchat_edit: + path: /chat/edit/{chat_id} + defaults: {_controller: spaceace.ajaxchat.chat.controller:editAction} + +spaceace_ajaxchat_read: + path: /chat/read + defaults: {_controller: spaceace.ajaxchat.chat.controller:readAction} + +spaceace_ajaxchat_add: + path: /chat/add + defaults: {_controller: spaceace.ajaxchat.chat.controller:addAction} + +spaceace_ajaxchat_delete: + path: /chat/delete + defaults: {_controller: spaceace.ajaxchat.chat.controller:delAction} + +spaceace_ajaxchat_quote: + path: /chat/quotemessage + defaults: {_controller: spaceace.ajaxchat.chat.controller:chat_quote} spaceace_ajaxchat_chat: path: /chat - defaults: {_controller: spaceace.ajaxchat.chat.controller:index} \ No newline at end of file + defaults: {_controller: spaceace.ajaxchat.chat.controller:defaultAction} \ No newline at end of file diff --git a/controller/chat.php b/controller/chat.php index c72c23c..8c3a350 100644 --- a/controller/chat.php +++ b/controller/chat.php @@ -11,6 +11,7 @@ namespace spaceace\ajaxchat\controller; +use phpbb\exception\http_exception; use phpbb\user; use phpbb\template\template; use phpbb\db\driver\driver_interface as db_driver; @@ -25,9 +26,9 @@ /** * Main Chat Controller * - * @version 0.1.0-BETA + * @version 0.3.15-BETA * @package spaceace\ajaxchat - * @author Kevin Roy + * @author Kevin Roy * @author Spaceace */ class chat @@ -149,13 +150,13 @@ public function __construct(template $template, user $user, db_driver $db, auth $this->user->add_lang('posting'); $this->user->add_lang_ext('spaceace/ajaxchat', 'ajax_chat'); // sets desired status times - $this->times = [ + $this->times = [ 'online' => $this->config['status_online_chat'], 'idle' => $this->config['status_idle_chat'], 'offline' => $this->config['status_offline_chat'], ]; //set delay for each status - $this->delay = [ + $this->delay = [ 'online' => $this->config['delay_online_chat'], 'idle' => $this->config['delay_idle_chat'], 'offline' => $this->config['delay_offline_chat'], @@ -172,61 +173,27 @@ public function __construct(template $template, user $user, db_driver $db, auth define('CHAT_SESSIONS_TABLE', $chat_session_table); } - include $this->root_path . 'includes/functions_posting.' . $this->php_ext; - include $this->root_path . 'includes/functions_display.' . $this->php_ext; - $this->ext_path = $this->ext_manager->get_extension_path('spaceace/ajaxchat', true); $this->ext_path_web = $this->path_helper->update_web_root_path($this->ext_path); - $this->post = $this->request->get_super_global(\phpbb\request\request_interface::POST); - } - - public function index() - { //fixes smilies and avatar not loading properly on index page if (!defined('PHPBB_USE_BOARD_URL_PATH')) { define('PHPBB_USE_BOARD_URL_PATH', true); } + } - // sets a few variables before the actions - $this->mode = $this->request->variable('mode', 'default'); - $this->last_id = $this->request->variable('last_id', 0); - $this->last_time = $this->request->variable('last_time', 0); - $this->post_time = $this->request->variable('last_post', 0); - $this->read_interval = $this->request->variable('read_interval', 5000); - // Grabs the right Action depending on ajax requested mode - if ($this->mode === 'default') - { - $this->defaultAction(); - } - else if ($this->mode === 'read') - { - $this->readAction(); - } - else if ($this->mode === 'add') - { - $this->addAction(); - } - else if ($this->mode === 'smilies') - { - $this->smiliesAction(); - } - else if ($this->mode === 'delete') - { - $this->delAction(); - } - + public function index() + { // Sets a few variables - $bbcode_status = ($this->config['allow_bbcode'] && $this->config['auth_bbcode_pm'] && $this->auth->acl_get('u_ajaxchat_bbcode')) ? true : false; - $smilies_status = ($this->config['allow_smilies'] && $this->config['auth_smilies_pm'] && $this->auth->acl_get('u_pm_smilies')) ? true : false; - $img_status = ($this->config['auth_img_pm'] && $this->auth->acl_get('u_pm_img')) ? true : false; - $flash_status = ($this->config['auth_flash_pm'] && $this->auth->acl_get('u_pm_flash')) ? true : false; - $url_status = ($this->config['allow_post_links']) ? true : false; - $quote_status = true; - $this->mode = strtoupper($this->mode); - - $sql = 'SELECT `user_lastpost` FROM ' . CHAT_SESSIONS_TABLE . " WHERE user_id = {$this->user->data['user_id']}"; + $bbcode_status = ($this->config['allow_bbcode'] && $this->config['auth_bbcode_pm'] && $this->auth->acl_get('u_ajaxchat_bbcode')) ? true : false; + $smilies_status = ($this->config['allow_smilies'] && $this->config['auth_smilies_pm'] && $this->auth->acl_get('u_pm_smilies')) ? true : false; + $img_status = ($this->config['auth_img_pm'] && $this->auth->acl_get('u_pm_img')) ? true : false; + $flash_status = ($this->config['auth_flash_pm'] && $this->auth->acl_get('u_pm_flash')) ? true : false; + $url_status = ($this->config['allow_post_links']) ? true : false; + $quote_status = true; + + $sql = 'SELECT user_lastpost FROM ' . CHAT_SESSIONS_TABLE . ' WHERE user_id = ' . (int) $this->user->data['user_id']; $result = $this->db->sql_query($sql); $row = $this->db->sql_fetchrow($result); $this->db->sql_freeresult($result); @@ -256,45 +223,54 @@ public function index() { $last_post = $row['user_lastpost']; } - $details = base64_decode('Jm5ic3A7PGEgaHJlZj0iaHR0cDovL3d3dy5saXZlbWVtYmVyc29ubHkuY29tIiBzdHlsZT0iZm9udC13ZWlnaHQ6IGJvbGQ7Ij5BSkFYJm5ic3A7Q2hhdCZuYnNwOyZjb3B5OyZuYnNwOzIwMTU8L2E+Jm5ic3A7PHN0cm9uZz5MaXZlJm5ic3A7TWVtYmVycyZuYnNwO09ubHk8L3N0cm9uZz4='); + + add_form_key('ajax_chat_post'); //Assign the features template variable $this->template->assign_vars([ - 'BBCODE_STATUS' => ($bbcode_status) ? sprintf($this->user->lang['BBCODE_IS_ON'], 'root_path}faq.$this->php_ext", 'mode=bbcode') . '">', '') : sprintf($this->user->lang['BBCODE_IS_OFF'], 'root_path}faq.$this->php_ext", 'mode=bbcode') . '">', ''), - 'IMG_STATUS' => ($img_status) ? $this->user->lang['IMAGES_ARE_ON'] : $this->user->lang['IMAGES_ARE_OFF'], - 'FLASH_STATUS' => ($flash_status) ? $this->user->lang['FLASH_IS_ON'] : $this->user->lang['FLASH_IS_OFF'], - 'SMILIES_STATUS' => ($smilies_status) ? $this->user->lang['SMILIES_ARE_ON'] : $this->user->lang['SMILIES_ARE_OFF'], - 'URL_STATUS' => ($url_status) ? $this->user->lang['URL_IS_ON'] : $this->user->lang['URL_IS_OFF'], - 'S_LINKS_ALLOWED' => $url_status, - 'S_COMPOSE_PM' => true, - 'S_BBCODE_ALLOWED' => $bbcode_status, - 'S_SMILIES_ALLOWED' => $smilies_status, - 'S_BBCODE_IMG' => $img_status, - 'S_BBCODE_FLASH' => $flash_status, - 'S_BBCODE_QUOTE' => $quote_status, - 'S_BBCODE_URL' => $url_status, - 'L_DETAILS' => $details, - 'REFRESH_TIME' => $refresh, - 'LAST_ID' => $this->last_id, - 'LAST_POST' => $last_post, - 'TIME' => time(), - 'L_VERSION' => '3.0.15-BETA', - 'STYLE_PATH' => generate_board_url() . '/styles/' . $this->user->style['style_path'], - 'EXT_STYLE_PATH' => '' . $this->ext_path_web . 'styles/', - 'FILENAME' => $this->helper->route('spaceace_ajaxchat_chat'), - 'S_CHAT' => (!$this->get) ? true : false, - 'S_GET_CHAT' => ($this->get) ? true : false, - 'S_' . $this->mode => true, + 'BBCODE_STATUS' => ($bbcode_status) ? sprintf($this->user->lang['BBCODE_IS_ON'], 'root_path}faq.$this->php_ext", 'mode=bbcode') . '">', '') : sprintf($this->user->lang['BBCODE_IS_OFF'], 'root_path}faq.$this->php_ext", 'mode=bbcode') . '">', ''), + 'IMG_STATUS' => ($img_status) ? $this->user->lang['IMAGES_ARE_ON'] : $this->user->lang['IMAGES_ARE_OFF'], + 'FLASH_STATUS' => ($flash_status) ? $this->user->lang['FLASH_IS_ON'] : $this->user->lang['FLASH_IS_OFF'], + 'SMILIES_STATUS' => ($smilies_status) ? $this->user->lang['SMILIES_ARE_ON'] : $this->user->lang['SMILIES_ARE_OFF'], + 'URL_STATUS' => ($url_status) ? $this->user->lang['URL_IS_ON'] : $this->user->lang['URL_IS_OFF'], + 'S_LINKS_ALLOWED' => $url_status, + 'S_COMPOSE_PM' => true, + 'S_BBCODE_ALLOWED' => $bbcode_status, + 'S_SMILIES_ALLOWED' => $smilies_status, + 'S_BBCODE_IMG' => $img_status, + 'S_BBCODE_FLASH' => $flash_status, + 'S_BBCODE_QUOTE' => $quote_status, + 'S_BBCODE_URL' => $url_status, + 'REFRESH_TIME' => $refresh, + 'LAST_ID' => $this->last_id, + 'LAST_POST' => $last_post, + 'TIME' => time(), + 'L_VERSION' => '3.0.16', + 'STYLE_PATH' => generate_board_url() . '/styles/' . $this->user->style['style_path'], + 'EXT_STYLE_PATH' => $this->ext_path_web . 'styles/', + 'FILENAME' => $this->helper->route('spaceace_ajaxchat_chat'), + 'S_CHAT' => (!$this->get) ? true : false, + 'S_GET_CHAT' => ($this->get) ? true : false, ]); + // Generate smiley listing + if (!function_exists('generate_smilies')) + { + include($this->root_path . 'includes/functions_posting.' . $this->php_ext); + } + generate_smilies('inline', 0); // Build custom bbcodes array + if (!function_exists('display_custom_bbcodes')) + { + include($this->root_path . 'includes/functions_display.' . $this->php_ext); + } + display_custom_bbcodes(); $this->whois_online(); - - return $this->helper->render('chat_body.html', $this->user->lang['CHAT_EXPLAIN']); + return; } /** @@ -302,16 +278,23 @@ public function index() * * @return multi */ - private function defaultAction() + public function defaultAction() { - $sql = 'SELECT c.*, p.post_visibility, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height + // sets a few variables before the actions + $this->mode = $this->request->variable('mode', 'default'); + $this->last_id = $this->request->variable('last_id', 0); + $this->last_time = $this->request->variable('last_time', 0); + $this->post_time = $this->request->variable('last_post', 0); + $this->read_interval = $this->request->variable('read_interval', 5000); + + $sql = 'SELECT c.*, p.post_visibility, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height FROM ' . CHAT_TABLE . ' as c LEFT JOIN ' . USERS_TABLE . ' as u ON c.user_id = u.user_id LEFT JOIN ' . POSTS_TABLE . ' as p ON c.post_id = p.post_id - WHERE c.message_id > ' . $this->last_id . ' + WHERE c.message_id > ' . (int) $this->last_id . ' ORDER BY c.message_id DESC'; - $result = $this->db->sql_query_limit($sql, (int) $this->config['ajax_chat_chat_amount']); - $rows = $this->db->sql_fetchrowset($result); + $result = $this->db->sql_query_limit($sql, (int) $this->config['ajax_chat_chat_amount']); + $rows = $this->db->sql_fetchrowset($result); foreach ($rows as $row) { @@ -323,13 +306,13 @@ private function defaultAction() { continue; } - $avatar = [ + $avatar = [ 'avatar' => $row['user_avatar'], 'avatar_type' => $row['user_avatar_type'], 'avatar_height' => $row['user_avatar_height'], 'avatar_width' => $row['user_avatar_width'], ]; - $avatar_thumb = [ + $avatar_thumb = [ 'avatar' => $row['user_avatar'], 'avatar_type' => $row['user_avatar_type'], 'avatar_height' => 20, @@ -361,15 +344,20 @@ private function defaultAction() 'CLASS' => ($row['message_id'] % 2) ? 1 : 2, 'USER_AVATAR' => $row['avatar'], 'USER_AVATAR_THUMB' => $row['avatar_thumb'], + 'S_AJAXCHAT_EDIT' => $this->user->data['user_type'] === USER_FOUNDER || $this->auth->acl_get('m_edit') || $this->user->data['user_id'] === $row['user_id'], + 'U_EDIT' => $this->helper->route('spaceace_ajaxchat_edit', array('chat_id' => $row['message_id'])), + ]); + $this->template->assign_vars([ + ]); } $this->db->sql_freeresult($result); if ($this->user->data['user_type'] == USER_FOUNDER || $this->user->data['user_type'] == USER_NORMAL) { - $sql = 'SELECT * - FROM ' . CHAT_SESSIONS_TABLE . " - WHERE user_id = {$this->user->data['user_id']}"; + $sql = 'SELECT * + FROM ' . CHAT_SESSIONS_TABLE . ' + WHERE user_id = ' . (int) $this->user->data['user_id']; $result = $this->db->sql_query($sql); $row = $this->db->sql_fetchrow($result); $this->db->sql_freeresult($result); @@ -383,7 +371,7 @@ private function defaultAction() 'user_login' => time(), 'user_lastupdate' => time(), ]; - $sql = 'INSERT INTO ' . CHAT_SESSIONS_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary); + $sql = 'INSERT INTO ' . CHAT_SESSIONS_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary); $this->db->sql_query($sql); } else @@ -394,14 +382,15 @@ private function defaultAction() 'user_login' => time(), 'user_lastupdate' => time(), ]; - $sql = 'UPDATE ' . CHAT_SESSIONS_TABLE . ' - SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . " - WHERE user_id = {$this->user->data['user_id']}"; + $sql = 'UPDATE ' . CHAT_SESSIONS_TABLE . ' + SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' + WHERE user_id = ' . (int) $this->user->data['user_id']; $this->db->sql_query($sql); } } - return; + $this->index(); + return $this->helper->render('chat_body.html', $this->user->lang['CHAT_EXPLAIN']); } /** @@ -418,22 +407,22 @@ private function whois_online() 'user_colour' => $this->user->data['user_colour'], 'user_lastupdate' => time(), ]; - $sql = 'UPDATE ' . CHAT_SESSIONS_TABLE . ' + $sql = 'UPDATE ' . CHAT_SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . " WHERE user_id = {$this->user->data['user_id']}"; $this->db->sql_query($sql); - $sql = 'DELETE FROM ' . CHAT_SESSIONS_TABLE . " WHERE user_lastupdate < $check_time"; + $sql = 'DELETE FROM ' . CHAT_SESSIONS_TABLE . ' WHERE user_lastupdate < ' . (int) $check_time; $this->db->sql_query($sql); - $sql = 'SELECT * - FROM ' . CHAT_SESSIONS_TABLE . " - WHERE user_lastupdate > $check_time - ORDER BY username ASC"; + $sql = 'SELECT * + FROM ' . CHAT_SESSIONS_TABLE . ' + WHERE user_lastupdate > ' . (int) $check_time . ' + ORDER BY username ASC'; $result = $this->db->sql_query($sql); $status_time = time(); - while ($row = $this->db->sql_fetchrow($result)) + while ($row = $this->db->sql_fetchrow($result)) { if ($this->check_hidden($row['user_id']) === false) { @@ -516,16 +505,23 @@ private function clean_username($user) * * @return boolean|null */ - private function readAction() + public function readAction() { - $sql = 'SELECT c.*, p.post_visibility, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height + // sets a few variables before the actions + $this->mode = $this->request->variable('mode', 'default'); + $this->last_id = $this->request->variable('last_id', 0); + $this->last_time = $this->request->variable('last_time', 0); + $this->post_time = $this->request->variable('last_post', 0); + $this->read_interval = $this->request->variable('read_interval', 5000); + + $sql = 'SELECT c.*, p.post_visibility, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height FROM ' . CHAT_TABLE . ' as c LEFT JOIN ' . USERS_TABLE . ' as u ON c.user_id = u.user_id LEFT JOIN ' . POSTS_TABLE . ' as p ON c.post_id = p.post_id - WHERE c.message_id > ' . $this->last_id . ' + WHERE c.message_id > ' . (int) $this->last_id . ' ORDER BY c.message_id DESC'; - $result = $this->db->sql_query_limit($sql, (int) $this->config['ajax_chat_chat_amount']); - $rows = $this->db->sql_fetchrowset($result); + $result = $this->db->sql_query_limit($sql, (int) $this->config['ajax_chat_chat_amount']); + $rows = $this->db->sql_fetchrowset($result); if (!sizeof($rows) && ((time() - 60) < $this->last_time)) { @@ -543,13 +539,13 @@ private function readAction() continue; } - $avatar = [ + $avatar = [ 'avatar' => $row['user_avatar'], 'avatar_type' => $row['user_avatar_type'], 'avatar_height' => $row['user_avatar_height'], 'avatar_width' => $row['user_avatar_width'], ]; - $avatar_thumb = [ + $avatar_thumb = [ 'avatar' => $row['user_avatar'], 'avatar_type' => $row['user_avatar_type'], 'avatar_height' => 20, @@ -571,6 +567,7 @@ private function readAction() $this->template->assign_vars([ 'SOUND_ENABLED' => true, 'SOUND_FILE' => 'sound', + 'S_READ' => true, ]); } @@ -589,7 +586,9 @@ private function readAction() 'USERNAME_A' => $row['username'], 'USER_COLOR' => $row['user_colour'], 'MESSAGE' => generate_text_for_display($row['message'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options']), + 'U_EDIT' => $this->helper->route('spaceace_ajaxchat_edit', array('chat_id' => $row['message_id'])), 'TIME' => $this->user->format_date($row['time'], $time), + 'S_AJAXCHAT_EDIT' => $this->user->data['user_type'] === USER_FOUNDER || $this->auth->acl_get('m_edit') || $this->user->data['user_id'] === $row['user_id'], 'CLASS' => ($row['message_id'] % 2) ? 1 : 2, 'USER_AVATAR' => $row['avatar'], 'USER_AVATAR_THUMB' => $row['avatar_thumb'], @@ -604,15 +603,165 @@ private function readAction() 'user_colour' => $this->user->data['user_colour'], 'user_lastupdate' => time(), ]; - $sql = 'UPDATE ' . CHAT_SESSIONS_TABLE . ' - SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . " - WHERE user_id = {$this->user->data['user_id']}"; + $sql = 'UPDATE ' . CHAT_SESSIONS_TABLE . ' + SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' + WHERE user_id = ' . (int) $this->user->data['user_id']; $result = $this->db->sql_query($sql); } $this->get = true; - return; + $this->index(); + return $this->helper->render('chat_body_readadd.html', $this->user->lang['CHAT_EXPLAIN']); + } + + /** + * Edit Action + * + * $return boolean|null + */ + public function editAction($chat_id) + { + // sets a few variables before the actions + $this->mode = $this->request->variable('mode', 'default'); + $this->last_id = $chat_id; + $this->last_time = $this->request->variable('last_time', 0); + $this->post_time = $this->request->variable('last_post', 0); + $this->read_interval = $this->request->variable('read_interval', 5000); + $submit = $this->request->is_set_post('submit'); + + $sql = 'SELECT message, user_id, bbcode_uid, bbcode_bitfield, bbcode_options + FROM ' . CHAT_TABLE . ' + WHERE message_id = ' . (int) $chat_id; + $result = $this->db->sql_query($sql); + $row = $this->db->sql_fetchrow($result); + $this->db->sql_freeresult($result); + + if (!$row || ($this->user->data['user_type'] !== USER_FOUNDER && !$this->auth->acl_get('m_edit') && $this->user->data['user_id'] !== $row['user_id'])) + { + throw new \phpbb\exception\http_exception(403, 'NO_EDIT_PERMISSION'); + } + + if ($submit) + { + $text = $this->request->variable('message', ''); + $uid = $bitfield = $flags = ''; + $errors = generate_text_for_storage($text, $uid, $bitfield, $flags, true, true, true); + if (sizeof($errors)) + { + $this->template->assign_vars(array( + 'PARSE_ERRORS' => implode('
', $errors), + )); + } + else + { + $sql_ary = [ + 'message' => $text, + 'bbcode_uid' => $uid, + 'bbcode_bitfield' => $bitfield, + 'bbcode_options' => $flags + ]; + $sql = 'UPDATE ' . CHAT_TABLE . ' + SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) + . ' WHERE message_id = ' . (int) $chat_id; + $this->db->sql_query($sql); + + $sql = 'SELECT c.*, p.post_visibility, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height + FROM ' . CHAT_TABLE . ' as c + LEFT JOIN ' . USERS_TABLE . ' as u ON c.user_id = u.user_id + LEFT JOIN ' . POSTS_TABLE . ' as p ON c.post_id = p.post_id + WHERE c.message_id = ' . (int) $chat_id . ' + ORDER BY c.message_id DESC'; + $result = $this->db->sql_query($sql); + $row = $this->db->sql_fetchrow($result); + $this->db->sql_freeresult($result); + + if ($row['forum_id'] && !$row['post_visibility'] == ITEM_APPROVED && !$this->auth->acl_get('m_approve', $row['forum_id'])) + { + return; + } + + if ($row['forum_id'] && !$this->auth->acl_get('f_read', $row['forum_id'])) + { + return; + } + + $avatar = [ + 'avatar' => $row['user_avatar'], + 'avatar_type' => $row['user_avatar_type'], + 'avatar_height' => $row['user_avatar_height'], + 'avatar_width' => $row['user_avatar_width'], + ]; + $avatar_thumb = [ + 'avatar' => $row['user_avatar'], + 'avatar_type' => $row['user_avatar_type'], + 'avatar_height' => 20, + 'avatar_width' => '', + ]; + $row['avatar'] = ($this->user->optionget('viewavatars')) ? phpbb_get_avatar($avatar, '') : ''; + $row['avatar_thumb'] = ($this->user->optionget('viewavatars')) ? phpbb_get_avatar($avatar_thumb, '') : ''; + + if ($this->count++ === 0) + { + if ($row['message_id'] !== null) + { + $this->last_id = $row['message_id']; + } + else + { + $this->last_id = 0; + } + $this->template->assign_vars([ + 'SOUND_ENABLED' => true, + 'SOUND_FILE' => 'sound', + 'S_READ' => true, + ]); + } + + if ($this->config['ajax_chat_time_setting']) + { + $time = $this->config['ajax_chat_time_setting']; + } + else + { + $time = $this->user->data['user_dateformat']; + } + + $this->template->assign_block_vars('chatrow', [ + 'MESSAGE_ID' => $row['message_id'], + 'USERNAME_FULL' => $this->clean_username(get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST'])), + 'USERNAME_A' => $row['username'], + 'USER_COLOR' => $row['user_colour'], + 'MESSAGE' => generate_text_for_display($row['message'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options']), + 'TIME' => $this->user->format_date($row['time'], $time), + 'CLASS' => ($row['message_id'] % 2) ? 1 : 2, + 'USER_AVATAR' => $row['avatar'], + 'USER_AVATAR_THUMB' => $row['avatar_thumb'], + 'S_AJAXCHAT_EDIT' => $this->user->data['user_type'] === USER_FOUNDER || $this->auth->acl_get('m_edit') || $this->user->data['user_id'] === $row['user_id'], + 'U_EDIT' => $this->helper->route('spaceace_ajaxchat_edit', array('chat_id' => $row['message_id'])), + ]); + + $this->template->assign_vars([ + 'STYLE_PATH' => generate_board_url() . '/styles/' . $this->user->style['style_path'], + 'S_BBCODE_ALLOWED' => ($this->config['allow_bbcode'] && $this->config['auth_bbcode_pm'] && $this->auth->acl_get('u_ajaxchat_bbcode')) ? true : false, + ]); + + return $this->helper->render('chat_body_readadd.html', $this->user->lang['CHAT_EXPLAIN']); + } + } + else + { + $text = generate_text_for_edit($row['message'], $row['bbcode_uid'], $row['bbcode_options']); + + $this->template->assign_vars([ + 'MESSAGE' => $text['text'], + 'CHAT_ID' => $chat_id, + 'S_AJAXCHAT_EDIT' => true, + ]); + + $this->index(); + return $this->helper->render('chat_edit.html'); + } } /** @@ -620,19 +769,31 @@ private function readAction() * * @return boolean|null */ - private function addAction() + public function addAction() { - $this->get = true; - $message = utf8_normalize_nfc($this->request->variable('message', '', true)); + if (!$this->auth->acl_get('u_ajaxchat_post') && $this->user->data['user_type'] !== USER_FOUNDER) + { + return; + } + + // sets a few variables before the actions + $this->mode = $this->request->variable('mode', 'default'); + $this->last_id = $this->request->variable('last_id', 0); + $this->last_time = $this->request->variable('last_time', 0); + $this->post_time = $this->request->variable('last_post', 0); + $this->read_interval = $this->request->variable('read_interval', 5000); + + $this->get = true; + $message = $this->request->variable('message', '', true); if (!$message) { return; } $this->clean_message($message); - $uid = $bitfield = $options = ''; - $allow_bbcode = $this->auth->acl_get('u_ajaxchat_bbcode'); - $allow_urls = $allow_smilies = true; + $uid = $bitfield = $options = ''; + $allow_bbcode = $this->auth->acl_get('u_ajaxchat_bbcode'); + $allow_urls = $allow_smilies = true; generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies); $sql_ary = [ @@ -640,7 +801,7 @@ private function addAction() 'user_id' => $this->user->data['user_id'], 'username' => $this->user->data['username'], 'user_colour' => $this->user->data['user_colour'], - 'message' => $message, + 'message' => str_replace('\'', '’', $message), 'bbcode_bitfield' => $bitfield, 'bbcode_uid' => $uid, 'bbcode_options' => $options, @@ -655,19 +816,19 @@ private function addAction() 'user_lastpost' => time(), 'user_lastupdate' => time(), ]; - $sql = 'UPDATE ' . CHAT_SESSIONS_TABLE . ' + $sql = 'UPDATE ' . CHAT_SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary2) . " WHERE user_id = {$this->user->data['user_id']}"; $result = $this->db->sql_query($sql); - $sql = 'SELECT c.*, p.post_visibility, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height + $sql = 'SELECT c.*, p.post_visibility, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height FROM ' . CHAT_TABLE . ' as c LEFT JOIN ' . USERS_TABLE . ' as u ON c.user_id = u.user_id LEFT JOIN ' . POSTS_TABLE . ' as p ON c.post_id = p.post_id - WHERE c.message_id > ' . $this->last_id . ' + WHERE c.message_id > ' . (int) $this->last_id . ' ORDER BY c.message_id DESC'; - $result = $this->db->sql_query_limit($sql, (int) $this->config['ajax_chat_chat_amount']); - $rows = $this->db->sql_fetchrowset($result); + $result = $this->db->sql_query_limit($sql, (int) $this->config['ajax_chat_chat_amount']); + $rows = $this->db->sql_fetchrowset($result); if (!sizeof($rows) && ((time() - 60) < $this->last_time)) { @@ -686,13 +847,13 @@ private function addAction() continue; } - $avatar = [ + $avatar = [ 'avatar' => $row['user_avatar'], 'avatar_type' => $row['user_avatar_type'], 'avatar_height' => $row['user_avatar_height'], 'avatar_width' => $row['user_avatar_width'], ]; - $avatar_thumb = [ + $avatar_thumb = [ 'avatar' => $row['user_avatar'], 'avatar_type' => $row['user_avatar_type'], 'avatar_height' => 20, @@ -707,6 +868,7 @@ private function addAction() $this->template->assign_vars([ 'SOUND_ENABLED' => true, 'SOUND_FILE' => 'soundout', + 'S_ADD' => true, ]); } @@ -729,11 +891,14 @@ private function addAction() 'CLASS' => ($row['message_id'] % 2) ? 1 : 2, 'USER_AVATAR' => $row['avatar'], 'USER_AVATAR_THUMB' => $row['avatar_thumb'], + 'S_AJAXCHAT_EDIT' => $this->user->data['user_type'] === USER_FOUNDER || $this->auth->acl_get('m_edit') || $this->user->data['user_id'] === $row['user_id'], + 'U_EDIT' => $this->helper->route('spaceace_ajaxchat_edit', array('chat_id' => $row['message_id'])), ]); } $this->db->sql_freeresult($result); - return; + $this->index(); + return $this->helper->render('chat_body_readadd.html', $this->user->lang['CHAT_EXPLAIN']); } /** @@ -741,11 +906,10 @@ private function addAction() * * @return boolean|null */ - private function delAction() + public function delAction() { $this->get = true; $chat_id = $this->request->variable('chat_id', 0); - if (!$chat_id) { return; @@ -756,19 +920,58 @@ private function delAction() return; } - $sql = 'DELETE FROM ' . CHAT_TABLE . " WHERE message_id = $chat_id"; + $sql = 'DELETE FROM ' . CHAT_TABLE . ' WHERE message_id = ' . (int) $chat_id; $this->db->sql_query($sql); return; } public function check_hidden($uid) { - $sql = 'SELECT `session_viewonline` ' - . 'FROM ' . SESSIONS_TABLE .' ' - . 'WHERE `session_user_id` = "' . $uid . '"'; - $result = $this->db->sql_query($sql); - $hidden = $this->db->sql_fetchrow($result); + $sql = 'SELECT session_viewonline ' + . 'FROM ' . SESSIONS_TABLE . ' ' + . 'WHERE session_user_id = ' . (int) $uid; + $result = $this->db->sql_query($sql); + $hidden = $this->db->sql_fetchrow($result); return (bool) $hidden['session_viewonline']; } + /** + * Quote function + * + */ + public function chat_quote() + { + $this->get = true; + $chat_id = $this->request->variable('chat_id', 0); + if (!$chat_id) + { + return; + } + + $sql = 'SELECT username, message, bbcode_uid, bbcode_bitfield, bbcode_options + FROM ' . CHAT_TABLE . ' + WHERE message_id = ' . (int) $chat_id; + $result = $this->db->sql_query($sql); + $row = $this->db->sql_fetchrow($result); + $this->db->sql_freeresult($result); + + if ($row) + { + $patterns = [ + '/\[color2=#[a-fA-F0-9]{6}\]/', + '/\[\/color2\]/', + ]; + $replacement = [ + '', + '', + ]; + $texts = generate_text_for_edit($row['message'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options']); + $cleaned_text = preg_replace($patterns, $replacement, html_entity_decode($texts['text'], ENT_QUOTES)); + + $new_text = '[quote="' . $row['username'] . '"] ' . $cleaned_text . ' [/quote]--!--'; + $this->index(); + echo $new_text; + } + } + } diff --git a/cron/task/prune_ajaxchat.php b/cron/task/prune_ajaxchat.php index e096ba1..d15ff51 100644 --- a/cron/task/prune_ajaxchat.php +++ b/cron/task/prune_ajaxchat.php @@ -58,7 +58,7 @@ public function run() $row = $this->db->sql_fetchfield('message_id'); $this->db->sql_freeresult($result); $sql1 = 'DELETE FROM ' . CHAT_TABLE . ' - WHERE `message_id` <= ' . (int) $row . ''; + WHERE message_id <= ' . (int) $row; $this->db->sql_query($sql1); // Add the log to the ACP. $this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'PRUNE_LOG_AJAXCHAT_AUTO', time()); diff --git a/event/listener.php b/event/listener.php index e5fb219..33cae04 100644 --- a/event/listener.php +++ b/event/listener.php @@ -230,6 +230,16 @@ public function page_header() $this->template->assign_var('S_AJAX_CHAT_VIEWTOPIC_OVERRIDE', true); } + if ($this->config['ajax_chat_input_full'] === '1') + { + $this->template->assign_var('S_AJAX_CHAT_INPUT_FULL', true); + } + + if ($this->config['ajax_chat_chatrow_full'] === '1') + { + $this->template->assign_var('S_AJAX_CHAT_CHATROW_FULL', true); + } + // Get chat rules data from the config_text object $chat_rules_data = $this->config_text->get_array(array( 'chat_rules_text', @@ -264,11 +274,11 @@ public function page_header() 'S_AJAX_CHAT_AVATAR_HOVER' => $this->user->data['user_ajax_chat_avatar_hover'], 'S_AJAX_CHAT_ONLINELIST' => $this->user->data['user_ajax_chat_onlinelist'], 'S_AJAX_CHAT_AUTOCOMPLETE' => $this->user->data['user_ajax_chat_autocomplete'], - 'S_AJAXCHAT_VIEW' => $this->auth->acl_get('u_ajaxchat_view'), - 'S_AJAXCHAT_POST' => $this->auth->acl_get('u_ajaxchat_post'), - 'S_AJAXCHAT_BBCODE' => $this->auth->acl_get('u_ajaxchat_bbcode'), - 'S_AJAXCHAT_EDIT' => $this->auth->acl_get('u_ajaxchat_edit'), - 'M_AJAXCHAT_DELETE' => $this->auth->acl_get('m_ajaxchat_delete'), + 'S_AJAXCHAT_VIEW' => ($this->user->data['user_type'] === USER_FOUNDER || $this->auth->acl_get('u_ajaxchat_view')) ? true : false, + 'S_AJAXCHAT_POST' => ($this->user->data['user_type'] === USER_FOUNDER || $this->auth->acl_get('u_ajaxchat_post')) ? true : false, + 'S_AJAXCHAT_BBCODE' => ($this->user->data['user_type'] === USER_FOUNDER || $this->auth->acl_get('u_ajaxchat_bbcode')) ? true : false, + 'M_AJAXCHAT_DELETE' => ($this->user->data['user_type'] === USER_FOUNDER || $this->auth->acl_get('m_ajaxchat_delete')) ? true : false, + 'S_AJAX_CHAT_MESSAGES_DOWN' => $this->user->data['user_ajax_chat_messages_down'], ) ); @@ -328,9 +338,6 @@ public function index() define('CHAT_SESSIONS_TABLE', $chat_session_table); } - include_once $this->root_path . 'includes/functions_posting.' . $this->php_ext; - include_once $this->root_path . 'includes/functions_display.' . $this->php_ext; - $this->mode = $this->request->variable('mode', 'default'); $this->last_id = $this->request->variable('last_id', 0); $this->last_time = $this->request->variable('last_time', 0); @@ -346,9 +353,9 @@ public function index() FROM ' . CHAT_TABLE . ' as c LEFT JOIN ' . USERS_TABLE . ' as u ON c.user_id = u.user_id LEFT JOIN ' . POSTS_TABLE . ' as p ON c.post_id = p.post_id - WHERE c.message_id > ' . $this->last_id . ' + WHERE c.message_id > ' . (int) $this->last_id . ' ORDER BY c.message_id DESC'; - $result = $this->db->sql_query_limit($sql, (int) $this->config['ajax_chat_chat_amount']); + $result = $this->db->sql_query_limit($sql, (int) $this->config['ajax_chat_index_amount']); $rows = $this->db->sql_fetchrowset($result); if (!sizeof($rows) && ((time() - 60) < $this->last_time)) @@ -407,6 +414,8 @@ public function index() 'CLASS' => ($row['message_id'] % 2) ? 1 : 2, 'USER_AVATAR' => $row['avatar'], 'USER_AVATAR_THUMB' => $row['avatar_thumb'], + 'S_AJAXCHAT_EDIT' => $this->user->data['user_type'] === USER_FOUNDER || $this->auth->acl_get('m_edit') || $this->user->data['user_id'] === $row['user_id'], + 'U_EDIT' => $this->helper->route('spaceace_ajaxchat_edit', array('chat_id' => $row['message_id'])), ]); } @@ -489,7 +498,7 @@ public function index() $last_post = $row['user_lastpost']; } - $details = base64_decode('Jm5ic3A7PGEgaHJlZj0iaHR0cDovL3d3dy5saXZlbWVtYmVyc29ubHkuY29tIiBzdHlsZT0iZm9udC13ZWlnaHQ6IGJvbGQ7Ij5BSkFYJm5ic3A7Q2hhdCZuYnNwOyZjb3B5OyZuYnNwOzIwMTU8L2E+Jm5ic3A7PHN0cm9uZz5MaXZlJm5ic3A7TWVtYmVycyZuYnNwO09ubHk8L3N0cm9uZz4='); + add_form_key('ajax_chat_post'); //Assign the features template variable $this->template->assign_vars([ @@ -506,23 +515,32 @@ public function index() 'S_BBCODE_FLASH' => $flash_status, 'S_BBCODE_QUOTE' => $quote_status, 'S_BBCODE_URL' => $url_status, - 'L_DETAILS' => $details, 'REFRESH_TIME' => $refresh, 'LAST_ID' => $this->last_id, 'LAST_POST' => $last_post, 'TIME' => time(), - 'L_VERSION' => '3.0.15-BETA', + 'L_VERSION' => '3.0.16', 'STYLE_PATH' => generate_board_url() . '/styles/' . $this->user->style['style_path'], - 'EXT_STYLE_PATH' => '' . $this->ext_path_web . 'styles/', + 'EXT_STYLE_PATH' => $this->ext_path_web . 'styles/', 'FILENAME' => $this->helper->route('spaceace_ajaxchat_chat'), 'S_GET_CHAT' => ($this->get) ? true : false, 'S_' . $this->mode => true, ]); // Generate smiley listing + if (!function_exists('generate_smilies')) + { + include($this->root_path . 'includes/functions_posting.' . $this->php_ext); + } + generate_smilies('inline', 0); // Build custom bbcodes array + if (!function_exists('display_custom_bbcodes')) + { + include($this->root_path . 'includes/functions_display.' . $this->php_ext); + } + display_custom_bbcodes(); $this->whois_online(); @@ -636,6 +654,7 @@ public function acp_users_chat_settings_get($event) 'user_ajax_chat_avatar_hover' => $this->request->variable('ajax_chat_avatar_hover', (bool) $user_row['user_ajax_chat_avatar_hover']), 'user_ajax_chat_onlinelist' => $this->request->variable('ajax_chat_onlinelist', (bool) $user_row['user_ajax_chat_onlinelist']), 'user_ajax_chat_autocomplete' => $this->request->variable('ajax_chat_autocomplete', (bool) $user_row['user_ajax_chat_autocomplete']), + 'user_ajax_chat_messages_down' => $this->request->variable('ajax_chat_messages_down', (bool) $user_row['user_ajax_chat_messages_down']), )); $event['data'] = $data; } @@ -667,6 +686,7 @@ public function acp_profile_ajax_chat_template($event) 'S_AJAX_CHAT_AVATAR_HOVER' => $data['user_ajax_chat_avatar_hover'], 'S_AJAX_CHAT_ONLINELIST' => $data['user_ajax_chat_onlinelist'], 'S_AJAX_CHAT_AUTOCOMPLETE' => $data['user_ajax_chat_autocomplete'], + 'S_AJAX_CHAT_MESSAGES_DOWN' => $data['user_ajax_chat_messages_down'], )); $event['user_prefs_data'] = $user_prefs_data; } @@ -692,6 +712,7 @@ public function ucp_profile_ajax_chat_set($event) 'user_ajax_chat_avatar_hover' => $event['data']['user_ajax_chat_avatar_hover'], 'user_ajax_chat_onlinelist' => $event['data']['user_ajax_chat_onlinelist'], 'user_ajax_chat_autocomplete' => $event['data']['user_ajax_chat_autocomplete'], + 'user_ajax_chat_messages_down' => $event['data']['user_ajax_chat_messages_down'], )); $event['sql_ary'] = $sql_ary; } @@ -817,11 +838,12 @@ private function clean_username($user) */ public function check_hidden($uid) { - $sql = 'SELECT `session_viewonline` ' - . 'FROM ' . SESSIONS_TABLE .' ' - . 'WHERE `session_user_id` = "' . $uid . '"'; - $result = $this->db->sql_query($sql); - $hidden = $this->db->sql_fetchrow($result); + $sql = 'SELECT session_viewonline ' + . 'FROM ' . SESSIONS_TABLE . ' ' + . 'WHERE session_user_id = ' . (int) $uid; + $result = $this->db->sql_query($sql); + $hidden = $this->db->sql_fetchrow($result); return (bool) $hidden['session_viewonline']; } + } diff --git a/language/en/ajax_chat.php b/language/en/ajax_chat.php index 63da222..62fa245 100644 --- a/language/en/ajax_chat.php +++ b/language/en/ajax_chat.php @@ -69,7 +69,11 @@ 'IE_NO_AJAX' => 'Your version of Internet Explorer does not support AJAX.', 'UPGRADE_BROWSER' => 'Status: Could not create XmlHttpRequest Object. Consider upgrading your browser.', 'NO_POST_IN_CHAT' => 'You do not have permission to post in chat.', + 'NO_EDIT_PERMISSION' => 'You do not have permission to edit this message.', 'DELETE_CHAT_COOKIE' => 'Delete cookie', 'DELETE_CHAT_COOKIE_EXPLAIN' => 'This button deletes the font colour hold cookie.', + // @copyright line. No translations below this line. + // Removing this from the template files will result in support no longer given. + 'DETAILS' => 'AJAX Chat © 2015 Live Members Only', ) ); diff --git a/language/en/info_acp_ajax_chat.php b/language/en/info_acp_ajax_chat.php index a5a5b53..55977e8 100644 --- a/language/en/info_acp_ajax_chat.php +++ b/language/en/info_acp_ajax_chat.php @@ -112,5 +112,11 @@ 'AJAX_CHAT_NAV_LINK_EXPLAIN' => 'Display Chat Center link on menubar after the FAQ link.', 'AJAX_CHAT_QUICK_LINK' => 'Display Chat Center link in Quick Links', 'AJAX_CHAT_QUICK_LINK_EXPLAIN' => 'Display Chat Center link in the Quick Links drop menu.', + 'AJAX_CHAT_UPDATED_SETTINGS' => 'Updated Ajax Chat settings', + 'AJAX_CHAT_LAYOUT' => 'Chat Layout', + 'AJAX_CHAT_INPUT_FULL' => 'Chat input with all available buttons', + 'AJAX_CHAT_INPUT_FULL_EXPLAIN' => 'Disabling this will leave only the "Submit" button and message inputbox making it a very basic input like a shoutbox.', + 'AJAX_CHAT_CHATROW_FULL' => 'Short message height', + 'AJAX_CHAT_CHATROW_FULL_EXPLAIN' => 'Disabling this will set the chat message height to it`s original height. Enabling this will have the message height as short as possible while fitting more messages in view.', ) ); diff --git a/language/en/info_ucp_ajax_chat.php b/language/en/info_ucp_ajax_chat.php index c1733b7..9cb58c9 100644 --- a/language/en/info_ucp_ajax_chat.php +++ b/language/en/info_ucp_ajax_chat.php @@ -53,5 +53,6 @@ 'USER_AJAXCHAT' => 'Ajax Chat', 'USER_AJAXCHAT_SETTINGS' => 'Ajax Chat Settings', 'NO_VIEW_CHAT' => 'You do not have permission to view chat.', + 'AJAX_CHAT_MESSAGES_DOWN' => 'Display newest chat messages in the top or bottom of chat. Also moves the inputbox to the top or bottom', ) ); diff --git a/migrations/install_ajaxchat.php b/migrations/install_ajaxchat.php index 57b7f57..cbb6470 100644 --- a/migrations/install_ajaxchat.php +++ b/migrations/install_ajaxchat.php @@ -23,6 +23,8 @@ public function update_data() return array( // Add configs array('config.add', array('display_ajax_chat', '1')), + array('config.add', array('ajax_chat_input_full', '1')), + array('config.add', array('ajax_chat_chatrow_full', '1')), array('config.add', array('whois_chatting', '1')), array('config.add', array('location_ajax_chat', '1')), array('config.add', array('location_ajax_chat_override', '0')), @@ -122,6 +124,7 @@ public function update_chat_bbcodes() $acp_manager->install_bbcodes($bbcode_data); } + // Add chat DB tables and columns public function update_schema() { return array( @@ -167,11 +170,13 @@ public function update_schema() 'user_ajax_chat_avatar_hover' => array('UINT:1', 1), 'user_ajax_chat_onlinelist' => array('UINT:1', 1), 'user_ajax_chat_autocomplete' => array('UINT:1', 0), + 'user_ajax_chat_messages_down' => array('UINT:1', 1), ), ), ); } + // Remove chat tables and columns public function revert_schema() { return array( @@ -190,6 +195,7 @@ public function revert_schema() 'user_ajax_chat_avatar_hover', 'user_ajax_chat_onlinelist', 'user_ajax_chat_autocomplete', + 'user_ajax_chat_messages_down', ), ), ); diff --git a/styles/Bluespace/template/chat_body.html b/styles/Bluespace/template/chat_body.html index a8f4219..ac86998 100644 --- a/styles/Bluespace/template/chat_body.html +++ b/styles/Bluespace/template/chat_body.html @@ -1,82 +1,12 @@ - - -
-
-
-
-
-
- - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
-
- - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
« {chatrow.TIME} » -
-
-
-
-
-
- {SMILIES_PATH} -
-
    - -
  • - -
-
-
- {chatrow.MESSAGE} -
-
-
- - --!--{LAST_ID}--!-- - - - - - - - -
- {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
- - - --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} - + -
@@ -86,10 +16,10 @@ var last_id = {LAST_ID}; var post_time = {LAST_POST}; var read_interval = ({REFRESH_TIME} * 1000); - var chat_empty = '{LA_EMPTY}'; - var ie_no_ajax = '{LA_IE_NO_AJAX}'; + var chat_empty = '{{ lang('EMPTY')|e('js') }}'; + var ie_no_ajax = '{{ lang('IE_NO_AJAX')|e('js') }}'; var cookie_name = '{COOKIE_NAME}'; - var upgrade_browser = '{LA_UPGRADE_BROWSER}'; + var upgrade_browser = '{{ lang('UPGRADE_BROWSER')|e('js') }}'; var query_url = '{FILENAME}'; var query_url = '{FILENAME}/popup'; @@ -101,142 +31,66 @@ var chatbbcodetrue = false; + + var chatmessagedown = false; + + var chatmessagedown = true; + //]]> -
-
- - -
    -
  • -
    -
    - - - -
    - - autocomplete="off" /> -
    - - - - - - - - - - -
    - -
    - - {L_NO_POST_IN_CHAT} - - -
    {L_GUEST_MESSAGE}
    - - -
    -
    +
    +
    +
    + - -
    -
    - -
    - {L_CHAT_RULE}
    {CHAT_RULES} + + + + +
    - -
    -
    - -
    -
    -
    -
    -
    -
    - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
    -
    - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
    « {chatrow.TIME} » -
    -
    -
    -
    -
    -
    -
    -
      - -
    • - -
    -
    -
    - {chatrow.MESSAGE} -
    -
    +
    + + - + +
    +
    +
    class="chat-messages-down" > + +
    -
    - -
    -

    - {L_WHOIS_CHATTING} -

    -
    - -
    - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
    - + +
    +

    + {{ lang('WHOIS_CHATTING') }} +

    +
    + +
    + +
    + \ No newline at end of file diff --git a/styles/Bluespace/template/chat_body_input.html b/styles/Bluespace/template/chat_body_input.html new file mode 100644 index 0000000..214c903 --- /dev/null +++ b/styles/Bluespace/template/chat_body_input.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/styles/Bluespace/template/chat_body_input_full.html b/styles/Bluespace/template/chat_body_input_full.html new file mode 100644 index 0000000..b168578 --- /dev/null +++ b/styles/Bluespace/template/chat_body_input_full.html @@ -0,0 +1,39 @@ +
      +
    • +
      +
      + + +
      +
      + {S_FORM_TOKEN} + + autocomplete="off" /> +
      + + + + + + + + + + + + +
      + +
      + + {{ lang('NO_POST_IN_CHAT') }} + + +
      {{ lang('GUEST_MESSAGE') }}
      + +
      +
      +
      +
      +
    • +
    \ No newline at end of file diff --git a/styles/Bluespace/template/chat_body_input_original.html b/styles/Bluespace/template/chat_body_input_original.html new file mode 100644 index 0000000..b0e5690 --- /dev/null +++ b/styles/Bluespace/template/chat_body_input_original.html @@ -0,0 +1,25 @@ +
      +
    • +
      +
      + + +
      +
      + {S_FORM_TOKEN} + + autocomplete="off" /> +
      +
      + + {{ lang('NO_POST_IN_CHAT') }} + + +
      {{ lang('GUEST_MESSAGE') }}
      + +
      +
      +
      +
      +
    • +
    \ No newline at end of file diff --git a/styles/Bluespace/template/chat_body_whois.html b/styles/Bluespace/template/chat_body_whois.html new file mode 100644 index 0000000..933f151 --- /dev/null +++ b/styles/Bluespace/template/chat_body_whois.html @@ -0,0 +1,5 @@ + +
    + {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  +
    + \ No newline at end of file diff --git a/styles/Bluespace/template/chat_edit.html b/styles/Bluespace/template/chat_edit.html new file mode 100644 index 0000000..63440ff --- /dev/null +++ b/styles/Bluespace/template/chat_edit.html @@ -0,0 +1,40 @@ + + + +
    +
    +
    +

    {{ lang('CHAT_EDIT') }}

    +
    +
    + +
    + +
    +
    +   + +
    +
    +
    +
    + + diff --git a/styles/all/template/ucp_ajax_chat.html b/styles/Bluespace/template/ucp_ajax_chat.html similarity index 56% rename from styles/all/template/ucp_ajax_chat.html rename to styles/Bluespace/template/ucp_ajax_chat.html index 14875d0..cf25dae 100644 --- a/styles/all/template/ucp_ajax_chat.html +++ b/styles/Bluespace/template/ucp_ajax_chat.html @@ -2,7 +2,7 @@
    -

    {L_USER_AJAXCHAT_SETTINGS}

    +

    {{ lang('USER_AJAXCHAT_SETTINGS') }}

    @@ -11,72 +11,79 @@

    {L_USER_AJAXCHAT_SETTINGS}

    {ERROR}

    -
    +
    - - + +
    -
    +
    - - + +
    +
    +
    +
    + + +
    +
    -
    +
    - - + +
    -
    +
    - - + +
    -
    +
    - - + +
    -
    +
    - - + +
    -
    +
    - - + +
    -
    +
    - - + +
    -
    +
    - - + +
    @@ -86,16 +93,16 @@

    {L_USER_AJAXCHAT_SETTINGS}

    - {S_HIDDEN_FIELDS}  - + {S_HIDDEN_FIELDS}  + {S_FORM_TOKEN}
    -

    {L_USER_AJAXCHAT_SETTINGS}

    +

    {{ lang('USER_AJAXCHAT_SETTINGS') }}

    - {L_NO_VIEW_CHAT} + {{ lang('NO_VIEW_CHAT') }}
    diff --git a/styles/Deepspace/template/chat_body.html b/styles/Deepspace/template/chat_body.html index a8f4219..ac86998 100644 --- a/styles/Deepspace/template/chat_body.html +++ b/styles/Deepspace/template/chat_body.html @@ -1,82 +1,12 @@ - - -
    -
    -
    -
    -
    -
    - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
    -
    - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
    « {chatrow.TIME} » -
    -
    -
    -
    -
    -
    - {SMILIES_PATH} -
    -
      - -
    • - -
    -
    -
    - {chatrow.MESSAGE} -
    -
    -
    - - --!--{LAST_ID}--!-- - - - - - - - -
    - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
    - - - --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} - + -
    @@ -86,10 +16,10 @@ var last_id = {LAST_ID}; var post_time = {LAST_POST}; var read_interval = ({REFRESH_TIME} * 1000); - var chat_empty = '{LA_EMPTY}'; - var ie_no_ajax = '{LA_IE_NO_AJAX}'; + var chat_empty = '{{ lang('EMPTY')|e('js') }}'; + var ie_no_ajax = '{{ lang('IE_NO_AJAX')|e('js') }}'; var cookie_name = '{COOKIE_NAME}'; - var upgrade_browser = '{LA_UPGRADE_BROWSER}'; + var upgrade_browser = '{{ lang('UPGRADE_BROWSER')|e('js') }}'; var query_url = '{FILENAME}'; var query_url = '{FILENAME}/popup'; @@ -101,142 +31,66 @@ var chatbbcodetrue = false; + + var chatmessagedown = false; + + var chatmessagedown = true; + //]]> -
    -
    - - -
      -
    • -
      -
      - - - -
      - - autocomplete="off" /> -
      - - - - - - - - - - -
      - -
      - - {L_NO_POST_IN_CHAT} - - -
      {L_GUEST_MESSAGE}
      - - -
      -
      +
      +
      +
      + - -
      -
      - -
      - {L_CHAT_RULE}
      {CHAT_RULES} + + + + +
      - -
      -
      - -
      -
      -
      -
      -
      -
      - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
      -
      - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
      « {chatrow.TIME} » -
      -
      -
      -
      -
      -
      -
      -
        - -
      • - -
      -
      -
      - {chatrow.MESSAGE} -
      -
      +
      + + - + +
      +
      +
      class="chat-messages-down" > + +
      -
      - -
      -

      - {L_WHOIS_CHATTING} -

      -
      - -
      - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
      - + +
      +

      + {{ lang('WHOIS_CHATTING') }} +

      +
      + +
      + +
      + \ No newline at end of file diff --git a/styles/Deepspace/template/chat_body_input.html b/styles/Deepspace/template/chat_body_input.html new file mode 100644 index 0000000..214c903 --- /dev/null +++ b/styles/Deepspace/template/chat_body_input.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/styles/Deepspace/template/chat_body_input_full.html b/styles/Deepspace/template/chat_body_input_full.html new file mode 100644 index 0000000..b168578 --- /dev/null +++ b/styles/Deepspace/template/chat_body_input_full.html @@ -0,0 +1,39 @@ +
        +
      • +
        +
        + + +
        +
        + {S_FORM_TOKEN} + + autocomplete="off" /> +
        + + + + + + + + + + + + +
        + +
        + + {{ lang('NO_POST_IN_CHAT') }} + + +
        {{ lang('GUEST_MESSAGE') }}
        + +
        +
        +
        +
        +
      • +
      \ No newline at end of file diff --git a/styles/Deepspace/template/chat_body_input_original.html b/styles/Deepspace/template/chat_body_input_original.html new file mode 100644 index 0000000..b0e5690 --- /dev/null +++ b/styles/Deepspace/template/chat_body_input_original.html @@ -0,0 +1,25 @@ +
        +
      • +
        +
        + + +
        +
        + {S_FORM_TOKEN} + + autocomplete="off" /> +
        +
        + + {{ lang('NO_POST_IN_CHAT') }} + + +
        {{ lang('GUEST_MESSAGE') }}
        + +
        +
        +
        +
        +
      • +
      \ No newline at end of file diff --git a/styles/Deepspace/template/chat_body_whois.html b/styles/Deepspace/template/chat_body_whois.html new file mode 100644 index 0000000..933f151 --- /dev/null +++ b/styles/Deepspace/template/chat_body_whois.html @@ -0,0 +1,5 @@ + +
      + {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  +
      + \ No newline at end of file diff --git a/styles/Deepspace/template/chat_edit.html b/styles/Deepspace/template/chat_edit.html new file mode 100644 index 0000000..63440ff --- /dev/null +++ b/styles/Deepspace/template/chat_edit.html @@ -0,0 +1,40 @@ + + + +
      +
      +
      +

      {{ lang('CHAT_EDIT') }}

      +
      +
      + +
      + +
      +
      +   + +
      +
      +
      +
      + + diff --git a/styles/Deepspace/template/ucp_ajax_chat.html b/styles/Deepspace/template/ucp_ajax_chat.html new file mode 100644 index 0000000..cf25dae --- /dev/null +++ b/styles/Deepspace/template/ucp_ajax_chat.html @@ -0,0 +1,111 @@ + + +
      + +

      {{ lang('USER_AJAXCHAT_SETTINGS') }}

      + +
      +
      + +
      +

      {ERROR}

      + +
      +
      +
      + + +
      +
      + +
      +
      +
      + + +
      +
      + +
      +
      +
      + + +
      +
      + +
      +
      +
      + + +
      +
      + + +
      +
      +
      + + +
      +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      +
      + + +
      +
      + +
      + +
      +
      + +
      + {S_HIDDEN_FIELDS}  + + {S_FORM_TOKEN} +
      + +

      {{ lang('USER_AJAXCHAT_SETTINGS') }}

      + +
      +
      + {{ lang('NO_VIEW_CHAT') }} +
      +
      + +
      + + diff --git a/styles/GhostSpace/template/chat_body.html b/styles/GhostSpace/template/chat_body.html deleted file mode 100644 index 6daa43a..0000000 --- a/styles/GhostSpace/template/chat_body.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - -
      - - - - - -
      - -
      - « {chatrow.TIME} » -
      -
      -
      {chatrow.MESSAGE}{L_DELETE}
      -
      -
      - - --!--{LAST_ID}--!-- - - - - - - - -
      - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
      - - - --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} - - - - - - - - -
      - - - -
      -

      {L_CHAT_EXPLAIN}{L_CHAT_EXPLAIN}

      -
      -
      - - - - - - - - - - - - - - - - -
      -
      - {L_CHAT_RULE}
      {CHAT_RULES} -
      -
      -
      -
      - -
      - - - - - -
      - -
      - « {chatrow.TIME} » -
      -
      -
      {chatrow.MESSAGE}{L_DELETE}
      -
      -
      - -
      -
      -
      style="visibility: hidden; position: absolute;"> -
      -
      - -
      - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
      - -
      -
      -
      -
      -
      -
      -
      - {L_DETAILS} - check_indicator - act_indicator -  {L_UPDATES} {REFRESH_TIME} {L_UNIT} -
      -
      -
      - - - - -
      - - - - - \ No newline at end of file diff --git a/styles/GhostSpace/template/chat_buttons.html b/styles/GhostSpace/template/chat_buttons.html deleted file mode 100644 index 3907b81..0000000 --- a/styles/GhostSpace/template/chat_buttons.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - diff --git a/styles/GhostSpace/template/event/index_body_forumlist_body_after.html b/styles/GhostSpace/template/event/index_body_forumlist_body_after.html deleted file mode 100644 index 5eb0f73..0000000 --- a/styles/GhostSpace/template/event/index_body_forumlist_body_after.html +++ /dev/null @@ -1,9 +0,0 @@ - - -
      - - -
      - - - \ No newline at end of file diff --git a/styles/GhostSpace/template/event/index_body_forumlist_body_before.html b/styles/GhostSpace/template/event/index_body_forumlist_body_before.html deleted file mode 100644 index 018e1fd..0000000 --- a/styles/GhostSpace/template/event/index_body_forumlist_body_before.html +++ /dev/null @@ -1,9 +0,0 @@ - - - -
      - - -
      - - \ No newline at end of file diff --git a/styles/GhostSpace/template/event/overall_header_head_append.html b/styles/GhostSpace/template/event/overall_header_head_append.html deleted file mode 100644 index fca29e6..0000000 --- a/styles/GhostSpace/template/event/overall_header_head_append.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/styles/GhostSpace/template/event/overall_header_navigation_append.html b/styles/GhostSpace/template/event/overall_header_navigation_append.html deleted file mode 100644 index c09d4f1..0000000 --- a/styles/GhostSpace/template/event/overall_header_navigation_append.html +++ /dev/null @@ -1,5 +0,0 @@ - - - {L_CHAT_EXPLAIN}   - - diff --git a/styles/GhostSpace/template/event/overall_header_navigation_prepend.html b/styles/GhostSpace/template/event/overall_header_navigation_prepend.html deleted file mode 100644 index 58694a9..0000000 --- a/styles/GhostSpace/template/event/overall_header_navigation_prepend.html +++ /dev/null @@ -1,5 +0,0 @@ - - - {L_CHAT_EXPLAIN}   - - \ No newline at end of file diff --git a/styles/GhostSpace/template/event/simple_header_head_append.html b/styles/GhostSpace/template/event/simple_header_head_append.html deleted file mode 100644 index fca29e6..0000000 --- a/styles/GhostSpace/template/event/simple_header_head_append.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/styles/GhostSpace/template/ucp_ajax_chat.html b/styles/GhostSpace/template/ucp_ajax_chat.html deleted file mode 100644 index e9865e7..0000000 --- a/styles/GhostSpace/template/ucp_ajax_chat.html +++ /dev/null @@ -1,55 +0,0 @@ - - - -

      {L_USER_AJAXCHAT_SETTINGS}

      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      {ERROR}
      {L_USER_AJAX_CHAT_VIEW}{L_COLON} checked="checked" />{L_YES}   checked="checked" />{L_NO}
      {L_USER_AJAX_CHAT_POSITION}{L_COLON} checked="checked" />{L_CHAT_TOP}   checked="checked" />{L_CHAT_BOTTOM}
      {L_USER_AJAX_CHAT_AVATARS}{L_COLON} checked="checked" />{L_YES}   checked="checked" />{L_NO}
      {L_USER_AJAX_CHAT_AVATAR_HOVER}{L_COLON} checked="checked" />{L_YES}   checked="checked" />{L_NO}
      {L_USER_AJAX_CHAT_SOUND}{L_COLON} checked="checked" />{L_YES}   checked="checked" />{L_NO}
      {L_USER_AJAX_CHAT_ONLINELIST}{L_COLON} checked="checked" />{L_YES}   checked="checked" />{L_NO}
      {S_HIDDEN_FIELDS}  
      -
      -
       
      - -

      {L_USER_AJAXCHAT_SETTINGS}

      -
      - - - - -
      {L_NO_VIEW_CHAT}
      -
      -
       
      - - - diff --git a/styles/GhostSpace/theme/ajax_chat.css b/styles/GhostSpace/theme/ajax_chat.css deleted file mode 100644 index d96e0f9..0000000 --- a/styles/GhostSpace/theme/ajax_chat.css +++ /dev/null @@ -1,172 +0,0 @@ -#bbpalette { - display: inline; -} - -#fc { - margin: 0 auto; - height: 20px; - width: 20px; - border-style: solid; - border-width: 1px; -} - -#chat_colour_palette { - display: none; - text-align: center; - padding-bottom: 5px; - text-indent: 0; -} - -#chat_colour_palette table { - margin: 0 auto; -} - -#chat { - width: 100%; - text-align: left; -} - -#message { - width: 65%; -} - -#whois_online{ - vertical-align: text-top; - text-align: left; -} - -#act_indicator { - visibility: hidden; - vertical-align: text-bottom; - cursor: wait; -} - -#check_indicator{ - vertical-align: text-bottom; - margin-right: -16px; - cursor: help; -} - -.chat_sound { - visibility: hidden; - position: absolute; -} - -.select_color { - margin: 0 auto; -} - -.box { - width: 100%; - margin-left: auto; - margin-right: auto; -} - -.chat_profile { - width: 200px; - padding: 4px; -} - -.whois { - height: 300px; - overflow: auto; -} - -.shouts { - width: 100%; - height: 300px; - overflow: auto; -} - -.status_img { - vertical-align: middle; -} - -.chat-avatars { - float: left; - position: relative; - margin-right: 10px; - outline: none; - z-index: 0; -} - -div.chat-avatars:hover { - background-color: transparent; - z-index: 50; -} - -.chat-avatars span { - position: absolute; - left: 0px; - display: none; - color: #FFFFFF; - text-decoration: none; -} - -.chat-avatars span img { - border-width: 0; -} - -div.chat-avatars:hover span { - position: absolute; - display: block; - top: -25px; - left: 40px; - padding: 2px 2px 0; - background-color: transparent; - border: none; -} - -.chat .cat { - background-repeat-y: no-repeat !important; -} - -.chat-icon { - background-position: 0 50%; - background-repeat: no-repeat; - background-image: url("./images/icon_chat.png"); - padding: 6px 0 6px 21px; -} - -.span_chat_rule { - font-weight: bold; - font-size: 1.1em; - color: #FF0000; -} - -#chat_smilies { - margin-bottom: 5px; -} - -.details { - color: #AA0000; -} - -/* ABBC3 Compatibility */ - -.abbc3_buttons_row { - width: inherit !important; -} - -#abbc3_buttons { - margin-top: 0 !important; -} - -#chat_bbcodes #bbcode_wizard { - position: inherit; -} - -.chat_postbody { - color: #37B7E6; - font-size: 1.3em; - line-height: 1.4em; - font-family: "Lucida Grande", "Trebuchet MS", Helvetica, Arial, sans-serif; -} - -.floatr { - float: right; -} - -.vert { - margin-top: 10px; -} diff --git a/styles/GhostSpace/theme/images/icon_chat.png b/styles/GhostSpace/theme/images/icon_chat.png deleted file mode 100644 index e3e549e..0000000 Binary files a/styles/GhostSpace/theme/images/icon_chat.png and /dev/null differ diff --git a/styles/Prospace/template/chat_body.html b/styles/Prospace/template/chat_body.html index a8f4219..ac86998 100644 --- a/styles/Prospace/template/chat_body.html +++ b/styles/Prospace/template/chat_body.html @@ -1,82 +1,12 @@ - - -
      -
      -
      -
      -
      -
      - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
      -
      - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
      « {chatrow.TIME} » -
      -
      -
      -
      -
      -
      - {SMILIES_PATH} -
      -
        - -
      • - -
      -
      -
      - {chatrow.MESSAGE} -
      -
      -
      - - --!--{LAST_ID}--!-- - - - - - - - -
      - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
      - - - --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} - + -
      @@ -86,10 +16,10 @@ var last_id = {LAST_ID}; var post_time = {LAST_POST}; var read_interval = ({REFRESH_TIME} * 1000); - var chat_empty = '{LA_EMPTY}'; - var ie_no_ajax = '{LA_IE_NO_AJAX}'; + var chat_empty = '{{ lang('EMPTY')|e('js') }}'; + var ie_no_ajax = '{{ lang('IE_NO_AJAX')|e('js') }}'; var cookie_name = '{COOKIE_NAME}'; - var upgrade_browser = '{LA_UPGRADE_BROWSER}'; + var upgrade_browser = '{{ lang('UPGRADE_BROWSER')|e('js') }}'; var query_url = '{FILENAME}'; var query_url = '{FILENAME}/popup'; @@ -101,142 +31,66 @@ var chatbbcodetrue = false; + + var chatmessagedown = false; + + var chatmessagedown = true; + //]]> -
      -
      - - -
        -
      • -
        -
        - - -
        -
        - - autocomplete="off" /> -
        - - - - - - - - - - -
        - -
        - - {L_NO_POST_IN_CHAT} - - -
        {L_GUEST_MESSAGE}
        - -
        -
        -
        +
        +
        +
        + - -
        -
        - -
        - {L_CHAT_RULE}
        {CHAT_RULES} + + + + +
        - -
        -
        - -
        -
        -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        -
        -
        -
        -
        -
        -
          - -
        • - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        +
        + + - + +
        +
        +
        class="chat-messages-down" > + +
        -
        - -
        -

        - {L_WHOIS_CHATTING} -

        -
        - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - + +
        +

        + {{ lang('WHOIS_CHATTING') }} +

        +
        + +
        + +
        + \ No newline at end of file diff --git a/styles/Prospace/template/chat_body_input.html b/styles/Prospace/template/chat_body_input.html new file mode 100644 index 0000000..214c903 --- /dev/null +++ b/styles/Prospace/template/chat_body_input.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/styles/Prospace/template/chat_body_input_full.html b/styles/Prospace/template/chat_body_input_full.html new file mode 100644 index 0000000..b168578 --- /dev/null +++ b/styles/Prospace/template/chat_body_input_full.html @@ -0,0 +1,39 @@ +
          +
        • +
          +
          + + +
          +
          + {S_FORM_TOKEN} + + autocomplete="off" /> +
          + + + + + + + + + + + + +
          + +
          + + {{ lang('NO_POST_IN_CHAT') }} + + +
          {{ lang('GUEST_MESSAGE') }}
          + +
          +
          +
          +
          +
        • +
        \ No newline at end of file diff --git a/styles/Prospace/template/chat_body_input_original.html b/styles/Prospace/template/chat_body_input_original.html new file mode 100644 index 0000000..b0e5690 --- /dev/null +++ b/styles/Prospace/template/chat_body_input_original.html @@ -0,0 +1,25 @@ +
          +
        • +
          +
          + + +
          +
          + {S_FORM_TOKEN} + + autocomplete="off" /> +
          +
          + + {{ lang('NO_POST_IN_CHAT') }} + + +
          {{ lang('GUEST_MESSAGE') }}
          + +
          +
          +
          +
          +
        • +
        \ No newline at end of file diff --git a/styles/Prospace/template/chat_body_whois.html b/styles/Prospace/template/chat_body_whois.html new file mode 100644 index 0000000..933f151 --- /dev/null +++ b/styles/Prospace/template/chat_body_whois.html @@ -0,0 +1,5 @@ + +
        + {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  +
        + \ No newline at end of file diff --git a/styles/Prospace/template/chat_edit.html b/styles/Prospace/template/chat_edit.html new file mode 100644 index 0000000..63440ff --- /dev/null +++ b/styles/Prospace/template/chat_edit.html @@ -0,0 +1,40 @@ + + + +
        +
        +
        +

        {{ lang('CHAT_EDIT') }}

        +
        +
        + +
        + +
        +
        +   + +
        +
        +
        +
        + + diff --git a/styles/Prospace/template/ucp_ajax_chat.html b/styles/Prospace/template/ucp_ajax_chat.html new file mode 100644 index 0000000..cf25dae --- /dev/null +++ b/styles/Prospace/template/ucp_ajax_chat.html @@ -0,0 +1,111 @@ + + +
        + +

        {{ lang('USER_AJAXCHAT_SETTINGS') }}

        + +
        +
        + +
        +

        {ERROR}

        + +
        +
        +
        + + +
        +
        + +
        +
        +
        + + +
        +
        + +
        +
        +
        + + +
        +
        + +
        +
        +
        + + +
        +
        + + +
        +
        +
        + + +
        +
        + +
        +
        +
        + + +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + +
        +
        + +
        + +
        +
        + +
        + {S_HIDDEN_FIELDS}  + + {S_FORM_TOKEN} +
        + +

        {{ lang('USER_AJAXCHAT_SETTINGS') }}

        + +
        +
        + {{ lang('NO_VIEW_CHAT') }} +
        +
        + +
        + + diff --git a/styles/Subway/template/chat_body.html b/styles/Subway/template/chat_body.html deleted file mode 100644 index 8be3c1f..0000000 --- a/styles/Subway/template/chat_body.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - -
        -
        -
        -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        -
        -
        -
        -
        - {SMILIES_PATH} -
        -
          - -
        • - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        -
        -
        - - --!--{LAST_ID}--!-- - - - - - - - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - - - --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} - - - - - - - - -
        - - - -
        -
        - - -
          -
        • -
          -
          - - -
          -
          - - autocomplete="off" /> -
          - - - - - - - - - - -
          - -
          - - {L_NO_POST_IN_CHAT} - - -
          {L_GUEST_MESSAGE}
          - -
          -
          -
          -
          -
        • -
        - -
        -
        - -
        - {L_CHAT_RULE}
        {CHAT_RULES} -
        - -
        -
        -
        - -
        -
        -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        -
        -
        -
        -
        -
        -
          - -
        • - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        -
        - -
        -
        -
        - -
        -

        - {L_WHOIS_CHATTING} -

        -
        - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - -
        -
        - - - - - - -
        - - - - - \ No newline at end of file diff --git a/styles/all/template/chat_body.html b/styles/all/template/chat_body.html deleted file mode 100644 index 4decabc..0000000 --- a/styles/all/template/chat_body.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - -
        -
        -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        -
        -
        -
        -
        - {SMILIES_PATH} -
        -
          - -
        • - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        -
        - - --!--{LAST_ID}--!-- - - - - - - - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - - - --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} - - - - - - - - -
        - - - -
        -
        - - -
          -
        • -
          -
          - - -
          -
          - - autocomplete="off" /> -
          - - - - - - - - - - -
          - -
          - - {L_NO_POST_IN_CHAT} - - -
          {L_GUEST_MESSAGE}
          - -
          -
          -
          -
          -
        • -
        - -
        -
        - -
        - {L_CHAT_RULE}
        {CHAT_RULES} -
        - -
        -
        - -
        -
        -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        -
        -
        -
        -
        -
        -
          - -
        • - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        -
        - -
        -
        - -
        -

        - {L_WHOIS_CHATTING} -

        -
        - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - -
        -
        - - - - - - -
        - - - - - \ No newline at end of file diff --git a/styles/all/template/chat_body_buttons.html b/styles/all/template/chat_body_buttons.html new file mode 100644 index 0000000..7eaccf5 --- /dev/null +++ b/styles/all/template/chat_body_buttons.html @@ -0,0 +1,16 @@ + +
        + +
        + + + diff --git a/styles/all/template/chat_body_chatrow.html b/styles/all/template/chat_body_chatrow.html new file mode 100644 index 0000000..099631a --- /dev/null +++ b/styles/all/template/chat_body_chatrow.html @@ -0,0 +1,42 @@ + +
        +
        +
        +
        class="chat-avatars"> + + + + {chatrow.USER_AVATAR} + + {chatrow.USER_AVATAR_THUMB} + + + + + + + + + +
        +
        + + + @ + + @ + + + @ + + {chatrow.USERNAME_FULL} « {chatrow.TIME} » +
        +
        + {SMILIES_PATH} +
        + + {chatrow.MESSAGE} +
        +
        +
        + \ No newline at end of file diff --git a/styles/all/template/chat_body_readadd.html b/styles/all/template/chat_body_readadd.html new file mode 100644 index 0000000..6fa1c83 --- /dev/null +++ b/styles/all/template/chat_body_readadd.html @@ -0,0 +1,13 @@ + + + --!--{LAST_ID}--!-- + + + + + + + + + --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} + \ No newline at end of file diff --git a/styles/all/template/chat_buttons.html b/styles/all/template/chat_buttons.html deleted file mode 100644 index 5e38449..0000000 --- a/styles/all/template/chat_buttons.html +++ /dev/null @@ -1,14 +0,0 @@ - -
        - -
        - - - diff --git a/styles/all/template/chatrow_message_icons.html b/styles/all/template/chatrow_message_icons.html new file mode 100644 index 0000000..b0ba19a --- /dev/null +++ b/styles/all/template/chatrow_message_icons.html @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/styles/all/template/event/index_body_stat_blocks_before.html b/styles/all/template/event/index_body_forumlist_body_after.html similarity index 97% rename from styles/all/template/event/index_body_stat_blocks_before.html rename to styles/all/template/event/index_body_forumlist_body_after.html index 664778a..1d6110a 100644 --- a/styles/all/template/event/index_body_stat_blocks_before.html +++ b/styles/all/template/event/index_body_forumlist_body_after.html @@ -1,5 +1,5 @@ - +
        diff --git a/styles/all/template/event/index_body_markforums_after.html b/styles/all/template/event/index_body_markforums_after.html index 018e1fd..008dd90 100644 --- a/styles/all/template/event/index_body_markforums_after.html +++ b/styles/all/template/event/index_body_markforums_after.html @@ -1,5 +1,5 @@ - +
        diff --git a/styles/all/template/event/navbar_header_quick_links_after.html b/styles/all/template/event/navbar_header_quick_links_after.html index ed121e0..db275d9 100644 --- a/styles/all/template/event/navbar_header_quick_links_after.html +++ b/styles/all/template/event/navbar_header_quick_links_after.html @@ -1,5 +1,5 @@ -
      • {L_CHAT_EXPLAIN}
      • +
      • {{ lang('CHAT_EXPLAIN') }}
      • diff --git a/styles/all/template/event/overall_footer_content_after.html b/styles/all/template/event/overall_footer_content_after.html new file mode 100644 index 0000000..9e8807c --- /dev/null +++ b/styles/all/template/event/overall_footer_content_after.html @@ -0,0 +1,32 @@ + + + + + +
        + + + + +
        + + + + + + + + + +
        + + + + +
        + + + + + + \ No newline at end of file diff --git a/styles/all/template/event/overall_header_head_append.html b/styles/all/template/event/overall_header_head_append.html index fca29e6..1d317e4 100644 --- a/styles/all/template/event/overall_header_head_append.html +++ b/styles/all/template/event/overall_header_head_append.html @@ -1 +1,3 @@ - + + + \ No newline at end of file diff --git a/styles/all/template/event/overall_header_navigation_append.html b/styles/all/template/event/overall_header_navigation_append.html index 87df1bb..31d7183 100644 --- a/styles/all/template/event/overall_header_navigation_append.html +++ b/styles/all/template/event/overall_header_navigation_append.html @@ -1,5 +1,5 @@ - + diff --git a/styles/all/template/event/simple_header_head_append.html b/styles/all/template/event/simple_header_head_append.html index fca29e6..1d317e4 100644 --- a/styles/all/template/event/simple_header_head_append.html +++ b/styles/all/template/event/simple_header_head_append.html @@ -1 +1,3 @@ - + + + \ No newline at end of file diff --git a/styles/all/template/event/viewforum_forum_title_after.html b/styles/all/template/event/viewforum_forum_title_after.html index 8bdab12..169ff2e 100644 --- a/styles/all/template/event/viewforum_forum_title_after.html +++ b/styles/all/template/event/viewforum_forum_title_after.html @@ -1,3 +1,11 @@ - - - + + + + +
        + + +
        + + + \ No newline at end of file diff --git a/styles/all/template/event/viewtopic_topic_title_after.html b/styles/all/template/event/viewtopic_topic_title_after.html index 67c12ab..c0b65f0 100644 --- a/styles/all/template/event/viewtopic_topic_title_after.html +++ b/styles/all/template/event/viewtopic_topic_title_after.html @@ -1,3 +1,11 @@ - - + + + + +
        + + +
        + + diff --git a/styles/all/template/js/ajax_chat.js b/styles/all/template/js/ajax_chat.js index 2fa9a3d..96c8fb3 100644 --- a/styles/all/template/js/ajax_chat.js +++ b/styles/all/template/js/ajax_chat.js @@ -13,28 +13,28 @@ function setCookie(name, value, expires, path, domain, secure) { } //****************************************************************************************** -// This functions reads & returns the cookie value of the specified cookie (by cookie name) +// This functions reads & returns the cookie value of the specified cookie (by cookie name) //****************************************************************************************** function getCookie(name) { var start = document.cookie.indexOf(name + "="); var len = start + name.length + 1; - if ((!start) && (name != document.cookie.substring(0, name.length))) { + if ((!start) && (name !== document.cookie.substring(0, name.length))) { return null; } - if (start == -1) + if (start === -1) return null; var end = document.cookie.indexOf(';', len); - if (end == -1) + if (end === -1) end = document.cookie.length; return unescape(document.cookie.substring(len, end)); } function deletecookie(name) { - var cookie_date = new Date ( ); // current date & time - cookie_date.setTime ( cookie_date.getTime() - 1 ); - document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString(); - location.reload(true); + var cookie_date = new Date( ); // current date & time + cookie_date.setTime(cookie_date.getTime() - 1); + document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString(); + location.reload(true); } var form_name = 'postform'; @@ -44,45 +44,31 @@ var xmlHttp = http_object(); var type = 'receive'; var d = new Date(); var post_time = d.getTime(); - -var interval = setInterval('handle_send("read", last_id);', read_interval); +var interval = setInterval('handle_send("read", last_id);', read_interval* 1000); var name = getCookie(cookie_name); + if (chatbbcodetrue) { var blkopen = name; - - if (name === null || name == 'null') + + if (name === null || name === 'null') { var blkopen = ''; var blkclose = ''; - } - else + } else { var blkopen = name; var blkclose = '[/color2]'; } -} -else +} else { var blkopen = ''; var blkclose = ''; } -$(window).load(function () { - $("#smilies").click(function () { - $("#chat_smilies").toggle(600); - }); - $("#bbcodes").click(function () { - $("#chat_bbcodes").toggle(600); - }); - $("#chat_bbpalette").click(function () { - $("#chat_colour_palette").toggle(600); - }); -}); - function handle_send(mode, f) { - if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0) + if (xmlHttp.readyState === 4 || xmlHttp.readyState === 0) { indicator_switch('on'); type = 'receive'; @@ -92,7 +78,7 @@ function handle_send(mode, f) param += '&last_post=' + post_time; param += '&read_interval=' + read_interval; - if (mode == 'add' && document.postform.message.value != '') + if (mode === 'add' && document.postform.message.value !== '') { type = 'send'; for (var i = 0; i < f.elements.length; i++) @@ -101,20 +87,30 @@ function handle_send(mode, f) param += '&' + elem.name + '=' + blkopen + "" + encodeURIComponent(elem.value) + blkclose; } document.postform.message.value = ''; - } - else if (mode == 'add' && document.postform.message.value == '') - + } else if (mode === 'add' && document.postform.message.value === '') { alert(chat_empty); return false; - } - - else if (mode == 'delete') + } else if (mode === 'edit') { + var message = document.getElementById('message').value; + type = 'edit'; + mode += '/' + f; + param = '&submit=1&message=' + message; + } else if (mode === 'delete') + { + var parent = document.getElementById('chat'); + var child = document.getElementById('p' + f); + parent.removeChild(child); type = 'delete'; param += '&chat_id=' + f; + } else if (mode === 'quotemessage') + { + type = 'quotemessage'; + param += '&chat_id=' + f; } - xmlHttp.open("POST", query_url, true); + + xmlHttp.open("POST", query_url + "/" + mode, true); xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttp.onreadystatechange = handle_return; xmlHttp.send(param); @@ -123,19 +119,44 @@ function handle_send(mode, f) function handle_return() { - if (xmlHttp.readyState == 4) + if (xmlHttp.readyState === 4) { - if (type != 'delete') - { + results = xmlHttp.responseText.split('--!--'); + + if (type === 'quotemessage') { + if (results[0]) { + $text = document.getElementById('message').value; + document.getElementById('message').value = $text + results[0]; + document.getElementById("message").focus(); + } + } else if (type === 'edit') { + jQuery(function($) { - results = xmlHttp.responseText.split('--!--'); + 'use strict'; + + var opener = window.opener; + if (opener) { + $(opener.document).find('#p' + last_id).replaceWith(results[0]); + } + + var popup = window.self; + popup.opener = window.self; + popup.close(); + }); + } else if (type !== 'delete') { if (results[1]) { - if (last_id == 0) + jQuery(function($) { + + 'use strict'; + + $(fieldname).append(results[0]); + }); + + if (last_id === 0) { document.getElementById(fieldname).innerHTML = results[0]; - } - else + } else { document.getElementById(fieldname).innerHTML = results[0] + document.getElementById(fieldname).innerHTML; } @@ -148,34 +169,50 @@ function handle_return() { read_interval = results[4]; window.clearInterval(interval); - interval = setInterval('handle_send("read", last_id);', read_interval * 1000); document.getElementById('update_seconds').innerHTML = read_interval; } - + } } } + if (chatmessagedown) + { + setInterval(function(){ + var $chatscroll = $('div.shout-body'); + if($chatscroll.filter(function(){ return $(this).is(':hover'); }).length){$chatscroll.stop();}else {$chatscroll.scrollTop($('#chat').height());} + }, 200); + } indicator_switch('off'); } } +function edit_post(chat_id) +{ + //message = document.getElementId('message').value; + //console.log(message); +} + function delete_post(chatid) { document.getElementById('p' + chatid).style.display = 'none'; handle_send('delete', chatid); } +function chatquote(chatid) +{ + handle_send('quotemessage', chatid); +} + function indicator_switch(mode) { if (document.getElementById("act_indicator")) { var img = document.getElementById("act_indicator"); - if (img.style.visibility == "hidden" && mode == 'on') + if (img.style.visibility === "hidden" && mode === 'on') { img.style.visibility = "visible"; - } - else if (mode == 'off') + } else if (mode === 'off') { img.style.visibility = "hidden"; } @@ -184,11 +221,10 @@ function indicator_switch(mode) if (document.getElementById("check_indicator")) { var img = document.getElementById("check_indicator"); - if (img.style.visibility == "hidden" && mode == 'off') + if (img.style.visibility === "hidden" && mode === 'off') { img.style.visibility = "visible"; - } - else if (mode == 'on') + } else if (mode === 'on') { img.style.visibility = "hidden"; } @@ -200,26 +236,22 @@ function http_object() if (window.XMLHttpRequest) { return new XMLHttpRequest(); - } - else if (window.ActiveXObject) + } else if (window.ActiveXObject) { try { return new ActiveXObject("Msxml2.XMLHTTP"); - } - catch (e) + } catch (e) { try { return new ActiveXObject("Microsoft.XMLHTTP"); - } - catch (e) + } catch (e) { document.getElementById('p_status').innerHTML = (ie_no_ajax); } } - } - else + } else { document.getElementById('p_status').innerHTML = (upgrade_browser); } @@ -247,11 +279,40 @@ function addText(instext) mess.selectionStart = startPos + instext.length; mess.selectionEnd = endPos + instext.length; mess.focus(); - } - else + } else { mess.value += instext; mess.focus(); } } //END;Whatever + +jQuery(function($) { + + 'use strict'; + + $(window).load(function () { + $("#smilies").click(function () { + $("#chat_smilies").toggle(600); + }); + $("#bbcodes").click(function () { + $("#chat_bbcodes").toggle(600); + }); + $("#chat_bbpalette").click(function () { + $("#chat_colour_palette").toggle(600); + }); + if (chatmessagedown && type !== 'edit') + { + setInterval(function(){ + var $chatscroll = $('div.shout-body'); + if($chatscroll.filter(function(){ return $(this).is(':hover'); }).length){$chatscroll.stop();}else {$chatscroll.scrollTop($('#chat').height());} + }, 200); + } + }); + + var $chat_edit = $('#chat_edit'); + $chat_edit.find('#submit').on('click', function(e) { + e.preventDefault(); + handle_send('edit', $chat_edit.find('input[name=chat_id]').val()); + }); +}); diff --git a/styles/all/theme/ajax_chat.css b/styles/all/theme/ajax_chat.css index 95b9f31..016ac7f 100644 --- a/styles/all/theme/ajax_chat.css +++ b/styles/all/theme/ajax_chat.css @@ -51,17 +51,28 @@ display: none; } +#ajaxchat .navbar.chatrules { + margin: 0 5px 3px 5px; + border-radius: 0 0 7px 7px; + text-align: center; +} + +#ajaxchat .forabg { + margin-bottom: 0; +} + .select_color { margin: 0 auto; } .shouts { - float: left; - width: 84%; + width: 85%; height: 250px; overflow: auto; overflow-x: hidden; margin-left: 0.5%; + display: inline-block; + position: relative; } .chat_online_off { @@ -77,8 +88,7 @@ } .whois { - display: block; - width: 15%; + display: inline-block; height: 250px; overflow: auto; text-align: center; @@ -89,16 +99,6 @@ margin: 2px 0; } -.whois_chatting { - display: block; - width: 98%; - border-bottom: 1px solid #CCCCCC; - font-weight: bold; - text-transform: uppercase; - font-size: 1.0em; - margin: 0 auto 4px; -} - .whois_online { display: block; width: 90%; @@ -115,10 +115,10 @@ .chat-postbody { padding: 0; - line-height: 1.48em; + line-height: 1em; width: 100%; clear: both; - min-height: 30px; + min-height: 20px; } .chat dd { @@ -186,20 +186,26 @@ .message { line-height: 1.4em; font-size: 1.2em; - margin-left: 17%; - padding-top: 4px; + padding-top: 2px; + overflow: auto; } .chat-postprofile { - width: 15%; - min-width: 160px; + margin-right: 32px; + display: inline-block; float: left; - display: inline; + white-space: nowrap; } -.chat-profile-width { - min-width: 175px; - display: inline; +.chat-postprofile-no-avatar { + margin-right: 4px; + display: inline-block; + float: left; + white-space: nowrap; +} + +.chat-usernames { + padding-top: 5px; } .chat-time { @@ -224,15 +230,12 @@ .chat-avatars { float: left; + max-width: 20px; position: relative; margin-right: 10px; outline: none; z-index: 0; - padding: 3px 0px 0px 3px; -} - -.chat-names { - margin-left: 10px; + padding: 1px 0px 1px 0px; } div.chat-avatars:hover { @@ -262,12 +265,8 @@ div.chat-avatars:hover span { width: 300px; } -.big-avatar { - max-height: 128px; -} - -.small-avatar { - max-height: 20px; +.top-pad { + padding-top: 2px; } .chat-avatars img { @@ -285,7 +284,8 @@ div.chat-avatars:hover span { .chatnavbar { margin: 6px 0 4px 0; - padding: 5px 10px; + padding: 5px 10px 8px 10px; + text-align: center; } .input_message { @@ -295,6 +295,7 @@ div.chat-avatars:hover span { .chat-postbody .message blockquote, .chat-postbody .codebox { margin-right: 30px; margin-bottom: 4px; + width: 60%; } .chat .button { @@ -321,77 +322,26 @@ div.chat-avatars:hover span { border: none !important; } -@media only screen and (max-width: 900px), only screen and (max-device-width: 900px) { - .whois { - width: 100%; - height: auto; - text-align: left; - padding: 6px 0 0; - } - .whois_chatting { - display: inline; - border: none; - margin: 0; - } - .whois_online { - display: inline; - margin: 0 4px; - } - .shouts { - width: 100%; - height:150px; - } - #whois_online { - display: -webkit-flex; /* Safari */ - -webkit-flex-wrap: wrap; /* Safari 6.1+ */ - display: inline-flex; - flex-wrap: wrap; - } -} - -@media only screen and (max-width: 550px), only screen and (max-device-width: 550px) { - .shouts { - width: 100%; - height:250px; - } - .chat-avatars { - display: none; - } - .chat-postprofile { - min-width: 80px; - float: left; - display: inline; - } - .chatnavbar { - padding: 2px; - } - #bbpalette { - display: none; - } - #whois_online { - display: -webkit-flex; /* Safari */ - -webkit-flex-wrap: wrap; /* Safari 6.1+ */ - display: inline-flex; - flex-wrap: wrap; - } +.chat_edit textarea.inputbox { + width: 99%; } /* ABBC3 Compatibility */ -.abbc3_buttons_row { +#ajaxchat .abbc3_buttons_row { width: inherit !important; } -#abbc3_buttons { +#ajaxchat #abbc3_buttons { margin-top: 0 !important; } -#color_palette_placeholder { +#ajaxchat #color_palette_placeholder { width: 100%; margin: 0 auto; } -#color_palette_placeholder table { +#ajaxchat #color_palette_placeholder table { width: 100%; margin: 0 auto; } @@ -400,15 +350,26 @@ div.chat-avatars:hover span { position: inherit; } +#chat ul.topiclist dt { + width: auto; +} + /* bootlike additions */ .bordernav { border: 1px solid #E7E7E7; } -#chat .post { - padding-bottom: 3px; +.chatpost { + padding: 0 0 2px 5px; + margin-bottom: 0; + background-repeat: no-repeat; + background-position: 100% 0; + position: relative; border-radius: 4px; + border-right: #CCCCCC 1px solid; + border-bottom: #CCCCCC 1px solid; + border-left: #CCCCCC 1px solid; } .chat .btnbl { @@ -423,6 +384,11 @@ div.chat-avatars:hover span { margin-bottom: 3px; } +.chat-messages-down { + -webkit-transform: scaleY(-1); + transform: scaleY(-1); +} + /* Subway additions */ #chat .subway .post-buttons .icon-button:before { top: 5px; @@ -433,12 +399,177 @@ div.chat-avatars:hover span { width: 24px; } -.subway #chat .post { +.subway .chatpost { margin-bottom: 5px; padding: 5px; } /* Black additions */ - .fachaticon .nav-link { - content: '\f075'; // fa-comment - } +.fachaticon { + width: 30px; + margin-left: -5px; +} + +.fachaticon .nav-link { + width: 30px; +} + +.fachaticon .navbar .nav-tabs .responsive-menu .nav-link:after, .navbar .nav-tabs .account .nav-link:after, .navbar .nav-tabs .pm .nav-link:after, .navbar .nav-tabs .notifications .nav-link:after, .navbar .nav-tabs .mcp .nav-link:after, .navbar .nav-tabs .acp .nav-link:after, .navbar .nav-tabs .faq .nav-link:after, .navbar .nav-tabs .logout .nav-link:after, .navbar .nav-tabs .login .nav-link:after, .navbar .nav-tabs .register .nav-link:after, .navbar .nav-tabs .rightside .boardrules .nav-link:after, .navbar .nav-tabs .rightside .pages .nav-link:after, .navbar .nav-tabs .members .nav-link:after, .navbar .nav-tabs .forums .nav-link:after, .navbar .nav-tabs .leftside .boardrules .nav-link:after, .navbar .nav-tabs .leftside .pages .nav-link:after { + font-size: 16px; +} + +/* Aqua-Marine additions */ +#ajaxchat .forabg.aqua-marine { + padding-bottom: 0; +} + +#ajaxchat .navbar.chatrules.aqua-marine { + margin-top: -4px; +} + +/*! + * Font Awesome 4.6.1 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'FontAwesome'; + src: url('font-awesome/fontawesome-webfont.eot?v=4.5.0'); + src: url('font-awesome/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'), url('font-awesome/fontawesome-webfont.woff2?v=4.5.0') format('woff2'), url('font-awesome/fontawesome-webfont.woff?v=4.5.0') format('woff'), url('font-awesome/fontawesome-webfont.ttf?v=4.5.0') format('truetype'), url('font-awesome/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'FontAwesome'; + src: url('font-awesome/fontawesome-webfont.eot?v=4.6.1'); + src: url('font-awesome/fontawesome-webfont.eot?#iefix&v=4.6.1') format('embedded-opentype'), url('font-awesome/fontawesome-webfont.woff2?v=4.6.1') format('woff2'), url('font-awesome/fontawesome-webfont.woff?v=4.6.1') format('woff'), url('font-awesome/fontawesome-webfont.ttf?v=4.6.1') format('truetype'), url('font-awesome/fontawesome-webfont.svg?v=4.6.1#fontawesomeregular') format('svg'); + font-weight: normal; + font-style: normal; +} + +.shout-body .fa { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: 1.125em; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.fa-fw { + width: 1.28571429em; + text-align: center; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.fa-quote-left:before { + content: "\f10d"; +} + +.fa-pencil-square-o:before { + content: "\f044"; +} + +.fa-trash-o:before { + content: "\f014"; +} + +.fa-comments:before { + content: "\f086"; +} + +@media only screen and (max-width: 900px), only screen and (max-device-width: 900px) { + .whois { + width: 100%; + height: auto; + text-align: left; + padding: 6px 0 0; + } + .whois_chatting { + display: inline; + border: none; + margin: 0; + } + .whois_online { + display: inline; + margin: 0 4px; + } + .shouts { + width: 100%; + height:150px; + } + #whois_online { + display: -webkit-flex; /* Safari */ + -webkit-flex-wrap: wrap; /* Safari 6.1+ */ + display: inline-flex; + flex-wrap: wrap; + } + .chatpost { + padding: 0 0 2px 10px !important; + } +} + +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { + .chatpost { + padding: 0 0 2px 10px !important; + } + .chat-postprofile { + float: left; + } + .message { + clear: left; + } + .shout-body .fa { + font-size: 1em; + } +} + +@media only screen and (max-width: 550px), only screen and (max-device-width: 550px) { + .chat-avatars { + display: none; + } + .chat-postprofile { + margin-right: 4px; + min-width: 80px; + display: inline; + } + .chatnavbar { + padding: 2px; + } + #bbpalette { + display: none; + } + #whois_online { + display: -webkit-flex; /* Safari */ + -webkit-flex-wrap: wrap; /* Safari 6.1+ */ + display: inline-flex; + flex-wrap: wrap; + } + .chatpost { + padding: 0 0 2px 10px !important; + } +} + +.original { + padding: 8px 10px; + margin-bottom: 4px; +} + +.nomargin { + margin-top: 0 !important; + margin-bottom: 0 !important; + margin-left: 0 !important; + margin-right: 0 !important; +} + +#ajaxchat .forabg ul.topiclist li.header dt, .forumbg ul.topiclist li.header dt { + width: 100%; +} \ No newline at end of file diff --git a/styles/all/theme/font-awesome/FontAwesome.otf b/styles/all/theme/font-awesome/FontAwesome.otf new file mode 100644 index 0000000..59853bc Binary files /dev/null and b/styles/all/theme/font-awesome/FontAwesome.otf differ diff --git a/styles/all/theme/font-awesome/fontawesome-webfont.eot b/styles/all/theme/font-awesome/fontawesome-webfont.eot new file mode 100644 index 0000000..96f92f9 Binary files /dev/null and b/styles/all/theme/font-awesome/fontawesome-webfont.eot differ diff --git a/styles/all/theme/font-awesome/fontawesome-webfont.svg b/styles/all/theme/font-awesome/fontawesome-webfont.svg new file mode 100644 index 0000000..5a5f0ec --- /dev/null +++ b/styles/all/theme/font-awesome/fontawesome-webfont.svg @@ -0,0 +1,685 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/styles/all/theme/font-awesome/fontawesome-webfont.ttf b/styles/all/theme/font-awesome/fontawesome-webfont.ttf new file mode 100644 index 0000000..86784df Binary files /dev/null and b/styles/all/theme/font-awesome/fontawesome-webfont.ttf differ diff --git a/styles/all/theme/font-awesome/fontawesome-webfont.woff b/styles/all/theme/font-awesome/fontawesome-webfont.woff new file mode 100644 index 0000000..c7faa19 Binary files /dev/null and b/styles/all/theme/font-awesome/fontawesome-webfont.woff differ diff --git a/styles/all/theme/font-awesome/fontawesome-webfont.woff2 b/styles/all/theme/font-awesome/fontawesome-webfont.woff2 new file mode 100644 index 0000000..cab8571 Binary files /dev/null and b/styles/all/theme/font-awesome/fontawesome-webfont.woff2 differ diff --git a/styles/all/theme/sounds/sound.mp3 b/styles/all/theme/sounds/sound.mp3 index c1d47db..43f49a3 100644 Binary files a/styles/all/theme/sounds/sound.mp3 and b/styles/all/theme/sounds/sound.mp3 differ diff --git a/styles/all/theme/sounds/soundout.mp3 b/styles/all/theme/sounds/soundout.mp3 index e42d43a..d8b205e 100644 Binary files a/styles/all/theme/sounds/soundout.mp3 and b/styles/all/theme/sounds/soundout.mp3 differ diff --git a/styles/black/template/chat_body.html b/styles/black/template/chat_body.html deleted file mode 100644 index 5d28318..0000000 --- a/styles/black/template/chat_body.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - -
        -
        -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        -
        -
        -
        -
        - {SMILIES_PATH} -
        -
          - -
        • - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        -
        - - --!--{LAST_ID}--!-- - - - - - - - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - - - --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} - - - - - - - - -
        - - - -
        -
        - - -
          -
        • -
          -
          - - -
          -
          - - autocomplete="off" /> -
          - - - - - - - - - - -
          - -
          - - {L_NO_POST_IN_CHAT} - - -
          {L_GUEST_MESSAGE}
          - -
          -
          -
          -
          -
        • -
        - -
        -
        - -
        - {L_CHAT_RULE}
        {CHAT_RULES} -
        - -
        -
        - -
        -
        -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        -
        -
        -
        -
        -
        -
          - -
        • - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        -
        - -
        -
        - -
        -

        - {L_WHOIS_CHATTING} -

        -
        - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - -
        -
        - - - - - - -
        - - - - - \ No newline at end of file diff --git a/styles/black/template/event/navbar_header_quick_links_after.html b/styles/black/template/event/navbar_header_quick_links_after.html deleted file mode 100644 index d836073..0000000 --- a/styles/black/template/event/navbar_header_quick_links_after.html +++ /dev/null @@ -1,5 +0,0 @@ - - -
      • {L_CHAT_EXPLAIN}
      • - - diff --git a/styles/black/template/event/overall_header_navigation_append.html b/styles/black/template/event/overall_header_navigation_append.html deleted file mode 100644 index e69de29..0000000 diff --git a/styles/bootlike/template/chat_body.html b/styles/bootlike/template/chat_body.html deleted file mode 100644 index 4429f4b..0000000 --- a/styles/bootlike/template/chat_body.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        - {SMILIES_PATH} -
        -
        - - - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        -
        - - --!--{LAST_ID}--!-- - - - - - - - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - - - --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} - - - - - - - - -
        - - - -
        -
        -

        - - {L_CHAT_EXPLAIN}{L_CHAT_EXPLAIN} - -

        -
        - -
        - - -
        -
        - - autocomplete="off" /> -
        - - - - - - - - - - -
        - -
        - - {L_NO_POST_IN_CHAT} - - -
        {L_GUEST_MESSAGE}
        - -
        - -
        - -
        - {L_CHAT_RULE}
        {CHAT_RULES} -
        - -
        -
        - -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        -
        -
        - - - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        -
        - -
        -
        - -
        -

        - {L_WHOIS_CHATTING} -

        -
        - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - -
        -
        - - - - - - -
        - - - - - \ No newline at end of file diff --git a/styles/bootlike/template/event/navbar_header_quick_links_after.html b/styles/bootlike/template/event/navbar_header_quick_links_after.html deleted file mode 100644 index b59bb3e..0000000 --- a/styles/bootlike/template/event/navbar_header_quick_links_after.html +++ /dev/null @@ -1,5 +0,0 @@ - - -
      • {L_CHAT_EXPLAIN}
      • - - diff --git a/styles/bootlike/template/event/overall_header_navigation_append.html b/styles/bootlike/template/event/overall_header_navigation_append.html deleted file mode 100644 index f870408..0000000 --- a/styles/bootlike/template/event/overall_header_navigation_append.html +++ /dev/null @@ -1,5 +0,0 @@ - - -
      • {L_CHAT_EXPLAIN}
      • - - diff --git a/styles/bootlike/template/ucp_ajax_chat.html b/styles/bootlike/template/ucp_ajax_chat.html deleted file mode 100644 index e574c5f..0000000 --- a/styles/bootlike/template/ucp_ajax_chat.html +++ /dev/null @@ -1,86 +0,0 @@ - - -
        - -
        -
        -

        {L_USER_AJAXCHAT_SETTINGS}

        -
        -
        - -
        -
        {ERROR}
        -
        -
        -
        - - -
        -
        - -
        -
        -
        - - -
        -
        - -
        -
        -
        - - -
        -
        -
        -
        -
        - - -
        -
        -
        -
        -
        - - -
        -
        -
        -
        -
        - - -
        -
        -
        -
        -
        - - -
        -
        -
        - -
        - - -
        - - -

        {L_USER_AJAXCHAT_SETTINGS}

        - -
        -
        - {L_NO_VIEW_CHAT} -
        -
        - -
        - - diff --git a/styles/proDVGFX/template/event/index_body_forumlist_body_after.html b/styles/proDVGFX/template/event/index_body_forumlist_body_after.html deleted file mode 100644 index 2c49b1a..0000000 --- a/styles/proDVGFX/template/event/index_body_forumlist_body_after.html +++ /dev/null @@ -1,13 +0,0 @@ - - - -
        - - - - -
        - - - - diff --git a/styles/proDVGFX/template/event/index_body_stat_blocks_before.html b/styles/proDVGFX/template/event/index_body_stat_blocks_before.html deleted file mode 100644 index e69de29..0000000 diff --git a/styles/prosilver/template/chat_body.html b/styles/prosilver/template/chat_body.html new file mode 100644 index 0000000..ac86998 --- /dev/null +++ b/styles/prosilver/template/chat_body.html @@ -0,0 +1,105 @@ + + + + + + + + + + +
        + + + +
        +
        +
        + + + + + + +
        +
        + + + +
        +
        +
        class="chat-messages-down" > + +
        +
        + +
        +

        + {{ lang('WHOIS_CHATTING') }} +

        +
        + +
        +
        + +
        + +
        + + + + +
        + + + + + \ No newline at end of file diff --git a/styles/prosilver/template/chat_body_font_colour_hold.html b/styles/prosilver/template/chat_body_font_colour_hold.html new file mode 100644 index 0000000..471527c --- /dev/null +++ b/styles/prosilver/template/chat_body_font_colour_hold.html @@ -0,0 +1,71 @@ +
        + +
        +
        +
        + {{ lang('SELECT_COLOR') }} +
        + + + +
        + +
        +
        {{ lang('DELETE_CHAT_COOKIE_EXPLAIN') }}
        + +
        \ No newline at end of file diff --git a/styles/prosilver/template/chat_body_input.html b/styles/prosilver/template/chat_body_input.html new file mode 100644 index 0000000..214c903 --- /dev/null +++ b/styles/prosilver/template/chat_body_input.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/styles/prosilver/template/chat_body_input_full.html b/styles/prosilver/template/chat_body_input_full.html new file mode 100644 index 0000000..5b42184 --- /dev/null +++ b/styles/prosilver/template/chat_body_input_full.html @@ -0,0 +1,39 @@ +
          +
        • +
          +
          + + +
          +
          + {S_FORM_TOKEN} + + autocomplete="off" /> +
          + + + + + + + + + + + + +
          + +
          + + {{ lang('NO_POST_IN_CHAT') }} + + +
          {{ lang('GUEST_MESSAGE') }}
          + +
          +
          +
          +
          +
        • +
        \ No newline at end of file diff --git a/styles/prosilver/template/chat_body_input_original.html b/styles/prosilver/template/chat_body_input_original.html new file mode 100644 index 0000000..0445d02 --- /dev/null +++ b/styles/prosilver/template/chat_body_input_original.html @@ -0,0 +1,25 @@ +
          +
        • +
          +
          + + +
          +
          + {S_FORM_TOKEN} + + autocomplete="off" /> +
          +
          + + {{ lang('NO_POST_IN_CHAT') }} + + +
          {{ lang('GUEST_MESSAGE') }}
          + +
          +
          +
          +
          +
        • +
        \ No newline at end of file diff --git a/styles/prosilver/template/chat_body_whois.html b/styles/prosilver/template/chat_body_whois.html new file mode 100644 index 0000000..933f151 --- /dev/null +++ b/styles/prosilver/template/chat_body_whois.html @@ -0,0 +1,5 @@ + +
        + {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  +
        + \ No newline at end of file diff --git a/styles/prosilver/template/chat_edit.html b/styles/prosilver/template/chat_edit.html new file mode 100644 index 0000000..ddc31a7 --- /dev/null +++ b/styles/prosilver/template/chat_edit.html @@ -0,0 +1,40 @@ + + + +
        +
        +
        +

        {{ lang('CHAT_EDIT') }}

        +
        +
        + +
        + +
        +
        +   + +
        +
        +
        +
        + + diff --git a/styles/prosilver/template/ucp_ajax_chat.html b/styles/prosilver/template/ucp_ajax_chat.html new file mode 100644 index 0000000..cf25dae --- /dev/null +++ b/styles/prosilver/template/ucp_ajax_chat.html @@ -0,0 +1,111 @@ + + +
        + +

        {{ lang('USER_AJAXCHAT_SETTINGS') }}

        + +
        +
        + +
        +

        {ERROR}

        + +
        +
        +
        + + +
        +
        + +
        +
        +
        + + +
        +
        + +
        +
        +
        + + +
        +
        + +
        +
        +
        + + +
        +
        + + +
        +
        +
        + + +
        +
        + +
        +
        +
        + + +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + +
        +
        + +
        + +
        +
        + +
        + {S_HIDDEN_FIELDS}  + + {S_FORM_TOKEN} +
        + +

        {{ lang('USER_AJAXCHAT_SETTINGS') }}

        + +
        +
        + {{ lang('NO_VIEW_CHAT') }} +
        +
        + +
        + + diff --git a/styles/subsilver2/template/chat_body.html b/styles/subsilver2/template/chat_body.html deleted file mode 100644 index 6b48244..0000000 --- a/styles/subsilver2/template/chat_body.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - -
        - - - - - -
        - {L_DELETE} - -
        - « {chatrow.TIME} » -
        -
        {chatrow.MESSAGE}
        -
        -
        - - --!--{LAST_ID}--!-- - - - - - - - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - - - --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} - - - - - - - - -
        - - - -
        -
        - - - - - - - - - - - - - - - - - - - - -
        {L_CHAT_EXPLAIN}{L_CHAT_EXPLAIN}
        -
        - {L_CHAT_RULE}
        {CHAT_RULES} -
        -
        -
        -
        - -
        - - - - - -
        - {L_DELETE} - -
        - « {chatrow.TIME} » -
        -
        {chatrow.MESSAGE}
        -
        -
        - -
        -
        -
        style="visibility: hidden; position: absolute;"> -
        -
        - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - -
        -
        -
        - {L_DETAILS} - check_indicator - act_indicator -  {L_UPDATES} {REFRESH_TIME} {L_UNIT} -
        -
        -
        - - - - -
        - - - - - \ No newline at end of file diff --git a/styles/subsilver2/template/chat_buttons.html b/styles/subsilver2/template/chat_buttons.html deleted file mode 100644 index 3907b81..0000000 --- a/styles/subsilver2/template/chat_buttons.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - diff --git a/styles/subsilver2/template/event/index_body_forumlist_body_after.html b/styles/subsilver2/template/event/index_body_forumlist_body_after.html deleted file mode 100644 index 5eb0f73..0000000 --- a/styles/subsilver2/template/event/index_body_forumlist_body_after.html +++ /dev/null @@ -1,9 +0,0 @@ - - -
        - - -
        - - - \ No newline at end of file diff --git a/styles/subsilver2/template/event/index_body_markforums_after.html b/styles/subsilver2/template/event/index_body_markforums_after.html deleted file mode 100644 index 018e1fd..0000000 --- a/styles/subsilver2/template/event/index_body_markforums_after.html +++ /dev/null @@ -1,9 +0,0 @@ - - - -
        - - -
        - - \ No newline at end of file diff --git a/styles/subsilver2/template/event/overall_header_head_append.html b/styles/subsilver2/template/event/overall_header_head_append.html deleted file mode 100644 index fca29e6..0000000 --- a/styles/subsilver2/template/event/overall_header_head_append.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/styles/subsilver2/template/event/overall_header_navigation_prepend.html b/styles/subsilver2/template/event/overall_header_navigation_prepend.html deleted file mode 100644 index 257b408..0000000 --- a/styles/subsilver2/template/event/overall_header_navigation_prepend.html +++ /dev/null @@ -1,5 +0,0 @@ - - - * {L_CHAT_EXPLAIN}    - - diff --git a/styles/subsilver2/template/event/simple_header_head_append.html b/styles/subsilver2/template/event/simple_header_head_append.html deleted file mode 100644 index fca29e6..0000000 --- a/styles/subsilver2/template/event/simple_header_head_append.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/styles/subsilver2/template/ucp_ajax_chat.html b/styles/subsilver2/template/ucp_ajax_chat.html deleted file mode 100644 index 3fa2ede..0000000 --- a/styles/subsilver2/template/ucp_ajax_chat.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        {L_USER_AJAXCHAT_SETTINGS}
        {ERROR}
        {L_USER_AJAX_CHAT_VIEW}{L_COLON} checked="checked" />{L_YES}   checked="checked" />{L_NO}
        {L_USER_AJAX_CHAT_POSITION}{L_COLON} checked="checked" />{L_CHAT_TOP}   checked="checked" />{L_CHAT_BOTTOM}
        {L_USER_AJAX_CHAT_AVATARS}{L_COLON} checked="checked" />{L_YES}   checked="checked" />{L_NO}
        {L_USER_AJAX_CHAT_AVATAR_HOVER}{L_COLON} checked="checked" />{L_YES}   checked="checked" />{L_NO}
        {L_USER_AJAX_CHAT_SOUND}{L_COLON} checked="checked" />{L_YES}   checked="checked" />{L_NO}
        {L_USER_AJAX_CHAT_ONLINELIST}{L_COLON} checked="checked" />{L_YES}   checked="checked" />{L_NO}
        {S_HIDDEN_FIELDS}  
        - - - - - - - - -
        {L_USER_AJAXCHAT_SETTINGS}
        {L_NO_VIEW_CHAT}
        - - - diff --git a/styles/subsilver2/theme/ajax_chat.css b/styles/subsilver2/theme/ajax_chat.css deleted file mode 100644 index 5af032c..0000000 --- a/styles/subsilver2/theme/ajax_chat.css +++ /dev/null @@ -1,157 +0,0 @@ -#bbpalette { - display: inline; -} - -#fc { - margin: 0 auto; - height: 20px; - width: 20px; - border-style: solid; - border-width: 1px; -} - -#chat_colour_palette { - display: none; - text-align: center; - padding-bottom: 5px; - text-indent: 0; -} - -#chat_colour_palette table { - margin: 0 auto; -} - -#chat { - width: 100%; - text-align: left; -} - -#message { - width: 65%; -} - -#whois_online{ - vertical-align: text-top; - text-align: left; -} - -#act_indicator { - visibility: hidden; - vertical-align: text-bottom; - cursor: wait; -} - -#check_indicator{ - vertical-align: text-bottom; - margin-right: -16px; - cursor: help; -} - -.chat_sound { - visibility: hidden; - position: absolute; -} - -.select_color { - margin: 0 auto; -} - -.box { - width: 100%; - margin-left: auto; - margin-right: auto; -} - -.chat_profile { - width: 200px; - padding: 4px; -} - -.whois { - height: 300px; - overflow: auto; -} - -.shouts { - width: 100%; - height: 300px; - overflow: auto; -} - -.status_img { - vertical-align: middle; -} - -.chat-avatars { - float: left; - position: relative; - margin-right: 10px; - outline: none; - z-index: 0; -} - -div.chat-avatars:hover { - background-color: transparent; - z-index: 50; -} - -.chat-avatars span { - position: absolute; - left: 0px; - display: none; - color: #FFFFFF; - text-decoration: none; -} - -.chat-avatars span img { - border-width: 0; -} - -div.chat-avatars:hover span { - position: absolute; - display: block; - top: -25px; - left: 40px; - padding: 2px 2px 0; - background-color: transparent; - border: none; -} - -.chat .cat { - background-repeat-y: no-repeat !important; -} - -.chat-icon { - background-position: 0 50%; - background-repeat: no-repeat; - background-image: url("./images/icon_chat.png"); - padding: 6px 0 6px 21px; -} - -.span_chat_rule { - font-weight: bold; - font-size: 1.1em; - color: #AA0000; -} - -#chat_smilies { - margin-bottom: 5px; -} - -.details { - color: #AA0000; -} - -/* ABBC3 Compatibility */ - -.abbc3_buttons_row { - width: inherit !important; -} - -#abbc3_buttons { - margin-top: 0 !important; -} - -#chat_bbcodes #bbcode_wizard { - position: inherit; -} diff --git a/styles/subsilver2/theme/images/icon_chat.png b/styles/subsilver2/theme/images/icon_chat.png deleted file mode 100644 index e3e549e..0000000 Binary files a/styles/subsilver2/theme/images/icon_chat.png and /dev/null differ diff --git a/styles/we_universal/template/chat_body.html b/styles/we_universal/template/chat_body.html deleted file mode 100644 index df21a6c..0000000 --- a/styles/we_universal/template/chat_body.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - -
        -
        -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        -
        -
        -
        -
        - {SMILIES_PATH} -
        -
          - -
        • - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        -
        - - --!--{LAST_ID}--!-- - - - - - - - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - - - --!--{LAST_TIME}--!--{REFRESH_TIME}--!--{LAST_POST} - - - - - - - - -
        - - - -
        -
        - - -
          -
        • -
          -
          - - -
          -
          - - autocomplete="off" /> -
          - - - - - - - - - - -
          - -
          - - {L_NO_POST_IN_CHAT} - - -
          {L_GUEST_MESSAGE}
          - -
          -
          -
          -
          -
        • -
        - -
        -
        - -
        - {L_CHAT_RULE}
        {CHAT_RULES} -
        - -
        -
        - -
        -
        -
        -
        -
        -
        - - - - {chatrow.USER_AVATAR} - - {chatrow.USER_AVATAR_THUMB} - - - - - - - - - -
        -
        - - - @ - - @ - - - @ - - {chatrow.USERNAME_FULL}
        « {chatrow.TIME} » -
        -
        -
        -
        -
        -
        -
        -
          - -
        • - -
        -
        -
        - {chatrow.MESSAGE} -
        -
        -
        - -
        -
        - -
        -

        - {L_WHOIS_CHATTING} -

        -
        - -
        - {whoisrow.USER_STATUS} {whoisrow.USERNAME_FULL}  -
        - -
        -
        - -
        -
        - {L_DETAILS} - check_indicator - act_indicator -  {L_UPDATES} {REFRESH_TIME} {L_UNIT} -
        -
        - - - - -
        - - - - - \ No newline at end of file diff --git a/styles/we_universal/template/event/navbar_header_quick_links_after.html b/styles/we_universal/template/event/navbar_header_quick_links_after.html deleted file mode 100644 index 62069f9..0000000 --- a/styles/we_universal/template/event/navbar_header_quick_links_after.html +++ /dev/null @@ -1,5 +0,0 @@ - - -
      • {L_CHAT_EXPLAIN}
      • - - diff --git a/ucp/ucp_ajaxchat_module.php b/ucp/ucp_ajaxchat_module.php index f6b6ffa..7f8bac2 100644 --- a/ucp/ucp_ajaxchat_module.php +++ b/ucp/ucp_ajaxchat_module.php @@ -100,13 +100,13 @@ public function main($id, $mode) 'user_ajax_chat_avatar_hover' => $this->request->variable('ajax_chat_avatar_hover', (bool) $this->user->data['user_ajax_chat_avatar_hover']), 'user_ajax_chat_onlinelist' => $this->request->variable('ajax_chat_onlinelist', (bool) $this->user->data['user_ajax_chat_onlinelist']), 'user_ajax_chat_autocomplete' => $this->request->variable('ajax_chat_autocomplete', (bool) $this->user->data['user_ajax_chat_autocomplete']), + 'user_ajax_chat_messages_down' => $this->request->variable('ajax_chat_messages_down', (bool) $this->user->data['user_ajax_chat_messages_down']), ); $error = array(); - $submit = $this->request->variable('submit', false, false, \phpbb\request\request_interface::POST); + $submit = $this->request->is_set_post('submit'); add_form_key('ucp_ajax_chat'); - $post = $this->request->get_super_global(\phpbb\request\request_interface::POST); if ($submit) { if (!check_form_key('ucp_ajax_chat')) @@ -116,7 +116,7 @@ public function main($id, $mode) if (!$this->config['location_ajax_chat_override']) { - $chat_position2 = $post['ajax_chat_position']; + $chat_position2 = $this->request->variable('ajax_chat_position', 0); } else { @@ -125,7 +125,7 @@ public function main($id, $mode) if (!$this->config['viewforum_ajax_chat_override']) { - $chat_viewforum2 = $post['ajax_chat_viewforum']; + $chat_viewforum2 = $this->request->variable('ajax_chat_viewforum', 0); } else { @@ -134,7 +134,7 @@ public function main($id, $mode) if (!$this->config['viewtopic_ajax_chat_override']) { - $chat_viewtopic2 = $post['ajax_chat_viewtopic']; + $chat_viewtopic2 = $this->request->variable('ajax_chat_viewtopic', 0); } else { @@ -144,16 +144,17 @@ public function main($id, $mode) if (!sizeof($error)) { $sql_ary = array( - 'user_ajax_chat_view' => $post['ajax_chat_view'], - 'user_ajax_chat_avatars' => $post['ajax_chat_avatars'], + 'user_ajax_chat_view' => $this->request->variable('ajax_chat_view', 0), + 'user_ajax_chat_avatars' => $this->request->variable('ajax_chat_avatars', 0), 'user_ajax_chat_position' => $chat_position2, 'user_ajax_chat_viewforum' => $chat_viewforum2, 'user_ajax_chat_viewtopic' => $chat_viewtopic2, - 'user_ajax_chat_sound' => $post['ajax_chat_sound'], - 'user_ajax_chat_sound' => $post['ajax_chat_sound'], - 'user_ajax_chat_avatar_hover' => $post['ajax_chat_avatar_hover'], - 'user_ajax_chat_onlinelist' => $post['ajax_chat_onlinelist'], - 'user_ajax_chat_autocomplete' => $post['ajax_chat_autocomplete'], + 'user_ajax_chat_sound' => $this->request->variable('ajax_chat_sound', 0), + 'user_ajax_chat_sound' => $this->request->variable('ajax_chat_sound', 0), + 'user_ajax_chat_avatar_hover' => $this->request->variable('ajax_chat_avatar_hover', 0), + 'user_ajax_chat_onlinelist' => $this->request->variable('ajax_chat_onlinelist', 0), + 'user_ajax_chat_autocomplete' => $this->request->variable('ajax_chat_autocomplete', 0), + 'user_ajax_chat_messages_down' => $this->request->variable('ajax_chat_messages_down', 0), ); if (sizeof($sql_ary)) @@ -184,6 +185,7 @@ public function main($id, $mode) 'S_AJAX_CHAT_AVATAR_HOVER' => $data['user_ajax_chat_avatar_hover'], 'S_AJAX_CHAT_ONLINELIST' => $data['user_ajax_chat_onlinelist'], 'S_AJAX_CHAT_AUTOCOMPLETE' => $data['user_ajax_chat_autocomplete'], + 'S_AJAX_CHAT_MESSAGES_DOWN' => $data['user_ajax_chat_messages_down'], )); break; }