diff --git a/adm/style/acp_mchat_globalsettings.html b/adm/style/acp_mchat_globalsettings.html index 6ba3c16..0e83c81 100644 --- a/adm/style/acp_mchat_globalsettings.html +++ b/adm/style/acp_mchat_globalsettings.html @@ -12,189 +12,182 @@
- -
- {L_CONFIRM} - {L_MCHAT_PURGE_CONFIRM}{L_COLON} -

-   - - {S_FORM_TOKEN} -

-
- -
- {L_MCHAT_SETTINGS_INDEX} -
-

- {L_MCHAT_INDEX_HEIGHT_EXPLAIN}
-
-
-
-

- {L_MCHAT_MESSAGE_NUM_INDEX_EXPLAIN}
-
-
-
- -
- {L_MCHAT_SETTINGS_CUSTOM} -
-

- {L_MCHAT_CUSTOM_PAGE_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_CUSTOM_HEIGHT_EXPLAIN}
-
-
-
-

- {L_MCHAT_MESSAGE_NUM_CUSTOM_EXPLAIN}
-
-
-
-
-
-
-
-
-
- {L_MCHAT_SETTINGS_ARCHIVE} -
-

- {L_MCHAT_MESSAGE_NUM_ARCHIVE_EXPLAIN}
-
-
-
-
- {L_MCHAT_SETTINGS_MESSAGES} -
-

- {L_MCHAT_TIMEOUT_EXPLAIN}
-
-
-
-

- {L_MCHAT_REFRESH_EXPLAIN}
-
-
-
-

- {L_MCHAT_EDIT_DELETE_LIMIT_EXPLAIN} -
-
-
-

- {L_MCHAT_LIVE_UPDATES_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_FLOOD_TIME_EXPLAIN}
-
-
-
-

- {L_MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN}
-
-
-
-

- {L_MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_BBCODES_DISALLOWED_EXPLAIN}
-
-
-
-

- {L_MCHAT_RULES_EXPLAIN}
-
-
-
-

- {L_MCHAT_STATIC_MESSAGE_EXPLAIN}
-
-
-
-
- {L_MCHAT_SETTINGS_POSTS} -
-
-
- - -
-
-
-
-
- - -
-
-
-
-
- - -
-
-
-
-
- - -
-
-
-
- {L_MCHAT_SETTINGS_STATS} -
-

- {L_MCHAT_WHOIS_REFRESH_EXPLAIN}
-
-
-
-
- {L_MCHAT_SETTINGS_PRUNE} -
-

- {L_MCHAT_PRUNE_EXPLAIN}
-
-
-
-
-
-
-
- -
-
-
-
- -
- -

-   - - {S_FORM_TOKEN} -

- +
+ {L_MCHAT_SETTINGS_INDEX} +
+

+ {L_MCHAT_INDEX_HEIGHT_EXPLAIN}
+
+
+
+

+ {L_MCHAT_MESSAGE_NUM_INDEX_EXPLAIN}
+
+
+
+ +
+ {L_MCHAT_SETTINGS_CUSTOM} +
+

+ {L_MCHAT_CUSTOM_PAGE_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_CUSTOM_HEIGHT_EXPLAIN}
+
+
+
+

+ {L_MCHAT_MESSAGE_NUM_CUSTOM_EXPLAIN}
+
+
+
+
+
+
+
+
+
+ {L_MCHAT_SETTINGS_ARCHIVE} +
+

+ {L_MCHAT_MESSAGE_NUM_ARCHIVE_EXPLAIN}
+
+
+
+
+ {L_MCHAT_SETTINGS_MESSAGES} +
+

+ {L_MCHAT_TIMEOUT_EXPLAIN}
+
+
+
+

+ {L_MCHAT_REFRESH_EXPLAIN}
+
+
+
+

+ {L_MCHAT_EDIT_DELETE_LIMIT_EXPLAIN} +
+
+
+

+ {L_MCHAT_LIVE_UPDATES_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_FLOOD_TIME_EXPLAIN}
+
+
+
+

+ {L_MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN}
+
+
+
+

+ {L_MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_BBCODES_DISALLOWED_EXPLAIN}
+
+
+
+

+ {L_MCHAT_RULES_EXPLAIN}
+
+
+
+

+ {L_MCHAT_STATIC_MESSAGE_EXPLAIN}
+
+
+
+
+ {L_MCHAT_SETTINGS_POSTS} +
+
+
+ + +
+
+
+
+
+ + +
+
+
+
+
+ + +
+
+
+
+
+ + +
+
+
+
+ {L_MCHAT_SETTINGS_STATS} +
+

+ {L_MCHAT_WHOIS_REFRESH_EXPLAIN}
+
+
+
+
+ {L_MCHAT_SETTINGS_PRUNE} +
+

+ {L_MCHAT_PRUNE_EXPLAIN}
+
+
+
+
+
+
+
+ +
+
+
+ + + + +
+
+ +
+ +

+   + + {S_FORM_TOKEN} +

diff --git a/adm/style/acp_mchat_globalusersettings.html b/adm/style/acp_mchat_globalusersettings.html index ac1295e..332b413 100644 --- a/adm/style/acp_mchat_globalusersettings.html +++ b/adm/style/acp_mchat_globalusersettings.html @@ -15,12 +15,29 @@
- {L_MCHAT_ACP_GLOBALUSERSETTINGS_TITLE} + {L_ACP_MCHAT_GLOBALUSERSETTINGS}
+
+ {L_MCHAT_GLOBALUSERSETTINGS_OVERWRITE} +
+

{L_MCHAT_GLOBALUSERSETTINGS_OVERWRITE_EXPLAIN}
+
+ + +
+
+
+
+
+ + +
+
+

-   - +   + {S_FORM_TOKEN}

diff --git a/composer.json b/composer.json index 5838f23..627e175 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,8 @@ "type": "phpbb-extension", "description": "mChat Extension", "homepage": "http://www.dmzx-web.net", - "version": "2.0.0-RC3", - "time": "2016-03-24", + "version": "2.0.0-RC4", + "time": "2016-03-31", "keywords": ["phpbb", "extension", "mchat"], "license": "GPL-2.0", "authors": [ diff --git a/config/services.yml b/config/services.yml index a47a3cf..a9e5731 100644 --- a/config/services.yml +++ b/config/services.yml @@ -49,6 +49,7 @@ services: - '@ext.manager' - '%core.root_path%' - '%core.php_ext%' + - '@?phpbb.collapsiblecategories.operator' dmzx.mchat.functions: class: dmzx\mchat\core\functions arguments: diff --git a/controller/acp_controller.php b/controller/acp_controller.php index 2c85d7d..47bad30 100644 --- a/controller/acp_controller.php +++ b/controller/acp_controller.php @@ -87,20 +87,13 @@ class acp_controller $error = array(); - if ($this->request->is_set_post('mchat_purge')) + if ($this->request->is_set_post('mchat_purge') && $this->request->variable('mchat_purge_confirm', false) && check_form_key('acp_mchat') && $this->user->data['user_type'] == USER_FOUNDER) { - $this->template->assign_var('MCHAT_PURGE', true); - } - else if ($this->request->is_set_post('mchat_purge_confirm')) - { - if (check_form_key('acp_mchat') && $this->user->data['user_type'] == USER_FOUNDER) - { - $this->db->sql_query('TRUNCATE TABLE ' . $this->mchat_table); - $this->db->sql_query('TRUNCATE TABLE ' . $this->mchat_deleted_messages_table); - $this->cache->destroy('sql', $this->mchat_deleted_messages_table); - $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_TABLE_PURGED', false, array($this->user->data['username'])); - trigger_error($this->user->lang('MCHAT_PURGED') . adm_back_link($u_action)); - } + $this->db->sql_query('TRUNCATE TABLE ' . $this->mchat_table); + $this->db->sql_query('TRUNCATE TABLE ' . $this->mchat_deleted_messages_table); + $this->cache->destroy('sql', $this->mchat_deleted_messages_table); + $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_TABLE_PURGED', false, array($this->user->data['username'])); + trigger_error($this->user->lang('MCHAT_PURGED') . adm_back_link($u_action)); } else if ($this->request->is_set_post('submit')) { @@ -203,6 +196,18 @@ class acp_controller if (!$error) { + if ($this->request->variable('mchat_overwrite', 0) && $this->request->variable('mchat_overwrite_confirm', 0)) + { + $mchat_new_user_config = array(); + foreach ($mchat_new_config as $config_name => $config_value) + { + $mchat_new_user_config['user_' . $config_name] = $config_value; + } + + $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $mchat_new_user_config); + $this->db->sql_query($sql); + } + // Set the options the user configured foreach ($mchat_new_config as $config_name => $config_value) { diff --git a/controller/main_controller.php b/controller/main_controller.php index 7caec63..ed9349e 100644 --- a/controller/main_controller.php +++ b/controller/main_controller.php @@ -54,7 +54,7 @@ class main_controller * Controller for mChat actions called with Ajax requests * * @param string $action The action to perform, one of add|edit|del|refresh|whois - * @return A Symfony JsonResponse object + * @return \Symfony\Component\HttpFoundation\JsonResponse A Symfony JsonResponse object */ public function action($action) { diff --git a/core/mchat.php b/core/mchat.php index ea76981..06432e0 100644 --- a/core/mchat.php +++ b/core/mchat.php @@ -49,26 +49,30 @@ class mchat /** @var string */ protected $php_ext; + /** @var \phpbb\collapsiblecategories\operator\operator */ + protected $cc_operator; + /** @var boolean */ protected $remove_disallowed_bbcodes = false; /** * Constructor * - * @param \dmzx\mchat\core\functions $functions - * @param \dmzx\mchat\core\settings $settings - * @param \phpbb\controller\helper $helper - * @param \phpbb\template\template $template - * @param \phpbb\user $user - * @param \phpbb\auth\auth $auth - * @param \phpbb\pagination $pagination - * @param \phpbb\request\request $request - * @param \phpbb\event\dispatcher_interface $dispatcher - * @param \phpbb\extension\manager $extension_manager - * @param string $root_path - * @param string $php_ext + * @param \dmzx\mchat\core\functions $functions + * @param \dmzx\mchat\core\settings $settings + * @param \phpbb\controller\helper $helper + * @param \phpbb\template\template $template + * @param \phpbb\user $user + * @param \phpbb\auth\auth $auth + * @param \phpbb\pagination $pagination + * @param \phpbb\request\request $request + * @param \phpbb\event\dispatcher_interface $dispatcher + * @param \phpbb\extension\manager $extension_manager + * @param string $root_path + * @param string $php_ext + * @param \phpbb\collapsiblecategories\operator\operator $cc_operator */ - public function __construct(\dmzx\mchat\core\functions $functions, \dmzx\mchat\core\settings $settings, \phpbb\controller\helper $helper, \phpbb\template\template $template, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \phpbb\request\request $request, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\extension\manager $extension_manager, $root_path, $php_ext) + public function __construct(\dmzx\mchat\core\functions $functions, \dmzx\mchat\core\settings $settings, \phpbb\controller\helper $helper, \phpbb\template\template $template, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \phpbb\request\request $request, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\extension\manager $extension_manager, $root_path, $php_ext, \phpbb\collapsiblecategories\operator\operator $cc_operator = null) { $this->functions = $functions; $this->settings = $settings; @@ -82,6 +86,7 @@ class mchat $this->extension_manager = $extension_manager; $this->root_path = $root_path; $this->php_ext = $php_ext; + $this->cc_operator = $cc_operator; $this->template->assign_vars(array( 'IS_PHPBB31' => $this->settings->is_phpbb31, @@ -307,8 +312,7 @@ class mchat throw new \phpbb\exception\http_exception(403, 'MCHAT_NOACCESS'); } - $is_archive = $this->request->variable('archive', 0); - $this->template->assign_var('MCHAT_IS_ARCHIVE_PAGE', $is_archive); + $this->template->assign_var('MCHAT_IS_ARCHIVE_PAGE', $this->request->variable('archive', false)); $message = $this->request->variable('message', '', true); @@ -330,7 +334,7 @@ class mchat $rows = $this->functions->mchat_get_messages($sql_where, 1); $this->assign_global_template_data(); - $this->assign_messages($rows, $is_archive ? 'archive' : ''); + $this->assign_messages($rows); return array('edit' => $this->render_template('mchat_messages.html')); } @@ -520,22 +524,22 @@ class mchat 'MCHAT_WHOIS_REFRESH_EXPLAIN' => $this->user->lang('MCHAT_WHO_IS_REFRESH_EXPLAIN', $this->settings->cfg('mchat_whois_refresh')), 'MCHAT_SESSION_TIMELEFT' => $this->user->lang('MCHAT_SESSION_ENDS', gmdate('H:i:s', (int) $this->settings->cfg('mchat_timeout'))), 'MCHAT_STATIC_MESS' => htmlspecialchars_decode($static_message), - 'MCHAT_MESS_LONG' => addslashes($this->user->lang('MCHAT_MESS_LONG', $this->settings->cfg('mchat_max_message_lngth'))), - 'MCHAT_REFRESH_YES' => addslashes($this->user->lang('MCHAT_REFRESH_YES', $this->settings->cfg('mchat_refresh'))), + 'A_MCHAT_MESS_LONG' => addslashes($this->user->lang('MCHAT_MESS_LONG', $this->settings->cfg('mchat_max_message_lngth'))), + 'A_MCHAT_REFRESH_YES' => addslashes($this->user->lang('MCHAT_REFRESH_YES', $this->settings->cfg('mchat_refresh'))), 'U_MCHAT_CUSTOM_PAGE' => $this->helper->route('dmzx_mchat_controller'), 'U_MCHAT_RULES' => $this->helper->route('dmzx_mchat_page_controller', array('page' => 'rules')), 'U_MCHAT_ARCHIVE_URL' => $this->helper->route('dmzx_mchat_page_controller', array('page' => 'archive')), )); // The template needs some language variables if we display relative time for messages - if ($this->settings->cfg('mchat_relative_time') && $page != 'archive') + if ($this->settings->cfg('mchat_relative_time')) { $minutes_limit = $this->get_relative_minutes_limit(); for ($i = 0; $i < $minutes_limit; $i++) { $this->template->assign_block_vars('mchattime', array( 'KEY' => $i, - 'LANG' => addslashes($this->user->lang('MCHAT_MINUTES_AGO', $i)), + 'A_LANG' => addslashes($this->user->lang('MCHAT_MINUTES_AGO', $i)), 'IS_LAST' => $i + 1 === $minutes_limit, )); } @@ -545,9 +549,9 @@ class mchat $actions = array_keys(array_filter(array( 'edit' => $this->auth_message('u_mchat_edit', true, time()), 'del' => $this->auth_message('u_mchat_delete', true, time()), - 'refresh' => $page != 'archive' && $this->auth->acl_get('u_mchat_view'), - 'add' => $page != 'archive' && $u_mchat_use, - 'whois' => $page != 'archive' && $this->settings->cfg('mchat_whois'), + 'refresh' => $page !== 'archive' && $this->auth->acl_get('u_mchat_view'), + 'add' => $page !== 'archive' && $u_mchat_use, + 'whois' => $page !== 'archive' && $this->settings->cfg('mchat_whois'), ))); foreach ($actions as $i => $action) @@ -560,14 +564,14 @@ class mchat } $limit = $this->settings->cfg('mchat_message_num_' . $page); - $start = $page == 'archive' ? $this->request->variable('start', 0) : 0; + $start = $page === 'archive' ? $this->request->variable('start', 0) : 0; $rows = $this->functions->mchat_get_messages('', $limit, $start); $this->assign_global_template_data(); - $this->assign_messages($rows, $page); + $this->assign_messages($rows); // Render pagination - if ($page == 'archive') + if ($page === 'archive') { $archive_url = $this->helper->route('dmzx_mchat_page_controller', array('page' => 'archive')); $total_messages = $this->functions->mchat_total_message_count(); @@ -576,12 +580,26 @@ class mchat } // Render legend - if ($page != 'index' && $this->settings->cfg('mchat_whois')) + if ($page !== 'index' && $this->settings->cfg('mchat_whois')) { $legend = $this->functions->mchat_legend(); $this->template->assign_var('LEGEND', implode($this->user->lang('COMMA_SEPARATOR'), $legend)); } + // Make mChat collapsible + if ($page === 'index' && $this->cc_operator !== null) + { + $cc_fid = 'mchat'; + $this->template->assign_vars(array( + 'MCHAT_IS_COLLAPSIBLE' => true, + 'S_MCHAT_HIDDEN' => in_array($cc_fid, $this->cc_operator->get_user_categories()), + 'U_MCHAT_COLLAPSE_URL' => $this->helper->route('phpbb_collapsiblecategories_main_controller', array( + 'forum_id' => $cc_fid, + 'hash' => generate_link_hash('collapsible_' . $cc_fid), + )), + )); + } + $this->assign_authors(); if ($u_mchat_use) @@ -657,9 +675,8 @@ class mchat * Assigns all message rows to the template * * @param array $rows - * @param string $page */ - protected function assign_messages($rows, $page = '') + protected function assign_messages($rows) { if (!$rows) { @@ -718,7 +735,7 @@ class mchat } $message_age = time() - $row['message_time']; - $minutes_ago = $this->get_minutes_ago($message_age, $page); + $minutes_ago = $this->get_minutes_ago($message_age); $datetime = $this->user->format_date($row['message_time'], $this->settings->cfg('mchat_date')); $is_poster = $row['user_id'] != ANONYMOUS && $this->user->data['user_id'] == $row['user_id']; @@ -754,12 +771,11 @@ class mchat * or the message is older than 59 minutes or we render for the archive, -1 is returned. * * @param int $message_age - * @param string $page * @return int */ - protected function get_minutes_ago($message_age, $page) + protected function get_minutes_ago($message_age) { - if ($this->settings->cfg('mchat_relative_time') && $page != 'archive') + if ($this->settings->cfg('mchat_relative_time')) { $minutes_ago = floor($message_age / 60); if ($minutes_ago < $this->get_relative_minutes_limit()) @@ -780,11 +796,11 @@ class mchat */ protected function get_relative_minutes_limit() { - $timeout = $this->settings->cfg('session_length'); + $timeout = $this->settings->cfg('mchat_timeout'); - if ($this->settings->cfg('mchat_timeout')) + if (!$timeout) { - $timeout = $this->settings->cfg('mchat_timeout'); + $timeout = $this->settings->cfg('session_length'); } return min(max((int) ceil($timeout / 60), 1), 60); @@ -823,7 +839,7 @@ class mchat $this->template->assign_var($option['template_var'], !$is_disallowed); } - $this->template->assign_var('MCHAT_DISALLOWED_BBCODES', addslashes(str_replace('=', '-', $this->settings->cfg('mchat_bbcode_disallowed')))); + $this->template->assign_var('A_MCHAT_DISALLOWED_BBCODES', addslashes(str_replace('=', '-', $this->settings->cfg('mchat_bbcode_disallowed')))); if (!function_exists('display_custom_bbcodes')) { @@ -863,6 +879,22 @@ class mchat return $sql_ary; } + /** + * Sets the default values when a user registers a new account as configured in the global user settings + * + * @param array $sql_ary + * @return array + */ + public function set_user_default_values($sql_ary) + { + foreach (array_keys($this->settings->ucp) as $config_name) + { + $sql_ary['user_' . $config_name] = $this->settings->cfg($config_name, true); + } + + return $sql_ary; + } + /** Inserts a message with posting information into the database * * @param string $mode One of post|quote|edit|reply @@ -910,7 +942,7 @@ class mchat return true; } - $can_edit_delete = $this->settings->cfg('mchat_edit_delete_limit') == 0 || $message_time >= time() - $this->settings->cfg('mchat_edit_delete_limit'); + $can_edit_delete = !$this->settings->cfg('mchat_edit_delete_limit') || $message_time >= time() - $this->settings->cfg('mchat_edit_delete_limit'); return $can_edit_delete && $this->user->data['user_id'] == $author_id && $this->user->data['is_registered']; } diff --git a/event/acp_listener.php b/event/acp_listener.php index 070f631..2c73b4c 100644 --- a/event/acp_listener.php +++ b/event/acp_listener.php @@ -154,7 +154,7 @@ class acp_listener implements EventSubscriberInterface */ public function acp_users_prefs_modify_template_data($event) { - $this->user->add_lang_ext('dmzx/mchat', 'mchat_ucp'); + $this->user->add_lang_ext('dmzx/mchat', array('mchat_acp', 'mchat_ucp')); $user_id = $event['user_row']['user_id']; diff --git a/event/main_listener.php b/event/main_listener.php index 8709f10..2b25236 100644 --- a/event/main_listener.php +++ b/event/main_listener.php @@ -55,6 +55,7 @@ class main_listener implements EventSubscriberInterface 'core.index_modify_page_title' => 'display_mchat_on_index', 'core.posting_modify_submit_post_after' => 'posting_modify_submit_post_after', 'core.display_custom_bbcodes_modify_sql' => 'display_custom_bbcodes_modify_sql', + 'core.user_add_modify_data' => 'user_registration_set_default_values', ); } @@ -123,4 +124,12 @@ class main_listener implements EventSubscriberInterface { $event['sql_ary'] = $this->mchat->remove_disallowed_bbcodes($event['sql_ary']); } + + /** + * @param object $event The event object + */ + public function user_registration_set_default_values($event) + { + $event['sql_ary'] = $this->mchat->set_user_default_values($event['sql_ary']); + } } diff --git a/language/en/info_acp_mchat.php b/language/en/info_acp_mchat.php index 3a35931..1b42daa 100644 --- a/language/en/info_acp_mchat.php +++ b/language/en/info_acp_mchat.php @@ -36,17 +36,15 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( // Module titles - 'ACP_CAT_MCHAT' => 'mChat', - 'ACP_CAT_MCHAT_USER_CONFIG' => 'mChat in UCP', - 'ACP_MCHAT_GLOBALSETTINGS' => 'Global settings', - 'ACP_MCHAT_GLOBALUSERSETTINGS' => 'Global user settings', - - 'MCHAT_ACP_USER_PREFS_EXPLAIN' => 'Below are listed all mChat preferences of the selected user. Settings for which the selected user does not have permission to customise are disabled. These settings can be changed in the Global user settings mChat configuration section.', + 'ACP_CAT_MCHAT' => 'mChat', + 'ACP_CAT_MCHAT_USER_CONFIG' => 'mChat in UCP', + 'ACP_MCHAT_GLOBALSETTINGS' => 'Global settings', + 'ACP_MCHAT_GLOBALUSERSETTINGS' => 'Global user settings', // Log entries (%1$s is replaced with the user name who triggered the event) - 'LOG_MCHAT_CONFIG_UPDATE' => 'mChat configuration updated
» %1$s', - 'LOG_MCHAT_TABLE_PRUNED' => 'mChat messages pruned
» %1$s', - 'LOG_MCHAT_TABLE_PURGED' => 'mChat messages purged
» %1$s', - 'LOG_DELETED_MCHAT' => 'mChat message deleted
» %1$s', - 'LOG_EDITED_MCHAT' => 'mChat message edited
» %1$s', + 'LOG_MCHAT_CONFIG_UPDATE' => 'mChat configuration updated
» %1$s', + 'LOG_MCHAT_TABLE_PRUNED' => 'mChat messages pruned
» %1$s', + 'LOG_MCHAT_TABLE_PURGED' => 'mChat messages purged
» %1$s', + 'LOG_DELETED_MCHAT' => 'mChat message deleted
» %1$s', + 'LOG_EDITED_MCHAT' => 'mChat message edited
» %1$s', )); diff --git a/language/en/mchat.php b/language/en/mchat.php index a6ed9c9..c7d547c 100644 --- a/language/en/mchat.php +++ b/language/en/mchat.php @@ -66,12 +66,12 @@ $lang = array_merge($lang, array( 'MCHAT_REFRESH_NO' => 'Update is off', 'MCHAT_REFRESH_YES' => 'Updates every %1$d seconds', 'MCHAT_RESPOND' => 'Respond to user', - 'MCHAT_RESET_QUESTION' => 'Clear the input area?', 'MCHAT_SESSION_ENDS' => 'Chat session ends in %1$s', 'MCHAT_SESSION_OUT' => 'Chat session has expired', 'MCHAT_SMILES' => 'Smilies', 'MCHAT_TOTALMESSAGES' => 'Total messages: %1$d', 'MCHAT_USESOUND' => 'Play sound', + 'MCHAT_COLLAPSE_TITLE' => 'Toggle visibility of mChat', 'MCHAT_WHO_IS_REFRESH_EXPLAIN' => 'Refreshes every %1$d seconds', 'MCHAT_MINUTES_AGO' => array( 0 => 'just now', diff --git a/language/en/mchat_acp.php b/language/en/mchat_acp.php index 73182eb..cc8c9a0 100644 --- a/language/en/mchat_acp.php +++ b/language/en/mchat_acp.php @@ -36,95 +36,100 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( // ACP Configuration sections - 'MCHAT_SETTINGS_INDEX' => 'Index page settings', - 'MCHAT_SETTINGS_CUSTOM' => 'Custom page settings', - 'MCHAT_SETTINGS_ARCHIVE' => 'Archive page settings', - 'MCHAT_SETTINGS_POSTS' => 'New posts settings', - 'MCHAT_SETTINGS_MESSAGES' => 'Message settings', - 'MCHAT_SETTINGS_PRUNE' => 'Pruning settings', - 'MCHAT_SETTINGS_STATS' => 'Who is chatting settings', + 'MCHAT_SETTINGS_INDEX' => 'Index page settings', + 'MCHAT_SETTINGS_CUSTOM' => 'Custom page settings', + 'MCHAT_SETTINGS_ARCHIVE' => 'Archive page settings', + 'MCHAT_SETTINGS_POSTS' => 'New posts settings', + 'MCHAT_SETTINGS_MESSAGES' => 'Message settings', + 'MCHAT_SETTINGS_PRUNE' => 'Pruning settings', + 'MCHAT_SETTINGS_STATS' => 'Who is chatting settings', - 'MCHAT_GLOBALUSERSETTINGS_EXPLAIN' => 'Settings for which a user does not have permission to customise are applied as configured below.
Go to the mChat UCP tab of the user permissions section to adjust customisation permissions.
Go to the Preferences form in the user management section to see the status of each user’s settings.', + 'MCHAT_GLOBALUSERSETTINGS_EXPLAIN' => 'Settings for which a user does not have permission to customise are applied as configured below.
New user accounts will have initial settings as configured below.

Go to the mChat in UCP tab of the user permissions section to adjust customisation permissions.
Go to the Preferences form in the user management section to see the status of each user’s settings.', + 'MCHAT_GLOBALUSERSETTINGS_OVERWRITE' => 'Overwrite settings for all users', + 'MCHAT_GLOBALUSERSETTINGS_OVERWRITE_EXPLAIN' => 'Applies the settings as defined above to all user accounts.', + 'MCHAT_GLOBALUSERSETTINGS_OVERWRITE_CONFIRM' => 'Confirm overwriting mChat settings for all users', + + 'MCHAT_ACP_USER_PREFS_EXPLAIN' => 'Below are listed all mChat preferences of the selected user. Settings for which the selected user does not have permission to customise are disabled. These settings can be changed in the Global user settings mChat configuration section.', // ACP settings - 'MCHAT_ACP_GLOBALSETTINGS_TITLE' => 'mChat Global settings', - 'MCHAT_ACP_GLOBALUSERSETTINGS_TITLE' => 'mChat Global user settings', - 'MCHAT_VERSION' => 'Version', - 'MCHAT_RULES' => 'Rules', - 'MCHAT_RULES_EXPLAIN' => 'Enter the rules of the forum here. HTML code is allowed. You are limited to 255 characters.
This message can be translated: edit the MCHAT_RULES_MESSAGE language key in /ext/dmzx/mchat/language/XX/mchat.php.', - 'MCHAT_CONFIG_SAVED' => 'mChat configuration has been updated', - 'MCHAT_AVATARS' => 'Display avatars', - 'MCHAT_AVATARS_EXPLAIN' => 'If set to yes, resized user avatars will be displayed', - 'MCHAT_INDEX' => 'Display mChat on the index page', - 'MCHAT_INDEX_HEIGHT' => 'Index page height', - 'MCHAT_INDEX_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the index page.
You are limited from 50 to 1000. Default is 250.', - 'MCHAT_TOP_OF_FORUM' => 'Top', - 'MCHAT_BOTTOM_OF_FORUM' => 'Bottom', - 'MCHAT_REFRESH' => 'Refresh interval', - 'MCHAT_REFRESH_EXPLAIN' => 'Number of seconds before the chat refreshes.
You are limited from 5 to 60 seconds. Default is 10.', - 'MCHAT_LIVE_UPDATES' => 'Live updates of edited and deleted messages', - 'MCHAT_LIVE_UPDATES_EXPLAIN' => 'When a user edits or deletes messages, the changes are updated live for all others, without them having to refresh the page. Disable this if you experience performance issues.', - 'MCHAT_PRUNE' => 'Enable message pruning', - 'MCHAT_PRUNE_EXPLAIN' => 'Only occurs if a user views the custom or archive pages.', - 'MCHAT_PRUNE_NUM' => 'Number of messages to retain when pruning', - 'MCHAT_NAVBAR_LINK' => 'Display link to the custom page in the navbar', - 'MCHAT_MESSAGE_NUM_CUSTOM' => 'Initial number of messages to display on the custom page', - 'MCHAT_MESSAGE_NUM_CUSTOM_EXPLAIN' => 'You are limited from 5 to 50. Default is 10.', - 'MCHAT_MESSAGE_NUM_INDEX' => 'Initial number of messages to display on the index page', - 'MCHAT_MESSAGE_NUM_INDEX_EXPLAIN' => 'You are limited from 5 to 50. Default is 10.', - 'MCHAT_MESSAGE_NUM_ARCHIVE' => 'Number of messages to display on the archive page', - 'MCHAT_MESSAGE_NUM_ARCHIVE_EXPLAIN' => 'The maximum number of messages to show per page on the archive page.
You are limited from 10 to 100. Default is 25.', - 'MCHAT_FLOOD_TIME' => 'Flood time', - 'MCHAT_FLOOD_TIME_EXPLAIN' => 'The number of seconds a user must wait before posting another message in the chat.
You are limited from 5 to 60 seconds. Default is 0. Set to 0 to disable.', - 'MCHAT_EDIT_DELETE_LIMIT' => 'Time limit for editing and deleting messages', - 'MCHAT_EDIT_DELETE_LIMIT_EXPLAIN' => 'Messages older than the specified number of seconds cannot be edited or deleted by the author any more.
Users who have edit/delete permission as well as moderator permission are exempt from this time limit.
Set to 0 to allow unlimited editing and deleting.', - 'MCHAT_MAX_MESSAGE_LENGTH' => 'Maximum message length', - 'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Maximum number of characters allowed per message posted.
You are limited from 0 to 1000. Default is 500. Set to 0 to disable.', - 'MCHAT_CUSTOM_PAGE' => 'Enable custom Page', - 'MCHAT_CUSTOM_PAGE_EXPLAIN' => 'Allow the use of the custom page', - 'MCHAT_CUSTOM_HEIGHT' => 'Custom page height', - 'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the custom page.
You are limited from 50 to 1000. Default is 350.', - 'MCHAT_BBCODES_DISALLOWED' => 'Disallowed bbcodes', - 'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Here you can input the bbcodes that are not to be used in a message.
Separate bbcodes with a vertical bar, for example:
b|i|u|code|list|list=|flash|quote and/or a %1$scustom bbcode tag name%2$s', - 'MCHAT_STATIC_MESSAGE' => 'Static message', - 'MCHAT_STATIC_MESSAGE_EXPLAIN' => 'Here you can define a static message to display to users of the chat. HTML code is allowed.
Set to empty to disable the display. You are limited to 255 characters.
This message can be translated: edit the MCHAT_STATIC_MESSAGE language key in /ext/dmzx/mchat/language/XX/mchat.php.', - 'MCHAT_USER_TIMEOUT' => 'User session timeout', - 'MCHAT_USER_TIMEOUT_EXPLAIN' => 'Set the amount of time in seconds until a user session in the chat ends.
Set to 0 for no timeout. Careful, the session of a user reading mChat will never expire!
You are limited to the %1$sforum config setting for sessions%2$s which is currently set to %3$d seconds', - 'MCHAT_OVERRIDE_SMILIE_LIMIT' => 'Override smilie limit', - 'MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN' => 'Set to yes to override the forums smilie limit setting for chat messages', - 'MCHAT_OVERRIDE_MIN_POST_CHARS' => 'Override minimum characters limit', - 'MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Set to yes to override the forums minimum characters setting for chat messages', + 'MCHAT_ACP_GLOBALSETTINGS_TITLE' => 'mChat Global settings', + 'MCHAT_ACP_GLOBALUSERSETTINGS_TITLE' => 'mChat Global user settings', + 'MCHAT_VERSION' => 'Version', + 'MCHAT_RULES' => 'Rules', + 'MCHAT_RULES_EXPLAIN' => 'Enter the rules of the forum here. HTML code is allowed. You are limited to 255 characters.
This message can be translated: edit the MCHAT_RULES_MESSAGE language key in /ext/dmzx/mchat/language/XX/mchat.php.', + 'MCHAT_CONFIG_SAVED' => 'mChat configuration has been updated', + 'MCHAT_AVATARS' => 'Display avatars', + 'MCHAT_AVATARS_EXPLAIN' => 'If set to yes, resized user avatars will be displayed', + 'MCHAT_INDEX' => 'Display mChat on the index page', + 'MCHAT_INDEX_HEIGHT' => 'Index page height', + 'MCHAT_INDEX_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the index page.
You are limited from 50 to 1000. Default is 250.', + 'MCHAT_TOP_OF_FORUM' => 'Top', + 'MCHAT_BOTTOM_OF_FORUM' => 'Bottom', + 'MCHAT_REFRESH' => 'Refresh interval', + 'MCHAT_REFRESH_EXPLAIN' => 'Number of seconds before the chat refreshes.
You are limited from 5 to 60 seconds. Default is 10.', + 'MCHAT_LIVE_UPDATES' => 'Live updates of edited and deleted messages', + 'MCHAT_LIVE_UPDATES_EXPLAIN' => 'When a user edits or deletes messages, the changes are updated live for all others, without them having to refresh the page. Disable this if you experience performance issues.', + 'MCHAT_PRUNE' => 'Enable message pruning', + 'MCHAT_PRUNE_EXPLAIN' => 'Only occurs if a user views the custom or archive pages.', + 'MCHAT_PRUNE_NUM' => 'Number of messages to retain when pruning', + 'MCHAT_NAVBAR_LINK' => 'Display link to the custom page in the navbar', + 'MCHAT_MESSAGE_NUM_CUSTOM' => 'Initial number of messages to display on the custom page', + 'MCHAT_MESSAGE_NUM_CUSTOM_EXPLAIN' => 'You are limited from 5 to 50. Default is 10.', + 'MCHAT_MESSAGE_NUM_INDEX' => 'Initial number of messages to display on the index page', + 'MCHAT_MESSAGE_NUM_INDEX_EXPLAIN' => 'You are limited from 5 to 50. Default is 10.', + 'MCHAT_MESSAGE_NUM_ARCHIVE' => 'Number of messages to display on the archive page', + 'MCHAT_MESSAGE_NUM_ARCHIVE_EXPLAIN' => 'The maximum number of messages to show per page on the archive page.
You are limited from 10 to 100. Default is 25.', + 'MCHAT_FLOOD_TIME' => 'Flood time', + 'MCHAT_FLOOD_TIME_EXPLAIN' => 'The number of seconds a user must wait before posting another message in the chat.
You are limited from 5 to 60 seconds. Default is 0. Set to 0 to disable.', + 'MCHAT_EDIT_DELETE_LIMIT' => 'Time limit for editing and deleting messages', + 'MCHAT_EDIT_DELETE_LIMIT_EXPLAIN' => 'Messages older than the specified number of seconds cannot be edited or deleted by the author any more.
Users who have edit/delete permission as well as moderator permission are exempt from this time limit.
Set to 0 to allow unlimited editing and deleting.', + 'MCHAT_MAX_MESSAGE_LENGTH' => 'Maximum message length', + 'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Maximum number of characters allowed per message posted.
You are limited from 0 to 1000. Default is 500. Set to 0 to disable.', + 'MCHAT_CUSTOM_PAGE' => 'Enable custom Page', + 'MCHAT_CUSTOM_PAGE_EXPLAIN' => 'Allow the use of the custom page', + 'MCHAT_CUSTOM_HEIGHT' => 'Custom page height', + 'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the custom page.
You are limited from 50 to 1000. Default is 350.', + 'MCHAT_BBCODES_DISALLOWED' => 'Disallowed bbcodes', + 'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Here you can input the bbcodes that are not to be used in a message.
Separate bbcodes with a vertical bar, for example:
b|i|u|code|list|list=|flash|quote and/or a %1$scustom bbcode tag name%2$s', + 'MCHAT_STATIC_MESSAGE' => 'Static message', + 'MCHAT_STATIC_MESSAGE_EXPLAIN' => 'Here you can define a static message to display to users of the chat. HTML code is allowed.
Set to empty to disable the display. You are limited to 255 characters.
This message can be translated: edit the MCHAT_STATIC_MESSAGE language key in /ext/dmzx/mchat/language/XX/mchat.php.', + 'MCHAT_USER_TIMEOUT' => 'User session timeout', + 'MCHAT_USER_TIMEOUT_EXPLAIN' => 'Set the amount of time in seconds until a user session in the chat ends.
Set to 0 for no timeout. Careful, the session of a user reading mChat will never expire!
You are limited to the %1$sforum config setting for sessions%2$s which is currently set to %3$d seconds', + 'MCHAT_OVERRIDE_SMILIE_LIMIT' => 'Override smilie limit', + 'MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN' => 'Set to yes to override the forums smilie limit setting for chat messages', + 'MCHAT_OVERRIDE_MIN_POST_CHARS' => 'Override minimum characters limit', + 'MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Set to yes to override the forums minimum characters setting for chat messages', - 'MCHAT_WHOIS_REFRESH' => 'Who is chatting refresh interval', - 'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Number of seconds before who is chatting refreshes.
You are limited from 10 to 300 seconds. Default is 60.', - 'MCHAT_SOUND' => 'Play sounds for new, edited and deleted messages', - 'MCHAT_PURGE' => 'Delete all messages now', - 'MCHAT_PURGE_CONFIRM' => 'Confirm deleting all messages', - 'MCHAT_PURGED' => 'All mChat messages have been successfully deleted', + 'MCHAT_WHOIS_REFRESH' => 'Who is chatting refresh interval', + 'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Number of seconds before who is chatting refreshes.
You are limited from 10 to 300 seconds. Default is 60.', + 'MCHAT_SOUND' => 'Play sounds for new, edited and deleted messages', + 'MCHAT_PURGE' => 'Delete all messages now', + 'MCHAT_PURGE_CONFIRM' => 'Confirm deleting all messages', + 'MCHAT_PURGED' => 'All mChat messages have been successfully deleted', // Error reporting - 'TOO_LONG_MCHAT_BBCODE_DISALLOWED' => 'The disallowed bbcodes value is too long.', - 'TOO_SMALL_MCHAT_CUSTOM_HEIGHT' => 'The custom height value is too small.', - 'TOO_LARGE_MCHAT_CUSTOM_HEIGHT' => 'The custom height value is too large.', - 'TOO_LONG_MCHAT_DATE' => 'The date format you entered is too long.', - 'TOO_SHORT_MCHAT_DATE' => 'The date format you entered is too short.', - 'TOO_SMALL_MCHAT_FLOOD_TIME' => 'The flood time value is too small.', - 'TOO_LARGE_MCHAT_FLOOD_TIME' => 'The flood time value is too large.', - 'TOO_SMALL_MCHAT_INDEX_HEIGHT' => 'The index height value is too small.', - 'TOO_LARGE_MCHAT_INDEX_HEIGHT' => 'The index height value is too large.', - 'TOO_SMALL_MCHAT_MAX_MESSAGE_LNGTH' => 'The max message length value is too small.', - 'TOO_LARGE_MCHAT_MAX_MESSAGE_LNGTH' => 'The max message length value is too large.', - 'TOO_SMALL_MCHAT_MESSAGE_NUM_CUSTOM' => 'The number of message to display on the custom page is too small.', - 'TOO_LARGE_MCHAT_MESSAGE_NUM_CUSTOM' => 'The number of message to display on the custom page is too large.', - 'TOO_SMALL_MCHAT_MESSAGE_NUM_INDEX' => 'The number of messages to display on the index page is too small.', - 'TOO_LARGE_MCHAT_MESSAGE_NUM_INDEX' => 'The number of messages to display on the index page is too large.', - 'TOO_SMALL_MCHAT_MESSAGE_NUM_ARCHIVE' => 'The number of message to display on the archive page is too small.', - 'TOO_LARGE_MCHAT_MESSAGE_NUM_ARCHIVE' => 'The number of message to display on the archive page is too large.', - 'TOO_SMALL_MCHAT_REFRESH' => 'The refresh value is too small.', - 'TOO_LARGE_MCHAT_REFRESH' => 'The refresh value is too large.', - 'TOO_LONG_MCHAT_STATIC_MESSAGE' => 'The static message value is too long.', - 'TOO_SMALL_MCHAT_TIMEOUT' => 'The user timeout value is too small.', - 'TOO_LARGE_MCHAT_TIMEOUT' => 'The user timeout value is too large.', - 'TOO_SMALL_MCHAT_WHOIS_REFRESH' => 'The whois refresh value is too small.', - 'TOO_LARGE_MCHAT_WHOIS_REFRESH' => 'The whois refresh value is too large.', + 'TOO_LONG_MCHAT_BBCODE_DISALLOWED' => 'The disallowed bbcodes value is too long.', + 'TOO_SMALL_MCHAT_CUSTOM_HEIGHT' => 'The custom height value is too small.', + 'TOO_LARGE_MCHAT_CUSTOM_HEIGHT' => 'The custom height value is too large.', + 'TOO_LONG_MCHAT_DATE' => 'The date format you entered is too long.', + 'TOO_SHORT_MCHAT_DATE' => 'The date format you entered is too short.', + 'TOO_SMALL_MCHAT_FLOOD_TIME' => 'The flood time value is too small.', + 'TOO_LARGE_MCHAT_FLOOD_TIME' => 'The flood time value is too large.', + 'TOO_SMALL_MCHAT_INDEX_HEIGHT' => 'The index height value is too small.', + 'TOO_LARGE_MCHAT_INDEX_HEIGHT' => 'The index height value is too large.', + 'TOO_SMALL_MCHAT_MAX_MESSAGE_LNGTH' => 'The max message length value is too small.', + 'TOO_LARGE_MCHAT_MAX_MESSAGE_LNGTH' => 'The max message length value is too large.', + 'TOO_SMALL_MCHAT_MESSAGE_NUM_CUSTOM' => 'The number of message to display on the custom page is too small.', + 'TOO_LARGE_MCHAT_MESSAGE_NUM_CUSTOM' => 'The number of message to display on the custom page is too large.', + 'TOO_SMALL_MCHAT_MESSAGE_NUM_INDEX' => 'The number of messages to display on the index page is too small.', + 'TOO_LARGE_MCHAT_MESSAGE_NUM_INDEX' => 'The number of messages to display on the index page is too large.', + 'TOO_SMALL_MCHAT_MESSAGE_NUM_ARCHIVE' => 'The number of message to display on the archive page is too small.', + 'TOO_LARGE_MCHAT_MESSAGE_NUM_ARCHIVE' => 'The number of message to display on the archive page is too large.', + 'TOO_SMALL_MCHAT_REFRESH' => 'The refresh value is too small.', + 'TOO_LARGE_MCHAT_REFRESH' => 'The refresh value is too large.', + 'TOO_LONG_MCHAT_STATIC_MESSAGE' => 'The static message value is too long.', + 'TOO_SMALL_MCHAT_TIMEOUT' => 'The user timeout value is too small.', + 'TOO_LARGE_MCHAT_TIMEOUT' => 'The user timeout value is too large.', + 'TOO_SMALL_MCHAT_WHOIS_REFRESH' => 'The whois refresh value is too small.', + 'TOO_LARGE_MCHAT_WHOIS_REFRESH' => 'The whois refresh value is too large.', )); diff --git a/migrations/mchat_2_0_0_rc3.php b/migrations/mchat_2_0_0_rc3.php index b0d1b30..edf8ff6 100644 --- a/migrations/mchat_2_0_0_rc3.php +++ b/migrations/mchat_2_0_0_rc3.php @@ -13,9 +13,6 @@ namespace dmzx\mchat\migrations; class mchat_2_0_0_rc3 extends \phpbb\db\migration\migration { - /** @const string */ - const MCHAT_VERSION = '2.0.0-RC3'; - /** @var array */ protected $mchat_config = null; @@ -24,11 +21,6 @@ class mchat_2_0_0_rc3 extends \phpbb\db\migration\migration return array('\phpbb\db\migration\data\v31x\v317pl1'); } - public function effectively_installed() - { - return isset($this->config['mchat_version']) && version_compare($this->config['mchat_version'], self::MCHAT_VERSION, '>='); - } - protected function get_config() { if ($this->mchat_config == null) @@ -62,7 +54,7 @@ class mchat_2_0_0_rc3 extends \phpbb\db\migration\migration } return array_merge($update_data, array( - array('config.add', array('mchat_version', self::MCHAT_VERSION)), + array('config.add', array('mchat_version', '2.0.0-RC3')), // Add user permissions array('permission.add', array('u_mchat_use', true)), diff --git a/migrations/mchat_2_0_0_rc4.php b/migrations/mchat_2_0_0_rc4.php new file mode 100644 index 0000000..78dee38 --- /dev/null +++ b/migrations/mchat_2_0_0_rc4.php @@ -0,0 +1,29 @@ + 0 ? 'visible' : 'hidden'); @@ -515,12 +529,16 @@ jQuery(function($) { }); } - mChat.cached('input').autoGrowInput({ - minWidth: mChat.cached('input').width(), - maxWidth: mChat.cached('form').width() - (mChat.cached('input').outerWidth(true) - mChat.cached('input').width()) + mChat.cached('form').one('keypress', function() { + mChat.cached('input').autoGrowInput({ + minWidth: mChat.cached('input').width(), + maxWidth: mChat.cached('form').width() - (mChat.cached('input').outerWidth(true) - mChat.cached('input').width()) + }); }); } + mChat.startRelativeTimeUpdate(mChat.cached('messages')); + $(window).on('beforeunload', function() { mChat.pageIsUnloading = true; }); diff --git a/styles/pbtech/template/event/index_body_markforums_before.html b/styles/pbtech/template/event/index_body_markforums_before.html index e69de29..e3d9205 100644 --- a/styles/pbtech/template/event/index_body_markforums_before.html +++ b/styles/pbtech/template/event/index_body_markforums_before.html @@ -0,0 +1 @@ + diff --git a/styles/prosilver/template/mchat_body.html b/styles/prosilver/template/mchat_body.html index 02680b5..a4e9b40 100644 --- a/styles/prosilver/template/mchat_body.html +++ b/styles/prosilver/template/mchat_body.html @@ -24,16 +24,29 @@ + + + + +
-
+
diff --git a/styles/prosilver/template/mchat_panel.html b/styles/prosilver/template/mchat_panel.html index 109c587..a1ac411 100644 --- a/styles/prosilver/template/mchat_panel.html +++ b/styles/prosilver/template/mchat_panel.html @@ -13,7 +13,7 @@ - + @@ -22,9 +22,6 @@
- - - diff --git a/styles/prosilver/template/mchat_script_data.html b/styles/prosilver/template/mchat_script_data.html index 90968ad..7866495 100644 --- a/styles/prosilver/template/mchat_script_data.html +++ b/styles/prosilver/template/mchat_script_data.html @@ -25,12 +25,12 @@ userTimeout : {MCHAT_USER_TIMEOUT}, mssgLngth : {MCHAT_MESSAGE_LNGTH}, editDeleteLimit : {MCHAT_EDIT_DELETE_LIMIT}, - removeBBCodes : '{MCHAT_DISALLOWED_BBCODES}', + removeBBCodes : '{A_MCHAT_DISALLOWED_BBCODES}', // Language minutesAgo : { - {mchattime.KEY}: '{mchattime.LANG}', + {mchattime.KEY}: '{mchattime.A_LANG}', }, newMessageAlert : '{LA_MCHAT_NEW_CHAT}', @@ -40,13 +40,12 @@ noAccess : '{LA_NO_AUTH_OPERATION}', flood : '{LA_MCHAT_FLOOD}', delConfirm : '{LA_MCHAT_DELCONFIRM}', - clearConfirm : '{LA_MCHAT_RESET_QUESTION}', sessOut : '{LA_MCHAT_SESSION_OUT}', sessEnds : '{LA_MCHAT_SESSION_ENDS_JS}', - refreshYes : '{MCHAT_REFRESH_YES}', + refreshYes : '{A_MCHAT_REFRESH_YES}', refreshNo : '{LA_MCHAT_REFRESH_NO}', charCount : '{LA_MCHAT_CHARACTER_COUNT_LIMIT}{LA_MCHAT_CHARACTER_COUNT}', - mssgLngthLong : '{MCHAT_MESS_LONG}', + mssgLngthLong : '{A_MCHAT_MESS_LONG}', likes : '{LA_MCHAT_LIKES}' }; // ]]> diff --git a/styles/prosilver/theme/mchat.css b/styles/prosilver/theme/mchat.css index d1c1d03..4f7a480 100644 --- a/styles/prosilver/theme/mchat.css +++ b/styles/prosilver/theme/mchat.css @@ -130,10 +130,14 @@ .mchat-text { clear: both; overflow: hidden; - padding: 0 5px 2px; + padding: 2px 5px; font-size: 1.2em; } +.mchat-text strong { + font-weight: bold !important; +} + .mchat-text li { display: list-item !important; list-style-type: inherit !important; @@ -324,3 +328,19 @@ #mchat-panel #abbc3_buttons .abbc3_buttons_row { margin: 0 auto !important; } + +/* Compatibility with Collapsible Categories extension */ + +.mchat-category { + display: none; + height: 0; +} + +.mchat-collapse { + display: none; + line-height: 0; +} + +.hidden-category + .forabg #mchat-body .topiclist.forums { + display: block; +}