Version 2.0.3
This commit is contained in:
@@ -18,12 +18,12 @@
|
||||
{% EVENT dmzx_mchat_acp_index_height_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_index_height">{{ lang('MCHAT_INDEX_HEIGHT') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_index_height">{{ lang('MCHAT_INDEX_HEIGHT') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_INDEX_HEIGHT_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_index_height" id="mchat_index_height" size="10" maxlength="4" value="{{ MCHAT_INDEX_HEIGHT }}" /> <span>{{ lang('PIXEL') }}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_message_num_index">{{ lang('MCHAT_MESSAGE_NUM_INDEX') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_message_num_index">{{ lang('MCHAT_MESSAGE_NUM_INDEX') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_MESSAGE_NUM_INDEX_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_message_num_index" id="mchat_message_num_index" size="10" maxlength="4" value="{{ MCHAT_MESSAGE_NUM_INDEX }}" /> <span>{{ lang('MCHAT_ACP_MESSAGES') }}</span></dd>
|
||||
</dl>
|
||||
@@ -45,12 +45,12 @@
|
||||
<label><input type="radio" class="radio" name="mchat_custom_page" value="0"{% if not MCHAT_CUSTOM_PAGE %} id="mchat_custom_page" checked="checked"{% endif %} /> {{ lang('NO') }}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_custom_height">{{ lang('MCHAT_CUSTOM_HEIGHT') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_custom_height">{{ lang('MCHAT_CUSTOM_HEIGHT') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_CUSTOM_HEIGHT_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_custom_height" id="mchat_custom_height" size="10" maxlength="4" value="{{ MCHAT_CUSTOM_HEIGHT }}" /> <span>{{ lang('PIXEL') }}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_message_num_custom">{{ lang('MCHAT_MESSAGE_NUM_CUSTOM') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_message_num_custom">{{ lang('MCHAT_MESSAGE_NUM_CUSTOM') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_MESSAGE_NUM_CUSTOM_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_message_num_custom" id="mchat_message_num_custom" size="10" value="{{ MCHAT_MESSAGE_NUM_CUSTOM }}" /> <span>{{ lang('MCHAT_ACP_MESSAGES') }}</span></dd>
|
||||
</dl>
|
||||
@@ -74,7 +74,7 @@
|
||||
{% EVENT dmzx_mchat_acp_message_num_archive_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_message_num_archive">{{ lang('MCHAT_MESSAGE_NUM_ARCHIVE') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_message_num_archive">{{ lang('MCHAT_MESSAGE_NUM_ARCHIVE') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_MESSAGE_NUM_ARCHIVE_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_message_num_archive" id="mchat_message_num_archive" size="10" value="{{ MCHAT_MESSAGE_NUM_ARCHIVE }}" /> <span>{{ lang('MCHAT_ACP_MESSAGES') }}</span></dd>
|
||||
</dl>
|
||||
@@ -84,8 +84,8 @@
|
||||
<dl>
|
||||
<dt><label for="mchat_archive_sort">{{ lang('MCHAT_ARCHIVE_SORT') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="mchat_archive_sort" value="0"{% if MCHAT_ARCHIVE_SORT == 0 %} id="mchat_archive_sort" checked="checked"{% endif %} /> {{ lang('MCHAT_ARCHIVE_SORT_TOP_BOTTOM') }}</label><br />
|
||||
<label><input type="radio" class="radio" name="mchat_archive_sort" value="1"{% if MCHAT_ARCHIVE_SORT == 1 %} id="mchat_archive_sort" checked="checked"{% endif %} /> {{ lang('MCHAT_ARCHIVE_SORT_BOTTOM_TOP') }}</label><br />
|
||||
<label><input type="radio" class="radio" name="mchat_archive_sort" value="0"{% if MCHAT_ARCHIVE_SORT == 0 %} id="mchat_archive_sort" checked="checked"{% endif %} /> {{ lang('MCHAT_ARCHIVE_SORT_TOP_BOTTOM') }}</label><br>
|
||||
<label><input type="radio" class="radio" name="mchat_archive_sort" value="1"{% if MCHAT_ARCHIVE_SORT == 1 %} id="mchat_archive_sort" checked="checked"{% endif %} /> {{ lang('MCHAT_ARCHIVE_SORT_BOTTOM_TOP') }}</label><br>
|
||||
<label><input type="radio" class="radio" name="mchat_archive_sort" value="2"{% if MCHAT_ARCHIVE_SORT == 2 %} id="mchat_archive_sort" checked="checked"{% endif %} /> {{ lang('MCHAT_ARCHIVE_SORT_USER') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -96,60 +96,60 @@
|
||||
{% EVENT dmzx_mchat_acp_timeout_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_timeout">{{ lang('MCHAT_TIMEOUT') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_timeout">{{ lang('MCHAT_TIMEOUT') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_TIMEOUT_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_timeout" id="mchat_timeout" size="10" maxlength="4" value="{{ MCHAT_TIMEOUT }}" /> <span>{{ lang('MCHAT_ACP_SECONDS') }}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_refresh">{{ lang('MCHAT_REFRESH') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_refresh">{{ lang('MCHAT_REFRESH') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_REFRESH_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_refresh" id="mchat_refresh" size="10" value="{{ MCHAT_REFRESH }}" /> <span>{{ lang('MCHAT_ACP_SECONDS') }}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_edit_delete_limit">{{ lang('MCHAT_EDIT_DELETE_LIMIT') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_edit_delete_limit">{{ lang('MCHAT_EDIT_DELETE_LIMIT') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_EDIT_DELETE_LIMIT_EXPLAIN') }}</span>
|
||||
<dd><input type="text" name="mchat_edit_delete_limit" id="mchat_edit_delete_limit" size="10" value="{{ MCHAT_EDIT_DELETE_LIMIT }}" /> <span>{{ lang('MCHAT_ACP_SECONDS') }}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_live_updates">{{ lang('MCHAT_LIVE_UPDATES') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_live_updates">{{ lang('MCHAT_LIVE_UPDATES') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_LIVE_UPDATES_EXPLAIN') }}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_live_updates" value="1"{% if MCHAT_LIVE_UPDATES %} id="mchat_live_updates" checked="checked"{% endif %} /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_live_updates" value="0"{% if not MCHAT_LIVE_UPDATES %} id="mchat_live_updates" checked="checked"{% endif %} /> {{ lang('NO') }}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_flood_time">{{ lang('MCHAT_FLOOD_TIME') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_flood_time">{{ lang('MCHAT_FLOOD_TIME') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_FLOOD_TIME_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_flood_time" id="mchat_flood_time" size="10" value="{{ MCHAT_FLOOD_TIME }}" /> <span>{{ lang('MCHAT_ACP_SECONDS') }}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_max_message_lngth">{{ lang('MCHAT_MAX_MESSAGE_LENGTH') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_max_message_lngth">{{ lang('MCHAT_MAX_MESSAGE_LENGTH') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_max_message_lngth" id="mchat_max_message_lngth" size="10" value="{{ MCHAT_MAX_MESSAGE_LNGTH }}" /> <span>{{ lang('MCHAT_ACP_CHARACTERS') }}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_override_min_post_chars">{{ lang('MCHAT_OVERRIDE_MIN_POST_CHARS') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_override_min_post_chars">{{ lang('MCHAT_OVERRIDE_MIN_POST_CHARS') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN') }}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_override_min_post_chars" value="1"{% if MCHAT_OVERRIDE_MIN_POST_CHARS %} id="mchat_override_min_post_chars" checked="checked"{% endif %} /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_override_min_post_chars" value="0"{% if not MCHAT_OVERRIDE_MIN_POST_CHARS %} id="mchat_override_min_post_chars" checked="checked"{% endif %} /> {{ lang('NO') }}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_override_smilie_limit">{{ lang('MCHAT_OVERRIDE_SMILIE_LIMIT') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_override_smilie_limit">{{ lang('MCHAT_OVERRIDE_SMILIE_LIMIT') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN') }}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_override_smilie_limit" value="1"{% if MCHAT_OVERRIDE_SMILIE_LIMIT %} id="mchat_override_smilie_limit" checked="checked"{% endif %} /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_override_smilie_limit" value="0"{% if not MCHAT_OVERRIDE_SMILIE_LIMIT %} id="mchat_override_smilie_limit" checked="checked"{% endif %} /> {{ lang('NO') }}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_bbcode_disallowed">{{ lang('MCHAT_BBCODES_DISALLOWED') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_bbcode_disallowed">{{ lang('MCHAT_BBCODES_DISALLOWED') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_BBCODES_DISALLOWED_EXPLAIN') }}</span></dt>
|
||||
<dd><textarea name="mchat_bbcode_disallowed" id="mchat_bbcode_disallowed" rows="3" cols="40">{{ MCHAT_BBCODE_DISALLOWED }}</textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_rules">{{ lang('MCHAT_RULES') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_rules">{{ lang('MCHAT_RULES') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_RULES_EXPLAIN') }}</span></dt>
|
||||
<dd><textarea name="mchat_rules" id="mchat_rules" rows="5" cols="40">{{ MCHAT_RULES }}</textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_static_message">{{ lang('MCHAT_STATIC_MESSAGE') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_static_message">{{ lang('MCHAT_STATIC_MESSAGE') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_STATIC_MESSAGE_EXPLAIN') }}</span></dt>
|
||||
<dd><textarea name="mchat_static_message" id="mchat_static_message" rows="5" cols="40">{{ MCHAT_STATIC_MESSAGE }}</textarea></dd>
|
||||
</dl>
|
||||
@@ -198,7 +198,7 @@
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_posts_auth_check">{{ lang('MCHAT_POSTS_AUTH_CHECK') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_posts_auth_check">{{ lang('MCHAT_POSTS_AUTH_CHECK') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_POSTS_AUTH_CHECK_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_posts_auth_check" value="1"{% if MCHAT_POSTS_AUTH_CHECK %} id="mchat_posts_auth_check" checked="checked"{% endif %} /> {{ lang('YES') }}</label>
|
||||
@@ -215,7 +215,7 @@
|
||||
{% EVENT dmzx_mchat_acp_whois_refresh_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_whois_refresh">{{ lang('MCHAT_WHOIS_REFRESH') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_whois_refresh">{{ lang('MCHAT_WHOIS_REFRESH') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_WHOIS_REFRESH_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_whois_refresh" id="mchat_whois_refresh" size="10" value="{{ MCHAT_WHOIS_REFRESH }}" /> <span>{{ lang('MCHAT_ACP_SECONDS') }}</span></dd>
|
||||
</dl>
|
||||
@@ -235,12 +235,12 @@
|
||||
<label><input type="radio" class="radio" name="mchat_prune" value="0"{% if not MCHAT_PRUNE %} id="mchat_prune" checked="checked"{% endif %} /> {{ lang('NO') }}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_prune_gc">{{ lang('MCHAT_PRUNE_GC') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_prune_gc">{{ lang('MCHAT_PRUNE_GC') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_PRUNE_GC_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_prune_gc" id="mchat_prune_gc" size="10" value="{{ MCHAT_PRUNE_GC }}" /> <span>{{ lang('MCHAT_ACP_SECONDS') }}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_prune_num">{{ lang('MCHAT_PRUNE_NUM') ~ lang('COLON') }}</label><br />
|
||||
<dt><label for="mchat_prune_num">{{ lang('MCHAT_PRUNE_NUM') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_PRUNE_NUM_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<input type="text" name="mchat_prune_num" size="10" id="mchat_prune_num" value="{{ MCHAT_PRUNE_NUM }}" />
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<fieldset>
|
||||
<legend>{{ lang('MCHAT_GLOBALUSERSETTINGS_OVERWRITE') }}</legend>
|
||||
<dl>
|
||||
<dt><label for="mchat_overwrite">{{ lang('MCHAT_GLOBALUSERSETTINGS_OVERWRITE') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_GLOBALUSERSETTINGS_OVERWRITE_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="mchat_overwrite">{{ lang('MCHAT_GLOBALUSERSETTINGS_OVERWRITE') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_GLOBALUSERSETTINGS_OVERWRITE_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_overwrite" value="1" /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="mchat_overwrite" value="0" id="mchat_overwrite" checked="checked" /> {{ lang('NO') }}</label>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_stats_index">{{ lang('MCHAT_STATS_INDEX') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_STATS_INDEX_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="user_mchat_stats_index">{{ lang('MCHAT_STATS_INDEX') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_STATS_INDEX_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_stats_index" value="1"{% if MCHAT_STATS_INDEX %} id="user_mchat_stats_index" checked="checked"{% endif %}{% if MCHAT_STATS_INDEX_NOAUTH %} disabled{% endif %} /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_stats_index" value="0"{% if not MCHAT_STATS_INDEX %} id="user_mchat_stats_index" checked="checked"{% endif %}{% if MCHAT_STATS_INDEX_NOAUTH %} disabled{% endif %} /> {{ lang('NO') }}</label>
|
||||
@@ -36,7 +36,7 @@
|
||||
{% EVENT dmzx_mchat_acp_message_top_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="user_mchat_message_top">{{ lang('MCHAT_MESSAGE_TOP') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_MESSAGE_TOP_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="user_mchat_message_top">{{ lang('MCHAT_MESSAGE_TOP') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_MESSAGE_TOP_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_message_top" value="1"{% if MCHAT_MESSAGE_TOP %} id="user_mchat_message_top" checked="checked"{% endif %}{% if MCHAT_MESSAGE_TOP_NOAUTH %} disabled{% endif %} /> {{ lang('MCHAT_TOP') }}</label>
|
||||
<label><input type="radio" name="user_mchat_message_top" value="0"{% if not MCHAT_MESSAGE_TOP %} id="user_mchat_message_top" checked="checked"{% endif %}{% if MCHAT_MESSAGE_TOP_NOAUTH %} disabled{% endif %} /> {{ lang('MCHAT_BOTTOM') }}</label>
|
||||
@@ -78,14 +78,14 @@
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_pause_on_input">{{ lang('MCHAT_PAUSE_ON_INPUT') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_PAUSE_ON_INPUT_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="user_mchat_pause_on_input">{{ lang('MCHAT_PAUSE_ON_INPUT') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_PAUSE_ON_INPUT_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_pause_on_input" value="1"{% if MCHAT_PAUSE_ON_INPUT %} id="user_mchat_pause_on_input" checked="checked"{% endif %}{% if MCHAT_PAUSE_ON_INPUT_NOAUTH %} disabled{% endif %} /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_pause_on_input" value="0"{% if not MCHAT_PAUSE_ON_INPUT %} id="user_mchat_pause_on_input" checked="checked"{% endif %}{% if MCHAT_PAUSE_ON_INPUT_NOAUTH %} disabled{% endif %} /> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_dateoptions">{{ lang('MCHAT_DATE_FORMAT') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_DATE_FORMAT_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="user_mchat_dateoptions">{{ lang('MCHAT_DATE_FORMAT') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_DATE_FORMAT_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<select name="user_mchat_dateoptions" id="user_mchat_dateoptions" onchange="phpbb.toggleDisplay('user_mchat_custom_date', this.value == 'custom' ? 1 : -1); document.getElementById('user_mchat_date').value = this.value == 'custom' ? '{{ MCHAT_DEFAULT_DATEFORMAT | escape('js') }}' : this.value;"{% if MCHAT_DATE_NOAUTH %} disabled{% endif %}>
|
||||
{{ S_MCHAT_DATEFORMAT_OPTIONS }}
|
||||
@@ -94,7 +94,7 @@
|
||||
<dd><div id="user_mchat_custom_date"{% if not S_MCHAT_CUSTOM_DATEFORMAT %} style="display:none;"{% endif %}><input type="text" name="user_mchat_date" id="user_mchat_date" value="{{ MCHAT_DATE }}"{% if MCHAT_DATE_NOAUTH %} disabled{% endif %} /></div></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_relative_time">{{ lang('MCHAT_RELATIVE_TIME') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_RELATIVE_TIME_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="user_mchat_relative_time">{{ lang('MCHAT_RELATIVE_TIME') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_RELATIVE_TIME_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_relative_time" value="1"{% if MCHAT_RELATIVE_TIME %} id="user_mchat_relative_time" checked="checked"{% endif %}{% if MCHAT_RELATIVE_TIME_NOAUTH %} disabled{% endif %} /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_relative_time" value="0"{% if not MCHAT_RELATIVE_TIME %} id="user_mchat_relative_time" checked="checked"{% endif %}{% if MCHAT_RELATIVE_TIME_NOAUTH %} disabled{% endif %} /> {{ lang('NO') }}</label>
|
||||
|
||||
@@ -3,13 +3,9 @@
|
||||
"type": "phpbb-extension",
|
||||
"description": "mChat",
|
||||
"homepage": "https://www.phpbb.com/customise/db/extension/mchat_extension/",
|
||||
"version": "2.0.2",
|
||||
"time": "2017-10-22",
|
||||
"keywords": [
|
||||
"phpbb",
|
||||
"extension",
|
||||
"mchat"
|
||||
],
|
||||
"version": "2.0.3",
|
||||
"time": "2017-12-31",
|
||||
"keywords": ["phpbb", "extension", "mchat"],
|
||||
"license": "GPL-2.0",
|
||||
"authors": [
|
||||
{
|
||||
@@ -32,8 +28,7 @@
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"composer/installers": "~1.0.0",
|
||||
"phpbb/phpbb": ">=3.1.8-RC1"
|
||||
"composer/installers": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpbb/epv": "dev-master"
|
||||
@@ -49,4 +44,4 @@
|
||||
"filename": "version_check"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ class acp_controller
|
||||
}
|
||||
|
||||
$template_data = array(
|
||||
'MCHAT_ERROR' => implode('<br />', $error),
|
||||
'MCHAT_ERROR' => implode('<br>', $error),
|
||||
'MCHAT_VERSION' => $this->settings->cfg('mchat_version'),
|
||||
'MCHAT_FOUNDER' => $is_founder,
|
||||
'S_MCHAT_PRUNE_MODE_OPTIONS' => $this->get_prune_mode_options($this->settings->cfg('mchat_prune_mode')),
|
||||
@@ -343,7 +343,7 @@ class acp_controller
|
||||
|
||||
$template_data = array_merge($template_data, array(
|
||||
'MCHAT_POSTS_ENABLED_LANG' => $this->settings->get_enabled_post_notifications_lang(),
|
||||
'MCHAT_ERROR' => implode('<br />', $error),
|
||||
'MCHAT_ERROR' => implode('<br>', $error),
|
||||
'MCHAT_VERSION' => $this->settings->cfg('mchat_version'),
|
||||
'U_ACTION' => $u_action,
|
||||
));
|
||||
|
||||
@@ -148,7 +148,7 @@ class ucp_controller
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
meta_refresh(3, $u_action);
|
||||
$message = $this->user->lang('PROFILE_UPDATED') . '<br /><br />' . $this->user->lang('RETURN_UCP', '<a href="' . $u_action . '">', '</a>');
|
||||
$message = $this->user->lang('PROFILE_UPDATED') . '<br><br>' . $this->user->lang('RETURN_UCP', '<a href="' . $u_action . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ class ucp_controller
|
||||
$template_data = array_merge($template_data, array(
|
||||
'MCHAT_ALLOW_USE' => $this->auth->acl_get('u_mchat_use'),
|
||||
'MCHAT_POSTS_ENABLED_LANG' => $this->settings->get_enabled_post_notifications_lang(),
|
||||
'ERROR' => sizeof($error) ? implode('<br />', $error) : '',
|
||||
'ERROR' => sizeof($error) ? implode('<br>', $error) : '',
|
||||
'MCHAT_AUTH_COUNT' => $auth_count,
|
||||
'S_UCP_ACTION' => $u_action,
|
||||
));
|
||||
|
||||
@@ -290,7 +290,7 @@ class mchat
|
||||
// If the rules are defined in the language file use them, else just use the entry in the database
|
||||
$mchat_rules = $lang_rules ?: $this->settings->cfg('mchat_rules');
|
||||
$mchat_rules = htmlspecialchars_decode($mchat_rules);
|
||||
$mchat_rules = str_replace("\n", '<br />', $mchat_rules);
|
||||
$mchat_rules = str_replace("\n", '<br>', $mchat_rules);
|
||||
|
||||
$this->template->assign_var('MCHAT_RULES', $mchat_rules);
|
||||
|
||||
@@ -585,7 +585,7 @@ class mchat
|
||||
*
|
||||
* @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
|
||||
* @var array log_row The log data (read only)
|
||||
* @since 2.0.0-RC6
|
||||
*/
|
||||
$vars = array(
|
||||
@@ -593,6 +593,8 @@ class mchat
|
||||
'log_row',
|
||||
);
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.action_refresh_process_log_row', compact($vars)));
|
||||
|
||||
unset($log_row);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -957,7 +959,7 @@ class mchat
|
||||
);
|
||||
|
||||
/**
|
||||
* Event that allows adding global templte data for mChat
|
||||
* Event that allows adding global template data for mChat
|
||||
*
|
||||
* @event dmzx.mchat.global_modify_template_data
|
||||
* @var array template_data The data that is about to be assigned to the template
|
||||
@@ -1582,6 +1584,6 @@ class mchat
|
||||
$this->template->set_filenames(array('body' => $template_file));
|
||||
$content = $this->template->assign_display('body', '', true);
|
||||
|
||||
return trim(str_replace(array("\r", "\n"), '', $content));
|
||||
return trim($content);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,9 +42,9 @@ $lang = array_merge($lang, array(
|
||||
'ACP_MCHAT_GLOBALUSERSETTINGS' => 'Global user settings',
|
||||
|
||||
// Log entries (%1$s is replaced with the user name who triggered the event)
|
||||
'LOG_MCHAT_CONFIG_UPDATE' => '<strong>mChat configuration updated</strong><br />» %1$s',
|
||||
'LOG_MCHAT_CONFIG_UPDATE' => '<strong>mChat configuration updated</strong><br>» %1$s',
|
||||
'LOG_MCHAT_TABLE_PRUNED' => '<strong>mChat messages pruned: %2$d</strong>',
|
||||
'LOG_MCHAT_TABLE_PURGED' => '<strong>mChat messages purged</strong><br />» %1$s',
|
||||
'LOG_DELETED_MCHAT' => '<strong>mChat message deleted</strong><br />» %1$s',
|
||||
'LOG_EDITED_MCHAT' => '<strong>mChat message edited</strong><br />» %1$s',
|
||||
'LOG_MCHAT_TABLE_PURGED' => '<strong>mChat messages purged</strong><br>» %1$s',
|
||||
'LOG_DELETED_MCHAT' => '<strong>mChat message deleted</strong><br>» %1$s',
|
||||
'LOG_EDITED_MCHAT' => '<strong>mChat message edited</strong><br>» %1$s',
|
||||
));
|
||||
|
||||
@@ -44,7 +44,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_SETTINGS_PRUNE' => 'Pruning settings (adjustable for founders only)',
|
||||
'MCHAT_SETTINGS_STATS' => 'Who is chatting settings',
|
||||
|
||||
'MCHAT_GLOBALUSERSETTINGS_EXPLAIN' => 'Settings for which a user does <strong>not</strong> have permission to customise are applied as configured below.<br />New user accounts will have initial settings as configured below.<br /><br />Go to the <em>mChat in UCP</em> tab of the user permissions section to adjust customisation permissions.<br />Go to the <em>Preferences</em> form in the <em>user management</em> section to see the status of each user’s settings.',
|
||||
'MCHAT_GLOBALUSERSETTINGS_EXPLAIN' => 'Settings for which a user does <strong>not</strong> have permission to customise are applied as configured below.<br>New user accounts will have initial settings as configured below.<br><br>Go to the <em>mChat in UCP</em> tab of the user permissions section to adjust customisation permissions.<br>Go to the <em>Preferences</em> form in the <em>user management</em> 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 <em>all</em> user accounts.',
|
||||
'MCHAT_GLOBALUSERSETTINGS_OVERWRITE_CONFIRM' => 'Confirm overwriting mChat settings for all users',
|
||||
@@ -62,17 +62,17 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_ACP_GLOBALUSERSETTINGS_TITLE' => 'mChat Global user settings',
|
||||
'MCHAT_VERSION' => 'Version',
|
||||
'MCHAT_RULES' => 'Rules',
|
||||
'MCHAT_RULES_EXPLAIN' => 'Enter the rules here. HTML code is allowed. <em>You are limited to 255 characters.</em><br />This message can be translated: edit the MCHAT_RULES_MESSAGE language key in /ext/dmzx/mchat/language/XX/mchat.php.',
|
||||
'MCHAT_RULES_EXPLAIN' => 'Enter the rules here. HTML code is allowed. Set to empty to disable the display.<br>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.<br /><em>You are limited from 50 to 1000. Default is 250.</em>',
|
||||
'MCHAT_INDEX_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the index page.<br><em>You are limited from 50 to 1000. Default is 250.</em>',
|
||||
'MCHAT_TOP_OF_FORUM' => 'Top',
|
||||
'MCHAT_BOTTOM_OF_FORUM' => 'Bottom',
|
||||
'MCHAT_REFRESH' => 'Refresh interval',
|
||||
'MCHAT_REFRESH_EXPLAIN' => 'Number of seconds before the chat refreshes.<br /><em>You are limited from 5 to 60 seconds. Default is 10.</em>',
|
||||
'MCHAT_REFRESH_EXPLAIN' => 'Number of seconds before the chat refreshes.<br><em>You are limited from 5 to 60 seconds. Default is 10.</em>',
|
||||
'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',
|
||||
@@ -90,26 +90,26 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_MESSAGE_NUM_INDEX' => 'Initial number of messages to display on the index page',
|
||||
'MCHAT_MESSAGE_NUM_INDEX_EXPLAIN' => '<em>You are limited from 5 to 50. Default is 10.</em>',
|
||||
'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.<br /><em>You are limited from 10 to 100. Default is 25.</em>',
|
||||
'MCHAT_MESSAGE_NUM_ARCHIVE_EXPLAIN' => 'The maximum number of messages to show per page on the archive page.<br><em>You are limited from 10 to 100. Default is 25.</em>',
|
||||
'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',
|
||||
'MCHAT_ARCHIVE_SORT_USER' => 'Sort messages depending on the user’s <em>Location of new messages</em> preference',
|
||||
'MCHAT_FLOOD_TIME' => 'Flood time',
|
||||
'MCHAT_FLOOD_TIME_EXPLAIN' => 'The number of seconds a user must wait before posting another message in the chat.<br /><em>You are limited from 0 to 60 seconds. Default is 0. Set to 0 to disable.</em>',
|
||||
'MCHAT_FLOOD_TIME_EXPLAIN' => 'The number of seconds a user must wait before posting another message in the chat.<br><em>You are limited from 0 to 60 seconds. Default is 0. Set to 0 to disable.</em>',
|
||||
'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.<br />Users who have <em>edit/delete permission as well as moderator permission are exempt</em> from this time limit.<br />Set to 0 to allow unlimited editing and deleting.',
|
||||
'MCHAT_EDIT_DELETE_LIMIT_EXPLAIN' => 'Messages older than the specified number of seconds cannot be edited or deleted by the author any more.<br>Users who have <em>edit/delete permission as well as moderator permission are exempt</em> from this time limit.<br>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.<br /><em>You are limited from 0 to 1000. Default is 500. Set to 0 to disable.</em>',
|
||||
'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Maximum number of characters allowed per message posted.<br><em>You are limited from 0 to 1000. Default is 500. Set to 0 to disable.</em>',
|
||||
'MCHAT_CUSTOM_PAGE' => 'Enable custom page',
|
||||
'MCHAT_CUSTOM_HEIGHT' => 'Custom page height',
|
||||
'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the custom page.<br /><em>You are limited from 50 to 1000. Default is 350.</em>',
|
||||
'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the custom page.<br><em>You are limited from 50 to 1000. Default is 350.</em>',
|
||||
'MCHAT_BBCODES_DISALLOWED' => 'Disallowed bbcodes',
|
||||
'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Here you can input the bbcodes that are <strong>not</strong> to be used in a message.<br />Separate bbcodes with a vertical bar, for example: <br />b|i|u|code|list|list=|flash|quote and/or a %1$scustom bbcode tag name%2$s',
|
||||
'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Here you can input the bbcodes that are <strong>not</strong> to be used in a message.<br>Separate bbcodes with a vertical bar, for example:<br>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.<br />Set to empty to disable the display. <em>You are limited to 255 characters.</em><br />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 to display to users of the chat. HTML code is allowed. Set to empty to disable the display.<br>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.<br />Set to 0 for no timeout. Careful, the session of a user reading mChat will never expire!<br /><em>You are limited to the %1$sforum config setting for sessions%2$s which is currently set to %3$d seconds</em>',
|
||||
'MCHAT_TIMEOUT_EXPLAIN' => 'Set the number of seconds until a session in the chat ends.<br>Set to 0 for no timeout. Careful, the session of a user reading mChat will never expire!<br><em>You are limited to the %1$sforum config setting for sessions%2$s which is currently set to %3$d seconds</em>',
|
||||
'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',
|
||||
@@ -119,7 +119,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_POSTS_AUTH_CHECK_EXPLAIN' => 'If set to yes, users who can not use mChat will not generate any post/login notification messages.',
|
||||
|
||||
'MCHAT_WHOIS_REFRESH' => 'Who is chatting refresh interval',
|
||||
'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Number of seconds before who is chatting refreshes.<br /><em>You are limited from 10 to 300 seconds. Default is 60.</em>',
|
||||
'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Number of seconds before who is chatting refreshes.<br><em>You are limited from 10 to 300 seconds. Default is 60.</em>',
|
||||
'MCHAT_SOUND' => 'Play sounds for new, edited and deleted messages',
|
||||
'MCHAT_PURGE' => 'Delete all messages now',
|
||||
'MCHAT_PURGE_CONFIRM' => 'Confirm deleting all messages',
|
||||
@@ -155,5 +155,5 @@ $lang = array_merge($lang, array(
|
||||
'TOO_SMALL_MCHAT_WHOIS_REFRESH' => 'The whois refresh value is too small.',
|
||||
'TOO_LARGE_MCHAT_WHOIS_REFRESH' => 'The whois refresh value is too large.',
|
||||
|
||||
'MCHAT_30X_REMNANTS' => 'The installation has been aborted.<br />There are remnant modules from the mChat MOD for phpBB 3.0.x in the database. The mChat extension does not work correctly with these modules present.<br />You need to entirely uninstall the mChat MOD before being able to install the mChat extension. Specifically, the modules with the following IDs need to be deleted from the %1$smodules table: %2$s',
|
||||
'MCHAT_30X_REMNANTS' => 'The installation has been aborted.<br>There are remnant modules from the mChat MOD for phpBB 3.0.x in the database. The mChat extension does not work correctly with these modules present.<br>You need to entirely uninstall the mChat MOD before being able to install the mChat extension. Specifically, the modules with the following IDs need to be deleted from the %1$smodules table: %2$s',
|
||||
));
|
||||
|
||||
@@ -3,209 +3,209 @@
|
||||
// Mofified by kasimi (c) 2016
|
||||
|
||||
( function( factory ) {
|
||||
// UMD wrapper
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( [ 'jquery' ], factory );
|
||||
} else if ( typeof exports !== 'undefined' ) {
|
||||
// Node/CommonJS
|
||||
module.exports = factory( require( 'jquery' ) );
|
||||
} else {
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
// UMD wrapper
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( [ 'jquery' ], factory );
|
||||
} else if ( typeof exports !== 'undefined' ) {
|
||||
// Node/CommonJS
|
||||
module.exports = factory( require( 'jquery' ) );
|
||||
} else {
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
/*
|
||||
* Auto-growing textareas; technique ripped from Facebook
|
||||
*/
|
||||
$.fn.autogrow = function(options) {
|
||||
/*
|
||||
* Auto-growing textareas; technique ripped from Facebook
|
||||
*/
|
||||
$.fn.autogrow = function(options) {
|
||||
|
||||
options = $.extend( {
|
||||
vertical: true,
|
||||
horizontal: false,
|
||||
characterSlop: 0
|
||||
}, options);
|
||||
options = $.extend( {
|
||||
vertical: true,
|
||||
horizontal: false,
|
||||
characterSlop: 0
|
||||
}, options);
|
||||
|
||||
this.filter('textarea,input').each(function() {
|
||||
this.filter('textarea,input').each(function() {
|
||||
|
||||
var $this = $(this),
|
||||
borderBox = $this.css( 'box-sizing' ) === 'border-box',
|
||||
// minHeight = borderBox ? $this.outerHeight() : $this.height(),
|
||||
maxHeight = $this.attr( "maxHeight" ),
|
||||
minWidth = typeof( $this.attr( "minWidth" ) ) == "undefined" ? 0 : $this.attr( "minWidth" );
|
||||
var $this = $(this),
|
||||
borderBox = $this.css( 'box-sizing' ) === 'border-box',
|
||||
// minHeight = borderBox ? $this.outerHeight() : $this.height(),
|
||||
maxHeight = $this.attr( "maxHeight" ),
|
||||
minWidth = typeof( $this.attr( "minWidth" ) ) == "undefined" ? 0 : $this.attr( "minWidth" );
|
||||
|
||||
if( typeof( maxHeight ) == "undefined" ) maxHeight = 1000000;
|
||||
if( typeof( maxHeight ) == "undefined" ) maxHeight = 1000000;
|
||||
|
||||
var shadow = $('<div class="autogrow-shadow"></div>').css( {
|
||||
position: 'absolute',
|
||||
top: -10000,
|
||||
left: -10000,
|
||||
fontSize: $this.css('fontSize'),
|
||||
fontFamily: $this.css('fontFamily'),
|
||||
fontWeight: $this.css('fontWeight'),
|
||||
lineHeight: $this.css('lineHeight'),
|
||||
paddingLeft: $this.css('paddingLeft'),
|
||||
paddingRight: $this.css('paddingRight'),
|
||||
paddingTop: $this.css('paddingTop'),
|
||||
paddingBottom: $this.css('paddingBottom'),
|
||||
borderTop: $this.css('borderTop'),
|
||||
borderBottom: $this.css('borderBottom'),
|
||||
borderLeft: $this.css('borderLeft'),
|
||||
borderRight: $this.css('borderRight'),
|
||||
var shadow = $('<div class="autogrow-shadow"></div>').css( {
|
||||
position: 'absolute',
|
||||
top: -10000,
|
||||
left: -10000,
|
||||
fontSize: $this.css('fontSize'),
|
||||
fontFamily: $this.css('fontFamily'),
|
||||
fontWeight: $this.css('fontWeight'),
|
||||
lineHeight: $this.css('lineHeight'),
|
||||
paddingLeft: $this.css('paddingLeft'),
|
||||
paddingRight: $this.css('paddingRight'),
|
||||
paddingTop: $this.css('paddingTop'),
|
||||
paddingBottom: $this.css('paddingBottom'),
|
||||
borderTop: $this.css('borderTop'),
|
||||
borderBottom: $this.css('borderBottom'),
|
||||
borderLeft: $this.css('borderLeft'),
|
||||
borderRight: $this.css('borderRight'),
|
||||
whiteSpace: 'pre-wrap',
|
||||
resize: 'none'
|
||||
} ).appendTo(document.body);
|
||||
resize: 'none'
|
||||
} ).appendTo(document.body);
|
||||
|
||||
shadow.html( 'a' );
|
||||
var characterWidth = shadow.width();
|
||||
shadow.html( '' );
|
||||
shadow.html( 'a' );
|
||||
var characterWidth = shadow.width();
|
||||
shadow.html( '' );
|
||||
var isTextarea = $this.is('textarea');
|
||||
|
||||
var update = function( val ) {
|
||||
var update = function( val ) {
|
||||
|
||||
var times = function(string, number) {
|
||||
for (var i = 0, r = ''; i < number; i ++) r += string;
|
||||
return r;
|
||||
};
|
||||
var times = function(string, number) {
|
||||
for (var i = 0, r = ''; i < number; i ++) r += string;
|
||||
return r;
|
||||
};
|
||||
|
||||
if( typeof val === 'undefined' ) val = this.value;
|
||||
if( val === '' && $(this).attr("placeholder") ) val = $(this).attr("placeholder");
|
||||
if( typeof val === 'undefined' ) val = this.value;
|
||||
if( val === '' && $(this).attr("placeholder") ) val = $(this).attr("placeholder");
|
||||
|
||||
if( options.vertical )
|
||||
val = val.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/\n$/, '<br/> ')
|
||||
.replace(/\n/g, '<br/>')
|
||||
.replace(/ {2,}/g, function(space) { return times(' ', space.length -1) + ' '; });
|
||||
else
|
||||
val = escapeHtml( val );
|
||||
if( options.vertical )
|
||||
val = val.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/\n$/, '<br/> ')
|
||||
.replace(/\n/g, '<br/>')
|
||||
.replace(/ {2,}/g, function(space) { return times(' ', space.length -1) + ' '; });
|
||||
else
|
||||
val = escapeHtml( val );
|
||||
|
||||
//if( options.horizontal )
|
||||
// val = $.trim( val );
|
||||
//if( options.horizontal )
|
||||
// val = $.trim( val );
|
||||
|
||||
// if( $(this).prop( 'tagName' ).toUpperCase() === 'INPUT' )
|
||||
// shadow.text(val).css( "width", "auto" );
|
||||
// else
|
||||
shadow.html( val ).css( "width", "auto" ); // need to use html here otherwise no way to count spaces (with html we can use )
|
||||
// if( $(this).prop( 'tagName' ).toUpperCase() === 'INPUT' )
|
||||
// shadow.text(val).css( "width", "auto" );
|
||||
// else
|
||||
shadow.html( val ).css( "width", "auto" ); // need to use html here otherwise no way to count spaces (with html we can use )
|
||||
|
||||
if( options.horizontal )
|
||||
{
|
||||
var slopWidth = options.characterSlop * characterWidth + 2;
|
||||
if( options.horizontal )
|
||||
{
|
||||
var slopWidth = options.characterSlop * characterWidth + 2;
|
||||
|
||||
var newWidth = Math.max( shadow.width() + slopWidth, minWidth );
|
||||
var maxWidth = options.maxWidth;
|
||||
//if( typeof( maxWidth ) === "undefined" ) maxWidth = $this.parent().width() - 12; // not sure why we were doing this but seems like a bad idea. doesn't work with inline-block parents for one thing, since it is the text area that should be "pushing" them to be wider
|
||||
if( maxWidth ) newWidth = Math.min( newWidth, maxWidth );
|
||||
var newWidth = Math.max( shadow.width() + slopWidth, minWidth );
|
||||
var maxWidth = options.maxWidth;
|
||||
//if( typeof( maxWidth ) === "undefined" ) maxWidth = $this.parent().width() - 12; // not sure why we were doing this but seems like a bad idea. doesn't work with inline-block parents for one thing, since it is the text area that should be "pushing" them to be wider
|
||||
if( maxWidth ) newWidth = Math.min( newWidth, maxWidth );
|
||||
// Take scrollbar into account
|
||||
if (isTextarea && shadow.get(0).scrollHeight > shadow.height()) {
|
||||
newWidth += 20;
|
||||
}
|
||||
$(this).css( "width", newWidth );
|
||||
}
|
||||
$(this).css( "width", newWidth );
|
||||
}
|
||||
|
||||
if( options.vertical )
|
||||
{
|
||||
var shadowWidth = $(this).width();
|
||||
if( ! borderBox ) shadowWidth = shadowWidth - parseInt($this.css('paddingLeft'),10) - parseInt($this.css('paddingRight'),10);
|
||||
shadow.css( "width", shadowWidth );
|
||||
var shadowHeight = borderBox ? shadow.outerHeight() : shadow.height();
|
||||
if( options.vertical )
|
||||
{
|
||||
var shadowWidth = $(this).width();
|
||||
if( ! borderBox ) shadowWidth = shadowWidth - parseInt($this.css('paddingLeft'),10) - parseInt($this.css('paddingRight'),10);
|
||||
shadow.css( "width", shadowWidth );
|
||||
var shadowHeight = borderBox ? shadow.outerHeight() : shadow.height();
|
||||
|
||||
$(this).css( "height", "auto" );
|
||||
minHeight = borderBox ? $this.outerHeight() : $this.height();
|
||||
$(this).css( "height", "auto" );
|
||||
minHeight = borderBox ? $this.outerHeight() : $this.height();
|
||||
|
||||
var newHeight = Math.min( Math.max( shadowHeight, minHeight ), maxHeight );
|
||||
$(this).css( "height", newHeight );
|
||||
$(this).css( "overflow", newHeight == maxHeight ? "auto" : "hidden" );
|
||||
}
|
||||
};
|
||||
var newHeight = Math.min( Math.max( shadowHeight, minHeight ), maxHeight );
|
||||
$(this).css( "height", newHeight );
|
||||
$(this).css( "overflow", newHeight == maxHeight ? "auto" : "hidden" );
|
||||
}
|
||||
};
|
||||
|
||||
$(this)
|
||||
.change(function(){update.call( this );return true;})
|
||||
.keyup(function(){update.call( this );return true;})
|
||||
.keypress(function( event ) {
|
||||
if( event.ctrlKey || event.metaKey ) return;
|
||||
$(this)
|
||||
.change(function(){update.call( this );return true;})
|
||||
.keyup(function(){update.call( this );return true;})
|
||||
.keypress(function( event ) {
|
||||
if( event.ctrlKey || event.metaKey ) return;
|
||||
|
||||
var val = this.value;
|
||||
var caretInfo = _getCaretInfo( this );
|
||||
var val = this.value;
|
||||
var caretInfo = _getCaretInfo( this );
|
||||
|
||||
var typedChar = event.which === 13 ? "\n" : String.fromCharCode( event.which );
|
||||
var valAfterKeypress = val.slice( 0, caretInfo.start ) + typedChar + val.slice( caretInfo.end );
|
||||
update.call( this, valAfterKeypress );
|
||||
return true;
|
||||
})
|
||||
.bind( "update.autogrow", function(){ update.apply(this); } )
|
||||
.bind( "remove.autogrow", function() {
|
||||
shadow.remove();
|
||||
} );
|
||||
var typedChar = event.which === 13 ? "\n" : String.fromCharCode( event.which );
|
||||
var valAfterKeypress = val.slice( 0, caretInfo.start ) + typedChar + val.slice( caretInfo.end );
|
||||
update.call( this, valAfterKeypress );
|
||||
return true;
|
||||
})
|
||||
.bind( "update.autogrow", function(){ update.apply(this); } )
|
||||
.bind( "remove.autogrow", function() {
|
||||
shadow.remove();
|
||||
} );
|
||||
|
||||
update.apply(this);
|
||||
update.apply(this);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
return this;
|
||||
};
|
||||
|
||||
// comes from https://github.com/madapaja/jquery.selection/blob/master/src/jquery.selection.js
|
||||
var _getCaretInfo = function(element){
|
||||
var res = {
|
||||
text: '',
|
||||
start: 0,
|
||||
end: 0
|
||||
};
|
||||
// comes from https://github.com/madapaja/jquery.selection/blob/master/src/jquery.selection.js
|
||||
var _getCaretInfo = function(element){
|
||||
var res = {
|
||||
text: '',
|
||||
start: 0,
|
||||
end: 0
|
||||
};
|
||||
|
||||
if (!element.value) {
|
||||
/* no value or empty string */
|
||||
return res;
|
||||
}
|
||||
if (!element.value) {
|
||||
/* no value or empty string */
|
||||
return res;
|
||||
}
|
||||
|
||||
try {
|
||||
if (window.getSelection) {
|
||||
/* except IE */
|
||||
res.start = element.selectionStart;
|
||||
res.end = element.selectionEnd;
|
||||
res.text = element.value.slice(res.start, res.end);
|
||||
} else if (doc.selection) {
|
||||
/* for IE */
|
||||
element.focus();
|
||||
try {
|
||||
if (window.getSelection) {
|
||||
/* except IE */
|
||||
res.start = element.selectionStart;
|
||||
res.end = element.selectionEnd;
|
||||
res.text = element.value.slice(res.start, res.end);
|
||||
} else if (doc.selection) {
|
||||
/* for IE */
|
||||
element.focus();
|
||||
|
||||
var range = doc.selection.createRange(),
|
||||
range2 = doc.body.createTextRange();
|
||||
var range = doc.selection.createRange(),
|
||||
range2 = doc.body.createTextRange();
|
||||
|
||||
res.text = range.text;
|
||||
res.text = range.text;
|
||||
|
||||
try {
|
||||
range2.moveToElementText(element);
|
||||
range2.setEndPoint('StartToStart', range);
|
||||
} catch (e) {
|
||||
range2 = element.createTextRange();
|
||||
range2.setEndPoint('StartToStart', range);
|
||||
}
|
||||
try {
|
||||
range2.moveToElementText(element);
|
||||
range2.setEndPoint('StartToStart', range);
|
||||
} catch (e) {
|
||||
range2 = element.createTextRange();
|
||||
range2.setEndPoint('StartToStart', range);
|
||||
}
|
||||
|
||||
res.start = element.value.length - range2.text.length;
|
||||
res.end = res.start + range.text.length;
|
||||
}
|
||||
} catch (e) {
|
||||
/* give up */
|
||||
}
|
||||
res.start = element.value.length - range2.text.length;
|
||||
res.end = res.start + range.text.length;
|
||||
}
|
||||
} catch (e) {
|
||||
/* give up */
|
||||
}
|
||||
|
||||
return res;
|
||||
};
|
||||
return res;
|
||||
};
|
||||
|
||||
var entityMap = {
|
||||
"&": "&",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
"/": '/',
|
||||
" ": ' '
|
||||
};
|
||||
var entityMap = {
|
||||
"&": "&",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
"/": '/',
|
||||
" ": ' '
|
||||
};
|
||||
|
||||
function escapeHtml(string) {
|
||||
return String(string).replace(/[&<>"'\/\ ]/g, function (s) {
|
||||
return entityMap[s];
|
||||
} );
|
||||
}
|
||||
function escapeHtml(string) {
|
||||
return String(string).replace(/[&<>"'\/\ ]/g, function (s) {
|
||||
return entityMap[s];
|
||||
} );
|
||||
}
|
||||
} ) );
|
||||
|
||||
@@ -39,9 +39,11 @@
|
||||
// Language
|
||||
lang: {
|
||||
minutesAgo : {
|
||||
{% for minute in 0..MCHAT_MINUTES_AGO_LIMIT-1 %}
|
||||
{{ minute }}: '{{ lang('MCHAT_MINUTES_AGO', minute) | escape('js') }}'{{ loop.last ? '' : ',' }}
|
||||
{% endfor %}
|
||||
{% if MCHAT_RELATIVE_TIME %}
|
||||
{% for minute in 0..MCHAT_MINUTES_AGO_LIMIT-1 %}
|
||||
{{ minute }}: '{{ lang('MCHAT_MINUTES_AGO', minute) | escape('js') }}'{{ loop.last ? '' : ',' }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
},
|
||||
err : '{{ lang('ERROR') | escape('js') }}',
|
||||
parserErr : '{{ lang('AJAX_ERROR_TEXT_PARSERERROR') | escape('js') }}',
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
</div>
|
||||
<div class="stat-block online-list mchat-stats-index">
|
||||
<h3><a href="{% if MCHAT_CUSTOM_PAGE and not MCHAT_INDEX %}{{ U_MCHAT }}{% endif %}#mChat">{{ lang('MCHAT_WHO_IS_CHATTING') }}</a></h3>
|
||||
<p>{{ MCHAT_USERS_TOTAL }} {{ MCHAT_ONLINE_EXPLAIN }}<br />{{ MCHAT_USERS_LIST }}
|
||||
<p>{{ MCHAT_USERS_TOTAL }} {{ MCHAT_ONLINE_EXPLAIN }}<br>{{ MCHAT_USERS_LIST }}
|
||||
{% endif %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% if MCHAT_PAGE %}
|
||||
<br />
|
||||
<br>
|
||||
<span>{{ MCHAT_DISPLAY_NAME }} © {{ lang('POST_BY_AUTHOR') }} {{ MCHAT_AUTHOR_HOMEPAGES }}</span>
|
||||
{% endif %}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{% EVENT dmzx_mchat_header_before %}
|
||||
|
||||
{% if MCHAT_PAGE == 'custom' %}
|
||||
<h2>{{ lang('MCHAT_CUSTOM_PAGE') }}</h2>
|
||||
<h2>{{ lang('MCHAT_CUSTOM_PAGE') }}</h2>
|
||||
{% elseif MCHAT_PAGE == 'archive' %}
|
||||
<h2>{{ lang('MCHAT_ARCHIVE_PAGE') }}</h2>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% EVENT dmzx_mchat_messages_before %}
|
||||
{% EVENT dmzx_mchat_messages_define_icons %}
|
||||
{%- EVENT dmzx_mchat_messages_before -%}
|
||||
{%- EVENT dmzx_mchat_messages_define_icons -%}
|
||||
|
||||
{% for mchatrow in loops.mchatrow %}
|
||||
{%- for mchatrow in loops.mchatrow -%}
|
||||
<li id="mchat-message-{{ mchatrow.MCHAT_MESSAGE_ID }}" class="row mchat-message{% if mchatrow.MCHAT_IS_NOTIFICATION %} mchat-notification-message{% endif %}" data-mchat-id="{{ mchatrow.MCHAT_MESSAGE_ID }}" data-mchat-username="{{ mchatrow.MCHAT_USERNAME }}"{% if mchatrow.MCHAT_USERNAME_COLOR %} data-mchat-usercolor="{{ mchatrow.MCHAT_USERNAME_COLOR }}"{% endif %} data-mchat-message="{{ mchatrow.MCHAT_MESSAGE_EDIT }}" data-mchat-message-time="{{ mchatrow.MCHAT_MESSAGE_TIME }}"{% if MCHAT_EDIT_DELETE_LIMIT and not MCHAT_EDIT_DELETE_IGNORE and (mchatrow.MCHAT_ALLOW_EDIT or mchatrow.MCHAT_ALLOW_DEL) %} data-mchat-edit-delete-limit="1"{% endif %} {% EVENT dmzx_mchat_message_attributes %}>
|
||||
{% if S_MCHAT_AVATARS %}
|
||||
<div class="mchat-avatar">
|
||||
@@ -24,6 +24,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{%- endfor -%}
|
||||
|
||||
{% EVENT dmzx_mchat_messages_after %}
|
||||
{%- EVENT dmzx_mchat_messages_after -%}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
{% endif %}
|
||||
{% if MCHAT_STATS_INDEX_AUTH %}
|
||||
<dl>
|
||||
<dt><label for="user_mchat_stats_index">{{ lang('MCHAT_STATS_INDEX') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_STATS_INDEX_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="user_mchat_stats_index">{{ lang('MCHAT_STATS_INDEX') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_STATS_INDEX_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_stats_index" value="1"{% if MCHAT_STATS_INDEX %} id="user_mchat_stats_index" checked="checked"{% endif %} /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_stats_index" value="0"{% if not MCHAT_STATS_INDEX %} id="user_mchat_stats_index" checked="checked"{% endif %} /> {{ lang('NO') }}</label>
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
{% if MCHAT_MESSAGE_TOP_AUTH %}
|
||||
<dl>
|
||||
<dt><label for="user_mchat_message_top">{{ lang('MCHAT_MESSAGE_TOP') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_MESSAGE_TOP_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="user_mchat_message_top">{{ lang('MCHAT_MESSAGE_TOP') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_MESSAGE_TOP_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_message_top" value="1"{% if MCHAT_MESSAGE_TOP %} id="user_mchat_message_top" checked="checked"{% endif %} /> {{ lang('MCHAT_TOP') }}</label>
|
||||
<label><input type="radio" name="user_mchat_message_top" value="0"{% if not MCHAT_MESSAGE_TOP %} id="user_mchat_message_top" checked="checked"{% endif %} /> {{ lang('MCHAT_BOTTOM') }}</label>
|
||||
@@ -117,7 +117,7 @@
|
||||
{% endif %}
|
||||
{% if MCHAT_PAUSE_ON_INPUT_AUTH and MCHAT_ALLOW_USE %}
|
||||
<dl>
|
||||
<dt><label for="user_mchat_pause_on_input">{{ lang('MCHAT_PAUSE_ON_INPUT') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_PAUSE_ON_INPUT_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="user_mchat_pause_on_input">{{ lang('MCHAT_PAUSE_ON_INPUT') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_PAUSE_ON_INPUT_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_pause_on_input" value="1"{% if MCHAT_PAUSE_ON_INPUT %} id="user_mchat_pause_on_input" checked="checked"{% endif %} /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_pause_on_input" value="0"{% if not MCHAT_PAUSE_ON_INPUT %} id="user_mchat_pause_on_input" checked="checked"{% endif %} /> {{ lang('NO') }}</label>
|
||||
@@ -126,7 +126,7 @@
|
||||
{% endif %}
|
||||
{% if MCHAT_DATE_AUTH %}
|
||||
<dl>
|
||||
<dt><label for="user_mchat_dateoptions">{{ lang('MCHAT_DATE_FORMAT') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_DATE_FORMAT_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="user_mchat_dateoptions">{{ lang('MCHAT_DATE_FORMAT') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_DATE_FORMAT_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<select name="user_mchat_dateoptions" id="user_mchat_dateoptions" onchange="phpbb.toggleDisplay('user_mchat_custom_date', this.value == 'custom' ? 1 : -1); document.getElementById('user_mchat_date').value = this.value == 'custom' ? '{{ MCHAT_DEFAULT_DATEFORMAT | escape('js') }}' : this.value;">
|
||||
{{ S_MCHAT_DATEFORMAT_OPTIONS }}
|
||||
@@ -137,7 +137,7 @@
|
||||
{% endif %}
|
||||
{% if MCHAT_RELATIVE_TIME_AUTH %}
|
||||
<dl>
|
||||
<dt><label for="user_mchat_relative_time">{{ lang('MCHAT_RELATIVE_TIME') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_RELATIVE_TIME_EXPLAIN') }}</span></dt>
|
||||
<dt><label for="user_mchat_relative_time">{{ lang('MCHAT_RELATIVE_TIME') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_RELATIVE_TIME_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_relative_time" value="1"{% if MCHAT_RELATIVE_TIME %} id="user_mchat_relative_time" checked="checked"{% endif %} /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_relative_time" value="0"{% if not MCHAT_RELATIVE_TIME %} id="user_mchat_relative_time" checked="checked"{% endif %} /> {{ lang('NO') }}</label>
|
||||
|
||||
Reference in New Issue
Block a user