diff --git a/composer.json b/composer.json
index a49f221..77a25a9 100644
--- a/composer.json
+++ b/composer.json
@@ -3,9 +3,13 @@
"type": "phpbb-extension",
"description": "mChat",
"homepage": "https://www.phpbb.com/customise/db/extension/mchat_extension/",
- "version": "2.1.1",
- "time": "2018-09-01",
- "keywords": ["phpbb", "extension", "mchat"],
+ "version": "2.1.2",
+ "time": "2018-12-25",
+ "keywords": [
+ "phpbb",
+ "extension",
+ "mchat"
+ ],
"license": "GPL-2.0-only",
"authors": [
{
@@ -28,7 +32,8 @@
],
"require": {
"php": ">=5.4.7",
- "composer/installers": "~1.0"
+ "composer/installers": "~1.0.0",
+ "phpbb/phpbb": ">=3.2.0"
},
"require-dev": {
"phpbb/epv": "dev-master"
@@ -44,4 +49,4 @@
"filename": "version_check"
}
}
-}
+}
\ No newline at end of file
diff --git a/core/log.php b/core/log.php
index e0bae89..4524470 100644
--- a/core/log.php
+++ b/core/log.php
@@ -104,19 +104,48 @@ class log
}
/**
- * @param string $log_type The log type, one of edit|del
+ * @param string $log_type The log type, one of edit|del or a custom type
* @param int $message_id The ID of the message to which this log entry belongs
- * @return int The ID of the newly added log row
+ * @return int The ID of the newly added log row, or 0 if no log row was added
*/
public function add_log($log_type, $message_id)
{
- $this->db->sql_query('INSERT INTO ' . $this->mchat_settings->get_table_mchat_log() . ' ' . $this->db->sql_build_array('INSERT', [
+ $log_row = [
'log_type' => $this->get_type_id($log_type),
'user_id' => (int) $this->user->data['user_id'],
'message_id' => (int) $message_id,
'log_ip' => $this->user->ip,
'log_time' => time(),
- ]));
+ ];
+
+ $insert_log = true;
+
+ /**
+ * Event that allows adding log types
+ *
+ * @event dmzx.mchat.log_add_before
+ * @var string log_type The log type, one of edit|del or a custom type
+ * @var int message_id ID of the message to which this log entry belongs
+ * @var array log_row Array that is about to be added to the mchat_log table
+ * @var bool insert_log Whether or not to add the log_row
+ * @since 2.1.2
+ */
+ $vars = [
+ 'log_type',
+ 'message_id',
+ 'log_row',
+ 'insert_log',
+ ];
+ extract($this->dispatcher->trigger_event('dmzx.mchat.log_add_before', compact($vars)));
+
+ if (!$insert_log)
+ {
+ return 0;
+ }
+
+ $sql = 'INSERT INTO ' . $this->mchat_settings->get_table_mchat_log() . ' ' . $this->db->sql_build_array('INSERT', $log_row);
+
+ $this->db->sql_query($sql);
$log_id = (int) $this->db->sql_nextid();
@@ -171,12 +200,11 @@ class log
* Event that allows processing log messages
*
* @event dmzx.mchat.action_refresh_process_log_row
- * @var array response The data that is sent back to the user (still incomplete at this point)
* @var array log_row The log data (read only)
* @since 2.0.0-RC6
+ * @changed 2.1.2 Removed response
*/
$vars = [
- 'response',
'log_row',
];
extract($this->dispatcher->trigger_event('dmzx.mchat.action_refresh_process_log_row', compact($vars)));
diff --git a/core/mchat.php b/core/mchat.php
index 6ea79f2..2c538f7 100644
--- a/core/mchat.php
+++ b/core/mchat.php
@@ -571,6 +571,7 @@ class mchat
unset($logs['latest']);
$log_edit_del_ids = $logs;
+ unset($logs);
}
else
{
@@ -761,18 +762,17 @@ class mchat
$is_archive = $page == 'archive';
$jump_to_id = $is_archive ? $this->request->variable('jumpto', 0) : 0;
- // If the static message is not empty in the language file, use it, else ise the static message in the database
+ // If the static message is not empty in the language file, use it, else use the static message in the database
$static_message = $this->lang->lang('MCHAT_STATIC_MESSAGE') ?: $this->mchat_settings->cfg('mchat_static_message');
$whois_refresh = $this->mchat_settings->cfg('mchat_whois_index') || $this->mchat_settings->cfg('mchat_navbar_link_count');
$template_data = [
'MCHAT_PAGE' => $page,
- 'MCHAT_CURRENT_URL' => '.' . $this->user->page['script_path'] . $this->user->page['page'],
+ 'MCHAT_CURRENT_URL' => $this->mchat_settings->get_current_page(),
'MCHAT_ALLOW_SMILES' => $this->mchat_settings->cfg('allow_smilies') && $this->auth->acl_get('u_mchat_smilies'),
'MCHAT_MESSAGE_TOP' => $this->mchat_settings->cfg('mchat_message_top'),
'MCHAT_INDEX_HEIGHT' => $this->mchat_settings->cfg('mchat_index_height'),
'MCHAT_CUSTOM_HEIGHT' => $this->mchat_settings->cfg('mchat_custom_height'),
- 'MCHAT_LIVE_UPDATES' => $this->mchat_settings->cfg('mchat_live_updates'),
'MCHAT_LOCATION' => $this->mchat_settings->cfg('mchat_location'),
'MCHAT_CHARACTER_COUNT' => $this->mchat_settings->cfg('mchat_character_count'),
'MCHAT_SOUND' => $this->mchat_settings->cfg('mchat_sound'),
@@ -1096,7 +1096,7 @@ class mchat
'MCHAT_USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour'], $this->lang->lang('GUEST')),
'MCHAT_USERNAME_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour'], $this->lang->lang('GUEST')),
'MCHAT_WHOIS_USER' => $this->lang->lang('MCHAT_WHOIS_USER', $row['user_ip']),
- 'MCHAT_U_IP' => $this->helper->route('dmzx_mchat_page_whois_controller', ['ip' => $row['user_ip']]),
+ 'MCHAT_U_IP' => $this->auth->acl_get('u_mchat_ip') ? $this->helper->route('dmzx_mchat_page_whois_controller', ['ip' => $row['user_ip']]) : false,
'MCHAT_U_PERMISSIONS' => append_sid($this->mchat_settings->url('adm/index', true), ['i' => 'permissions', 'mode' => 'setting_user_global', rawurlencode('user_id[0]') => $row['user_id']], true, $this->user->session_id),
'MCHAT_MESSAGE' => generate_text_for_display($row['message'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options']),
'MCHAT_TIME' => $minutes_ago === -1 ? $datetime : $this->lang->lang('MCHAT_MINUTES_AGO', $minutes_ago),
diff --git a/core/settings.php b/core/settings.php
index a27ae15..467e98f 100644
--- a/core/settings.php
+++ b/core/settings.php
@@ -168,10 +168,10 @@ class settings
'mchat_live_updates' => ['default' => 1],
'mchat_log_enabled' => ['default' => 1],
'mchat_max_input_height' => ['default' => 150, 'validation' => ['num', false, 0, 1000]],
- 'mchat_max_message_lngth' => ['default' => 500, 'validation' => ['num', false, 0, 1000]],
+ 'mchat_max_message_lngth' => ['default' => 500],
'mchat_message_num_archive' => ['default' => 25, 'validation' => ['num', false, 10, 100]],
- 'mchat_message_num_custom' => ['default' => 10, 'validation' => ['num', false, 5, 50]],
- 'mchat_message_num_index' => ['default' => 10, 'validation' => ['num', false, 5, 50]],
+ 'mchat_message_num_custom' => ['default' => 10],
+ 'mchat_message_num_index' => ['default' => 10],
'mchat_navbar_link_count' => ['default' => 1],
'mchat_override_min_post_chars' => ['default' => 0],
'mchat_override_smilie_limit' => ['default' => 0],
@@ -185,7 +185,7 @@ class settings
'mchat_prune_gc' => ['default' => strtotime('1 day', 0)],
'mchat_prune_mode' => ['default' => 0],
'mchat_prune_num' => ['default' => 0],
- 'mchat_refresh' => ['default' => 10, 'validation' => ['num', false, 5, 60]],
+ 'mchat_refresh' => ['default' => 10, 'validation' => ['num', false, 2, 3600]],
'mchat_timeout' => ['default' => 0, 'validation' => ['num', false, 0, (int) $this->cfg('session_length')]],
'mchat_whois_refresh' => ['default' => 60, 'validation' => ['num', false, 10, 300]],
];
@@ -479,6 +479,27 @@ class settings
return implode($this->lang->lang('COMMA_SEPARATOR'), $enabled_notifications_lang);
}
+ /**
+ * @return string
+ */
+ public function get_current_page()
+ {
+ $page = $this->user->page['page_name'];
+
+ // Remove app.php if URL rewriting is enabled in the ACP
+ if ($this->config['enable_mod_rewrite'])
+ {
+ $app_php = 'app.' . $this->php_ext . '/';
+
+ if (($app_position = strpos($page, $app_php)) !== false)
+ {
+ $page = substr($page, $app_position + strlen($app_php));
+ }
+ }
+
+ return generate_board_url() . '/' . $page;
+ }
+
/**
* @param string $path
* @param bool $absolute_url
diff --git a/language/en/mchat_acp.php b/language/en/mchat_acp.php
index d997b75..daea4ca 100644
--- a/language/en/mchat_acp.php
+++ b/language/en/mchat_acp.php
@@ -66,31 +66,31 @@ $lang = array_merge($lang, [
'MCHAT_RULES_EXPLAIN' => 'Enter the rules here. HTML code is allowed. Set to empty to disable the display.
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_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_INDEX_HEIGHT_EXPLAIN' => '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 between refreshing messages.
You are limited from 5 to 60 seconds. Default is 10.',
+ 'MCHAT_REFRESH_EXPLAIN' => 'Number of seconds between refreshing messages.
You are limited from 2 to 3600 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_GC' => 'Message prune task interval',
- 'MCHAT_PRUNE_GC_EXPLAIN' => 'The time in seconds that needs to pass before the next message pruning is triggered. Note: this setting controls when messages are checked if they can be deleted. It does not control which messages are deleted. Default is 86400 = 24 hours.',
+ 'MCHAT_PRUNE_GC_EXPLAIN' => 'The time that needs to pass before the next message pruning is triggered. Note: this setting controls when messages are checked if they can be deleted. It does not control which messages are deleted. Default is 86400 seconds = 24 hours.',
'MCHAT_PRUNE_NUM' => 'Messages to retain when pruning',
'MCHAT_PRUNE_NUM_EXPLAIN' => 'When using ’messages’ a fixed number of messages will be kept. When using ’hours’, ’days’ or ’weeks’ all messages older than the specified time period at the time of pruning will be deleted.',
'MCHAT_PRUNE_NOW' => 'Prune messages now',
'MCHAT_PRUNE_NOW_CONFIRM' => 'Confirm pruning messages',
'MCHAT_PRUNED' => '%1$d mChat messages have been pruned',
- 'MCHAT_NAVBAR_LINK_COUNT' => 'Display number of active chat sessions in the navbar link',
+ 'MCHAT_NAVBAR_LINK_COUNT' => 'Display number of active chat sessions in the navbar',
'MCHAT_MESSAGE_NUM_CUSTOM' => 'Initial number of messages to display on the mChat page',
- 'MCHAT_MESSAGE_NUM_CUSTOM_EXPLAIN' => 'You are limited from 5 to 50. Default is 10.',
+ 'MCHAT_MESSAGE_NUM_CUSTOM_EXPLAIN' => '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_INDEX_EXPLAIN' => '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_MESSAGE_NUM_ARCHIVE_EXPLAIN' => 'You are limited from 10 to 100. Default is 25.',
'MCHAT_ARCHIVE_SORT' => 'Message sorting',
'MCHAT_ARCHIVE_SORT_TOP_BOTTOM' => 'Always sort messages oldest to newest',
'MCHAT_ARCHIVE_SORT_BOTTOM_TOP' => 'Always sort messages newest to oldest',
@@ -100,22 +100,22 @@ $lang = array_merge($lang, [
'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_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Maximum number of characters allowed per message posted.
Default is 500. Set to 0 to disable.',
'MCHAT_MAX_INPUT_HEIGHT' => 'Maximum input field height',
'MCHAT_MAX_INPUT_HEIGHT_EXPLAIN' => 'The input field will not expand beyond this number of pixels.
You are limited from 0 to 1000. Default is 150. Set to 0 to not allow multi-line messages.',
'MCHAT_CUSTOM_PAGE' => 'Enable mChat page',
'MCHAT_CUSTOM_HEIGHT' => 'mChat page height',
- 'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the mChat 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_CUSTOM_HEIGHT_EXPLAIN' => 'You are limited from 50 to 1000. Default is 350.',
+ 'MCHAT_BBCODES_DISALLOWED' => 'Disallowed BBCdes',
+ '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.
This message can be translated: edit the MCHAT_STATIC_MESSAGE language key in /ext/dmzx/mchat/language/XX/mchat.php.',
+ 'MCHAT_STATIC_MESSAGE_EXPLAIN' => 'Here you can define a static message. HTML code is allowed. Set to empty to disable the display.
This message can be translated: edit the MCHAT_STATIC_MESSAGE language key in /ext/dmzx/mchat/language/XX/mchat.php.',
'MCHAT_TIMEOUT' => 'Session timeout',
- 'MCHAT_TIMEOUT_EXPLAIN' => 'Set the number of seconds until a 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_TIMEOUT_EXPLAIN' => 'Set the number of seconds until a 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_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_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Set to yes to override the forums minimum characters setting for chat messages.',
'MCHAT_LOG_ENABLED' => 'Add entries to the admin log',
'MCHAT_LOG_ENABLED_EXPLAIN' => 'This affects message editing, deleting, pruning and purging.',
@@ -134,7 +134,7 @@ $lang = array_merge($lang, [
'MCHAT_DELETE_MESSAGES' => '%1$s and delete mChat messages',
// Error reporting
- 'TOO_LONG_MCHAT_BBCODE_DISALLOWED' => 'The disallowed bbcodes value is too long.',
+ 'TOO_LONG_MCHAT_BBCODE_DISALLOWED' => 'The disallowed BBCodes value is too long.',
'TOO_SMALL_MCHAT_CUSTOM_HEIGHT' => 'The mChat page height value is too small.',
'TOO_LARGE_MCHAT_CUSTOM_HEIGHT' => 'The mChat page height value is too large.',
'TOO_LONG_MCHAT_DATE' => 'The date format you entered is too long.',
@@ -142,12 +142,7 @@ $lang = array_merge($lang, [
'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_LARGE_MCHAT_MAX_MESSAGE_LNGTH' => 'The max message length value is too large.',
'TOO_LARGE_MCHAT_MAX_INPUT_HEIGHT' => 'The max input height value is too large.',
- 'TOO_SMALL_MCHAT_MESSAGE_NUM_CUSTOM' => 'The number of messages to display on the mChat page is too small.',
- 'TOO_LARGE_MCHAT_MESSAGE_NUM_CUSTOM' => 'The number of messages to display on the mChat 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 messages to display on the archive page is too small.',
'TOO_LARGE_MCHAT_MESSAGE_NUM_ARCHIVE' => 'The number of messages to display on the archive page is too large.',
'TOO_SMALL_MCHAT_REFRESH' => 'The refresh value is too small.',
diff --git a/migrations/mchat_2_1_2.php b/migrations/mchat_2_1_2.php
new file mode 100644
index 0000000..db3ba31
--- /dev/null
+++ b/migrations/mchat_2_1_2.php
@@ -0,0 +1,30 @@
+ mChat.mssgLngth);
}
}
- mChat.cached('exceed-character-count').text(exceedCount).toggleClass('hidden', exceedCount >= 0);
- mChat.cached('input').parent().toggleClass('mchat-input-error', exceedCount < 0);
- mChat.cached('add').toggleClass('hidden', exceedCount < 0);
+ if (mChat.mssgLngth) {
+ var exceedCount = mChat.mssgLngth - count;
+ mChat.cached('exceed-character-count').text(exceedCount).toggleClass('hidden', exceedCount >= 0);
+ mChat.cached('input').parent().toggleClass('mchat-input-error', exceedCount < 0);
+ mChat.cached('add').toggleClass('hidden', exceedCount < 0);
+ }
},
cleanMessage: function(message) {
if (!mChat.maxInputHeight) {
@@ -773,20 +778,38 @@ jQuery(function($) {
}
});
+ var toggleRememberColor = function() {
+ var $this = $(this);
+ var newColor = $this.data('color');
+ if (mChat.storage.get('color') === newColor) {
+ mChat.storage.remove('color');
+ } else {
+ mChat.storage.set('color', newColor);
+ mChat.cached('colour').find('.colour-palette a').removeClass('remember-color');
+ }
+ $this.toggleClass('remember-color');
+ };
+
+ var toggleRememberColorTimer = 0;
+ var isToggledRememberColor = false;
mChat.cached('colour').find('.colour-palette').on('click', 'a', function(e) {
- if (e.ctrlKey || e.metaKey) {
+ if (isToggledRememberColor) {
e.preventDefault();
e.stopImmediatePropagation();
- var $this = $(this);
- var newColor = $this.data('color');
- if (mChat.storage.get('color') === newColor) {
- mChat.storage.remove('color');
- } else {
- mChat.storage.set('color', newColor);
- mChat.cached('colour').find('.colour-palette a').removeClass('remember-color');
- }
- $this.toggleClass('remember-color');
+ isToggledRememberColor = false;
+ } else if (e.ctrlKey || e.metaKey) {
+ e.preventDefault();
+ e.stopImmediatePropagation();
+ toggleRememberColor.call(this);
}
+ }).on('mousedown touchstart', 'a', function() {
+ var that = this;
+ toggleRememberColorTimer = setTimeout(function() {
+ toggleRememberColor.call(that);
+ isToggledRememberColor = true;
+ }, 500);
+ }).on('mouseup touchend', 'a', function() {
+ clearTimeout(toggleRememberColorTimer);
});
var color = mChat.storage.get('color');
@@ -794,6 +817,10 @@ jQuery(function($) {
mChat.cached('colour').find('.colour-palette a[data-color="' + color + '"]').addClass('remember-color');
}
+ mChat.cached('colour').find('.colour-palette a').each(function() {
+ $(this).removeAttr('href');
+ });
+
if (mChat.maxInputHeight) {
mChat.cached('input').one('focus', function() {
autosize(this);
@@ -803,7 +830,8 @@ jQuery(function($) {
mChat.cached('form').submit(function(e) {
e.preventDefault();
}).keypress(function(e) {
- if ((e.which === 10 || e.which === 13) && mChat.cached('input').is(e.target)) {
+ var isEnter = e.which === 10 || e.which === 13;
+ if (isEnter && mChat.cached('input').is(e.target)) {
var isCtrl = e.ctrlKey || e.metaKey;
if (!mChat.maxInputHeight || !isCtrl === !mChat.storage.get('no_enter')) {
e.preventDefault();
@@ -829,6 +857,9 @@ jQuery(function($) {
$(window).on('beforeunload', function() {
mChat.pageIsUnloading = true;
+ if (mChat.page !== 'archive') {
+ mChat.pauseSession();
+ }
});
$('#phpbb').on('click', '[data-mchat-action]', function(e) {
diff --git a/styles/all/template/mchat_script_data.html b/styles/all/template/mchat_script_data.html
index 60612d3..b1ce974 100644
--- a/styles/all/template/mchat_script_data.html
+++ b/styles/all/template/mchat_script_data.html
@@ -23,7 +23,6 @@
playSound : {{ MCHAT_SOUND ? 'true' : 'false' }},
messageTop : {{ MCHAT_MESSAGE_TOP ? 'true' : 'false' }},
allowBBCodes : {{ S_BBCODE_ALLOWED ? 'true' : 'false' }},
- liveUpdates : {{ MCHAT_LIVE_UPDATES ? 'true' : 'false' }},
relativeTime : {{ MCHAT_RELATIVE_TIME ? 'true' : 'false' }},
showCharCount : {{ MCHAT_CHARACTER_COUNT ? 'true' : 'false' }},
jumpTo : {{ MCHAT_JUMP_TO }},
diff --git a/styles/prosilver/template/event/overall_footer_copyright_append.html b/styles/prosilver/template/event/overall_footer_copyright_append.html
index 6e2b640..0059e40 100644
--- a/styles/prosilver/template/event/overall_footer_copyright_append.html
+++ b/styles/prosilver/template/event/overall_footer_copyright_append.html
@@ -1,4 +1,5 @@
{% if MCHAT_PAGE %}
-
- {{ MCHAT_DISPLAY_NAME }} © {{ lang('POST_BY_AUTHOR') }} {{ MCHAT_AUTHOR_HOMEPAGES }}
+