Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9839b5adde | |||
| e1cf85da23 | |||
| 73fbebce37 | |||
|
|
4e2fcec44a | ||
|
|
4d7253f0f0 | ||
|
|
940161da23 | ||
|
|
698db04f9e | ||
|
|
006a4e404e | ||
| b8ef65ec10 | |||
| 88668739e1 | |||
|
|
cd0f139598 | ||
|
|
d11883ac14 | ||
|
|
0addbac5c0 | ||
|
|
6405c7c7ab |
@@ -15,21 +15,21 @@ class acp_mchat_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
'filename' => '\dmzx\mchat\acp\acp_mchat_module',
|
||||
'title' => 'ACP_CAT_MCHAT',
|
||||
'modes' => array(
|
||||
'globalsettings' => array(
|
||||
'modes' => [
|
||||
'globalsettings' => [
|
||||
'title' => 'ACP_MCHAT_GLOBALSETTINGS',
|
||||
'auth' => 'ext_dmzx/mchat && acl_a_mchat',
|
||||
'cat' => array('ACP_CAT_MCHAT'),
|
||||
),
|
||||
'globalusersettings' => array(
|
||||
'cat' => ['ACP_CAT_MCHAT'],
|
||||
],
|
||||
'globalusersettings' => [
|
||||
'title' => 'ACP_MCHAT_GLOBALUSERSETTINGS',
|
||||
'auth' => 'ext_dmzx/mchat && acl_a_mchat',
|
||||
'cat' => array('ACP_CAT_MCHAT'),
|
||||
),
|
||||
),
|
||||
);
|
||||
'cat' => ['ACP_CAT_MCHAT'],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,14 +13,17 @@ namespace dmzx\mchat\acp;
|
||||
|
||||
class acp_mchat_module
|
||||
{
|
||||
public $tpl_name;
|
||||
public $page_title;
|
||||
public $u_action;
|
||||
|
||||
public function main($id, $mode)
|
||||
{
|
||||
global $phpbb_container, $user;
|
||||
global $phpbb_container;
|
||||
|
||||
// Add the ACP lang file
|
||||
$user->add_lang_ext('dmzx/mchat', array('mchat_acp', 'mchat_ucp'));
|
||||
$language = $phpbb_container->get('language');
|
||||
$language->add_lang(['mchat_acp', 'mchat_ucp'], 'dmzx/mchat');
|
||||
|
||||
// Set template
|
||||
$this->tpl_name = 'acp_mchat_' . strtolower($mode);
|
||||
|
||||
@@ -1,270 +1,315 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
{% INCLUDE 'overall_header.html' %}
|
||||
|
||||
<h1>{L_MCHAT_TITLE}</h1>
|
||||
<style>
|
||||
dd label span {
|
||||
white-space: normal;
|
||||
}
|
||||
</style>
|
||||
|
||||
{L_MCHAT_VERSION}{L_COLON} <em>{MCHAT_VERSION}</em>
|
||||
<h1>{{ lang('MCHAT_TITLE') }}</h1>
|
||||
|
||||
<!-- IF MCHAT_ERROR -->
|
||||
{{ lang('MCHAT_VERSION') ~ lang('COLON') }} <em>{{ MCHAT_VERSION }}</em> | <span>{{ lang('MCHAT_REPARSER_STATUS') ~ lang('COLON') }} <span{{ S_REPARSER_ACTIVE ? ' class="errorbox"' }}>{{ lang(S_REPARSER_ACTIVE ? 'MCHAT_REPARSER_ACTIVE' : 'MCHAT_REPARSER_FINISHED') }}</span></span> <a href="https://www.phpbb.com/customise/db/extension/mchat_extension/faq/3311" title="{{ lang('MCHAT_REPARSER_STATUS') }}"><i class="icon fa-question-circle-o fa-fw" aria-hidden="true"></i></a>
|
||||
|
||||
{% if MCHAT_ERROR %}
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{MCHAT_ERROR}</p>
|
||||
<h3>{{ lang('WARNING') }}</h3>
|
||||
<p>{{ MCHAT_ERROR }}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
{% endif %}
|
||||
|
||||
<form id="acp_mchat" method="post" action="{U_ACTION}">
|
||||
<form id="acp_mchat" method="post" action="{{ U_ACTION }}">
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_SETTINGS_INDEX}</legend>
|
||||
<legend>{{ lang('MCHAT_SETTINGS_INDEX') }}</legend>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_index_height_before -->
|
||||
{% EVENT dmzx_mchat_acp_index_height_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_index_height">{L_MCHAT_INDEX_HEIGHT}{L_COLON}</label><br />
|
||||
<span>{L_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>{L_PIXEL}</span></dd>
|
||||
<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">{L_MCHAT_MESSAGE_NUM_INDEX}{L_COLON}</label><br />
|
||||
<span>{L_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>{L_MCHAT_ACP_MESSAGES}</span></dd>
|
||||
<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>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_message_num_index_after -->
|
||||
{% EVENT dmzx_mchat_acp_message_num_index_after %}
|
||||
|
||||
</fieldset>
|
||||
|
||||
<!-- EVENT acp_dmzx_mchat_globalsettings_index_after -->
|
||||
{% EVENT acp_dmzx_mchat_globalsettings_index_after %}
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_SETTINGS_CUSTOM}</legend>
|
||||
<legend>{{ lang('MCHAT_SETTINGS_CUSTOM') }}</legend>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_custom_page_before -->
|
||||
{% EVENT dmzx_mchat_acp_custom_page_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_custom_page">{L_MCHAT_CUSTOM_PAGE}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_CUSTOM_PAGE_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_custom_page" value="1"<!-- IF MCHAT_CUSTOM_PAGE --> id="mchat_custom_page" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_custom_page" value="0"<!-- IF not MCHAT_CUSTOM_PAGE --> id="mchat_custom_page" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
<dt><label for="mchat_custom_page">{{ lang('MCHAT_CUSTOM_PAGE') ~ lang('COLON') }}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_custom_page" value="1"{% if MCHAT_CUSTOM_PAGE %} id="mchat_custom_page" checked="checked"{% endif %}> {{ lang('YES') }}</label>
|
||||
<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">{L_MCHAT_CUSTOM_HEIGHT}{L_COLON}</label><br />
|
||||
<span>{L_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>{L_PIXEL}</span></dd>
|
||||
<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">{L_MCHAT_MESSAGE_NUM_CUSTOM}{L_COLON}</label><br />
|
||||
<span>{L_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>{L_MCHAT_ACP_MESSAGES}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_navbar_link">{L_MCHAT_NAVBAR_LINK}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_navbar_link" value="1"<!-- IF MCHAT_NAVBAR_LINK --> id="mchat_navbar_link" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_navbar_link" value="0"<!-- IF not MCHAT_NAVBAR_LINK --> id="mchat_navbar_link" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_navbar_link_count">{L_MCHAT_NAVBAR_LINK_COUNT}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_navbar_link_count" value="1"<!-- IF MCHAT_NAVBAR_LINK_COUNT --> id="mchat_navbar_link_count" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_navbar_link_count" value="0"<!-- IF not MCHAT_NAVBAR_LINK_COUNT --> id="mchat_navbar_link_count" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
<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>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_navbar_link_count_after -->
|
||||
{% EVENT dmzx_mchat_acp_navbar_link_count_after %}
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_SETTINGS_ARCHIVE}</legend>
|
||||
<legend>{{ lang('MCHAT_SETTINGS_ARCHIVE') }}</legend>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_message_num_archive_before -->
|
||||
{% EVENT dmzx_mchat_acp_message_num_archive_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_message_num_archive">{L_MCHAT_MESSAGE_NUM_ARCHIVE}{L_COLON}</label><br />
|
||||
<span>{L_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>{L_MCHAT_ACP_MESSAGES}</span></dd>
|
||||
<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>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_message_num_archive_after -->
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_SETTINGS_MESSAGES}</legend>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_timeout_before -->
|
||||
{% EVENT dmzx_mchat_acp_message_num_archive_after %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_timeout">{L_MCHAT_TIMEOUT}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_TIMEOUT_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_timeout" id="mchat_timeout" size="10" maxlength="4" value="{MCHAT_TIMEOUT}" /> <span>{L_MCHAT_ACP_SECONDS}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_refresh">{L_MCHAT_REFRESH}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_REFRESH_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_refresh" id="mchat_refresh" size="10" value="{MCHAT_REFRESH}" /> <span>{L_MCHAT_ACP_SECONDS}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_edit_delete_limit">{L_MCHAT_EDIT_DELETE_LIMIT}{L_COLON}</label><br />
|
||||
<span>{L_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>{L_MCHAT_ACP_SECONDS}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_live_updates">{L_MCHAT_LIVE_UPDATES}{L_COLON}</label><br />
|
||||
<span>{L_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 --> /> {L_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 --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_flood_time">{L_MCHAT_FLOOD_TIME}{L_COLON}</label><br />
|
||||
<span>{L_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>{L_MCHAT_ACP_SECONDS}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_max_message_lngth">{L_MCHAT_MAX_MESSAGE_LENGTH}{L_COLON}</label><br />
|
||||
<span>{L_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>{L_MCHAT_ACP_CHARACTERS}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_override_min_post_chars">{L_MCHAT_OVERRIDE_MIN_POST_CHARS}{L_COLON}</label><br />
|
||||
<span>{L_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 --> /> {L_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 --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_override_smilie_limit">{L_MCHAT_OVERRIDE_SMILIE_LIMIT}{L_COLON}</label><br />
|
||||
<span>{L_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 --> /> {L_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 --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_bbcode_disallowed">{L_MCHAT_BBCODES_DISALLOWED}{L_COLON}</label><br />
|
||||
<span>{L_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">{L_MCHAT_RULES}{L_COLON}</label><br />
|
||||
<span>{L_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">{L_MCHAT_STATIC_MESSAGE}{L_COLON}</label><br />
|
||||
<span>{L_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>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_static_message_after -->
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_SETTINGS_POSTS}</legend>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_posts_topic_before -->
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_posts_topic">{L_MCHAT_POSTS_TOPIC}{L_COLON}</label></dt>
|
||||
<dt><label for="mchat_archive_sort">{{ lang('MCHAT_ARCHIVE_SORT') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_posts_topic" value="1"<!-- IF MCHAT_POSTS_TOPIC --> id="mchat_posts_topic" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="mchat_posts_topic" value="0"<!-- IF not MCHAT_POSTS_TOPIC --> id="mchat_posts_topic" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_archive_sort" value="0"{% if MCHAT_ARCHIVE_SORT == 0 %} id="mchat_archive_sort" checked="checked"{% endif %}> <span>{{ lang('MCHAT_ARCHIVE_SORT_TOP_BOTTOM') }}</span></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 %}> <span>{{ lang('MCHAT_ARCHIVE_SORT_BOTTOM_TOP') }}</span></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 %}> <span>{{ lang('MCHAT_ARCHIVE_SORT_USER') }}</span></label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ lang('MCHAT_SETTINGS_MESSAGES') }}</legend>
|
||||
|
||||
{% EVENT dmzx_mchat_acp_timeout_before %}
|
||||
|
||||
<dl>
|
||||
<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>
|
||||
<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>
|
||||
<span>{{ lang('MCHAT_EDIT_DELETE_LIMIT_EXPLAIN') }}</span></dt>
|
||||
<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>
|
||||
<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>
|
||||
<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_flood_messages">{{ lang('MCHAT_FLOOD_MESSAGES') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_FLOOD_MESSAGES_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_flood_messages" id="mchat_flood_messages" size="10" value="{{ MCHAT_FLOOD_MESSAGES }}"> <span>{{ lang('MCHAT_ACP_MESSAGES') }}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<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_max_input_height">{{ lang('MCHAT_MAX_INPUT_HEIGHT') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_MAX_INPUT_HEIGHT_EXPLAIN') }}</span></dt>
|
||||
<dd><input type="text" name="mchat_max_input_height" id="mchat_max_input_height" size="10" value="{{ MCHAT_MAX_INPUT_HEIGHT }}"> <span>{{ lang('PIXEL') }}</span></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
{% EVENT dmzx_mchat_acp_static_message_after %}
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ lang('MCHAT_SETTINGS_POSTS') }}</legend>
|
||||
|
||||
{% EVENT dmzx_mchat_acp_posts_topic_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_posts_topic">{{ lang('MCHAT_POSTS_TOPIC') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_posts_topic" value="1"{% if MCHAT_POSTS_TOPIC %} id="mchat_posts_topic" checked="checked"{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="mchat_posts_topic" value="0"{% if not MCHAT_POSTS_TOPIC %} id="mchat_posts_topic" checked="checked"{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_posts_reply">{L_MCHAT_POSTS_REPLY}{L_COLON}</label></dt>
|
||||
<dt><label for="mchat_posts_reply">{{ lang('MCHAT_POSTS_REPLY') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_posts_reply" value="1"<!-- IF MCHAT_POSTS_REPLY --> id="mchat_posts_reply" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="mchat_posts_reply" value="0"<!-- IF not MCHAT_POSTS_REPLY --> id="mchat_posts_reply" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" name="mchat_posts_reply" value="1"{% if MCHAT_POSTS_REPLY %} id="mchat_posts_reply" checked="checked"{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="mchat_posts_reply" value="0"{% if not MCHAT_POSTS_REPLY %} id="mchat_posts_reply" checked="checked"{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_posts_edit">{L_MCHAT_POSTS_EDIT}{L_COLON}</label></dt>
|
||||
<dt><label for="mchat_posts_edit">{{ lang('MCHAT_POSTS_EDIT') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_posts_edit" value="1"<!-- IF MCHAT_POSTS_EDIT --> id="mchat_posts_edit" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="mchat_posts_edit" value="0"<!-- IF not MCHAT_POSTS_EDIT --> id="mchat_posts_edit" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" name="mchat_posts_edit" value="1"{% if MCHAT_POSTS_EDIT %} id="mchat_posts_edit" checked="checked"{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="mchat_posts_edit" value="0"{% if not MCHAT_POSTS_EDIT %} id="mchat_posts_edit" checked="checked"{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_posts_quote">{L_MCHAT_POSTS_QUOTE}{L_COLON}</label></dt>
|
||||
<dt><label for="mchat_posts_quote">{{ lang('MCHAT_POSTS_QUOTE') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_posts_quote" value="1"<!-- IF MCHAT_POSTS_QUOTE --> id="mchat_posts_quote" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="mchat_posts_quote" value="0"<!-- IF not MCHAT_POSTS_QUOTE --> id="mchat_posts_quote" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" name="mchat_posts_quote" value="1"{% if MCHAT_POSTS_QUOTE %} id="mchat_posts_quote" checked="checked"{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="mchat_posts_quote" value="0"{% if not MCHAT_POSTS_QUOTE %} id="mchat_posts_quote" checked="checked"{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_posts_login">{L_MCHAT_POSTS_LOGIN}{L_COLON}</label></dt>
|
||||
<dt><label for="mchat_posts_login">{{ lang('MCHAT_POSTS_LOGIN') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_posts_login" value="1"<!-- IF MCHAT_POSTS_LOGIN --> id="mchat_posts_login" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="mchat_posts_login" value="0"<!-- IF not MCHAT_POSTS_LOGIN --> id="mchat_posts_login" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" name="mchat_posts_login" value="1"{% if MCHAT_POSTS_LOGIN %} id="mchat_posts_login" checked="checked"{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="mchat_posts_login" value="0"{% if not MCHAT_POSTS_LOGIN %} id="mchat_posts_login" checked="checked"{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<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>
|
||||
<label><input type="radio" name="mchat_posts_auth_check" value="0"{% if not MCHAT_POSTS_AUTH_CHECK %} id="mchat_posts_auth_check" checked="checked"{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_posts_login_after -->
|
||||
{% EVENT dmzx_mchat_acp_posts_login_after %}
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_SETTINGS_STATS}</legend>
|
||||
<legend>{{ lang('MCHAT_SETTINGS_STATS') }}</legend>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_whois_refresh_before -->
|
||||
{% EVENT dmzx_mchat_acp_whois_refresh_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_whois_refresh">{L_MCHAT_WHOIS_REFRESH}{L_COLON}</label><br />
|
||||
<span>{L_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>{L_MCHAT_ACP_SECONDS}</dd>
|
||||
<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>
|
||||
<dl>
|
||||
<dt><label for="mchat_navbar_link_count">{{ lang('MCHAT_NAVBAR_LINK_COUNT') ~ lang('COLON') }}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_navbar_link_count" value="1"{% if MCHAT_NAVBAR_LINK_COUNT %} id="mchat_navbar_link_count" checked="checked"{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_navbar_link_count" value="0"{% if not MCHAT_NAVBAR_LINK_COUNT %} id="mchat_navbar_link_count" checked="checked"{% endif %}> {{ lang('NO') }}</label></dd>
|
||||
</dl>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_whois_refresh_after -->
|
||||
{% EVENT dmzx_mchat_acp_whois_refresh_after %}
|
||||
|
||||
</fieldset>
|
||||
<!-- IF MCHAT_FOUNDER -->
|
||||
{% if MCHAT_FOUNDER %}
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_SETTINGS_PRUNE}</legend>
|
||||
<legend>{{ lang('MCHAT_SETTINGS_PRUNE') }}</legend>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_prune_before -->
|
||||
{% EVENT dmzx_mchat_acp_prune_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_prune">{L_MCHAT_PRUNE}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_prune" value="1"<!-- IF MCHAT_PRUNE --> id="mchat_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_prune" value="0"<!-- IF not MCHAT_PRUNE --> id="mchat_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
<dt><label for="mchat_prune">{{ lang('MCHAT_PRUNE') ~ lang('COLON') }}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_prune" value="1"{% if MCHAT_PRUNE %} id="mchat_prune" checked="checked"{% endif %}> {{ lang('YES') }}</label>
|
||||
<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">{L_MCHAT_PRUNE_GC}{L_COLON}</label><br />
|
||||
<span>{L_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>{L_MCHAT_ACP_SECONDS}</dd>
|
||||
<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">{L_MCHAT_PRUNE_NUM}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_PRUNE_NUM_EXPLAIN}</span></dt>
|
||||
<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}" />
|
||||
<select name="mchat_prune_mode" id="mchat_prune_mode" title="{L_MCHAT_PRUNE_NUM}">
|
||||
{S_MCHAT_PRUNE_MODE_OPTIONS}
|
||||
<input type="text" name="mchat_prune_num" size="10" id="mchat_prune_num" value="{{ MCHAT_PRUNE_NUM }}">
|
||||
<select name="mchat_prune_mode" id="mchat_prune_mode" title="{{ lang('MCHAT_PRUNE_NUM') }}">
|
||||
{{ S_MCHAT_PRUNE_MODE_OPTIONS }}
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_prune_now">{L_MCHAT_PRUNE_NOW}{L_COLON}</label></dt>
|
||||
<dt><label for="mchat_prune_now">{{ lang('MCHAT_PRUNE_NOW') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="button1" type="submit" id="mchat_prune_now" name="mchat_prune_now" value="{L_MCHAT_PRUNE_NOW}" />
|
||||
<label>{L_MCHAT_PRUNE_NOW_CONFIRM}{L_COLON}</label>
|
||||
<label><input type="radio" name="mchat_prune_now_confirm" value="1" /> {L_YES}</label>
|
||||
<label><input type="radio" name="mchat_prune_now_confirm" value="0" id="mchat_prune_now_confirm" checked="checked" /> {L_NO}</label>
|
||||
<input class="button1" type="submit" id="mchat_prune_now" name="mchat_prune_now" value="{{ lang('MCHAT_PRUNE_NOW') }}">
|
||||
<label>{{ lang('MCHAT_PRUNE_NOW_CONFIRM') ~ lang('COLON') }}</label>
|
||||
<label><input type="radio" name="mchat_prune_now_confirm" value="1"> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="mchat_prune_now_confirm" value="0" id="mchat_prune_now_confirm" checked="checked"> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_purge">{L_MCHAT_PURGE}{L_COLON}</label></dt>
|
||||
<dt><label for="mchat_purge">{{ lang('MCHAT_PURGE') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="button1" type="submit" id="mchat_purge" name="mchat_purge" value="{L_MCHAT_PURGE}" />
|
||||
<label>{L_MCHAT_PURGE_CONFIRM}{L_COLON}</label>
|
||||
<label><input type="radio" name="mchat_purge_confirm" value="1" /> {L_YES}</label>
|
||||
<label><input type="radio" name="mchat_purge_confirm" value="0" id="mchat_purge_confirm" checked="checked" /> {L_NO}</label>
|
||||
<input class="button1" type="submit" id="mchat_purge" name="mchat_purge" value="{{ lang('MCHAT_PURGE') }}">
|
||||
<label>{{ lang('MCHAT_PURGE_CONFIRM') ~ lang('COLON') }}</label>
|
||||
<label><input type="radio" name="mchat_purge_confirm" value="1"> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="mchat_purge_confirm" value="0" id="mchat_purge_confirm" checked="checked"> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_purge_after -->
|
||||
{% EVENT dmzx_mchat_acp_purge_after %}
|
||||
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT acp_dmzx_mchat_globalsettings_after -->
|
||||
<fieldset>
|
||||
<legend>{{ lang('MCHAT_SETTINGS_LOG') }}</legend>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
{S_FORM_TOKEN}
|
||||
</p>
|
||||
{% EVENT dmzx_mchat_acp_log_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="mchat_log_enabled">{{ lang('MCHAT_LOG_ENABLED') ~ lang('COLON') }}</label><br>
|
||||
<span>{{ lang('MCHAT_LOG_ENABLED_EXPLAIN') }}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_log_enabled" value="1"{% if MCHAT_LOG_ENABLED %} id="mchat_log_enabled" checked="checked"{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_log_enabled" value="0"{% if not MCHAT_LOG_ENABLED %} id="mchat_log_enabled" checked="checked"{% endif %}> {{ lang('NO') }}</label></dd>
|
||||
</dl>
|
||||
|
||||
{% EVENT dmzx_mchat_acp_log_after %}
|
||||
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
{% EVENT acp_dmzx_mchat_globalsettings_after %}
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_SUBMIT_CHANGES') }}</legend>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{{ lang('SUBMIT') }}">
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{{ lang('RESET') }}">
|
||||
</p>
|
||||
{{ S_FORM_TOKEN }}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
{% INCLUDE 'overall_footer.html' %}
|
||||
|
||||
@@ -1,45 +1,48 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
{% INCLUDE 'overall_header.html' %}
|
||||
|
||||
<h1>{L_MCHAT_TITLE}</h1>
|
||||
<h1>{{ lang('MCHAT_TITLE') }}</h1>
|
||||
|
||||
{L_MCHAT_VERSION}{L_COLON} <em>{MCHAT_VERSION}</em>
|
||||
{{ lang('MCHAT_VERSION') ~ lang('COLON') }} <em>{{ MCHAT_VERSION }}</em>
|
||||
|
||||
<div class="successbox notice">{L_MCHAT_GLOBALUSERSETTINGS_EXPLAIN}</div>
|
||||
<div class="successbox notice">{{ lang('MCHAT_GLOBALUSERSETTINGS_EXPLAIN') }}</div>
|
||||
|
||||
<!-- IF MCHAT_ERROR -->
|
||||
{% if MCHAT_ERROR %}
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{MCHAT_ERROR}</p>
|
||||
<h3>{{ lang('WARNING') }}</h3>
|
||||
<p>{{ MCHAT_ERROR }}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
{% endif %}
|
||||
|
||||
<form id="acp_mchat" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{L_ACP_MCHAT_GLOBALUSERSETTINGS}</legend>
|
||||
<!-- INCLUDE @dmzx_mchat/acp_mchat_globalusersettings_content.html -->
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_GLOBALUSERSETTINGS_OVERWRITE}</legend>
|
||||
<dl>
|
||||
<dt><label for="mchat_overwrite">{L_MCHAT_GLOBALUSERSETTINGS_OVERWRITE}{L_COLON}</label><br /><span>{L_MCHAT_GLOBALUSERSETTINGS_OVERWRITE_EXPLAIN}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_overwrite" value="1" /> {L_YES}</label>
|
||||
<label><input type="radio" name="mchat_overwrite" value="0" id="mchat_overwrite" checked="checked" /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_overwrite_confirm">{L_MCHAT_GLOBALUSERSETTINGS_OVERWRITE_CONFIRM}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_overwrite_confirm" value="1" /> {L_YES}</label>
|
||||
<label><input type="radio" name="mchat_overwrite_confirm" value="0" id="mchat_overwrite_confirm" checked="checked" /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<form id="acp_mchat" method="post" action="{{ U_ACTION }}">
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_MCHAT_GLOBALUSERSETTINGS') }}</legend>
|
||||
{% INCLUDE '@dmzx_mchat/acp_mchat_globalusersettings_content.html' %}
|
||||
</fieldset>
|
||||
<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>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_overwrite_confirm">{{ lang('MCHAT_GLOBALUSERSETTINGS_OVERWRITE_CONFIRM') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="mchat_overwrite_confirm" value="1"> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="mchat_overwrite_confirm" value="0" id="mchat_overwrite_confirm" checked="checked"> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_SUBMIT_CHANGES') }}</legend>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
{S_FORM_TOKEN}
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{{ lang('SUBMIT') }}">
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{{ lang('RESET') }}">
|
||||
</p>
|
||||
{{ S_FORM_TOKEN }}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
{% INCLUDE 'overall_footer.html' %}
|
||||
|
||||
@@ -1,118 +1,108 @@
|
||||
<!-- EVENT dmzx_mchat_acp_index_before -->
|
||||
{% EVENT dmzx_mchat_acp_index_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="user_mchat_index">{L_MCHAT_INDEX}{L_COLON}</label></dt>
|
||||
<dt><label for="user_mchat_index">{{ lang('MCHAT_INDEX') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_index" value="1"<!-- IF MCHAT_INDEX --> id="user_mchat_index" checked="checked"<!-- ENDIF --><!-- IF MCHAT_INDEX_NOAUTH --> disabled<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_index" value="0"<!-- IF not MCHAT_INDEX --> id="user_mchat_index" checked="checked"<!-- ENDIF --><!-- IF MCHAT_INDEX_NOAUTH --> disabled<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" name="user_mchat_index" value="1"{% if MCHAT_INDEX %} id="user_mchat_index" checked="checked"{% endif %}{% if MCHAT_INDEX_NOAUTH %} disabled{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_index" value="0"{% if not MCHAT_INDEX %} id="user_mchat_index" checked="checked"{% endif %}{% if MCHAT_INDEX_NOAUTH %} disabled{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_whois_index">{L_MCHAT_WHOIS_INDEX}{L_COLON}</label></dt>
|
||||
<dt><label for="user_mchat_whois_index">{{ lang('MCHAT_WHOIS_INDEX') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_whois_index" value="1"<!-- IF MCHAT_WHOIS_INDEX --> id="user_mchat_whois_index" checked="checked"<!-- ENDIF --><!-- IF MCHAT_WHOIS_INDEX_NOAUTH --> disabled<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_whois_index" value="0"<!-- IF not MCHAT_WHOIS_INDEX --> id="user_mchat_whois_index" checked="checked"<!-- ENDIF --><!-- IF MCHAT_WHOIS_INDEX_NOAUTH --> disabled<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" name="user_mchat_whois_index" value="1"{% if MCHAT_WHOIS_INDEX %} id="user_mchat_whois_index" checked="checked"{% endif %}{% if MCHAT_WHOIS_INDEX_NOAUTH %} disabled{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_whois_index" value="0"{% if not MCHAT_WHOIS_INDEX %} id="user_mchat_whois_index" checked="checked"{% endif %}{% if MCHAT_WHOIS_INDEX_NOAUTH %} disabled{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_stats_index">{L_MCHAT_STATS_INDEX}{L_COLON}</label><br /><span>{L_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 --> /> {L_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 --> /> {L_NO}</label>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_location">{L_MCHAT_LOCATION}{L_COLON}</label></dt>
|
||||
<dt><label for="user_mchat_location">{{ lang('MCHAT_LOCATION') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_location" value="1"<!-- IF MCHAT_LOCATION --> id="user_mchat_location" checked="checked"<!-- ENDIF --><!-- IF MCHAT_LOCATION_NOAUTH --> disabled<!-- ENDIF --> /> {L_MCHAT_TOP}</label>
|
||||
<label><input type="radio" name="user_mchat_location" value="0"<!-- IF not MCHAT_LOCATION --> id="user_mchat_location" checked="checked"<!-- ENDIF --><!-- IF MCHAT_LOCATION_NOAUTH --> disabled<!-- ENDIF --> /> {L_MCHAT_BOTTOM}</label>
|
||||
<label><input type="radio" name="user_mchat_location" value="1"{% if MCHAT_LOCATION %} id="user_mchat_location" checked="checked"{% endif %}{% if MCHAT_LOCATION_NOAUTH %} disabled{% endif %}> {{ lang('MCHAT_TOP') }}</label>
|
||||
<label><input type="radio" name="user_mchat_location" value="0"{% if not MCHAT_LOCATION %} id="user_mchat_location" checked="checked"{% endif %}{% if MCHAT_LOCATION_NOAUTH %} disabled{% endif %}> {{ lang('MCHAT_BOTTOM') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_location_after -->
|
||||
{% EVENT dmzx_mchat_acp_location_after %}
|
||||
|
||||
<hr />
|
||||
<hr>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_message_top_before -->
|
||||
{% EVENT dmzx_mchat_acp_message_top_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="user_mchat_message_top">{L_MCHAT_MESSAGE_TOP}{L_COLON}</label><br /><span>{L_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 --> /> {L_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 --> /> {L_MCHAT_BOTTOM}</label>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_capital_letter">{L_MCHAT_CAPITAL_LETTER}{L_COLON}</label></dt>
|
||||
<dt><label for="user_mchat_capital_letter">{{ lang('MCHAT_CAPITAL_LETTER') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_capital_letter" value="1"<!-- IF MCHAT_CAPITAL_LETTER --> id="user_mchat_capital_letter" checked="checked"<!-- ENDIF --><!-- IF MCHAT_CAPITAL_LETTER_NOAUTH --> disabled<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_capital_letter" value="0"<!-- IF not MCHAT_CAPITAL_LETTER --> id="user_mchat_capital_letter" checked="checked"<!-- ENDIF --><!-- IF MCHAT_CAPITAL_LETTER_NOAUTH --> disabled<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" name="user_mchat_capital_letter" value="1"{% if MCHAT_CAPITAL_LETTER %} id="user_mchat_capital_letter" checked="checked"{% endif %}{% if MCHAT_CAPITAL_LETTER_NOAUTH %} disabled{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_capital_letter" value="0"{% if not MCHAT_CAPITAL_LETTER %} id="user_mchat_capital_letter" checked="checked"{% endif %}{% if MCHAT_CAPITAL_LETTER_NOAUTH %} disabled{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_sound">{L_MCHAT_SOUND}{L_COLON}</label></dt>
|
||||
<dt><label for="user_mchat_sound">{{ lang('MCHAT_SOUND') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_sound" value="1"<!-- IF MCHAT_SOUND --> id="user_mchat_sound" checked="checked"<!-- ENDIF --><!-- IF MCHAT_SOUND_NOAUTH --> disabled<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_sound" value="0"<!-- IF not MCHAT_SOUND --> id="user_mchat_sound" checked="checked"<!-- ENDIF --><!-- IF MCHAT_SOUND_NOAUTH --> disabled<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" name="user_mchat_sound" value="1"{% if MCHAT_SOUND %} id="user_mchat_sound" checked="checked"{% endif %}{% if MCHAT_SOUND_NOAUTH %} disabled{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_sound" value="0"{% if not MCHAT_SOUND %} id="user_mchat_sound" checked="checked"{% endif %}{% if MCHAT_SOUND_NOAUTH %} disabled{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_avatars">{L_MCHAT_AVATARS}{L_COLON}</label></dt>
|
||||
<dt><label for="user_mchat_avatars">{{ lang('MCHAT_AVATARS') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_avatars" value="1"<!-- IF MCHAT_AVATARS --> id="user_mchat_avatars" checked="checked"<!-- ENDIF --><!-- IF MCHAT_AVATARS_NOAUTH --> disabled<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_avatars" value="0"<!-- IF not MCHAT_AVATARS --> id="user_mchat_avatars" checked="checked"<!-- ENDIF --><!-- IF MCHAT_AVATARS_NOAUTH --> disabled<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" name="user_mchat_avatars" value="1"{% if MCHAT_AVATARS %} id="user_mchat_avatars" checked="checked"{% endif %}{% if MCHAT_AVATARS_NOAUTH %} disabled{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_avatars" value="0"{% if not MCHAT_AVATARS %} id="user_mchat_avatars" checked="checked"{% endif %}{% if MCHAT_AVATARS_NOAUTH %} disabled{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_input_area">{L_MCHAT_CHAT_AREA}{L_COLON}</label></dt>
|
||||
<dt><label for="user_mchat_character_count">{{ lang('MCHAT_DISPLAY_CHARACTER_COUNT') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_input_area" value="1"<!-- IF MCHAT_INPUT_AREA --> id="user_mchat_input_area" checked="checked"<!-- ENDIF --><!-- IF MCHAT_INPUT_AREA_NOAUTH --> disabled<!-- ENDIF --> /> {L_MCHAT_INPUT_AREA}</label>
|
||||
<label><input type="radio" name="user_mchat_input_area" value="0"<!-- IF not MCHAT_INPUT_AREA --> id="user_mchat_input_area" checked="checked"<!-- ENDIF --><!-- IF MCHAT_INPUT_AREA_NOAUTH --> disabled<!-- ENDIF --> /> {L_MCHAT_TEXT_AREA}</label>
|
||||
<label><input type="radio" name="user_mchat_character_count" value="1"{% if MCHAT_CHARACTER_COUNT %} id="user_mchat_character_count" checked="checked"{% endif %}{% if MCHAT_CHARACTER_COUNT_NOAUTH %} disabled{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_character_count" value="0"{% if not MCHAT_CHARACTER_COUNT %} id="user_mchat_character_count" checked="checked"{% endif %}{% if MCHAT_CHARACTER_COUNT_NOAUTH %} disabled{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_character_count">{L_MCHAT_DISPLAY_CHARACTER_COUNT}{L_COLON}</label></dt>
|
||||
<dt><label for="user_mchat_dateoptions">{{ lang('MCHAT_DATE_FORMAT') ~ lang('COLON') }}</label><br><span>{{ lang('MCHAT_DATE_FORMAT_EXPLAIN') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_character_count" value="1"<!-- IF MCHAT_CHARACTER_COUNT --> id="user_mchat_character_count" checked="checked"<!-- ENDIF --><!-- IF MCHAT_CHARACTER_COUNT_NOAUTH --> disabled<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_character_count" value="0"<!-- IF not MCHAT_CHARACTER_COUNT --> id="user_mchat_character_count" checked="checked"<!-- ENDIF --><!-- IF MCHAT_CHARACTER_COUNT_NOAUTH --> disabled<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_pause_on_input">{L_MCHAT_PAUSE_ON_INPUT}{L_COLON}</label><br /><span>{L_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 --> /> {L_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 --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_dateoptions">{L_MCHAT_DATE_FORMAT}{L_COLON}</label><br /><span>{L_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' ? '{A_MCHAT_DEFAULT_DATEFORMAT}' : this.value;"<!-- IF MCHAT_DATE_NOAUTH --> disabled<!-- ENDIF -->>
|
||||
{S_MCHAT_DATEFORMAT_OPTIONS}
|
||||
<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 }}
|
||||
</select>
|
||||
</dd>
|
||||
<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>
|
||||
<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">{L_MCHAT_RELATIVE_TIME}{L_COLON}</label><br /><span>{L_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 --> /> {L_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 --> /> {L_NO}</label>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_relative_time_after -->
|
||||
{% EVENT dmzx_mchat_acp_relative_time_after %}
|
||||
|
||||
<hr />
|
||||
<hr>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_posts_before -->
|
||||
{% EVENT dmzx_mchat_acp_posts_before %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="user_mchat_posts"><!-- IF MCHAT_POSTS_ENABLED_LANG -->{MCHAT_POSTS_ENABLED_LANG}<!-- ELSE -->{L_MCHAT_POSTS}<!-- ENDIF -->{L_COLON}</label></dt>
|
||||
<dt><label for="user_mchat_posts">{% if MCHAT_POSTS_ENABLED_LANG %}{{ MCHAT_POSTS_ENABLED_LANG }}{% else %}{{ lang('MCHAT_POSTS') }}{% endif %}{{ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_posts" value="1"<!-- IF MCHAT_POSTS --> id="user_mchat_posts" checked="checked"<!-- ENDIF --><!-- IF MCHAT_POSTS_NOAUTH --> disabled<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_posts" value="0"<!-- IF not MCHAT_POSTS --> id="user_mchat_posts" checked="checked"<!-- ENDIF --><!-- IF MCHAT_POSTS_NOAUTH --> disabled<!-- ENDIF --> /> {L_NO}</label>
|
||||
<label><input type="radio" name="user_mchat_posts" value="1"{% if MCHAT_POSTS %} id="user_mchat_posts" checked="checked"{% endif %}{% if MCHAT_POSTS_NOAUTH %} disabled{% endif %}> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" name="user_mchat_posts" value="0"{% if not MCHAT_POSTS %} id="user_mchat_posts" checked="checked"{% endif %}{% if MCHAT_POSTS_NOAUTH %} disabled{% endif %}> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<!-- EVENT dmzx_mchat_acp_posts_after -->
|
||||
{% EVENT dmzx_mchat_acp_posts_after %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<fieldset>
|
||||
<p class="successbox notice">{L_MCHAT_ACP_USER_PREFS_EXPLAIN}</p>
|
||||
<legend>{L_MCHAT_PREFERENCES}</legend>
|
||||
<!-- INCLUDE @dmzx_mchat/acp_mchat_globalusersettings_content.html -->
|
||||
<p class="successbox notice">{{ lang('MCHAT_ACP_USER_PREFS_EXPLAIN') }}</p>
|
||||
<legend>{{ lang('MCHAT_PREFERENCES') }}</legend>
|
||||
{% INCLUDE '@dmzx_mchat/acp_mchat_globalusersettings_content.html' %}
|
||||
</fieldset>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "dmzx/mchat",
|
||||
"type": "phpbb-extension",
|
||||
"description": "mChat Extension",
|
||||
"homepage": "https://github.com/kasimi/mChat",
|
||||
"version": "2.0.0",
|
||||
"time": "2016-10-20",
|
||||
"description": "mChat",
|
||||
"homepage": "https://www.phpbb.com/customise/db/extension/mchat_extension/",
|
||||
"version": "2.1.4",
|
||||
"time": "2020-08-08",
|
||||
"keywords": ["phpbb", "extension", "mchat"],
|
||||
"license": "GPL-2.0",
|
||||
"license": "GPL-2.0-only",
|
||||
"authors": [
|
||||
{
|
||||
"name": "kasimi",
|
||||
@@ -27,8 +27,8 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"phpbb/phpbb": ">=3.1.8-RC1,<3.3.0@dev"
|
||||
"php": ">=5.4.7",
|
||||
"composer/installers": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpbb/epv": "dev-master"
|
||||
@@ -36,13 +36,12 @@
|
||||
"extra": {
|
||||
"display-name": "mChat",
|
||||
"soft-require": {
|
||||
"phpbb/phpbb": ">=3.1.8-RC1,<3.3.0@dev"
|
||||
"phpbb/phpbb": ">=3.2.0"
|
||||
},
|
||||
"version-check": {
|
||||
"host": "kasimi.github.io",
|
||||
"directory": "/mChat",
|
||||
"filename": "mchat_version.json",
|
||||
"ssl": true
|
||||
"host": "www.phpbb.com",
|
||||
"directory": "/customise/db/extension/mchat_extension",
|
||||
"filename": "version_check"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
dmzx_mchat_page_custom_controller:
|
||||
path: /mchat
|
||||
methods: [GET]
|
||||
defaults: { _controller: dmzx.mchat.core:page_custom }
|
||||
path: '/mchat'
|
||||
methods: ['GET']
|
||||
defaults: { _controller: 'dmzx.mchat.core:page_custom' }
|
||||
dmzx_mchat_page_archive_controller:
|
||||
path: /mchat/archive
|
||||
methods: [GET]
|
||||
defaults: { _controller: dmzx.mchat.core:page_archive }
|
||||
path: '/mchat/archive'
|
||||
methods: ['GET']
|
||||
defaults: { _controller: 'dmzx.mchat.core:page_archive' }
|
||||
dmzx_mchat_page_rules_controller:
|
||||
path: /mchat/rules
|
||||
methods: [GET]
|
||||
defaults: { _controller: dmzx.mchat.core:page_rules }
|
||||
path: '/mchat/rules'
|
||||
methods: ['GET']
|
||||
defaults: { _controller: 'dmzx.mchat.core:page_rules' }
|
||||
dmzx_mchat_page_whois_controller:
|
||||
path: /mchat/whois/{ip}
|
||||
methods: [GET]
|
||||
defaults: { _controller: dmzx.mchat.core:page_whois }
|
||||
path: '/mchat/whois/{ip}'
|
||||
methods: ['GET']
|
||||
defaults: { _controller: 'dmzx.mchat.core:page_whois' }
|
||||
|
||||
dmzx_mchat_action_add_controller:
|
||||
path: /mchat/action/add
|
||||
methods: [POST]
|
||||
defaults: { _controller: dmzx.mchat.core:action_add }
|
||||
path: '/mchat/action/add'
|
||||
methods: ['POST']
|
||||
defaults: { _controller: 'dmzx.mchat.core:action_add' }
|
||||
dmzx_mchat_action_edit_controller:
|
||||
path: /mchat/action/edit
|
||||
methods: [POST]
|
||||
defaults: { _controller: dmzx.mchat.core:action_edit }
|
||||
path: '/mchat/action/edit'
|
||||
methods: ['POST']
|
||||
defaults: { _controller: 'dmzx.mchat.core:action_edit' }
|
||||
dmzx_mchat_action_del_controller:
|
||||
path: /mchat/action/del
|
||||
methods: [POST]
|
||||
defaults: { _controller: dmzx.mchat.core:action_del }
|
||||
path: '/mchat/action/del'
|
||||
methods: ['POST']
|
||||
defaults: { _controller: 'dmzx.mchat.core:action_del' }
|
||||
dmzx_mchat_action_refresh_controller:
|
||||
path: /mchat/action/refresh
|
||||
methods: [POST]
|
||||
defaults: { _controller: dmzx.mchat.core:action_refresh }
|
||||
path: '/mchat/action/refresh'
|
||||
methods: ['POST']
|
||||
defaults: { _controller: 'dmzx.mchat.core:action_refresh' }
|
||||
dmzx_mchat_action_whois_controller:
|
||||
path: /mchat/action/whois
|
||||
methods: [POST]
|
||||
defaults: { _controller: dmzx.mchat.core:action_whois }
|
||||
path: '/mchat/action/whois'
|
||||
methods: ['POST']
|
||||
defaults: { _controller: 'dmzx.mchat.core:action_whois' }
|
||||
|
||||
@@ -1,101 +1,159 @@
|
||||
imports:
|
||||
- { resource: tables.yml }
|
||||
- { resource: 'tables.yml' }
|
||||
|
||||
services:
|
||||
|
||||
dmzx.mchat.acp.controller:
|
||||
class: dmzx\mchat\controller\acp_controller
|
||||
class: 'dmzx\mchat\controller\acp_controller'
|
||||
arguments:
|
||||
- '@dmzx.mchat.functions'
|
||||
- '@template'
|
||||
- '@log'
|
||||
- '@user'
|
||||
- '@language'
|
||||
- '@dbal.conn'
|
||||
- '@config_text'
|
||||
- '@cache.driver'
|
||||
- '@request'
|
||||
- '@dispatcher'
|
||||
- '@dmzx.mchat.settings'
|
||||
- '%dmzx.mchat.table.mchat%'
|
||||
- '%dmzx.mchat.table.mchat_log%'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
|
||||
dmzx.mchat.ucp.controller:
|
||||
class: dmzx\mchat\controller\ucp_controller
|
||||
class: 'dmzx\mchat\controller\ucp_controller'
|
||||
arguments:
|
||||
- '@template'
|
||||
- '@user'
|
||||
- '@language'
|
||||
- '@auth'
|
||||
- '@dbal.conn'
|
||||
- '@request'
|
||||
- '@dmzx.mchat.settings'
|
||||
- '@dispatcher'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
|
||||
dmzx.mchat.notifications:
|
||||
class: 'dmzx\mchat\core\notifications'
|
||||
arguments:
|
||||
- '@dmzx.mchat.settings'
|
||||
- '@user'
|
||||
- '@language'
|
||||
- '@auth'
|
||||
- '@dbal.conn'
|
||||
- '@dispatcher'
|
||||
- '@text_formatter.parser'
|
||||
|
||||
dmzx.mchat.log:
|
||||
class: 'dmzx\mchat\core\log'
|
||||
arguments:
|
||||
- '@dmzx.mchat.settings'
|
||||
- '@user'
|
||||
- '@dbal.conn'
|
||||
- '@cache.driver'
|
||||
- '@dispatcher'
|
||||
|
||||
dmzx.mchat.core:
|
||||
class: dmzx\mchat\core\mchat
|
||||
class: 'dmzx\mchat\core\mchat'
|
||||
arguments:
|
||||
- '@dmzx.mchat.functions'
|
||||
- '@dmzx.mchat.notifications'
|
||||
- '@dmzx.mchat.settings'
|
||||
- '@dmzx.mchat.log'
|
||||
- '@controller.helper'
|
||||
- '@template'
|
||||
- '@user'
|
||||
- '@language'
|
||||
- '@auth'
|
||||
- '@pagination'
|
||||
- '@request'
|
||||
- '@dispatcher'
|
||||
- '@ext.manager'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
- '@?text_formatter.s9e.parser'
|
||||
- '@text_formatter.parser'
|
||||
- '@?phpbb.collapsiblecategories.operator'
|
||||
- '@?rmcgirr83.authorizedforurls.listener'
|
||||
|
||||
dmzx.mchat.functions:
|
||||
class: dmzx\mchat\core\functions
|
||||
class: 'dmzx\mchat\core\functions'
|
||||
arguments:
|
||||
- '@dmzx.mchat.settings'
|
||||
- '@dmzx.mchat.notifications'
|
||||
- '@dmzx.mchat.log'
|
||||
- '@user'
|
||||
- '@language'
|
||||
- '@auth'
|
||||
- '@log'
|
||||
- '@dbal.conn'
|
||||
- '@cache.driver'
|
||||
- '@dispatcher'
|
||||
- '@group_helper'
|
||||
|
||||
dmzx.mchat.settings:
|
||||
class: 'dmzx\mchat\core\settings'
|
||||
arguments:
|
||||
- '@user'
|
||||
- '@language'
|
||||
- '@config'
|
||||
- '@config_text'
|
||||
- '@auth'
|
||||
- '@dispatcher'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
- '%dmzx.mchat.table.mchat%'
|
||||
- '%dmzx.mchat.table.mchat_log%'
|
||||
- '%dmzx.mchat.table.mchat_sessions%'
|
||||
dmzx.mchat.settings:
|
||||
class: dmzx\mchat\core\settings
|
||||
arguments:
|
||||
- '@user'
|
||||
- '@config'
|
||||
- '@auth'
|
||||
- '@dispatcher'
|
||||
|
||||
dmzx.mchat.acp.listener:
|
||||
class: dmzx\mchat\event\acp_listener
|
||||
class: 'dmzx\mchat\event\acp_listener'
|
||||
arguments:
|
||||
- '@template'
|
||||
- '@request'
|
||||
- '@user'
|
||||
- '@language'
|
||||
- '@dmzx.mchat.settings'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
- '@dmzx.mchat.functions'
|
||||
tags:
|
||||
- { name: event.listener }
|
||||
- { name: 'event.listener' }
|
||||
|
||||
dmzx.mchat.main.listener:
|
||||
class: dmzx\mchat\event\main_listener
|
||||
class: 'dmzx\mchat\event\main_listener'
|
||||
arguments:
|
||||
- '@dmzx.mchat.core'
|
||||
- '@dmzx.mchat.notifications'
|
||||
- '@controller.helper'
|
||||
- '@user'
|
||||
- '@language'
|
||||
- '@request'
|
||||
- '%core.php_ext%'
|
||||
tags:
|
||||
- { name: event.listener }
|
||||
- { name: 'event.listener' }
|
||||
|
||||
dmzx.mchat.cron.task.mchat_prune:
|
||||
class: dmzx\mchat\cron\mchat_prune
|
||||
class: 'dmzx\mchat\cron\mchat_prune'
|
||||
arguments:
|
||||
- '@dmzx.mchat.functions'
|
||||
- '@dmzx.mchat.settings'
|
||||
calls:
|
||||
- [set_name, [cron.task.mchat_prune]]
|
||||
- ['set_name', ['cron.task.mchat_prune']]
|
||||
tags:
|
||||
- { name: cron.task }
|
||||
- { name: 'cron.task' }
|
||||
|
||||
dmzx.mchat.text_reparser.mchat_messages:
|
||||
class: 'dmzx\mchat\textreparser\plugins\mchat_messages'
|
||||
arguments:
|
||||
- '@dbal.conn'
|
||||
- '%dmzx.mchat.table.mchat%'
|
||||
calls:
|
||||
- ['set_name', ['dmzx.mchat.text_reparser.mchat_messages']]
|
||||
tags:
|
||||
- { name: 'text_reparser.plugin' }
|
||||
|
||||
dmzx.mchat.text_reparser.reparser:
|
||||
class: 'phpbb\cron\task\text_reparser\reparser'
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@config_text'
|
||||
- '@text_reparser.lock'
|
||||
- '@text_reparser.manager'
|
||||
- '@text_reparser_collection'
|
||||
calls:
|
||||
- ['set_name', ['dmzx.mchat.text_reparser.reparser']]
|
||||
- ['set_reparser', ['dmzx.mchat.text_reparser.mchat_messages']]
|
||||
tags:
|
||||
- { name: 'cron.task' }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
parameters:
|
||||
dmzx.mchat.table.mchat: %core.table_prefix%mchat
|
||||
dmzx.mchat.table.mchat_log: %core.table_prefix%mchat_log
|
||||
dmzx.mchat.table.mchat_sessions: %core.table_prefix%mchat_sessions
|
||||
dmzx.mchat.table.mchat: '%core.table_prefix%mchat'
|
||||
dmzx.mchat.table.mchat_log: '%core.table_prefix%mchat_log'
|
||||
dmzx.mchat.table.mchat_sessions: '%core.table_prefix%mchat_sessions'
|
||||
|
||||
@@ -14,8 +14,10 @@ namespace dmzx\mchat\controller;
|
||||
use dmzx\mchat\core\functions;
|
||||
use dmzx\mchat\core\settings;
|
||||
use phpbb\cache\driver\driver_interface as cache_interface;
|
||||
use phpbb\config\db_text as config_text;
|
||||
use phpbb\db\driver\driver_interface as db_interface;
|
||||
use phpbb\event\dispatcher_interface;
|
||||
use phpbb\language\language;
|
||||
use phpbb\log\log_interface;
|
||||
use phpbb\request\request_interface;
|
||||
use phpbb\template\template;
|
||||
@@ -24,7 +26,7 @@ use phpbb\user;
|
||||
class acp_controller
|
||||
{
|
||||
/** @var functions */
|
||||
protected $functions;
|
||||
protected $mchat_functions;
|
||||
|
||||
/** @var template */
|
||||
protected $template;
|
||||
@@ -35,9 +37,15 @@ class acp_controller
|
||||
/** @var user */
|
||||
protected $user;
|
||||
|
||||
/** @var language */
|
||||
protected $lang;
|
||||
|
||||
/** @var db_interface */
|
||||
protected $db;
|
||||
|
||||
/** @var config_text */
|
||||
protected $config_text;
|
||||
|
||||
/** @var cache_interface */
|
||||
protected $cache;
|
||||
|
||||
@@ -50,63 +58,46 @@ class acp_controller
|
||||
/** @var settings */
|
||||
protected $settings;
|
||||
|
||||
/** @var string */
|
||||
protected $mchat_table;
|
||||
|
||||
/** @var string */
|
||||
protected $mchat_log_table;
|
||||
|
||||
/** @var string */
|
||||
protected $root_path;
|
||||
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param functions $functions
|
||||
* @param functions $mchat_functions
|
||||
* @param template $template
|
||||
* @param log_interface $log
|
||||
* @param user $user
|
||||
* @param language $lang
|
||||
* @param db_interface $db
|
||||
* @param config_text $config_text
|
||||
* @param cache_interface $cache
|
||||
* @param request_interface $request
|
||||
* @param dispatcher_interface $dispatcher
|
||||
* @param settings $settings
|
||||
* @param string $mchat_table
|
||||
* @param string $mchat_log_table
|
||||
* @param string $root_path
|
||||
* @param string $php_ext
|
||||
*/
|
||||
public function __construct(
|
||||
functions $functions,
|
||||
functions $mchat_functions,
|
||||
template $template,
|
||||
log_interface $log,
|
||||
user $user,
|
||||
language $lang,
|
||||
db_interface $db,
|
||||
config_text $config_text,
|
||||
cache_interface $cache,
|
||||
request_interface $request,
|
||||
dispatcher_interface $dispatcher,
|
||||
settings $settings,
|
||||
$mchat_table,
|
||||
$mchat_log_table,
|
||||
$root_path, $php_ext
|
||||
settings $settings
|
||||
)
|
||||
{
|
||||
$this->functions = $functions;
|
||||
$this->mchat_functions = $mchat_functions;
|
||||
$this->template = $template;
|
||||
$this->log = $log;
|
||||
$this->user = $user;
|
||||
$this->lang = $lang;
|
||||
$this->db = $db;
|
||||
$this->config_text = $config_text;
|
||||
$this->cache = $cache;
|
||||
$this->request = $request;
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->settings = $settings;
|
||||
$this->mchat_table = $mchat_table;
|
||||
$this->mchat_log_table = $mchat_log_table;
|
||||
$this->root_path = $root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,15 +109,17 @@ class acp_controller
|
||||
{
|
||||
add_form_key('acp_mchat');
|
||||
|
||||
$error = array();
|
||||
$error = [];
|
||||
|
||||
$is_founder = $this->user->data['user_type'] == USER_FOUNDER;
|
||||
|
||||
$settings = array_merge($this->settings->global_settings(), $this->settings->global_text_settings());
|
||||
|
||||
if ($this->request->is_set_post('submit'))
|
||||
{
|
||||
$mchat_new_config = array();
|
||||
$validation = array();
|
||||
foreach ($this->settings->global_settings() as $config_name => $config_data)
|
||||
$mchat_new_config = [];
|
||||
$validation = [];
|
||||
foreach ($settings as $config_name => $config_data)
|
||||
{
|
||||
$default = $this->settings->cfg($config_name);
|
||||
settype($default, gettype($config_data['default']));
|
||||
@@ -137,19 +130,26 @@ class acp_controller
|
||||
}
|
||||
}
|
||||
|
||||
// Don't allow changing pruning settings for non founders
|
||||
// Enable Emojis and rich text in Rules and Static Message
|
||||
$mchat_new_config['mchat_rules'] = utf8_encode_ncr($mchat_new_config['mchat_rules']);
|
||||
$mchat_new_config['mchat_static_message'] = utf8_encode_ncr($mchat_new_config['mchat_static_message']);
|
||||
|
||||
// Remove leading & trailing | characters to not break allowed BBCodes
|
||||
$mchat_new_config['mchat_bbcode_disallowed'] = trim($mchat_new_config['mchat_bbcode_disallowed'], '|');
|
||||
|
||||
if (!$is_founder)
|
||||
{
|
||||
// Don't allow changing pruning settings for non founders
|
||||
unset($mchat_new_config['mchat_prune']);
|
||||
unset($mchat_new_config['mchat_prune_gc']);
|
||||
unset($mchat_new_config['mchat_prune_mode']);
|
||||
unset($mchat_new_config['mchat_prune_num']);
|
||||
|
||||
// Don't allow changing log settings for non founders
|
||||
unset($mchat_new_config['mchat_log_enabled']);
|
||||
}
|
||||
|
||||
if (!function_exists('validate_data'))
|
||||
{
|
||||
include($this->root_path . 'includes/functions_user.' . $this->php_ext);
|
||||
}
|
||||
$this->settings->include_functions('user', 'validate_data');
|
||||
|
||||
$error = array_merge($error, validate_data($mchat_new_config, $validation));
|
||||
|
||||
@@ -166,10 +166,10 @@ class acp_controller
|
||||
* @var array error Array with error lang keys
|
||||
* @since 2.0.0-RC7
|
||||
*/
|
||||
$vars = array(
|
||||
$vars = [
|
||||
'mchat_new_config',
|
||||
'error',
|
||||
);
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.acp_globalsettings_update_data', compact($vars)));
|
||||
|
||||
if (!$error)
|
||||
@@ -181,43 +181,53 @@ class acp_controller
|
||||
}
|
||||
|
||||
// Add an entry into the log table
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_CONFIG_UPDATE', false, array($this->user->data['username']));
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_CONFIG_UPDATE', false, [$this->user->data['username']]);
|
||||
|
||||
trigger_error($this->user->lang('MCHAT_CONFIG_SAVED') . adm_back_link($u_action));
|
||||
trigger_error($this->lang->lang('MCHAT_CONFIG_SAVED') . adm_back_link($u_action));
|
||||
}
|
||||
|
||||
// Replace "error" strings with their real, localised form
|
||||
$error = array_map(array($this->user, 'lang'), $error);
|
||||
$error = array_map([$this->lang, 'lang'], $error);
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
if ($is_founder && $this->request->is_set_post('mchat_purge') && $this->request->variable('mchat_purge_confirm', false) && check_form_key('acp_mchat'))
|
||||
{
|
||||
$this->db->sql_query('TRUNCATE TABLE ' . $this->mchat_table);
|
||||
$this->db->sql_query('TRUNCATE TABLE ' . $this->mchat_log_table);
|
||||
$this->cache->destroy('sql', $this->mchat_log_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));
|
||||
/**
|
||||
* Event that is triggered right before all mChat messages are
|
||||
* deleted when using the Delete all messages button in the ACP
|
||||
*
|
||||
* @event dmzx.mchat.purge_before
|
||||
* @since 2.1.0-RC1
|
||||
*/
|
||||
$this->dispatcher->dispatch('dmzx.mchat.purge_before');
|
||||
|
||||
$this->db->sql_query('DELETE FROM ' . $this->settings->get_table_mchat());
|
||||
$this->db->sql_query('DELETE FROM ' . $this->settings->get_table_mchat_log());
|
||||
$this->cache->destroy('sql', $this->settings->get_table_mchat_log());
|
||||
$this->mchat_functions->phpbb_log('LOG_MCHAT_TABLE_PURGED');
|
||||
trigger_error($this->lang->lang('MCHAT_PURGED') . adm_back_link($u_action));
|
||||
}
|
||||
else if ($is_founder && $this->request->is_set_post('mchat_prune_now') && $this->request->variable('mchat_prune_now_confirm', false) && check_form_key('acp_mchat'))
|
||||
{
|
||||
$num_pruned_messages = count($this->functions->mchat_prune());
|
||||
trigger_error($this->user->lang('MCHAT_PRUNED', $num_pruned_messages) . adm_back_link($u_action));
|
||||
$num_pruned_messages = count($this->mchat_functions->mchat_prune());
|
||||
trigger_error($this->lang->lang('MCHAT_PRUNED', $num_pruned_messages) . adm_back_link($u_action));
|
||||
}
|
||||
}
|
||||
|
||||
$template_data = array(
|
||||
'MCHAT_ERROR' => implode('<br />', $error),
|
||||
$template_data = [
|
||||
'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')),
|
||||
'L_MCHAT_BBCODES_DISALLOWED_EXPLAIN' => $this->user->lang('MCHAT_BBCODES_DISALLOWED_EXPLAIN', '<a href="' . append_sid("{$this->root_path}adm/index.$this->php_ext", 'i=bbcodes', true, $this->user->session_id) . '">', '</a>'),
|
||||
'L_MCHAT_TIMEOUT_EXPLAIN' => $this->user->lang('MCHAT_TIMEOUT_EXPLAIN','<a href="' . append_sid("{$this->root_path}adm/index.$this->php_ext", 'i=board&mode=load', true, $this->user->session_id) . '">', '</a>', $this->settings->cfg('session_length')),
|
||||
'L_MCHAT_BBCODES_DISALLOWED_EXPLAIN' => $this->lang->lang('MCHAT_BBCODES_DISALLOWED_EXPLAIN', '<a href="' . append_sid($this->settings->url('adm/index'), ['i' => 'bbcodes']) . '">', '</a>'),
|
||||
'L_MCHAT_TIMEOUT_EXPLAIN' => $this->lang->lang('MCHAT_TIMEOUT_EXPLAIN','<a href="' . append_sid($this->settings->url('adm/index'), ['i' => 'board', 'mode' => 'load']) . '">', '</a>', $this->settings->cfg('session_length')),
|
||||
'S_REPARSER_ACTIVE' => $this->is_reparser_active('dmzx.mchat.text_reparser.mchat_messages'),
|
||||
'U_ACTION' => $u_action,
|
||||
);
|
||||
];
|
||||
|
||||
foreach (array_keys($this->settings->global_settings()) as $key)
|
||||
foreach (array_keys($settings) as $key)
|
||||
{
|
||||
$template_data[strtoupper($key)] = $this->settings->cfg($key);
|
||||
}
|
||||
@@ -230,10 +240,10 @@ class acp_controller
|
||||
* @var array error Array with error lang keys
|
||||
* @since 2.0.0-RC7
|
||||
*/
|
||||
$vars = array(
|
||||
$vars = [
|
||||
'template_data',
|
||||
'error',
|
||||
);
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.acp_globalsettings_modify_template_data', compact($vars)));
|
||||
|
||||
$this->template->assign_vars($template_data);
|
||||
@@ -246,12 +256,12 @@ class acp_controller
|
||||
{
|
||||
add_form_key('acp_mchat');
|
||||
|
||||
$error = array();
|
||||
$error = [];
|
||||
|
||||
if ($this->request->is_set_post('submit'))
|
||||
{
|
||||
$mchat_new_config = array();
|
||||
$validation = array();
|
||||
$mchat_new_config = [];
|
||||
$validation = [];
|
||||
foreach ($this->settings->ucp_settings() as $config_name => $config_data)
|
||||
{
|
||||
$default = $this->settings->cfg($config_name, true);
|
||||
@@ -264,10 +274,7 @@ class acp_controller
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('validate_data'))
|
||||
{
|
||||
include($this->root_path . 'includes/functions_user.' . $this->php_ext);
|
||||
}
|
||||
$this->settings->include_functions('user', 'validate_data');
|
||||
|
||||
$error = array_merge($error, validate_data($mchat_new_config, $validation));
|
||||
|
||||
@@ -276,7 +283,7 @@ class acp_controller
|
||||
$error[] = 'FORM_INVALID';
|
||||
}
|
||||
|
||||
$mchat_new_user_config = array();
|
||||
$mchat_new_user_config = [];
|
||||
|
||||
if ($this->request->variable('mchat_overwrite', 0) && $this->request->variable('mchat_overwrite_confirm', 0))
|
||||
{
|
||||
@@ -295,11 +302,11 @@ class acp_controller
|
||||
* @var array error Array with error lang keys
|
||||
* @since 2.0.0-RC7
|
||||
*/
|
||||
$vars = array(
|
||||
$vars = [
|
||||
'mchat_new_config',
|
||||
'mchat_new_user_config',
|
||||
'error',
|
||||
);
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.acp_globalusersettings_update_data', compact($vars)));
|
||||
|
||||
if (!$error)
|
||||
@@ -317,13 +324,13 @@ class acp_controller
|
||||
}
|
||||
|
||||
// Add an entry into the log table
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_CONFIG_UPDATE', false, array($this->user->data['username']));
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_CONFIG_UPDATE', false, [$this->user->data['username']]);
|
||||
|
||||
trigger_error($this->user->lang('MCHAT_CONFIG_SAVED') . adm_back_link($u_action));
|
||||
trigger_error($this->lang->lang('MCHAT_CONFIG_SAVED') . adm_back_link($u_action));
|
||||
}
|
||||
|
||||
// Replace "error" strings with their real, localised form
|
||||
$error = array_map(array($this->user, 'lang'), $error);
|
||||
$error = array_map([$this->lang, 'lang'], $error);
|
||||
}
|
||||
|
||||
// Force global date format for $selected_date value, not user-specific
|
||||
@@ -335,12 +342,12 @@ class acp_controller
|
||||
$template_data[strtoupper($key)] = $this->settings->cfg($key, true);
|
||||
}
|
||||
|
||||
$template_data = array_merge($template_data, array(
|
||||
$template_data = array_merge($template_data, [
|
||||
'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,
|
||||
));
|
||||
]);
|
||||
|
||||
/**
|
||||
* Event to modify ACP global user settings template data
|
||||
@@ -350,18 +357,18 @@ class acp_controller
|
||||
* @var array error Array with error lang keys
|
||||
* @since 2.0.0-RC7
|
||||
*/
|
||||
$vars = array(
|
||||
$vars = [
|
||||
'template_data',
|
||||
'error',
|
||||
);
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.acp_globalusersettings_modify_template_data', compact($vars)));
|
||||
|
||||
$this->template->assign_vars($template_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $selected
|
||||
* @return array
|
||||
* @param int $selected
|
||||
* @return string
|
||||
*/
|
||||
protected function get_prune_mode_options($selected)
|
||||
{
|
||||
@@ -375,10 +382,33 @@ class acp_controller
|
||||
foreach ($this->settings->prune_modes as $i => $prune_mode)
|
||||
{
|
||||
$prune_mode_options .= '<option value="' . $i . '"' . (($i == $selected) ? ' selected="selected"' : '') . '>';
|
||||
$prune_mode_options .= $this->user->lang('MCHAT_ACP_' . strtoupper($prune_mode));
|
||||
$prune_mode_options .= $this->lang->lang('MCHAT_ACP_' . strtoupper($prune_mode));
|
||||
$prune_mode_options .= '</option>';
|
||||
}
|
||||
|
||||
return $prune_mode_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $reparser_name
|
||||
* @return bool
|
||||
*/
|
||||
protected function is_reparser_active($reparser_name)
|
||||
{
|
||||
$reparser_resume = $this->config_text->get('reparser_resume');
|
||||
|
||||
if (empty($reparser_resume))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$reparser_resume = @unserialize($reparser_resume);
|
||||
|
||||
if (!isset($reparser_resume[$reparser_name]['range-min']) || !isset($reparser_resume[$reparser_name]['range-max']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return $reparser_resume[$reparser_name]['range-max'] >= $reparser_resume[$reparser_name]['range-min'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ use dmzx\mchat\core\settings;
|
||||
use phpbb\auth\auth;
|
||||
use phpbb\db\driver\driver_interface as db_interface;
|
||||
use phpbb\event\dispatcher_interface;
|
||||
use phpbb\language\language;
|
||||
use phpbb\request\request_interface;
|
||||
use phpbb\template\template;
|
||||
use phpbb\user;
|
||||
@@ -27,6 +28,9 @@ class ucp_controller
|
||||
/** @var user */
|
||||
protected $user;
|
||||
|
||||
/** @var language */
|
||||
protected $lang;
|
||||
|
||||
/** @var auth */
|
||||
protected $auth;
|
||||
|
||||
@@ -37,51 +41,42 @@ class ucp_controller
|
||||
protected $request;
|
||||
|
||||
/** @var settings */
|
||||
protected $settings;
|
||||
protected $mchat_settings;
|
||||
|
||||
/** @var dispatcher_interface */
|
||||
protected $dispatcher;
|
||||
|
||||
/** @var string */
|
||||
protected $root_path;
|
||||
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param template $template
|
||||
* @param user $user
|
||||
* @param language $lang
|
||||
* @param auth $auth
|
||||
* @param db_interface $db
|
||||
* @param request_interface $request
|
||||
* @param settings $settings
|
||||
* @param settings $mchat_settings
|
||||
* @param dispatcher_interface $dispatcher
|
||||
* @param string $root_path
|
||||
* @param string $php_ext
|
||||
*/
|
||||
public function __construct(
|
||||
template $template,
|
||||
user $user,
|
||||
language $lang,
|
||||
auth $auth,
|
||||
db_interface $db,
|
||||
request_interface $request,
|
||||
settings $settings,
|
||||
dispatcher_interface $dispatcher,
|
||||
$root_path,
|
||||
$php_ext
|
||||
settings $mchat_settings,
|
||||
dispatcher_interface $dispatcher
|
||||
)
|
||||
{
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
$this->auth = $auth;
|
||||
$this->db = $db;
|
||||
$this->request = $request;
|
||||
$this->settings = $settings;
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->root_path = $root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
$this->lang = $lang;
|
||||
$this->auth = $auth;
|
||||
$this->db = $db;
|
||||
$this->request = $request;
|
||||
$this->mchat_settings = $mchat_settings;
|
||||
$this->dispatcher = $dispatcher;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,13 +88,13 @@ class ucp_controller
|
||||
{
|
||||
add_form_key('ucp_mchat');
|
||||
|
||||
$error = array();
|
||||
$error = [];
|
||||
|
||||
if ($this->request->is_set_post('submit'))
|
||||
{
|
||||
$mchat_new_config = array();
|
||||
$validation = array();
|
||||
foreach ($this->settings->ucp_settings() as $config_name => $config_data)
|
||||
$mchat_new_config = [];
|
||||
$validation = [];
|
||||
foreach ($this->mchat_settings->ucp_settings() as $config_name => $config_data)
|
||||
{
|
||||
if ($this->auth->acl_get('u_' . $config_name))
|
||||
{
|
||||
@@ -114,10 +109,7 @@ class ucp_controller
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('validate_data'))
|
||||
{
|
||||
include($this->root_path . 'includes/functions_user.' . $this->php_ext);
|
||||
}
|
||||
$this->mchat_settings->include_functions('user', 'validate_data');
|
||||
|
||||
$error = array_merge($error, validate_data($mchat_new_config, $validation));
|
||||
|
||||
@@ -134,10 +126,10 @@ class ucp_controller
|
||||
* @var array error Array with error lang keys
|
||||
* @since 2.0.0-RC7
|
||||
*/
|
||||
$vars = array(
|
||||
$vars = [
|
||||
'mchat_new_config',
|
||||
'error',
|
||||
);
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.ucp_update_data', compact($vars)));
|
||||
|
||||
if (!$error)
|
||||
@@ -148,25 +140,25 @@ 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->lang->lang('PROFILE_UPDATED') . '<br><br>' . $this->lang->lang('RETURN_UCP', '<a href="' . $u_action . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
// Replace "error" strings with their real, localised form
|
||||
$error = array_map(array($this->user, 'lang'), $error);
|
||||
$error = array_map([$this->lang, 'lang'], $error);
|
||||
}
|
||||
|
||||
$selected_date = $this->settings->cfg('mchat_date');
|
||||
$template_data = $this->settings->get_date_template_data($selected_date);
|
||||
$selected_date = $this->mchat_settings->cfg('mchat_date');
|
||||
$template_data = $this->mchat_settings->get_date_template_data($selected_date);
|
||||
|
||||
$auth_count = 0;
|
||||
|
||||
foreach (array_keys($this->settings->ucp_settings()) as $config_name)
|
||||
foreach (array_keys($this->mchat_settings->ucp_settings()) as $config_name)
|
||||
{
|
||||
$upper = strtoupper($config_name);
|
||||
$auth = $this->auth->acl_get('u_' . $config_name);
|
||||
|
||||
$template_data[$upper] = $this->settings->cfg($config_name);
|
||||
$template_data[$upper] = $this->mchat_settings->cfg($config_name);
|
||||
$template_data[$upper . '_AUTH'] = $auth;
|
||||
|
||||
if ($auth)
|
||||
@@ -175,12 +167,13 @@ class ucp_controller
|
||||
}
|
||||
}
|
||||
|
||||
$template_data = array_merge($template_data, array(
|
||||
'MCHAT_POSTS_ENABLED_LANG' => $this->settings->get_enabled_post_notifications_lang(),
|
||||
'ERROR' => sizeof($error) ? implode('<br />', $error) : '',
|
||||
'MCHAT_AUTH_COUNT' => $auth_count,
|
||||
'S_UCP_ACTION' => $u_action,
|
||||
));
|
||||
$template_data = array_merge($template_data, [
|
||||
'MCHAT_ALLOW_USE' => $this->auth->acl_get('u_mchat_use'),
|
||||
'MCHAT_POSTS_ENABLED_LANG' => $this->mchat_settings->get_enabled_post_notifications_lang(),
|
||||
'ERROR' => sizeof($error) ? implode('<br>', $error) : '',
|
||||
'MCHAT_AUTH_COUNT' => $auth_count,
|
||||
'S_UCP_ACTION' => $u_action,
|
||||
]);
|
||||
|
||||
/**
|
||||
* Event to modify UCP settings template data
|
||||
@@ -191,11 +184,11 @@ class ucp_controller
|
||||
* @var array error Array with error lang keys
|
||||
* @since 2.0.0-RC7
|
||||
*/
|
||||
$vars = array(
|
||||
$vars = [
|
||||
'template_data',
|
||||
'auth_count',
|
||||
'error',
|
||||
);
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.ucp_modify_template_data', compact($vars)));
|
||||
|
||||
$this->template->assign_vars($template_data);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
238
core/log.php
Normal file
238
core/log.php
Normal file
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\core;
|
||||
|
||||
use phpbb\cache\driver\driver_interface as cache_interface;
|
||||
use phpbb\event\dispatcher_interface;
|
||||
use phpbb\user;
|
||||
use phpbb\db\driver\driver_interface as db_interface;
|
||||
|
||||
class log
|
||||
{
|
||||
/** @var settings */
|
||||
protected $mchat_settings;
|
||||
|
||||
/** @var user */
|
||||
protected $user;
|
||||
|
||||
/** @var db_interface */
|
||||
protected $db;
|
||||
|
||||
/** @var cache_interface */
|
||||
protected $cache;
|
||||
|
||||
/** @var dispatcher_interface */
|
||||
protected $dispatcher;
|
||||
|
||||
/** @var array */
|
||||
protected $log_types;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param settings $mchat_settings
|
||||
* @param user $user
|
||||
* @param db_interface $db
|
||||
* @param cache_interface $cache
|
||||
* @param dispatcher_interface $dispatcher
|
||||
*/
|
||||
public function __construct(
|
||||
settings $mchat_settings,
|
||||
user $user,
|
||||
db_interface $db,
|
||||
cache_interface $cache,
|
||||
dispatcher_interface $dispatcher
|
||||
)
|
||||
{
|
||||
$this->mchat_settings = $mchat_settings;
|
||||
$this->user = $user;
|
||||
$this->db = $db;
|
||||
$this->cache = $cache;
|
||||
$this->dispatcher = $dispatcher;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array with all registered log types
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_types()
|
||||
{
|
||||
if (!$this->log_types)
|
||||
{
|
||||
// Default log types
|
||||
$log_types = [
|
||||
1 => 'edit',
|
||||
2 => 'del',
|
||||
];
|
||||
|
||||
/**
|
||||
* Event that allows adding log types
|
||||
*
|
||||
* @event dmzx.mchat.log_types_init
|
||||
* @var array log_types Array containing log types
|
||||
* @since 2.1.0-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'log_types',
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.log_types_init', compact($vars)));
|
||||
|
||||
$this->log_types = $log_types;
|
||||
}
|
||||
|
||||
return $this->log_types;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the log type ID for the given string type
|
||||
*
|
||||
* @param string $type
|
||||
* @return int
|
||||
*/
|
||||
public function get_type_id($type)
|
||||
{
|
||||
return (int) array_search($type, $this->get_types());
|
||||
}
|
||||
|
||||
/**
|
||||
* @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, or 0 if no log row was added
|
||||
*/
|
||||
public function add_log($log_type, $message_id)
|
||||
{
|
||||
$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();
|
||||
|
||||
$this->cache->destroy('sql', $this->mchat_settings->get_table_mchat_log());
|
||||
|
||||
return $log_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches log entries from the database and sorts them
|
||||
*
|
||||
* @param int $log_id The ID of the latest log entry that the user has
|
||||
* @return array
|
||||
*/
|
||||
public function get_logs($log_id)
|
||||
{
|
||||
$sql_array = [
|
||||
'SELECT' => 'ml.*',
|
||||
'FROM' => [$this->mchat_settings->get_table_mchat_log() => 'ml'],
|
||||
'WHERE' => 'ml.log_id > ' . (int) $log_id,
|
||||
];
|
||||
|
||||
$sql = $this->db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $this->db->sql_query($sql, 3600);
|
||||
$rows = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$log_rows = array_merge(array_fill_keys($this->get_types(), []), [
|
||||
'latest' => (int) $log_id,
|
||||
]);
|
||||
|
||||
$log_types = $this->get_types();
|
||||
$edit_delete_limit = $this->mchat_settings->cfg('mchat_edit_delete_limit');
|
||||
$time_limit = $edit_delete_limit ? time() - $edit_delete_limit : 0;
|
||||
|
||||
foreach ($rows as $log_row)
|
||||
{
|
||||
$log_rows['latest'] = max($log_rows['latest'], (int) $log_row['log_id']);
|
||||
|
||||
$log_type = $log_row['log_type'];
|
||||
|
||||
if (isset($log_types[$log_type]))
|
||||
{
|
||||
if ($log_row['user_id'] != $this->user->data['user_id'] && $log_row['log_time'] > $time_limit)
|
||||
{
|
||||
$log_type_name = $log_types[$log_type];
|
||||
$log_rows[$log_type_name][] = (int) $log_row['message_id'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event that allows processing log messages
|
||||
*
|
||||
* @event dmzx.mchat.action_refresh_process_log_row
|
||||
* @var array log_row The log data (read only)
|
||||
* @since 2.0.0-RC6
|
||||
* @changed 2.1.2 Removed response
|
||||
*/
|
||||
$vars = [
|
||||
'log_row',
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.action_refresh_process_log_row', compact($vars)));
|
||||
|
||||
unset($log_row);
|
||||
}
|
||||
|
||||
return $log_rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the highest log ID
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function get_latest_id()
|
||||
{
|
||||
$sql_array = [
|
||||
'SELECT' => 'ml.log_id',
|
||||
'FROM' => [$this->mchat_settings->get_table_mchat_log() => 'ml'],
|
||||
'ORDER_BY' => 'log_id DESC',
|
||||
];
|
||||
|
||||
$sql = $this->db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $this->db->sql_query_limit($sql, 1);
|
||||
$max_log_id = (int) $this->db->sql_fetchfield('log_id');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return $max_log_id;
|
||||
}
|
||||
}
|
||||
1047
core/mchat.php
1047
core/mchat.php
File diff suppressed because it is too large
Load Diff
453
core/notifications.php
Normal file
453
core/notifications.php
Normal file
@@ -0,0 +1,453 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\core;
|
||||
|
||||
use phpbb\auth\auth;
|
||||
use phpbb\event\dispatcher_interface;
|
||||
use phpbb\language\language;
|
||||
use phpbb\textformatter\parser_interface;
|
||||
use phpbb\user;
|
||||
use phpbb\db\driver\driver_interface as db_interface;
|
||||
|
||||
class notifications
|
||||
{
|
||||
/**
|
||||
* Value of the phpbb_mchat.post_id field for login notification
|
||||
* messages if the user session is visible at the time of login
|
||||
*/
|
||||
const LOGIN_VISIBLE = 1;
|
||||
|
||||
/**
|
||||
* Value of the phpbb_mchat.post_id field for login notification
|
||||
* messages if the user session is hidden at the time of login
|
||||
*/
|
||||
const LOGIN_HIDDEN = 2;
|
||||
|
||||
/**
|
||||
* A notification of a new topic, quote, edit or reply
|
||||
*/
|
||||
const POST = 3;
|
||||
|
||||
/** @var settings */
|
||||
protected $mchat_settings;
|
||||
|
||||
/** @var user */
|
||||
protected $user;
|
||||
|
||||
/** @var language */
|
||||
protected $lang;
|
||||
|
||||
/** @var auth */
|
||||
protected $auth;
|
||||
|
||||
/** @var db_interface */
|
||||
protected $db;
|
||||
|
||||
/** @var dispatcher_interface */
|
||||
protected $dispatcher;
|
||||
|
||||
/** @var parser_interface */
|
||||
protected $textformatter_parser;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param settings $mchat_settings
|
||||
* @param user $user
|
||||
* @param language $lang
|
||||
* @param auth $auth
|
||||
* @param db_interface $db
|
||||
* @param dispatcher_interface $dispatcher
|
||||
* @param parser_interface $textformatter_parser
|
||||
*/
|
||||
public function __construct(
|
||||
settings $mchat_settings,
|
||||
user $user,
|
||||
language $lang,
|
||||
auth $auth,
|
||||
db_interface $db,
|
||||
dispatcher_interface $dispatcher,
|
||||
parser_interface $textformatter_parser
|
||||
)
|
||||
{
|
||||
$this->mchat_settings = $mchat_settings;
|
||||
$this->user = $user;
|
||||
$this->lang = $lang;
|
||||
$this->auth = $auth;
|
||||
$this->db = $db;
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->textformatter_parser = $textformatter_parser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether or not the given message row is a notification
|
||||
*
|
||||
* @param array $row The message row
|
||||
* @return int the notification type, or 0 if the $row is not a notification
|
||||
*/
|
||||
public function is_notification($row)
|
||||
{
|
||||
// If post_id is 0 it's not a notification
|
||||
if (isset($row['post_id']) && $row['post_id'])
|
||||
{
|
||||
// If forum_id is 0 it's a login notification
|
||||
if (isset($row['forum_id']) && !$row['forum_id'])
|
||||
{
|
||||
// post_id is either LOGIN_VISIBLE or LOGIN_HIDDEN
|
||||
return $row['post_id'];
|
||||
}
|
||||
|
||||
return self::POST;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the post rows for notifications and converts their language keys
|
||||
*
|
||||
* @param array $rows The rows to modify
|
||||
* @return array
|
||||
*/
|
||||
public function process($rows)
|
||||
{
|
||||
// All language keys of valid notifications. We need to check for them here because
|
||||
// notifications in < 2.0.0-RC6 are plain text and don't need to be processed.
|
||||
$notification_lang = [
|
||||
'MCHAT_NEW_POST',
|
||||
'MCHAT_NEW_QUOTE',
|
||||
'MCHAT_NEW_EDIT',
|
||||
'MCHAT_NEW_REPLY',
|
||||
'MCHAT_NEW_LOGIN',
|
||||
];
|
||||
|
||||
/**
|
||||
* Event that allows to modify rows and language keys before checking for notifications
|
||||
*
|
||||
* @event dmzx.mchat.process_notifications_before
|
||||
* @var array rows Message rows about to be checked for notifications
|
||||
* @var array notification_lang Unprocessed language keys of valid/known notifications
|
||||
* @since 2.1.4-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'rows',
|
||||
'notification_lang',
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.process_notifications_before', compact($vars)));
|
||||
|
||||
$notification_langs = array_merge(
|
||||
// Raw notification messages in phpBB < 3.2
|
||||
array_combine($notification_lang, $notification_lang),
|
||||
// XML notification messages in phpBB >= 3.2
|
||||
array_combine(array_map([$this->textformatter_parser, 'parse'], $notification_lang), $notification_lang)
|
||||
);
|
||||
|
||||
$notifications = [];
|
||||
$post_ids = [];
|
||||
|
||||
foreach ($rows as $i => $row)
|
||||
{
|
||||
$type = $this->is_notification($row);
|
||||
|
||||
if ($type && isset($notification_langs[$row['message']]))
|
||||
{
|
||||
$notifications[$i] = $type;
|
||||
|
||||
if ($type == self::POST)
|
||||
{
|
||||
$post_ids[$i] = $row['post_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$notification_post_data = $this->mchat_get_post_data($post_ids);
|
||||
|
||||
foreach ($notifications as $i => $type)
|
||||
{
|
||||
$lang_key = $notification_langs[$rows[$i]['message']];
|
||||
$post_data = $type == self::POST ? $notification_post_data[$post_ids[$i]] : null;
|
||||
$rows[$i] = $this->process_notification($rows[$i], $type, $lang_key, $post_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Event that allows to modify rows after processing their notifications
|
||||
*
|
||||
* @event dmzx.mchat.process_notifications_after
|
||||
* @var array rows Message rows about to be checked for notifications
|
||||
* @var array notification_lang Unprocessed language keys of valid/known notifications
|
||||
* @var array notification_langs Processed language keys of valid/known notifications
|
||||
* @var array notification_post_data Post data of notifications found in the rows array
|
||||
* @since 2.1.4-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'rows',
|
||||
'notification_lang',
|
||||
'notification_langs',
|
||||
'notification_post_data',
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.process_notifications_after', compact($vars)));
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches post subjects and their forum names. If a post_id can't be found the value for the post_id is set to null.
|
||||
*
|
||||
* @param array $post_ids
|
||||
* @return array
|
||||
*/
|
||||
protected function mchat_get_post_data($post_ids)
|
||||
{
|
||||
if (!$post_ids)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
$sql_array = [
|
||||
'SELECT' => 'p.post_id, p.post_subject, f.forum_id, f.forum_name',
|
||||
'FROM' => [POSTS_TABLE => 'p', FORUMS_TABLE => 'f'],
|
||||
'WHERE' => 'p.forum_id = f.forum_id AND ' . $this->db->sql_in_set('p.post_id', $post_ids),
|
||||
];
|
||||
|
||||
$sql = $this->db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $this->db->sql_query($sql);
|
||||
$rows = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$existing_post_ids = array_column($rows, 'post_id');
|
||||
$existing_posts = array_combine($existing_post_ids, $rows);
|
||||
|
||||
// Map IDs of missing posts to null
|
||||
$missing_posts = array_fill_keys(array_diff($post_ids, $existing_post_ids), null);
|
||||
|
||||
return $existing_posts + $missing_posts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the message field of the post row so that it can be passed to generate_text_for_display()
|
||||
*
|
||||
* @param array $row
|
||||
* @param int $type
|
||||
* @param string $lang_key
|
||||
* @param array $post_data
|
||||
* @return array
|
||||
*/
|
||||
protected function process_notification($row, $type, $lang_key, $post_data = null)
|
||||
{
|
||||
$lang_args = [];
|
||||
$replacements = [];
|
||||
|
||||
$post_subject_placeholder = '%POST_SUBJECT%';
|
||||
$forum_name_placeholder = '%FORUM_NAME%';
|
||||
|
||||
if ($type == self::POST)
|
||||
{
|
||||
if ($post_data)
|
||||
{
|
||||
$viewtopic_url = append_sid($this->mchat_settings->url('viewtopic', true), [
|
||||
'p' => $row['post_id'],
|
||||
'#' => 'p' . $row['post_id'],
|
||||
]);
|
||||
|
||||
// We prefer $post_data because it was fetched from the forums table just now.
|
||||
// $row might contain outdated data if a post was moved to a new forum.
|
||||
$forum_id = isset($post_data['forum_id']) ? $post_data['forum_id'] : $row['forum_id'];
|
||||
|
||||
$viewforum_url = append_sid($this->mchat_settings->url('viewforum', true), [
|
||||
'f' => $forum_id,
|
||||
]);
|
||||
|
||||
$lang_args[] = '[url=' . $viewtopic_url . ']' . $post_subject_placeholder . '[/url]';
|
||||
$lang_args[] = '[url=' . $viewforum_url . ']' . $forum_name_placeholder . '[/url]';
|
||||
|
||||
$replacements = [
|
||||
$post_subject_placeholder => $post_data['post_subject'],
|
||||
$forum_name_placeholder => $post_data['forum_name'],
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang_key .= '_DELETED';
|
||||
}
|
||||
}
|
||||
else if ($type == self::LOGIN_HIDDEN)
|
||||
{
|
||||
$row['username'] = '<em>' . $row['username'] . '</em>';
|
||||
}
|
||||
|
||||
$row['message'] = $this->lang->lang_array($lang_key, $lang_args);
|
||||
|
||||
// Quick'n'dirty check if BBCodes are in the message
|
||||
if (strpos($row['message'], '[') !== false)
|
||||
{
|
||||
generate_text_for_storage($row['message'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options'], true, true, true, true, true, true, true, 'mchat');
|
||||
}
|
||||
|
||||
$row['message'] = strtr($row['message'], $replacements);
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a message with posting information into the database
|
||||
*
|
||||
* @param string $mode One of post|quote|edit|reply
|
||||
* @param int $forum_id
|
||||
* @param int $post_id
|
||||
*/
|
||||
public function insert_post($mode, $forum_id, $post_id)
|
||||
{
|
||||
$this->insert($mode, $forum_id, $post_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a message with login information into the database
|
||||
*
|
||||
* @param bool $is_hidden
|
||||
*/
|
||||
public function insert_login($is_hidden)
|
||||
{
|
||||
$this->insert('login', 0, $is_hidden ? self::LOGIN_HIDDEN : self::LOGIN_VISIBLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a message with posting or login information into the database
|
||||
*
|
||||
* @param string $mode One of post|quote|edit|reply|login
|
||||
* @param int $forum_id
|
||||
* @param int $post_id Can be 0 if mode is login.
|
||||
*/
|
||||
protected function insert($mode, $forum_id, $post_id)
|
||||
{
|
||||
$mode_config = [
|
||||
'post' => 'mchat_posts_topic',
|
||||
'quote' => 'mchat_posts_quote',
|
||||
'edit' => 'mchat_posts_edit',
|
||||
'reply' => 'mchat_posts_reply',
|
||||
'login' => 'mchat_posts_login',
|
||||
];
|
||||
|
||||
$is_mode_enabled = !empty($mode_config[$mode]) && $this->mchat_settings->cfg($mode_config[$mode]) && (!$this->mchat_settings->cfg('mchat_posts_auth_check') || $this->can_use_mchat());
|
||||
|
||||
$sql_array = [
|
||||
'forum_id' => (int) $forum_id,
|
||||
'post_id' => (int) $post_id,
|
||||
'user_id' => (int) $this->user->data['user_id'],
|
||||
'user_ip' => $this->user->ip,
|
||||
'message' => $this->textformatter_parser->parse('MCHAT_NEW_' . strtoupper($mode)),
|
||||
'message_time' => time(),
|
||||
];
|
||||
|
||||
/**
|
||||
* Event that allows to modify data of a posting or login notification before it is inserted in the database
|
||||
*
|
||||
* @event dmzx.mchat.insert_posting_before
|
||||
* @var string mode The posting mode, one of post|quote|edit|reply|login
|
||||
* @var int forum_id The ID of the forum where the post was made, or 0 if mode is login.
|
||||
* @var int post_id The ID of the post that was made. If mode is login this value is
|
||||
* one of the constants LOGIN_HIDDEN|LOGIN_VISIBLE
|
||||
* @var array is_mode_enabled Whether or not the posting should be added to the database.
|
||||
* @var array sql_array An array containing the data that is about to be inserted into the messages table.
|
||||
* @since 2.0.0-RC6
|
||||
* @changed 2.1.0-RC1 Removed is_hidden_login
|
||||
*/
|
||||
$vars = [
|
||||
'mode',
|
||||
'forum_id',
|
||||
'post_id',
|
||||
'is_mode_enabled',
|
||||
'sql_array',
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.insert_posting_before', compact($vars)));
|
||||
|
||||
if ($is_mode_enabled)
|
||||
{
|
||||
$sql = 'INSERT INTO ' . $this->mchat_settings->get_table_mchat() . ' ' . $this->db->sql_build_array('INSERT', $sql_array);
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The user might have just logged in successfully in which case the permissions haven't been updated yet.
|
||||
* Let's do that here so that notifications are recorded correctly.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function can_use_mchat()
|
||||
{
|
||||
if ($this->auth->acl_get('u_mchat_use'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$auth = new auth();
|
||||
$auth->acl($this->user->data);
|
||||
return $auth->acl_get('u_mchat_use');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates an SQL WHERE condition to include or exlude notifacation
|
||||
* messages based on the current user's settings and permissions
|
||||
*
|
||||
* @param string $mode One of user|exclude. user mode uses the current user's settings to decide which notifications
|
||||
* to exclude. exclude mode always excludes all notifications.
|
||||
* @return string
|
||||
*/
|
||||
public function get_sql_where($mode = 'user')
|
||||
{
|
||||
// Exclude all post notifications
|
||||
if ($mode == 'exclude' || !$this->mchat_settings->cfg('mchat_posts'))
|
||||
{
|
||||
return 'm.post_id = 0';
|
||||
}
|
||||
|
||||
// If the current user doesn't have permission to see hidden users, exclude their login posts
|
||||
if (!$this->auth->acl_get('u_viewonline'))
|
||||
{
|
||||
return implode(' OR ', [
|
||||
'm.post_id <> ' . self::LOGIN_HIDDEN, // Exclude all notifications that were created by hidden users ...
|
||||
'm.user_id = ' . (int) $this->user->data['user_id'], // ... but include all login notifications of the current user
|
||||
'm.forum_id <> 0', // ... and include all post notifications
|
||||
]);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete post notification messages, for example when disapproving posts
|
||||
*
|
||||
* @param array $post_ids
|
||||
*/
|
||||
public function delete_post_notifications($post_ids)
|
||||
{
|
||||
if ($post_ids)
|
||||
{
|
||||
$sql = 'DELETE FROM ' . $this->mchat_settings->get_table_mchat() . '
|
||||
WHERE forum_id <> 0 AND ' . $this->db->sql_in_set('post_id', $post_ids);
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the user to which a post notification belongs
|
||||
*
|
||||
* @param int $post_id
|
||||
* @param int $user_id
|
||||
*/
|
||||
public function update_post_notification_user($post_id, $user_id)
|
||||
{
|
||||
$sql = 'UPDATE ' . $this->mchat_settings->get_table_mchat() . '
|
||||
SET user_id = ' . (int) $user_id . '
|
||||
WHERE forum_id <> 0 AND post_id = ' . (int) $post_id;
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,10 @@ namespace dmzx\mchat\core;
|
||||
|
||||
use phpbb\auth\auth;
|
||||
use phpbb\config\config;
|
||||
use phpbb\config\db_text;
|
||||
use phpbb\event\dispatcher_interface;
|
||||
use phpbb\exception\runtime_exception;
|
||||
use phpbb\language\language;
|
||||
use phpbb\user;
|
||||
|
||||
class settings
|
||||
@@ -21,15 +24,39 @@ class settings
|
||||
/** @var user */
|
||||
protected $user;
|
||||
|
||||
/** @var language */
|
||||
protected $lang;
|
||||
|
||||
/** @var config */
|
||||
protected $config;
|
||||
|
||||
/** @var db_text */
|
||||
protected $config_text;
|
||||
|
||||
/** @var auth */
|
||||
protected $auth;
|
||||
|
||||
/** @var dispatcher_interface */
|
||||
protected $dispatcher;
|
||||
|
||||
/** @var string */
|
||||
protected $root_path;
|
||||
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
|
||||
/** @var string */
|
||||
protected $mchat_table;
|
||||
|
||||
/** @var string */
|
||||
protected $mchat_log_table;
|
||||
|
||||
/** @var string */
|
||||
protected $mchat_sessions_table;
|
||||
|
||||
/** @var string */
|
||||
protected $board_url;
|
||||
|
||||
/**
|
||||
* Keys for global settings that only the administrator is allowed to modify.
|
||||
* The values are stored in the phpbb_config table.
|
||||
@@ -38,6 +65,21 @@ class settings
|
||||
*/
|
||||
protected $global_settings;
|
||||
|
||||
/**
|
||||
* Keys for global text settings that only the administrator is allowed to modify.
|
||||
* The values are stored in the phpbb_config_text table.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $global_text_settings;
|
||||
|
||||
/**
|
||||
* Values for global text settings.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $global_text_values;
|
||||
|
||||
/**
|
||||
* Keys for user-specific settings for which the administrator can set default
|
||||
* values as well as adjust permissions to allow users to customize them.
|
||||
@@ -55,41 +97,60 @@ class settings
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $prune_modes = array(
|
||||
public $prune_modes = [
|
||||
0 => 'messages',
|
||||
1 => 'hours',
|
||||
24 => 'days',
|
||||
168 => 'weeks',
|
||||
);
|
||||
];
|
||||
|
||||
/** @var bool */
|
||||
public $is_phpbb31;
|
||||
|
||||
/** @var bool */
|
||||
public $is_phpbb32;
|
||||
/**
|
||||
* Possible values of the global setting mchat_archive_sort
|
||||
*/
|
||||
const ARCHIVE_SORT_TOP_BOTTOM = 0;
|
||||
const ARCHIVE_SORT_BOTTOM_TOP = 1;
|
||||
const ARCHIVE_SORT_USER = 2;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param user $user
|
||||
* @param language $lang
|
||||
* @param config $config
|
||||
* @param db_text $config_text
|
||||
* @param auth $auth
|
||||
* @param dispatcher_interface $dispatcher
|
||||
* @param string $root_path
|
||||
* @param string $php_ext
|
||||
* @param string $mchat_table
|
||||
* @param string $mchat_log_table
|
||||
* @param string $mchat_sessions_table
|
||||
*/
|
||||
public function __construct(
|
||||
user $user,
|
||||
language $lang,
|
||||
config $config,
|
||||
db_text $config_text,
|
||||
auth $auth,
|
||||
dispatcher_interface $dispatcher
|
||||
dispatcher_interface $dispatcher,
|
||||
$root_path,
|
||||
$php_ext,
|
||||
$mchat_table,
|
||||
$mchat_log_table,
|
||||
$mchat_sessions_table
|
||||
)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->config = $config;
|
||||
$this->auth = $auth;
|
||||
$this->dispatcher = $dispatcher;
|
||||
|
||||
$this->is_phpbb31 = phpbb_version_compare(PHPBB_VERSION, '3.1.0@dev', '>=') && phpbb_version_compare(PHPBB_VERSION, '3.2.0@dev', '<');
|
||||
$this->is_phpbb32 = phpbb_version_compare(PHPBB_VERSION, '3.2.0@dev', '>=') && phpbb_version_compare(PHPBB_VERSION, '3.3.0@dev', '<');
|
||||
$this->user = $user;
|
||||
$this->lang = $lang;
|
||||
$this->config = $config;
|
||||
$this->config_text = $config_text;
|
||||
$this->auth = $auth;
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->root_path = $root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
$this->mchat_table = $mchat_table;
|
||||
$this->mchat_log_table = $mchat_log_table;
|
||||
$this->mchat_sessions_table = $mchat_sessions_table;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,37 +158,39 @@ class settings
|
||||
*/
|
||||
public function initialize_global_settings()
|
||||
{
|
||||
$global_settings = array(
|
||||
'mchat_bbcode_disallowed' => array('default' => '', 'validation' => array('string', false, 0, 255)),
|
||||
'mchat_custom_height' => array('default' => 350, 'validation' => array('num', false, 50, 1000)),
|
||||
'mchat_custom_page' => array('default' => 1),
|
||||
'mchat_edit_delete_limit' => array('default' => 0),
|
||||
'mchat_flood_time' => array('default' => 0, 'validation' => array('num', false, 0, 60)),
|
||||
'mchat_index_height' => array('default' => 250, 'validation' => array('num', false, 50, 1000)),
|
||||
'mchat_live_updates' => array('default' => 1),
|
||||
'mchat_max_message_lngth' => array('default' => 500, 'validation' => array('num', false, 0, 1000)),
|
||||
'mchat_message_num_archive' => array('default' => 25, 'validation' => array('num', false, 10, 100)),
|
||||
'mchat_message_num_custom' => array('default' => 10, 'validation' => array('num', false, 5, 50)),
|
||||
'mchat_message_num_index' => array('default' => 10, 'validation' => array('num', false, 5, 50)),
|
||||
'mchat_navbar_link' => array('default' => 1),
|
||||
'mchat_navbar_link_count' => array('default' => 1),
|
||||
'mchat_override_min_post_chars' => array('default' => 0),
|
||||
'mchat_override_smilie_limit' => array('default' => 0),
|
||||
'mchat_posts_edit' => array('default' => 0),
|
||||
'mchat_posts_quote' => array('default' => 0),
|
||||
'mchat_posts_reply' => array('default' => 0),
|
||||
'mchat_posts_topic' => array('default' => 0),
|
||||
'mchat_posts_login' => array('default' => 0),
|
||||
'mchat_prune' => array('default' => 0),
|
||||
'mchat_prune_gc' => array('default' => strtotime('1 day', 0)),
|
||||
'mchat_prune_mode' => array('default' => 0),
|
||||
'mchat_prune_num' => array('default' => 0),
|
||||
'mchat_refresh' => array('default' => 10, 'validation' => array('num', false, 5, 60)),
|
||||
'mchat_rules' => array('default' => '', 'validation' => array('string', false, 0, 255)),
|
||||
'mchat_static_message' => array('default' => '', 'validation' => array('string', false, 0, 255)),
|
||||
'mchat_timeout' => array('default' => 0, 'validation' => array('num', false, 0, (int) $this->cfg('session_length'))),
|
||||
'mchat_whois_refresh' => array('default' => 60, 'validation' => array('num', false, 10, 300)),
|
||||
);
|
||||
$global_settings = [
|
||||
'mchat_archive_sort' => ['default' => self::ARCHIVE_SORT_BOTTOM_TOP],
|
||||
'mchat_bbcode_disallowed' => ['default' => '', 'validation' => ['string', false, 0, 255]],
|
||||
'mchat_custom_height' => ['default' => 350, 'validation' => ['num', false, 50, 1000]],
|
||||
'mchat_custom_page' => ['default' => 1],
|
||||
'mchat_edit_delete_limit' => ['default' => 0],
|
||||
'mchat_flood_time' => ['default' => 0, 'validation' => ['num', false, 0, 3600]],
|
||||
'mchat_flood_messages' => ['default' => 0, 'validation' => ['num', false, 0, 100]],
|
||||
'mchat_index_height' => ['default' => 250, 'validation' => ['num', false, 50, 1000]],
|
||||
'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],
|
||||
'mchat_message_num_archive' => ['default' => 25, 'validation' => ['num', false, 10, 100]],
|
||||
'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],
|
||||
'mchat_posts_auth_check' => ['default' => 0],
|
||||
'mchat_posts_edit' => ['default' => 0],
|
||||
'mchat_posts_quote' => ['default' => 0],
|
||||
'mchat_posts_reply' => ['default' => 0],
|
||||
'mchat_posts_topic' => ['default' => 0],
|
||||
'mchat_posts_login' => ['default' => 0],
|
||||
'mchat_prune' => ['default' => 0],
|
||||
'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, 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]],
|
||||
];
|
||||
|
||||
/**
|
||||
* Event to modify global settings data
|
||||
@@ -136,35 +199,58 @@ class settings
|
||||
* @var array global_settings Array containing global settings data
|
||||
* @since 2.0.0-RC7
|
||||
*/
|
||||
$vars = array(
|
||||
$vars = [
|
||||
'global_settings',
|
||||
);
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.global_settings_modify', compact($vars)));
|
||||
|
||||
return $global_settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function initialize_global_text_settings()
|
||||
{
|
||||
$global_text_settings = [
|
||||
'mchat_rules' => ['default' => ''],
|
||||
'mchat_static_message' => ['default' => ''],
|
||||
];
|
||||
|
||||
/**
|
||||
* Event to modify global text settings data
|
||||
*
|
||||
* @event dmzx.mchat.global_text_settings_modify
|
||||
* @var array global_text_settings Array containing global text settings data
|
||||
* @since 2.0.2
|
||||
*/
|
||||
$vars = [
|
||||
'global_text_settings',
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.global_text_settings_modify', compact($vars)));
|
||||
|
||||
return $global_text_settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function initialize_ucp_settings()
|
||||
{
|
||||
$ucp_settings = array(
|
||||
'mchat_avatars' => array('default' => 1),
|
||||
'mchat_capital_letter' => array('default' => 1),
|
||||
'mchat_character_count' => array('default' => 1),
|
||||
'mchat_date' => array('default' => 'D M d, Y g:i a', 'validation' => array('string', false, 0, 64)),
|
||||
'mchat_index' => array('default' => 1),
|
||||
'mchat_input_area' => array('default' => 1),
|
||||
'mchat_location' => array('default' => 1),
|
||||
'mchat_message_top' => array('default' => 1),
|
||||
'mchat_pause_on_input' => array('default' => 0),
|
||||
'mchat_posts' => array('default' => 1),
|
||||
'mchat_relative_time' => array('default' => 1),
|
||||
'mchat_sound' => array('default' => 1),
|
||||
'mchat_stats_index' => array('default' => 0),
|
||||
'mchat_whois_index' => array('default' => 1),
|
||||
);
|
||||
$ucp_settings = [
|
||||
'mchat_avatars' => ['default' => 1],
|
||||
'mchat_capital_letter' => ['default' => 1],
|
||||
'mchat_character_count' => ['default' => 1],
|
||||
'mchat_date' => ['default' => 'D M d, Y g:i a', 'validation' => ['string', false, 0, 64]],
|
||||
'mchat_index' => ['default' => 1],
|
||||
'mchat_location' => ['default' => 1],
|
||||
'mchat_message_top' => ['default' => 1],
|
||||
'mchat_posts' => ['default' => 1],
|
||||
'mchat_relative_time' => ['default' => 1],
|
||||
'mchat_sound' => ['default' => 1],
|
||||
'mchat_stats_index' => ['default' => 0],
|
||||
'mchat_whois_index' => ['default' => 1],
|
||||
];
|
||||
|
||||
/**
|
||||
* Event to modify UCP settings data
|
||||
@@ -173,9 +259,9 @@ class settings
|
||||
* @var array ucp_settings Array containing UCP settings data
|
||||
* @since 2.0.0-RC7
|
||||
*/
|
||||
$vars = array(
|
||||
$vars = [
|
||||
'ucp_settings',
|
||||
);
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.ucp_settings_modify', compact($vars)));
|
||||
|
||||
return $ucp_settings;
|
||||
@@ -194,6 +280,46 @@ class settings
|
||||
return $this->global_settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function global_text_settings()
|
||||
{
|
||||
if (empty($this->global_text_settings))
|
||||
{
|
||||
$this->global_text_settings = $this->initialize_global_text_settings();
|
||||
}
|
||||
|
||||
return $this->global_text_settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function global_text_values()
|
||||
{
|
||||
if (empty($this->global_text_values))
|
||||
{
|
||||
$global_text_values = $this->config_text->get_array(array_keys($this->global_text_settings()));
|
||||
|
||||
/**
|
||||
* Event to modify global text values
|
||||
*
|
||||
* @event dmzx.mchat.global_text_values_modify
|
||||
* @var array global_text_values Array containing global text values
|
||||
* @since 2.0.2
|
||||
*/
|
||||
$vars = [
|
||||
'global_text_values',
|
||||
];
|
||||
extract($this->dispatcher->trigger_event('dmzx.mchat.global_text_values_modify', compact($vars)));
|
||||
|
||||
$this->global_text_values = $global_text_values;
|
||||
}
|
||||
|
||||
return $this->global_text_values;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
@@ -226,23 +352,53 @@ class settings
|
||||
*/
|
||||
public function cfg_user($config, $user_data, $auth, $force_global = false)
|
||||
{
|
||||
$ucp_settings = $this->ucp_settings();
|
||||
|
||||
if (!$force_global && isset($ucp_settings[$config]) && $auth->acl_get('u_' . $config))
|
||||
if (!$force_global)
|
||||
{
|
||||
return $user_data['user_' . $config];
|
||||
$ucp_settings = $this->ucp_settings();
|
||||
|
||||
if (isset($ucp_settings[$config]) && $auth->acl_get('u_' . $config))
|
||||
{
|
||||
return $user_data['user_' . $config];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->config[$config];
|
||||
if (isset($this->config[$config]))
|
||||
{
|
||||
return $this->config[$config];
|
||||
}
|
||||
|
||||
$global_text_settings = $this->global_text_settings();
|
||||
|
||||
if (isset($global_text_settings[$config]))
|
||||
{
|
||||
$global_text_values = $this->global_text_values();
|
||||
return $global_text_values[$config];
|
||||
}
|
||||
|
||||
throw new runtime_exception();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $config
|
||||
* @param $value
|
||||
* @param string $config
|
||||
* @param mixed $value
|
||||
* @param bool $volatile
|
||||
*/
|
||||
public function set_cfg($config, $value, $volatile = false)
|
||||
{
|
||||
$global_text_settings = $this->global_text_settings();
|
||||
|
||||
if (isset($global_text_settings[$config]))
|
||||
{
|
||||
$this->global_text_values[$config] = $value;
|
||||
|
||||
if (!$volatile)
|
||||
{
|
||||
$this->config_text->set($config, $value);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($volatile)
|
||||
{
|
||||
$this->config[$config] = $value;
|
||||
@@ -253,6 +409,30 @@ class settings
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function get_table_mchat()
|
||||
{
|
||||
return $this->mchat_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function get_table_mchat_log()
|
||||
{
|
||||
return $this->mchat_log_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function get_table_mchat_sessions()
|
||||
{
|
||||
return $this->mchat_sessions_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $selected
|
||||
* @return array
|
||||
@@ -260,31 +440,32 @@ class settings
|
||||
public function get_date_template_data($selected)
|
||||
{
|
||||
$dateformat_options = '';
|
||||
$dateformats = $this->lang->lang_raw('dateformats');
|
||||
|
||||
foreach ($this->user->lang['dateformats'] as $format => $null)
|
||||
foreach (array_keys($dateformats) as $format)
|
||||
{
|
||||
$dateformat_options .= '<option value="' . $format . '"' . (($format == $selected) ? ' selected="selected"' : '') . '>';
|
||||
$dateformat_options .= $this->user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $this->user->lang('VARIANT_DATE_SEPARATOR') . $this->user->format_date(time(), $format, true) : '');
|
||||
$dateformat_options .= $this->user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $this->lang->lang('VARIANT_DATE_SEPARATOR') . $this->user->format_date(time(), $format, true) : '');
|
||||
$dateformat_options .= '</option>';
|
||||
}
|
||||
|
||||
$s_custom = false;
|
||||
|
||||
$dateformat_options .= '<option value="custom"';
|
||||
if (!isset($this->user->lang['dateformats'][$selected]))
|
||||
if (!isset($dateformats[$selected]))
|
||||
{
|
||||
$dateformat_options .= ' selected="selected"';
|
||||
$s_custom = true;
|
||||
}
|
||||
$dateformat_options .= '>' . $this->user->lang('MCHAT_CUSTOM_DATEFORMAT') . '</option>';
|
||||
$dateformat_options .= '>' . $this->lang->lang('MCHAT_CUSTOM_DATEFORMAT') . '</option>';
|
||||
|
||||
$ucp_settings = $this->ucp_settings();
|
||||
|
||||
return array(
|
||||
return [
|
||||
'S_MCHAT_DATEFORMAT_OPTIONS' => $dateformat_options,
|
||||
'A_MCHAT_DEFAULT_DATEFORMAT' => addslashes($ucp_settings['mchat_date']['default']),
|
||||
'MCHAT_DEFAULT_DATEFORMAT' => $ucp_settings['mchat_date']['default'],
|
||||
'S_MCHAT_CUSTOM_DATEFORMAT' => $s_custom,
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,16 +473,72 @@ class settings
|
||||
*/
|
||||
public function get_enabled_post_notifications_lang()
|
||||
{
|
||||
$enabled_notifications_lang = array();
|
||||
$enabled_notifications_lang = [];
|
||||
|
||||
foreach (array('topic', 'reply', 'quote', 'edit', 'login') as $notification)
|
||||
foreach (['topic', 'reply', 'quote', 'edit', 'login'] as $notification)
|
||||
{
|
||||
if ($this->cfg('mchat_posts_' . $notification))
|
||||
{
|
||||
$enabled_notifications_lang[] = $this->user->lang('MCHAT_POSTS_' . strtoupper($notification));
|
||||
$enabled_notifications_lang[] = $this->lang->lang('MCHAT_POSTS_' . strtoupper($notification));
|
||||
}
|
||||
}
|
||||
|
||||
return implode($this->user->lang('COMMA_SEPARATOR'), $enabled_notifications_lang);
|
||||
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
|
||||
* @param bool $append_ext
|
||||
* @return string
|
||||
*/
|
||||
public function url($path, $absolute_url = false, $append_ext = true)
|
||||
{
|
||||
if ($absolute_url && !$this->board_url)
|
||||
{
|
||||
$this->board_url = generate_board_url() . '/';
|
||||
}
|
||||
|
||||
$url = ($absolute_url ? $this->board_url : $this->root_path) . $path;
|
||||
|
||||
if ($append_ext)
|
||||
{
|
||||
$url .= '.' . $this->php_ext;
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
* @param string $function
|
||||
*/
|
||||
public function include_functions($file, $function)
|
||||
{
|
||||
if (!function_exists($function))
|
||||
{
|
||||
include($this->root_path . 'includes/functions_' . $file . '.' . $this->php_ext);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,35 +18,33 @@ use phpbb\cron\task\base;
|
||||
class mchat_prune extends base
|
||||
{
|
||||
/** @var functions */
|
||||
protected $functions;
|
||||
protected $mchat_functions;
|
||||
|
||||
/** @var settings */
|
||||
protected $settings;
|
||||
protected $mchat_settings;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param functions $functions
|
||||
* @param settings $settings
|
||||
* @param functions $mchat_functions
|
||||
* @param settings $mchat_settings
|
||||
*/
|
||||
public function __construct(
|
||||
functions $functions,
|
||||
settings $settings
|
||||
functions $mchat_functions,
|
||||
settings $mchat_settings
|
||||
)
|
||||
{
|
||||
$this->functions = $functions;
|
||||
$this->settings = $settings;
|
||||
$this->mchat_functions = $mchat_functions;
|
||||
$this->mchat_settings = $mchat_settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs this cron task.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->functions->mchat_prune();
|
||||
$this->settings->set_cfg('mchat_prune_last_gc', time());
|
||||
$this->mchat_functions->mchat_prune();
|
||||
$this->mchat_settings->set_cfg('mchat_prune_last_gc', time());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,7 +56,7 @@ class mchat_prune extends base
|
||||
*/
|
||||
public function is_runnable()
|
||||
{
|
||||
return $this->settings->cfg('mchat_prune');
|
||||
return $this->mchat_settings->cfg('mchat_prune');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,6 +67,6 @@ class mchat_prune extends base
|
||||
*/
|
||||
public function should_run()
|
||||
{
|
||||
return $this->settings->cfg('mchat_prune_last_gc') < time() - $this->settings->cfg('mchat_prune_gc');
|
||||
return $this->mchat_settings->cfg('mchat_prune_last_gc') < time() - $this->mchat_settings->cfg('mchat_prune_gc');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
|
||||
namespace dmzx\mchat\event;
|
||||
|
||||
use dmzx\mchat\core\functions;
|
||||
use dmzx\mchat\core\settings;
|
||||
use phpbb\auth\auth;
|
||||
use phpbb\event\data;
|
||||
use phpbb\language\language;
|
||||
use phpbb\request\request_interface;
|
||||
use phpbb\template\template;
|
||||
use phpbb\user;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
class acp_listener implements EventSubscriberInterface
|
||||
@@ -27,71 +28,67 @@ class acp_listener implements EventSubscriberInterface
|
||||
/** @var request_interface */
|
||||
protected $request;
|
||||
|
||||
/** @var user */
|
||||
protected $user;
|
||||
/** @var language */
|
||||
protected $lang;
|
||||
|
||||
/** @var settings */
|
||||
protected $settings;
|
||||
protected $mchat_settings;
|
||||
|
||||
/** @var string */
|
||||
protected $root_path;
|
||||
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
/** @var functions */
|
||||
protected $mchat_functions;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param template $template
|
||||
* @param request_interface $request
|
||||
* @param user $user
|
||||
* @param settings $settings
|
||||
* @param string $root_path
|
||||
* @param string $php_ext
|
||||
* @param language $lang
|
||||
* @param settings $mchat_settings
|
||||
* @param functions $mchat_functions
|
||||
*/
|
||||
public function __construct(
|
||||
template $template,
|
||||
request_interface $request,
|
||||
user $user,
|
||||
settings $settings,
|
||||
$root_path,
|
||||
$php_ext
|
||||
language $lang,
|
||||
settings $mchat_settings,
|
||||
functions $mchat_functions
|
||||
)
|
||||
{
|
||||
$this->template = $template;
|
||||
$this->request = $request;
|
||||
$this->user = $user;
|
||||
$this->settings = $settings;
|
||||
$this->root_path = $root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
$this->template = $template;
|
||||
$this->request = $request;
|
||||
$this->lang = $lang;
|
||||
$this->mchat_settings = $mchat_settings;
|
||||
$this->mchat_functions = $mchat_functions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
static public function getSubscribedEvents()
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
'core.permissions' => 'permissions',
|
||||
'core.acp_users_prefs_modify_sql' => 'acp_users_prefs_modify_sql',
|
||||
'core.acp_users_prefs_modify_template_data' => 'acp_users_prefs_modify_template_data',
|
||||
);
|
||||
'core.acp_users_overview_before' => 'acp_users_overview_before',
|
||||
'core.delete_user_after' => 'delete_user_after',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
* @param data $event
|
||||
*/
|
||||
public function permissions($event)
|
||||
public function permissions(data $event)
|
||||
{
|
||||
$ucp_configs = array();
|
||||
$ucp_configs = [];
|
||||
|
||||
foreach (array_keys($this->settings->ucp_settings()) as $config_name)
|
||||
foreach (array_keys($this->mchat_settings->ucp_settings()) as $config_name)
|
||||
{
|
||||
$ucp_configs[] = 'u_' . $config_name;
|
||||
}
|
||||
|
||||
$permission_categories = array(
|
||||
'mchat' => array(
|
||||
$permission_categories = [
|
||||
'mchat' => [
|
||||
'u_mchat_use',
|
||||
'u_mchat_view',
|
||||
'u_mchat_edit',
|
||||
@@ -108,38 +105,38 @@ class acp_listener implements EventSubscriberInterface
|
||||
'u_mchat_smilies',
|
||||
'u_mchat_urls',
|
||||
'a_mchat',
|
||||
),
|
||||
],
|
||||
'mchat_user_config' => $ucp_configs,
|
||||
);
|
||||
];
|
||||
|
||||
$mchat_permissions = array();
|
||||
$mchat_permissions = [];
|
||||
|
||||
foreach ($permission_categories as $cat => $permissions)
|
||||
{
|
||||
foreach ($permissions as $permission)
|
||||
{
|
||||
$mchat_permissions[$permission] = array(
|
||||
$mchat_permissions[$permission] = [
|
||||
'lang' => 'ACL_' . strtoupper($permission),
|
||||
'cat' => $cat,
|
||||
);
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$event['permissions'] = array_merge($event['permissions'], $mchat_permissions);
|
||||
|
||||
$event['categories'] = array_merge($event['categories'], array(
|
||||
$event['categories'] = array_merge($event['categories'], [
|
||||
'mchat' => 'ACP_CAT_MCHAT',
|
||||
'mchat_user_config' => 'ACP_CAT_MCHAT_USER_CONFIG',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
* @param data $event
|
||||
*/
|
||||
public function acp_users_prefs_modify_sql($event)
|
||||
public function acp_users_prefs_modify_sql(data $event)
|
||||
{
|
||||
$sql_ary = array();
|
||||
$validation = array();
|
||||
$sql_ary = [];
|
||||
$validation = [];
|
||||
|
||||
$user_id = $event['user_row']['user_id'];
|
||||
|
||||
@@ -147,7 +144,7 @@ class acp_listener implements EventSubscriberInterface
|
||||
$userdata = $auth->obtain_user_data($user_id);
|
||||
$auth->acl($userdata);
|
||||
|
||||
foreach ($this->settings->ucp_settings() as $config_name => $config_data)
|
||||
foreach ($this->mchat_settings->ucp_settings() as $config_name => $config_data)
|
||||
{
|
||||
if ($auth->acl_get('u_' . $config_name))
|
||||
{
|
||||
@@ -162,42 +159,63 @@ class acp_listener implements EventSubscriberInterface
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('validate_data'))
|
||||
{
|
||||
include($this->root_path . 'includes/functions_user.' . $this->php_ext);
|
||||
}
|
||||
$this->mchat_settings->include_functions('user', 'validate_data');
|
||||
|
||||
$event['error'] = array_merge($event['error'], validate_data($sql_ary, $validation));
|
||||
$event['sql_ary'] = array_merge($event['sql_ary'], $sql_ary);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
* @param data $event
|
||||
*/
|
||||
public function acp_users_prefs_modify_template_data($event)
|
||||
public function acp_users_prefs_modify_template_data(data $event)
|
||||
{
|
||||
$this->user->add_lang_ext('dmzx/mchat', array('mchat_acp', 'mchat_ucp'));
|
||||
$this->lang->add_lang(['mchat_acp', 'mchat_ucp'], 'dmzx/mchat');
|
||||
|
||||
$user_id = $event['user_row']['user_id'];
|
||||
$user_id = (int) $event['user_row']['user_id'];
|
||||
|
||||
$auth = new auth();
|
||||
$userdata = $auth->obtain_user_data($user_id);
|
||||
$auth->acl($userdata);
|
||||
|
||||
$selected = $this->settings->cfg_user('mchat_date', $event['user_row'], $auth);
|
||||
$date_template_data = $this->settings->get_date_template_data($selected);
|
||||
$selected = $this->mchat_settings->cfg_user('mchat_date', $event['user_row'], $auth);
|
||||
$date_template_data = $this->mchat_settings->get_date_template_data($selected);
|
||||
$this->template->assign_vars($date_template_data);
|
||||
|
||||
$notifications_template_data = $this->settings->get_enabled_post_notifications_lang();
|
||||
$notifications_template_data = $this->mchat_settings->get_enabled_post_notifications_lang();
|
||||
$this->template->assign_var('MCHAT_POSTS_ENABLED_LANG', $notifications_template_data);
|
||||
|
||||
foreach (array_keys($this->settings->ucp_settings()) as $config_name)
|
||||
foreach (array_keys($this->mchat_settings->ucp_settings()) as $config_name)
|
||||
{
|
||||
$upper = strtoupper($config_name);
|
||||
$this->template->assign_vars(array(
|
||||
$upper => $this->settings->cfg_user($config_name, $event['user_row'], $auth),
|
||||
$this->template->assign_vars([
|
||||
$upper => $this->mchat_settings->cfg_user($config_name, $event['user_row'], $auth),
|
||||
$upper . '_NOAUTH' => !$auth->acl_get('u_' . $config_name, $user_id),
|
||||
));
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function acp_users_overview_before()
|
||||
{
|
||||
$this->lang->add_lang('mchat_acp', 'dmzx/mchat');
|
||||
|
||||
$this->template->assign_vars([
|
||||
'L_RETAIN_POSTS' => $this->lang->lang('MCHAT_RETAIN_MESSAGES', $this->lang->lang('RETAIN_POSTS')),
|
||||
'L_DELETE_POSTS' => $this->lang->lang('MCHAT_DELETE_MESSAGES', $this->lang->lang('DELETE_POSTS')),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param data $event
|
||||
*/
|
||||
public function delete_user_after(data $event)
|
||||
{
|
||||
if ($event['mode'] == 'remove')
|
||||
{
|
||||
$this->mchat_functions->mchat_prune($event['user_ids']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,12 @@
|
||||
namespace dmzx\mchat\event;
|
||||
|
||||
use dmzx\mchat\core\mchat;
|
||||
use dmzx\mchat\core\notifications;
|
||||
use phpbb\controller\helper;
|
||||
use phpbb\event\data;
|
||||
use phpbb\language\language;
|
||||
use phpbb\request\request_interface;
|
||||
use phpbb\user;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
class main_listener implements EventSubscriberInterface
|
||||
@@ -23,12 +25,18 @@ class main_listener implements EventSubscriberInterface
|
||||
/** @var mchat */
|
||||
protected $mchat;
|
||||
|
||||
/** @var notifications */
|
||||
protected $mchat_notifications;
|
||||
|
||||
/** @var helper */
|
||||
protected $helper;
|
||||
|
||||
/** @var user */
|
||||
protected $user;
|
||||
|
||||
/** @var language */
|
||||
protected $lang;
|
||||
|
||||
/** @var request_interface */
|
||||
protected $request;
|
||||
|
||||
@@ -39,128 +47,160 @@ class main_listener implements EventSubscriberInterface
|
||||
* Constructor
|
||||
*
|
||||
* @param mchat $mchat
|
||||
* @param notifications $mchat_notifications
|
||||
* @param helper $helper
|
||||
* @param user $user
|
||||
* @param language $lang
|
||||
* @param request_interface $request
|
||||
* @param string $php_ext
|
||||
*/
|
||||
public function __construct(
|
||||
mchat $mchat,
|
||||
notifications $mchat_notifications,
|
||||
helper $helper,
|
||||
user $user,
|
||||
language $lang,
|
||||
request_interface $request,
|
||||
$php_ext
|
||||
)
|
||||
{
|
||||
$this->mchat = $mchat;
|
||||
$this->helper = $helper;
|
||||
$this->user = $user;
|
||||
$this->request = $request;
|
||||
$this->php_ext = $php_ext;
|
||||
$this->mchat = $mchat;
|
||||
$this->mchat_notifications = $mchat_notifications;
|
||||
$this->helper = $helper;
|
||||
$this->user = $user;
|
||||
$this->lang = $lang;
|
||||
$this->request = $request;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
static public function getSubscribedEvents()
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
'core.viewonline_overwrite_location' => 'add_page_viewonline',
|
||||
'core.user_setup' => 'load_language_on_setup',
|
||||
'core.page_header' => 'add_page_header_link',
|
||||
'core.index_modify_page_title' => 'display_mchat_on_index',
|
||||
'core.submit_post_end' => 'insert_posting',
|
||||
'core.display_custom_bbcodes_modify_sql' => array(array('remove_disallowed_bbcodes'), array('pm_compose_add_quote')),
|
||||
'core.delete_posts_after' => 'delete_posts_after',
|
||||
'core.display_custom_bbcodes_modify_sql' => [['remove_disallowed_bbcodes'], ['pm_compose_add_quote']],
|
||||
'core.generate_smilies_after' => 'generate_smilies_after',
|
||||
'core.user_add_modify_data' => 'user_registration_set_default_values',
|
||||
'core.mcp_change_poster_after' => 'mcp_change_poster_after',
|
||||
'core.login_box_redirect' => 'user_login_success',
|
||||
'core.session_gc_after' => 'session_gc',
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
* @param data $event
|
||||
*/
|
||||
public function add_page_viewonline($event)
|
||||
public function add_page_viewonline(data $event)
|
||||
{
|
||||
if (strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/mchat') === 0)
|
||||
{
|
||||
$event['location'] = $this->user->lang('MCHAT_TITLE');
|
||||
$event['location'] = $this->lang->lang('MCHAT_TITLE');
|
||||
$event['location_url'] = $this->helper->route('dmzx_mchat_page_custom_controller');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
* @param data $event
|
||||
*/
|
||||
public function load_language_on_setup($event)
|
||||
public function load_language_on_setup(data $event)
|
||||
{
|
||||
$lang_set_ext = $event['lang_set_ext'];
|
||||
$lang_set_ext[] = array(
|
||||
$lang_set_ext[] = [
|
||||
'ext_name' => 'dmzx/mchat',
|
||||
'lang_set' => 'common',
|
||||
);
|
||||
];
|
||||
$event['lang_set_ext'] = $lang_set_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a URL to the mchat controller file for the header linklist
|
||||
*
|
||||
* @param Event $event
|
||||
*/
|
||||
public function add_page_header_link($event)
|
||||
public function add_page_header_link()
|
||||
{
|
||||
$this->mchat->render_page_header_link();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if mchat should be displayed on index.
|
||||
*
|
||||
* @param Event $event
|
||||
*/
|
||||
public function display_mchat_on_index($event)
|
||||
public function display_mchat_on_index()
|
||||
{
|
||||
$this->mchat->page_index();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
* @param data $event
|
||||
*/
|
||||
public function insert_posting($event)
|
||||
public function insert_posting(data $event)
|
||||
{
|
||||
$this->mchat->insert_posting($event['mode'], $event['data']['forum_id'], $event['data']['post_id']);
|
||||
$this->mchat_notifications->insert_post($event['mode'], $event['data']['forum_id'], $event['data']['post_id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
* @param data $event
|
||||
*/
|
||||
public function remove_disallowed_bbcodes($event)
|
||||
public function delete_posts_after(data $event)
|
||||
{
|
||||
$this->mchat_notifications->delete_post_notifications($event['post_ids']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param data $event
|
||||
*/
|
||||
public function remove_disallowed_bbcodes(data $event)
|
||||
{
|
||||
$event['sql_ary'] = $this->mchat->remove_disallowed_bbcodes($event['sql_ary']);
|
||||
|
||||
$this->mchat->set_custom_bbcodes_generated(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
*
|
||||
*/
|
||||
public function user_registration_set_default_values($event)
|
||||
public function generate_smilies_after()
|
||||
{
|
||||
$this->mchat->set_smilies_generated(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param data $event
|
||||
*/
|
||||
public function user_registration_set_default_values(data $event)
|
||||
{
|
||||
$event['sql_ary'] = $this->mchat->set_user_default_values($event['sql_ary']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
* @param data $event
|
||||
*/
|
||||
public function user_login_success($event)
|
||||
public function mcp_change_poster_after(data $event)
|
||||
{
|
||||
$this->mchat_notifications->update_post_notification_user($event['post_info']['post_id'], $event['userdata']['user_id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param data $event
|
||||
*/
|
||||
public function user_login_success(data $event)
|
||||
{
|
||||
if (!$event['admin'])
|
||||
{
|
||||
$this->mchat->insert_posting('login');
|
||||
$is_hidden = $this->request->is_set_post('viewonline') || !$this->user->data['user_allow_viewonline'];
|
||||
$this->mchat_notifications->insert_login($is_hidden);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
*
|
||||
*/
|
||||
public function pm_compose_add_quote($event)
|
||||
public function pm_compose_add_quote()
|
||||
{
|
||||
$mchat_message_id = $this->request->variable('mchat_pm_quote_message', 0);
|
||||
|
||||
@@ -171,9 +211,9 @@ class main_listener implements EventSubscriberInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
*
|
||||
*/
|
||||
public function session_gc($event)
|
||||
public function session_gc()
|
||||
{
|
||||
$this->mchat->session_gc();
|
||||
}
|
||||
|
||||
35
ext.php
35
ext.php
@@ -11,11 +11,14 @@
|
||||
|
||||
namespace dmzx\mchat;
|
||||
|
||||
class ext extends \phpbb\extension\base
|
||||
use phpbb\extension\base;
|
||||
|
||||
class ext extends base
|
||||
{
|
||||
/**
|
||||
* Requires phpBB 3.1.7-PL1 due to usage of \phpbb\session:update_session_infos()
|
||||
* Requires phpBB 3.1.8-RC1 due to HTTPS in version check
|
||||
* Requires phpBB 3.2.0 due to EoL of phpBB 3.1
|
||||
*
|
||||
* @return bool
|
||||
* @access public
|
||||
@@ -37,57 +40,45 @@ class ext extends \phpbb\extension\base
|
||||
|
||||
if ($module_ids)
|
||||
{
|
||||
if (phpbb_version_compare(PHPBB_VERSION, '3.2.0-dev', '>='))
|
||||
{
|
||||
// For phpBB >= 3.2.x
|
||||
$lang = $this->container->get('language');
|
||||
$lang->add_lang('mchat_acp', 'dmzx/mchat');
|
||||
}
|
||||
else
|
||||
{
|
||||
// For phpBB 3.1.x
|
||||
$user = $this->container->get('user');
|
||||
$user->add_lang_ext('dmzx/mchat', 'mchat_acp');
|
||||
$lang = $user;
|
||||
}
|
||||
|
||||
$lang = $this->container->get('language');
|
||||
$lang->add_lang('mchat_acp', 'dmzx/mchat');
|
||||
$php_ext = $this->container->getParameter('core.php_ext');
|
||||
$error_msg = $lang->lang('MCHAT_30X_REMNANTS', $table_prefix, implode(', ', $module_ids)) . adm_back_link(append_sid('index.' . $php_ext, 'i=acp_extensions&mode=main'));
|
||||
$error_msg = $lang->lang('MCHAT_30X_REMNANTS', $table_prefix, implode($lang->lang('COMMA_SEPARATOR'), $module_ids)) . adm_back_link(append_sid('index.' . $php_ext, ['i' => 'acp_extensions', 'mode' => 'main']));
|
||||
|
||||
trigger_error($error_msg, E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
return phpbb_version_compare(PHPBB_VERSION, '3.1.8-RC1', '>=');
|
||||
return phpbb_version_compare(PHPBB_VERSION, '3.2.0', '>=') && phpbb_version_compare(PHP_VERSION, '5.4.7', '>=');
|
||||
}
|
||||
|
||||
/**
|
||||
* This method checks whether the phpbb_modules table contains remnants of the 3.0 MOD.
|
||||
* It returns an array of the modules' IDs, or an empty array if no old modules are found.
|
||||
*
|
||||
* @var string $table_prefix
|
||||
* @param string $table_prefix
|
||||
* @return array
|
||||
*/
|
||||
protected function get_old_module_ids($table_prefix)
|
||||
{
|
||||
$db = $this->container->get('dbal.conn');
|
||||
|
||||
$mchat_30x_module_langnames = array(
|
||||
$mchat_30x_module_langnames = [
|
||||
'ACP_CAT_MCHAT',
|
||||
'ACP_MCHAT_CONFIG',
|
||||
'ACP_USER_MCHAT',
|
||||
'UCP_CAT_MCHAT',
|
||||
'UCP_MCHAT_CONFIG',
|
||||
);
|
||||
];
|
||||
|
||||
$sql = 'SELECT module_id
|
||||
FROM ' . $table_prefix . 'modules
|
||||
WHERE ' . $db->sql_in_set('module_langname', $mchat_30x_module_langnames);
|
||||
$result = $db->sql_query($sql);
|
||||
$rows = $db->sql_fetchrowset();
|
||||
$rows = $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$module_ids = array();
|
||||
$module_ids = [];
|
||||
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
|
||||
82
language/de/common.php
Normal file
82
language/de/common.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat [German]
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, [
|
||||
'MCHAT_TITLE' => 'Tippliga Würzburg Shoutbox',
|
||||
'MCHAT_TITLE_COUNT' => [
|
||||
0 => 'Shoutbox',
|
||||
1 => 'Shoutbox [<strong>%1$d</strong>]',
|
||||
],
|
||||
'MCHAT_NAVBAR_CUSTOM_PAGE' => 'Shoutbox Seite',
|
||||
'MCHAT_NAVBAR_ARCHIVE' => 'Archiv',
|
||||
'MCHAT_NAVBAR_RULES' => 'Regeln',
|
||||
|
||||
// Who is chatting
|
||||
'MCHAT_WHO_IS_CHATTING' => 'Wer chattet',
|
||||
'MCHAT_ONLINE_USERS_TOTAL' => [
|
||||
0 => 'Niemand ist im Chat',
|
||||
1 => '<strong>%1$d</strong> Benutzer chattet',
|
||||
2 => '<strong>%1$d</strong> Benutzer chatten',
|
||||
],
|
||||
'MCHAT_ONLINE_EXPLAIN' => 'basierend auf den aktiven Besuchern der letzten %1$s',
|
||||
'MCHAT_HOURS' => [
|
||||
1 => '%1$d Stunde',
|
||||
2 => '%1$d Stunden',
|
||||
],
|
||||
'MCHAT_MINUTES' => [
|
||||
1 => '%1$d Minute',
|
||||
2 => '%1$d Minuten',
|
||||
],
|
||||
'MCHAT_SECONDS' => [
|
||||
1 => '%1$d Sekunde',
|
||||
2 => '%1$d Sekunden',
|
||||
],
|
||||
|
||||
// Custom translations for administrators
|
||||
'MCHAT_RULES_MESSAGE' => '',
|
||||
'MCHAT_STATIC_MESSAGE' => '',
|
||||
|
||||
// Post notification messages (%1$s is replaced with a link to the new/edited post, %2$s is replaced with a link to the forum)
|
||||
'MCHAT_NEW_POST' => 'erstellte einen neuen Beitrag: %1$s in %2$s',
|
||||
'MCHAT_NEW_POST_DELETED' => 'erstellte einen neuen Beitrag, der gelöscht wurde',
|
||||
'MCHAT_NEW_REPLY' => 'erstellte eine neue Antwort: %1$s in %2$s',
|
||||
'MCHAT_NEW_REPLY_DELETED' => 'erstellte eine Antwort, die gelöscht wurde',
|
||||
'MCHAT_NEW_QUOTE' => 'antwortete mit einem Zitat: %1$s in %2$s',
|
||||
'MCHAT_NEW_QUOTE_DELETED' => 'erstellte eine Zitatantwort, die gelöscht wurde',
|
||||
'MCHAT_NEW_EDIT' => 'bearbeitete einen Beitrag: %1$s in %2$s',
|
||||
'MCHAT_NEW_EDIT_DELETED' => 'bearbeitete einen Beitrag, der gelöscht wurde',
|
||||
'MCHAT_NEW_LOGIN' => 'hat sich angemeldet',
|
||||
]);
|
||||
50
language/de/info_acp_mchat.php
Normal file
50
language/de/info_acp_mchat.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat [German]
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, [
|
||||
// Module titles
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
'ACP_CAT_MCHAT_USER_CONFIG' => 'mChat im UCP',
|
||||
'ACP_MCHAT_GLOBALSETTINGS' => 'Globale Einstellungen',
|
||||
'ACP_MCHAT_GLOBALUSERSETTINGS' => 'Globale Benutzereinstellungen',
|
||||
|
||||
// Log entries (%1$s is replaced with the user name who triggered the event)
|
||||
'LOG_MCHAT_CONFIG_UPDATE' => '<strong>mChat-Konfiguration geändert</strong><br>» %1$s',
|
||||
'LOG_MCHAT_TABLE_PRUNED' => '<strong>mChat-Nachrichten beschnitten: %2$d</strong>',
|
||||
'LOG_MCHAT_TABLE_PURGED' => '<strong>mChat-Nachrichten bereinigt</strong><br>» %1$s',
|
||||
'LOG_DELETED_MCHAT' => '<strong>mChat-Nachricht gelöscht</strong><br>» %1$s',
|
||||
'LOG_EDITED_MCHAT' => '<strong>mChat-Nachricht bearbeitet</strong><br>» %1$s',
|
||||
]);
|
||||
39
language/de/info_ucp_mchat.php
Normal file
39
language/de/info_ucp_mchat.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat [German]
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, [
|
||||
'UCP_MCHAT_CONFIG' => 'Shoutbox',
|
||||
]);
|
||||
88
language/de/mchat.php
Normal file
88
language/de/mchat.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat [German]
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, [
|
||||
'MCHAT_ADD' => 'Senden',
|
||||
'MCHAT_ARCHIVE' => 'Archiv',
|
||||
'MCHAT_ARCHIVE_PAGE' => 'mChat Archiv',
|
||||
'MCHAT_CUSTOM_PAGE' => 'mChat',
|
||||
'MCHAT_BBCODES' => 'BBCodes',
|
||||
'MCHAT_CUSTOM_BBCODES' => 'Eigene BBCodes',
|
||||
'MCHAT_DELCONFIRM' => 'Bist du sicher, dass du diese Nachricht löschen willst?',
|
||||
'MCHAT_EDIT' => 'Bearbeiten',
|
||||
'MCHAT_EDITINFO' => 'Bearbeite die Nachricht unten.',
|
||||
'MCHAT_NEW_CHAT' => 'Neue Chatnachricht!',
|
||||
'MCHAT_SEND_PM' => 'Sende private Nachricht',
|
||||
'MCHAT_LIKE' => 'Diese Nachricht gefällt mir',
|
||||
'MCHAT_LIKES' => 'gefällt diese Nachricht',
|
||||
'MCHAT_FLOOD' => 'Du kannst keine Nachricht so schnell nach deiner letzten Nachricht senden.',
|
||||
'MCHAT_FOE' => 'Diese Nachricht wurde von <strong>%1$s</strong> erstellt, welcher sich derzeit auf deiner Ignorierliste befindet.',
|
||||
'MCHAT_RULES' => 'Regeln',
|
||||
'MCHAT_WHOIS_USER' => 'IP whois für %1$s',
|
||||
'MCHAT_MESS_LONG' => 'Deine Nachricht ist zu lang. Bitte beschränke sie auf %1$d Zeichen.',
|
||||
'MCHAT_NO_CUSTOM_PAGE' => 'Die separate Seite für mChat ist derzeit nicht aktiviert.',
|
||||
'MCHAT_NO_RULES' => 'Die Seite mit den mChat-Regeln ist derzeit nicht aktiviert.',
|
||||
'MCHAT_NOACCESS_ARCHIVE' => 'Du hast keine Berechtigung das Archiv anzusehen.',
|
||||
'MCHAT_NOJAVASCRIPT' => 'Bitte aktiviere JavaScript, um mChat zu benutzen.',
|
||||
'MCHAT_NOMESSAGE' => 'Keine Nachrichten',
|
||||
'MCHAT_NOMESSAGEINPUT' => 'Du hast keine Nachricht eingegeben',
|
||||
'MCHAT_MESSAGE_DELETED' => 'Diese Nachricht wurde gelöscht.',
|
||||
'MCHAT_OK' => 'OK',
|
||||
'MCHAT_PAUSE' => 'Pausiert',
|
||||
'MCHAT_PERMISSIONS' => 'Ändere die Benutzerrechte',
|
||||
'MCHAT_REFRESHING' => 'Aktualisiere…',
|
||||
'MCHAT_RESPOND' => 'Antworte dem Benutzer',
|
||||
'MCHAT_SMILES' => 'Smilies',
|
||||
'MCHAT_TOTALMESSAGES' => 'Nachrichten gesamt: <strong>%1$d</strong>',
|
||||
'MCHAT_USESOUND' => 'Ton abspielen',
|
||||
'MCHAT_SOUND_ON' => 'Ton ist an',
|
||||
'MCHAT_SOUND_OFF' => 'Ton ist aus',
|
||||
'MCHAT_ENTER' => 'Use Strg/Cmd + Enter für die alternative Aktion',
|
||||
'MCHAT_ENTER_SUBMIT' => 'Enter schickt die Nachricht',
|
||||
'MCHAT_ENTER_LINEBREAK' => 'Enter fügt eine neue Zeile hinzu',
|
||||
'MCHAT_COLLAPSE_TITLE' => 'Sichtbarkeit von mChat umschalten',
|
||||
'MCHAT_WHO_IS_REFRESH_EXPLAIN' => 'Aktualisiert alle <strong>%1$d</strong> Sekunden',
|
||||
'MCHAT_MINUTES_AGO' => [
|
||||
0 => 'gerade eben',
|
||||
1 => 'vor %1$d Minute',
|
||||
2 => 'vor %1$d Minuten',
|
||||
],
|
||||
|
||||
// These messages are formatted with JavaScript, hence {} and no %d
|
||||
'MCHAT_CHARACTER_COUNT' => '<strong>{current}</strong> Zeichen',
|
||||
'MCHAT_CHARACTER_COUNT_LIMIT' => '<strong>{current}</strong> verbraucht von {max} Zeichen',
|
||||
'MCHAT_MENTION' => ' @{username} ',
|
||||
]);
|
||||
163
language/de/mchat_acp.php
Normal file
163
language/de/mchat_acp.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat [German]
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, [
|
||||
// ACP Configuration sections
|
||||
'MCHAT_SETTINGS_INDEX' => 'Einstellungen Index',
|
||||
'MCHAT_SETTINGS_CUSTOM' => 'Einstellungen separate Seite',
|
||||
'MCHAT_SETTINGS_ARCHIVE' => 'Einstellungen Archivseite',
|
||||
'MCHAT_SETTINGS_POSTS' => 'Einstellungen neuer Beitrag',
|
||||
'MCHAT_SETTINGS_MESSAGES' => 'Einstellungen Nachricht',
|
||||
'MCHAT_SETTINGS_PRUNE' => 'Einstellungen für Löschen (nur für Gründer einstellbar)',
|
||||
'MCHAT_SETTINGS_LOG' => 'Log settings (adjustable for founders only)',
|
||||
'MCHAT_SETTINGS_STATS' => 'Einstellungen für <em>Wer chattet</em>',
|
||||
|
||||
'MCHAT_GLOBALUSERSETTINGS_EXPLAIN' => 'Einstellungen, für welche ein Benutzer <strong>KEINE</strong> Berechtigung zur Anpassung hat, werden angewendet wie unten eingestellt.<br>Neue Benutzerkonten werden die unten konfigurierten Starteinstellungen haben.<br><br>Gehe zum <em>mChat im UCP</em>-Tab im Bereich Benutzerberechtigungen, um die Befugnisse zu einzustellen.<br>Gehe zum Formular <em>Voreinstellungen</em> im Bereich <em>Benutzer verwalten</em> um den Status der Einstellung eines jeden Benutzers zu sehen.',
|
||||
'MCHAT_GLOBALUSERSETTINGS_OVERWRITE' => 'Überschreibe Einstellungen für alle Benutzer',
|
||||
'MCHAT_GLOBALUSERSETTINGS_OVERWRITE_EXPLAIN' => 'Setzt die Einstellungen für <em>alle</em> Benutzerkonten wie oben definiert.',
|
||||
'MCHAT_GLOBALUSERSETTINGS_OVERWRITE_CONFIRM' => 'Bestätige überschreiben der mChat-Einstellungen für alle Benutzer',
|
||||
|
||||
'MCHAT_ACP_USER_PREFS_EXPLAIN' => 'Unten sind alle mChat-Voreinstellungen der ausgewählten Benutzer aufgelistet. Einstellungen, für deren Anpassung die ausgewählten Benutzer keine Berechtigung haben, sind deaktiviert. Diese Einstellungen können geändert werden in der mChat Konfiguration <em>Globale Benutzereinstellungen</em>.',
|
||||
|
||||
// ACP settings
|
||||
'MCHAT_ACP_CHARACTERS' => 'Zeichen',
|
||||
'MCHAT_ACP_MESSAGES' => 'Nachrichten',
|
||||
'MCHAT_ACP_SECONDS' => 'Sekunden',
|
||||
'MCHAT_ACP_HOURS' => 'Stunden',
|
||||
'MCHAT_ACP_DAYS' => 'Tage',
|
||||
'MCHAT_ACP_WEEKS' => 'Wochen',
|
||||
'MCHAT_ACP_GLOBALSETTINGS_TITLE' => 'mChat Globale Einstellungen',
|
||||
'MCHAT_ACP_GLOBALUSERSETTINGS_TITLE' => 'mChat Globale Benutzereinstellungen',
|
||||
'MCHAT_VERSION' => 'Version',
|
||||
'MCHAT_RULES' => 'Regeln',
|
||||
'MCHAT_RULES_EXPLAIN' => 'Gib deine Forenregeln hier ein. HTML-Code ist erlaubt. Lass das Feld leer, und die Anzeige zu deaktivieren.<br>Diese Nachricht kann übersetzt werden: bearbeite dafür die Sprachvariable MCHAT_RULES_MESSAGE in /ext/dmzx/mchat/language/XX/common.php.',
|
||||
'MCHAT_CONFIG_SAVED' => 'mChat-Konfiguration wurde aktualisiert',
|
||||
'MCHAT_AVATARS' => 'Avatare anzeigen',
|
||||
'MCHAT_AVATARS_EXPLAIN' => 'Wenn JA eingestellt ist, werden verkleinerte Benutzeravatare angezeigt',
|
||||
'MCHAT_INDEX' => 'mChat auf dem Forenindex anzeigen',
|
||||
'MCHAT_INDEX_HEIGHT' => 'Seitenhöhe im Index',
|
||||
'MCHAT_INDEX_HEIGHT_EXPLAIN' => 'Die Höhe der Chat Box in Pixeln auf der Indexseite des Forums.<br><em>Die Einstellung ist begrenzt von 50 bis 1000 Pixel.</em>',
|
||||
'MCHAT_TOP_OF_FORUM' => 'Oben',
|
||||
'MCHAT_BOTTOM_OF_FORUM' => 'Unten',
|
||||
'MCHAT_REFRESH' => 'Aktualisierungsintervall',
|
||||
'MCHAT_REFRESH_EXPLAIN' => 'Die Anzahl Sekunden, bis sich der mChat automatisch aktualisiert. <br><em>Die Einstellung ist begrenzt von 5 bis 60 Sekunden. Standard ist 10.</em>',
|
||||
'MCHAT_LIVE_UPDATES' => 'Live-Aktualiserung von bearbeiteten und gelöschten Nachrichten',
|
||||
'MCHAT_LIVE_UPDATES_EXPLAIN' => 'Wenn ein Benutzer Nachrichten bearbeitet oder löscht, werden die Änderungen für alle live angezeigt, ohne dass sie die Seite aktualisieren müssen. Deaktiviere das, falls du Leistungsprobleme bekommst.',
|
||||
'MCHAT_PRUNE' => 'Aktiviere automatisches Leeren',
|
||||
'MCHAT_PRUNE_GC' => 'Intervall für Nachrichten-Löschaufgabe',
|
||||
'MCHAT_PRUNE_GC_EXPLAIN' => 'Die Zeit in Sekunden, die vergehen muss, ehe die nächste Löschung von Nachrichten ausgelöst wird. Hinweis: diese Einstellung steuert, <em>wann</em> Nachrichten geprüft werden, ob sie gelöscht werden können. Sie steuert <em>nicht</em>, <em>welche</em> Nachrichten gelöscht werden. <em>Standard ist 86400 = 24 Stunden.</em>',
|
||||
'MCHAT_PRUNE_NUM' => 'Anzahl verbleibender Nachrichten nach dem Leeren',
|
||||
'MCHAT_PRUNE_NUM_EXPLAIN' => 'Verwende die Einstellung „Nachrichten“, um eine festgelegte Anzahl von Nachrichten zu behalten. Verwende „Stunden“, „Tage“ oder „Wochen“, und alle Nachrichten, die älter sind als die festgelegte Zeitperiode werden gelöscht.',
|
||||
'MCHAT_PRUNE_NOW' => 'Jetzt die Nachrichten löschen',
|
||||
'MCHAT_PRUNE_NOW_CONFIRM' => 'Löschen der Nachrichten bestätigen',
|
||||
'MCHAT_PRUNED' => '%1$d mChat Nachrichten wurden gelöscht.',
|
||||
'MCHAT_NAVBAR_LINK_COUNT' => 'Zeige die Anzahl der aktiven Chatsitzungen im Navbar-Link an',
|
||||
'MCHAT_MESSAGE_NUM_CUSTOM' => 'Anfängliche Anzahl von Nachrichten, die in der eigenen Chatseite angezeigt werden',
|
||||
'MCHAT_MESSAGE_NUM_CUSTOM_EXPLAIN' => '<em>Du bist eingeschränkt auf Einstellungen zwischen 5 und 50. Standard ist 10.</em>',
|
||||
'MCHAT_MESSAGE_NUM_INDEX' => 'Anfängliche Anzahl von Nachrichten, die auf der Indexseite angezeigt werden sollen',
|
||||
'MCHAT_MESSAGE_NUM_INDEX_EXPLAIN' => '<em>Du bist eingeschränkt auf Einstellungen zwischen 5 und 50. Standard ist 10.</em>',
|
||||
'MCHAT_MESSAGE_NUM_ARCHIVE' => 'Nachrichtenanzahl zur Anzeige auf der Archivseite',
|
||||
'MCHAT_MESSAGE_NUM_ARCHIVE_EXPLAIN' => 'Die maximale Anzahl an Nachrichten, die je Seite auf der Archivseite angezeigt werden sollen.<br><em>Du bist beschränkt auf Einstellungen zwischen 10 und 100. Standard ist 25.</em>',
|
||||
'MCHAT_ARCHIVE_SORT' => 'Nachrichten sortieren',
|
||||
'MCHAT_ARCHIVE_SORT_TOP_BOTTOM' => 'Sortiere Nachrichten immer von der ältesten zur neuesten',
|
||||
'MCHAT_ARCHIVE_SORT_BOTTOM_TOP' => 'Sortiere Nachrichten immer von der neuesten zur ältesten',
|
||||
'MCHAT_ARCHIVE_SORT_USER' => 'Nachrichtensortierung hängt ab von der Einstellung des Benutzers zu <em>Lokalisierung neuer Nachrichten</em>',
|
||||
'MCHAT_FLOOD_TIME' => 'Überflutungszeit',
|
||||
'MCHAT_FLOOD_TIME_EXPLAIN' => 'Sekunden, die ein Benutzer warten muss, bevor er eine weitere Nachricht im Chat schreibt.<br><em>Du bist zwischen 0 und 3600 Sekunden (1 Stunde) limitiert. Default ist 0. 0 zum deaktivieren.</em>',
|
||||
'MCHAT_FLOOD_MESSAGES' => 'Nachrichtenflut',
|
||||
'MCHAT_FLOOD_MESSAGES_EXPLAIN' => 'Die Zeit in Sekunden, die ein Benutzer warten muß, bis er eine neue Nachricht im mChat absenden kann.<br><em>Begrenzt auf 0 bis 60 Sekunden. Standard ist 0. Stelle 0 ein, um die Funktion zu deaktivieren</em>',
|
||||
'MCHAT_EDIT_DELETE_LIMIT' => 'Zeitbegrenzung für bearbeiten und löschen von Nachrichten',
|
||||
'MCHAT_EDIT_DELETE_LIMIT_EXPLAIN' => 'Nachrichten, die älter sind als die hier angegebene Anzahl Sekunden können nicht mehr durch den Verfasser bearbeitet oder gelöscht werden.<br>Benutzer mit <em>Berechtigung zum bearbeiten/löschen sowie mit Moderatorberechtigung sind ausgenommen</em> von dieser Begrenzung.<br>Um unbegrenzte Bearbeitung und Löschen zu erlauben, setze auf 0.',
|
||||
'MCHAT_MAX_MESSAGE_LENGTH' => 'Maximale Nachrichtenlänge',
|
||||
'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Die maximal erlaubte Anzahl von Zeichen pro Nachricht.<br><em>Empfohlen sind 100 bis 500, stelle 0 ein, um die Funktion zu deaktivieren</em>.',
|
||||
'MCHAT_MAX_INPUT_HEIGHT' => 'Maximale Eingabefeld Höhe',
|
||||
'MCHAT_MAX_INPUT_HEIGHT_EXPLAIN' => 'Das Eingabefeld wird nicht über diese Anzahl von Pixeln hinaus erweitert.<br><em>Du bist zwischen 0 und 1000 limitiert. Default ist 150. Stelle 0 ein, um multi-line Nachrichten zu verbieten.</em>',
|
||||
'MCHAT_CUSTOM_PAGE' => 'Separate Seite aktivieren',
|
||||
'MCHAT_CUSTOM_HEIGHT' => 'Höhe der separaten Seite',
|
||||
'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'Die Höhe der Chat-Box in Pixeln auf der eigenen mChat Seite.<br><em>Die Einstellung ist begrenzt von 50 bis 1000 Pixel</em>.',
|
||||
'MCHAT_BBCODES_DISALLOWED' => 'Nicht erlaubte BBCodes',
|
||||
'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Hier kann man BBCodes eintragen, die <strong>nicht</strong> in einer Nachricht verwendet werden dürfen.<br>Trenne BBCodes mit einem senkrechten Strich (pipe), zum Beispiel: <br>b|i|u|code|list|list=|flash|quote und/oder einem %1$scustom bbcode tag name%2$s',
|
||||
'MCHAT_STATIC_MESSAGE' => 'Permanente Nachricht',
|
||||
'MCHAT_STATIC_MESSAGE_EXPLAIN' => 'Hier kannst du eine permanente Nachricht für die Benutzer des mChats eingeben. HTML-Code ist erlaubt.Wenn das Feld leer bleibt wird keine Nachricht angezeigt.<br>Diese Nachricht kann auch übersetzt werden: bearbeite dafür die Sprachvariable MCHAT_STATIC_MESSAGE in /ext/dmzx/mchat/language/XX/common.php.',
|
||||
'MCHAT_TIMEOUT' => 'Ablauf der Benutzersitzung',
|
||||
'MCHAT_TIMEOUT_EXPLAIN' => 'Stelle einen Wert für die Zeit in Sekunden ein, nach der die Sitzung für einen Benutzer im mChat endet. <br>Setze hier 0 für kein Timeout. Achtung - für einen Benutzer, der im mChat liest, endet dann die Sitzung nie! <br><em>Diese Einstellung ist eingeschränkt durch die Einstellungen in deiner %1$sForenkonfiguration für Sitzungen%2$s, welche derzeit auf %3$d Sekunden eingestellt ist.</em>',
|
||||
'MCHAT_OVERRIDE_SMILIE_LIMIT' => 'Smilielimit überschreiben?',
|
||||
'MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN' => 'Setze auf Ja um die Smiliebegrenzung des Forums für Chatnachrichten zu überschreiben',
|
||||
'MCHAT_OVERRIDE_MIN_POST_CHARS' => 'Minimale Anzahl von Zeichen überschreiben?',
|
||||
'MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Setze auf Ja um die Forumseinstellung für die minimale Anzahl von Zeichen für Chatnachrichten zu überschreiben',
|
||||
'MCHAT_LOG_ENABLED' => 'Füge den Admin Log Einträge hinzu',
|
||||
'MCHAT_LOG_ENABLED_EXPLAIN' => 'Das betrifft Nachrichten editieren, löschen, kürzen und aufräumen.',
|
||||
|
||||
'MCHAT_POSTS_AUTH_CHECK' => 'Erfordert Benutzerberechtigung',
|
||||
'MCHAT_POSTS_AUTH_CHECK_EXPLAIN' => 'Wenn dies auf Ja gesetzt wird, werden Benutzer, die keine Berechtigung für die Benutzung von mChat haben, auch keine Beitrags- oder Loginbenachrichtigungen auslösen.',
|
||||
|
||||
'MCHAT_WHOIS_REFRESH' => '„Wer chattet“ Aktualisierungsintervall',
|
||||
'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Anzahl der Sekunden, ehe „Wer chattet“ aktualisiert.<br><em>Du bist beschränkt auf Einstellungen von 10 bis 300 Sekunden. Standard ist 60.</em>',
|
||||
'MCHAT_SOUND' => 'Töne abspielen bei neuen, bearbeiteten und gelöschten Nachrichten',
|
||||
'MCHAT_PURGE' => 'Lösche jetzt alle Nachrichten',
|
||||
'MCHAT_PURGE_CONFIRM' => 'Bestätige die Löschung aller Nachrichten',
|
||||
'MCHAT_PURGED' => 'Alle mChat Nachrichten wurden erfolgreich gelöscht',
|
||||
|
||||
'MCHAT_REPARSER_STATUS' => 'Nachricht reparser status',
|
||||
'MCHAT_REPARSER_ACTIVE' => 'aktiv',
|
||||
'MCHAT_REPARSER_FINISHED' => 'beendet',
|
||||
|
||||
// '%1$s' enthält 'Beiträge behalten' bzw. 'Beiträge löschen'
|
||||
'MCHAT_RETAIN_MESSAGES' => '%1$s und behalte mChat-Nachrichten',
|
||||
'MCHAT_DELETE_MESSAGES' => '%1$s und lösche mChat-Nachrichten',
|
||||
|
||||
// Error reporting
|
||||
'TOO_LONG_MCHAT_BBCODE_DISALLOWED' => 'Der Wert für nicht erlaubte BBCodes ist zu lang.',
|
||||
'TOO_SMALL_MCHAT_CUSTOM_HEIGHT' => 'Der Wert für die benutzerdefinierte Höhe ist zu klein.',
|
||||
'TOO_LARGE_MCHAT_CUSTOM_HEIGHT' => 'Der Wert für die benutzerdefinierte Höhe ist zu groß.',
|
||||
'TOO_LONG_MCHAT_DATE' => 'Das eingegebene Datumsformat ist zu lang.',
|
||||
'TOO_SHORT_MCHAT_DATE' => 'Das eingegebene Datumsformat ist zu kurz.',
|
||||
'TOO_LARGE_MCHAT_FLOOD_TIME' => 'Der Wert für die Flood-Zeit ist zu groß.',
|
||||
'TOO_LARGE_MCHAT_FLOOD_MESSAGES' => 'Der Wert für die Nachrichtenflug ist zu groß.',
|
||||
'TOO_SMALL_MCHAT_INDEX_HEIGHT' => 'Der Wert für die Höhe im Index ist zu klein.',
|
||||
'TOO_LARGE_MCHAT_INDEX_HEIGHT' => 'Der Wert für die Höhe im Index ist zu groß.',
|
||||
'TOO_LARGE_MCHAT_MAX_INPUT_HEIGHT' => 'Der Wert für die Höhe im Eingabefeldhöhe ist zu groß.',
|
||||
'TOO_SMALL_MCHAT_MESSAGE_NUM_ARCHIVE' => 'The number of message to display on the archive is too small.',
|
||||
'TOO_LARGE_MCHAT_MESSAGE_NUM_ARCHIVE' => 'Die Anzahl der Nachrichten für die Anzeige auf der Archivseite ist zu groß.',
|
||||
'TOO_SMALL_MCHAT_REFRESH' => 'Der Wert für die Aktualisierung ist zu klein.',
|
||||
'TOO_LARGE_MCHAT_REFRESH' => 'Der Wert für die Aktualisierung ist zu groß.',
|
||||
'TOO_SMALL_MCHAT_TIMEOUT' => 'Der Timeout-Wert für Benutzer ist zu klein.',
|
||||
'TOO_LARGE_MCHAT_TIMEOUT' => 'Der Timeout-Wert für Benutzer ist zu groß.',
|
||||
'TOO_SMALL_MCHAT_WHOIS_REFRESH' => 'Der Wert für <em>Wer chattet</em> ist zu klein.',
|
||||
'TOO_LARGE_MCHAT_WHOIS_REFRESH' => 'Der Wert für <em>Wer chattet</em> ist zu groß.',
|
||||
|
||||
'MCHAT_30X_REMNANTS' => 'Die Installation wurde abgebrochen. <br>Es befinden sich übriggebliebene Module des mChat MOD für phpBB 3.0.x in der Datenbank. Die mChat Extension funktioniert nicht korrekt, wenn diese Module vorhanden sind.<br>Du musst unbedingt den mChat MOD vollständig deinstallieren, damit es möglich ist, die mChat Extension zu installieren. Besonders die Module mit den folgenden IDs müssen gelöscht werden aus der %1$smodules Tabelle: %2$s',
|
||||
]);
|
||||
67
language/de/mchat_ucp.php
Normal file
67
language/de/mchat_ucp.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat [German]
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, [
|
||||
'MCHAT_PREFERENCES' => 'Shoutbox Einstellungen',
|
||||
'MCHAT_NO_SETTINGS' => 'Du bist nicht berechtigt irgendwelche Einstellungen anzupassen.',
|
||||
|
||||
'MCHAT_INDEX' => 'Auf dem Forenindex anzeigen',
|
||||
'MCHAT_SOUND' => 'Ton einschalten',
|
||||
'MCHAT_WHOIS_INDEX' => 'Zeige <em>Wer chattet</em> unter dem Chat an',
|
||||
'MCHAT_STATS_INDEX' => 'Zeige <em>Wer chattet</em> im Statistikbereich an',
|
||||
'MCHAT_STATS_INDEX_EXPLAIN' => 'Zeige wer chattet unter dem <em>Wer ist online</em>-Bereich auf dem Forenindex.',
|
||||
'MCHAT_AVATARS' => 'Zeige Avatare im Chat',
|
||||
'MCHAT_CAPITAL_LETTER' => 'Erster Buchstabe als Grossbuchstabe in deinen Nachrichten',
|
||||
'MCHAT_POSTS' => 'Zeige neue Beiträge an (derzeit alle deaktiviert, können im ACP in den Allgemeinen Einstellungen von Shoutbox aktiviert werden)',
|
||||
'MCHAT_DISPLAY_CHARACTER_COUNT' => 'Zeige die Anzahl der Zeichen beim Schreiben einer Nachricht an',
|
||||
'MCHAT_RELATIVE_TIME' => 'Zeige die relative Zeit für neue Nachrichten an',
|
||||
'MCHAT_RELATIVE_TIME_EXPLAIN' => 'Zeigt „gerade eben“, „vor einer Minute“ und so weiter für jede Nachricht an. Setze auf <em>Nein</em>, um immer das volle Datum zu sehen.',
|
||||
'MCHAT_MESSAGE_TOP' => 'Lokalisierung neuer Nachrichten',
|
||||
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'Neue Nachrichten werden oben oder unten im Chat erscheinen.',
|
||||
'MCHAT_LOCATION' => 'Lokalisierung auf der Forenübersicht',
|
||||
'MCHAT_BOTTOM' => 'Unten',
|
||||
'MCHAT_TOP' => 'Oben',
|
||||
|
||||
'MCHAT_POSTS_TOPIC' => 'Zeige neue Themen an',
|
||||
'MCHAT_POSTS_REPLY' => 'Zeige neue Antworten an',
|
||||
'MCHAT_POSTS_EDIT' => 'Zeige bearbeitete Beiträge an',
|
||||
'MCHAT_POSTS_QUOTE' => 'Zeige Zitatbeiträge an',
|
||||
'MCHAT_POSTS_LOGIN' => 'Zeige Benutzeranmeldungen an',
|
||||
|
||||
'MCHAT_DATE_FORMAT' => 'Datumsformat',
|
||||
'MCHAT_DATE_FORMAT_EXPLAIN' => 'Die verwendete Syntax ist identisch zur PHP <a href="http://www.php.net/date">date()</a> Funktion.',
|
||||
'MCHAT_CUSTOM_DATEFORMAT' => 'Eigenes…',
|
||||
]);
|
||||
68
language/de/permissions_mchat.php
Normal file
68
language/de/permissions_mchat.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat [German]
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, [
|
||||
'ACL_U_MCHAT_USE' => 'Kann mChat benutzen',
|
||||
'ACL_U_MCHAT_VIEW' => 'Kann mChat sehen',
|
||||
'ACL_U_MCHAT_EDIT' => 'Kann eigene mChat-Nachrichten bearbeiten',
|
||||
'ACL_U_MCHAT_DELETE' => 'Kann eigene mChat-Nachrichten löschen',
|
||||
'ACL_U_MCHAT_MODERATOR_EDIT' => 'Kann jedermanns Nachrichten bearbeiten',
|
||||
'ACL_U_MCHAT_MODERATOR_DELETE' => 'Kann jedermanns Nachrichten löschen',
|
||||
'ACL_U_MCHAT_IP' => 'Kann IP-Adressen sehen',
|
||||
'ACL_U_MCHAT_PM' => 'Kann Private Nachrichten benutzen',
|
||||
'ACL_U_MCHAT_LIKE' => 'Kann Nachrichten liken',
|
||||
'ACL_U_MCHAT_QUOTE' => 'Kann Nachrichten zitieren',
|
||||
'ACL_U_MCHAT_FLOOD_IGNORE' => 'Kann Flood-Intervall ignorieren',
|
||||
'ACL_U_MCHAT_ARCHIVE' => 'Kann das Archiv sehen',
|
||||
'ACL_U_MCHAT_BBCODE' => 'Kann BBCodes benutzen',
|
||||
'ACL_U_MCHAT_SMILIES' => 'Kann Smilies benutzen',
|
||||
'ACL_U_MCHAT_URLS' => 'Kann automatisch geparste URLs senden',
|
||||
|
||||
'ACL_U_MCHAT_AVATARS' => 'Kann anpassen <em>Avatare anzeigen</em>',
|
||||
'ACL_U_MCHAT_CAPITAL_LETTER' => 'Kann anpassen <em>Erster Buchstabe groß</em>',
|
||||
'ACL_U_MCHAT_CHARACTER_COUNT' => 'Kann anpassen <em>Zeige Zeichenanzahl an</em>',
|
||||
'ACL_U_MCHAT_DATE' => 'Kann anpassen <em>Datumsformat</em>',
|
||||
'ACL_U_MCHAT_INDEX' => 'Kann anpassen <em>Display on index</em>',
|
||||
'ACL_U_MCHAT_LOCATION' => 'Kann anpassen <em>Lokalisierung von mChat auf der Indexseite</em>',
|
||||
'ACL_U_MCHAT_MESSAGE_TOP' => 'Kann anpassen <em>Lokalisierung neuer mChat-Nachrichten</em>',
|
||||
'ACL_U_MCHAT_POSTS' => 'Kann anpassen <em>Neue Beiträge anzeigen</em>',
|
||||
'ACL_U_MCHAT_RELATIVE_TIME' => 'Kann anpassen <em>Relative Zeit anzeigen</em>',
|
||||
'ACL_U_MCHAT_SOUND' => 'Kann anpassen <em>Töne abspielen</em>',
|
||||
'ACL_U_MCHAT_WHOIS_INDEX' => 'Kann anpassen <em>„Wer chattet“-Anzeige unter dem Chat</em>',
|
||||
'ACL_U_MCHAT_STATS_INDEX' => 'Kann anpassen <em>„Wer chattet“-Anzeige im Statistikbereich</em>',
|
||||
|
||||
'ACL_A_MCHAT' => 'Kann mChat-Einstellungen verwalten',
|
||||
]);
|
||||
@@ -16,7 +16,7 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
@@ -34,30 +34,40 @@ if (empty($lang) || !is_array($lang))
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
$lang = array_merge($lang, [
|
||||
'MCHAT_TITLE' => 'mChat',
|
||||
'MCHAT_TITLE_COUNT' => 'mChat [<strong>%1$d</strong>]',
|
||||
'MCHAT_TITLE_COUNT' => [
|
||||
0 => 'mChat',
|
||||
1 => 'mChat [<strong>%1$d</strong>]',
|
||||
],
|
||||
'MCHAT_NAVBAR_CUSTOM_PAGE' => 'mChat page',
|
||||
'MCHAT_NAVBAR_ARCHIVE' => 'Archive',
|
||||
'MCHAT_NAVBAR_RULES' => 'Rules',
|
||||
|
||||
// Who is chatting
|
||||
'MCHAT_WHO_IS_CHATTING' => 'Who is chatting',
|
||||
'MCHAT_ONLINE_USERS_TOTAL' => array(
|
||||
'MCHAT_ONLINE_USERS_TOTAL' => [
|
||||
0 => 'No one is chatting',
|
||||
1 => '<strong>%1$d</strong> user is chatting',
|
||||
2 => '<strong>%1$d</strong> users are chatting',
|
||||
),
|
||||
],
|
||||
'MCHAT_ONLINE_EXPLAIN' => 'based on users active over the past %1$s',
|
||||
'MCHAT_HOURS' => array(
|
||||
'MCHAT_HOURS' => [
|
||||
1 => '%1$d hour',
|
||||
2 => '%1$d hours',
|
||||
),
|
||||
'MCHAT_MINUTES' => array(
|
||||
],
|
||||
'MCHAT_MINUTES' => [
|
||||
1 => '%1$d minute',
|
||||
2 => '%1$d minutes',
|
||||
),
|
||||
'MCHAT_SECONDS' => array(
|
||||
],
|
||||
'MCHAT_SECONDS' => [
|
||||
1 => '%1$d second',
|
||||
2 => '%1$d seconds',
|
||||
),
|
||||
],
|
||||
|
||||
// Custom translations for administrators
|
||||
'MCHAT_RULES_MESSAGE' => '',
|
||||
'MCHAT_STATIC_MESSAGE' => '',
|
||||
|
||||
// Post notification messages (%1$s is replaced with a link to the new/edited post, %2$s is replaced with a link to the forum)
|
||||
'MCHAT_NEW_POST' => 'posted a new topic: %1$s in %2$s',
|
||||
@@ -69,4 +79,4 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_NEW_EDIT' => 'edited a post: %1$s in %2$s',
|
||||
'MCHAT_NEW_EDIT_DELETED' => 'edited a post that was deleted',
|
||||
'MCHAT_NEW_LOGIN' => 'just logged in',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -16,7 +16,7 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
$lang = array_merge($lang, [
|
||||
// Module titles
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
'ACP_CAT_MCHAT_USER_CONFIG' => 'mChat in UCP',
|
||||
@@ -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_TABLE_PRUNED' => '<strong>mChat messages pruned: %2$d</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',
|
||||
));
|
||||
'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',
|
||||
]);
|
||||
|
||||
@@ -16,7 +16,7 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
@@ -34,6 +34,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
$lang = array_merge($lang, [
|
||||
'UCP_MCHAT_CONFIG' => 'mChat',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -16,7 +16,7 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
$lang = array_merge($lang, [
|
||||
'MCHAT_ADD' => 'Send',
|
||||
'MCHAT_ARCHIVE' => 'Archive',
|
||||
'MCHAT_ARCHIVE_PAGE' => 'mChat Archive',
|
||||
@@ -53,38 +53,36 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_RULES' => 'Rules',
|
||||
'MCHAT_WHOIS_USER' => 'IP whois for %1$s',
|
||||
'MCHAT_MESS_LONG' => 'Your message is too long. Please limit it to %1$d characters.',
|
||||
'MCHAT_NO_CUSTOM_PAGE' => 'The mChat custom page is not activated at this time.',
|
||||
'MCHAT_NO_CUSTOM_PAGE' => 'The mChat page is not activated at this time.',
|
||||
'MCHAT_NO_RULES' => 'The mChat rules page is not activated at this time.',
|
||||
'MCHAT_NOACCESS_ARCHIVE' => 'You don’t have permission to view the archive.',
|
||||
'MCHAT_NOJAVASCRIPT' => 'Please enable JavaScript to use mChat.',
|
||||
'MCHAT_NOMESSAGE' => 'No messages',
|
||||
'MCHAT_NOMESSAGEINPUT' => 'You have not entered a message',
|
||||
'MCHAT_MESSAGE_DELETED' => 'This message has been deleted.',
|
||||
'MCHAT_OK' => 'OK',
|
||||
'MCHAT_PAUSE' => 'Paused',
|
||||
'MCHAT_PERMISSIONS' => 'Change user’s permissions',
|
||||
'MCHAT_REFRESHING' => 'Refreshing…',
|
||||
'MCHAT_REFRESH_NO' => 'Update is off',
|
||||
'MCHAT_REFRESH_YES' => 'Updates every <strong>%1$d</strong> seconds',
|
||||
'MCHAT_RESPOND' => 'Respond to user',
|
||||
'MCHAT_SESSION_ENDS' => 'Chat session ends in %1$s',
|
||||
'MCHAT_SESSION_OUT' => 'Chat session has expired',
|
||||
'MCHAT_SMILES' => 'Smilies',
|
||||
'MCHAT_TOTALMESSAGES' => 'Total messages: <strong>%1$d</strong>',
|
||||
'MCHAT_USESOUND' => 'Play sound',
|
||||
'MCHAT_SOUND_ON' => 'Sound is on',
|
||||
'MCHAT_SOUND_OFF' => 'Sound is off',
|
||||
'MCHAT_ENTER' => 'Use Ctrl/Cmd + Enter for the alternative action',
|
||||
'MCHAT_ENTER_SUBMIT' => 'Enter sends the message',
|
||||
'MCHAT_ENTER_LINEBREAK' => 'Enter adds a new line',
|
||||
'MCHAT_COLLAPSE_TITLE' => 'Toggle visibility of mChat',
|
||||
'MCHAT_WHO_IS_REFRESH_EXPLAIN' => 'Refreshes every <strong>%1$d</strong> seconds',
|
||||
'MCHAT_MINUTES_AGO' => array(
|
||||
'MCHAT_MINUTES_AGO' => [
|
||||
0 => 'just now',
|
||||
1 => '%1$d minute ago',
|
||||
2 => '%1$d minutes ago',
|
||||
),
|
||||
],
|
||||
|
||||
// These messages are formatted with JavaScript, hence {} and no %d
|
||||
'MCHAT_CHARACTER_COUNT' => '<strong>{current}</strong> characters',
|
||||
'MCHAT_CHARACTER_COUNT_LIMIT' => '<strong>{current}</strong> out of {max} characters',
|
||||
'MCHAT_SESSION_ENDS_JS' => 'Chat session ends in {timeleft}',
|
||||
|
||||
// Custom translations for administrators
|
||||
'MCHAT_RULES_MESSAGE' => '',
|
||||
'MCHAT_STATIC_MESSAGE' => '',
|
||||
));
|
||||
'MCHAT_MENTION' => ' @{username} ',
|
||||
]);
|
||||
|
||||
@@ -16,7 +16,7 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
@@ -34,17 +34,18 @@ if (empty($lang) || !is_array($lang))
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
$lang = array_merge($lang, [
|
||||
// ACP Configuration sections
|
||||
'MCHAT_SETTINGS_INDEX' => 'Index page settings',
|
||||
'MCHAT_SETTINGS_CUSTOM' => 'Custom page settings',
|
||||
'MCHAT_SETTINGS_CUSTOM' => 'mChat page settings',
|
||||
'MCHAT_SETTINGS_ARCHIVE' => 'Archive page settings',
|
||||
'MCHAT_SETTINGS_POSTS' => 'New posts settings',
|
||||
'MCHAT_SETTINGS_MESSAGES' => 'Message settings',
|
||||
'MCHAT_SETTINGS_PRUNE' => 'Pruning settings (adjustable for founders only)',
|
||||
'MCHAT_SETTINGS_LOG' => 'Log 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 adjust individual user 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,88 +63,101 @@ $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 of the forum 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_CONFIG_SAVED' => 'mChat configuration has been updated',
|
||||
'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_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' => '<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 between refreshing messages.<br><em>You are limited from 2 to 3600 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',
|
||||
'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 <em>when</em> messages are checked if they can be deleted. It does <em>not</em> control <em>which</em> messages are deleted. <em>Default is 86400 = 24 hours.</em>',
|
||||
'MCHAT_PRUNE_GC_EXPLAIN' => 'The time that needs to pass before the next message pruning is triggered. Note: this setting controls <em>when</em> messages are checked if they can be deleted. It does <em>not</em> control <em>which</em> messages are deleted. <em>Default is 86400 seconds = 24 hours.</em>',
|
||||
'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' => 'Display link to the custom page in the navbar',
|
||||
'MCHAT_NAVBAR_LINK_COUNT' => 'Display number of active chat sessions in navbar link',
|
||||
'MCHAT_MESSAGE_NUM_CUSTOM' => 'Initial number of messages to display on the custom page',
|
||||
'MCHAT_MESSAGE_NUM_CUSTOM_EXPLAIN' => '<em>You are limited from 5 to 50. Default is 10.</em>',
|
||||
'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' => '<em>Default is 10.</em>',
|
||||
'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_INDEX_EXPLAIN' => '<em>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' => '<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 3600 seconds (1 hour). Default is 0. Set to 0 to disable.</em>',
|
||||
'MCHAT_FLOOD_MESSAGES' => 'Flood messages',
|
||||
'MCHAT_FLOOD_MESSAGES_EXPLAIN' => 'The number of messages a user can send consecutively before another user is required to post in the chat.<br><em>You are limited from 0 to 100 messages. 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_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.<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_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Maximum number of characters allowed per message posted.<br><em>Default is 500. Set to 0 to disable.</em>',
|
||||
'MCHAT_MAX_INPUT_HEIGHT' => 'Maximum input field height',
|
||||
'MCHAT_MAX_INPUT_HEIGHT_EXPLAIN' => 'The input field will not expand beyond this number of pixels.<br><em>You are limited from 0 to 1000. Default is 150. Set to 0 to not allow multi-line messages.</em>',
|
||||
'MCHAT_CUSTOM_PAGE' => 'Enable mChat page',
|
||||
'MCHAT_CUSTOM_HEIGHT' => 'mChat page height',
|
||||
'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => '<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_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. 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_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.',
|
||||
|
||||
'MCHAT_POSTS_AUTH_CHECK' => 'Require user permission',
|
||||
'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',
|
||||
'MCHAT_PURGED' => 'All mChat messages have been successfully deleted',
|
||||
'MCHAT_PURGED' => 'All mChat messages have been successfully deleted.',
|
||||
|
||||
'MCHAT_REPARSER_STATUS' => 'Message reparser status',
|
||||
'MCHAT_REPARSER_ACTIVE' => 'active',
|
||||
'MCHAT_REPARSER_FINISHED' => 'finished',
|
||||
|
||||
// '%1$s' contains 'Retain posts' and 'Delete posts' respectively
|
||||
'MCHAT_RETAIN_MESSAGES' => '%1$s and retain mChat messages',
|
||||
'MCHAT_DELETE_MESSAGES' => '%1$s and delete mChat messages',
|
||||
|
||||
// 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_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.',
|
||||
'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_LARGE_MCHAT_FLOOD_MESSAGES' => 'The flood messages 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_LARGE_MCHAT_MAX_INPUT_HEIGHT' => 'The max input height value 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.',
|
||||
'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.',
|
||||
|
||||
'MCHAT_30X_REMNANTS' => 'The installation as 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',
|
||||
]);
|
||||
|
||||
@@ -16,7 +16,7 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
$lang = array_merge($lang, [
|
||||
'MCHAT_PREFERENCES' => 'mChat preferences',
|
||||
'MCHAT_NO_SETTINGS' => 'You are not authorised to customise any settings.',
|
||||
|
||||
@@ -45,15 +45,10 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_STATS_INDEX_EXPLAIN' => 'Displays who is chatting below the <em>Who is online</em> section on the index page.',
|
||||
'MCHAT_AVATARS' => 'Display avatars',
|
||||
'MCHAT_CAPITAL_LETTER' => 'Capital first letter in your messages',
|
||||
'MCHAT_CHAT_AREA' => 'Input type',
|
||||
'MCHAT_INPUT_AREA' => 'Input field',
|
||||
'MCHAT_TEXT_AREA' => 'Text area',
|
||||
'MCHAT_POSTS' => 'Display new posts (currently all disabled, can be enabled in the mChat Global Settings section in the ACP)',
|
||||
'MCHAT_DISPLAY_CHARACTER_COUNT' => 'Display number of characters when typing a message',
|
||||
'MCHAT_RELATIVE_TIME' => 'Display relative time for new messages',
|
||||
'MCHAT_RELATIVE_TIME_EXPLAIN' => 'Displays “just now”, “1 minute ago” and so on for each message. Set to <em>No</em> to always display the full date.',
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Pause on input',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Do not update mChat upon entering a message',
|
||||
'MCHAT_MESSAGE_TOP' => 'Location of new chat messages',
|
||||
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'New messages will appear at the top or at the bottom in the chat.',
|
||||
'MCHAT_LOCATION' => 'Location on the index page',
|
||||
@@ -69,4 +64,4 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_DATE_FORMAT' => 'Date format',
|
||||
'MCHAT_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP <a href="http://www.php.net/date">date()</a> function.',
|
||||
'MCHAT_CUSTOM_DATEFORMAT' => 'Custom…',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -16,7 +16,7 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
$lang = [];
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
@@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
$lang = array_merge($lang, [
|
||||
'ACL_U_MCHAT_USE' => 'Can use mChat',
|
||||
'ACL_U_MCHAT_VIEW' => 'Can view mChat',
|
||||
'ACL_U_MCHAT_EDIT' => 'Can edit own messages',
|
||||
@@ -43,9 +43,9 @@ $lang = array_merge($lang, array(
|
||||
'ACL_U_MCHAT_MODERATOR_DELETE' => 'Can delete anyone’s messages',
|
||||
'ACL_U_MCHAT_IP' => 'Can view IP addresses',
|
||||
'ACL_U_MCHAT_PM' => 'Can use private message',
|
||||
'ACL_U_MCHAT_LIKE' => 'Can like messages',
|
||||
'ACL_U_MCHAT_QUOTE' => 'Can quote messages',
|
||||
'ACL_U_MCHAT_FLOOD_IGNORE' => 'Can ignore flood limit',
|
||||
'ACL_U_MCHAT_LIKE' => 'Can see like icon (requires BBCode permission)',
|
||||
'ACL_U_MCHAT_QUOTE' => 'Can see quote icon (requires BBCode permission)',
|
||||
'ACL_U_MCHAT_FLOOD_IGNORE' => 'Can ignore flood limits',
|
||||
'ACL_U_MCHAT_ARCHIVE' => 'Can view the archive',
|
||||
'ACL_U_MCHAT_BBCODE' => 'Can use BBCodes',
|
||||
'ACL_U_MCHAT_SMILIES' => 'Can use smilies',
|
||||
@@ -56,15 +56,13 @@ $lang = array_merge($lang, array(
|
||||
'ACL_U_MCHAT_CHARACTER_COUNT' => 'Can customise <em>Display number of characters</em>',
|
||||
'ACL_U_MCHAT_DATE' => 'Can customise <em>Date format</em>',
|
||||
'ACL_U_MCHAT_INDEX' => 'Can customise <em>Display on index</em>',
|
||||
'ACL_U_MCHAT_INPUT_AREA' => 'Can customise <em>Input type</em>',
|
||||
'ACL_U_MCHAT_LOCATION' => 'Can customise <em>Location of mChat on the index page</em>',
|
||||
'ACL_U_MCHAT_MESSAGE_TOP' => 'Can customise <em>Location of new chat messages</em>',
|
||||
'ACL_U_MCHAT_PAUSE_ON_INPUT' => 'Can customise <em>Pause on input</em>',
|
||||
'ACL_U_MCHAT_POSTS' => 'Can customise <em>Display new post</em>',
|
||||
'ACL_U_MCHAT_POSTS' => 'Can customise <em>Display new posts</em>',
|
||||
'ACL_U_MCHAT_RELATIVE_TIME' => 'Can customise <em>Display relative time</em>',
|
||||
'ACL_U_MCHAT_SOUND' => 'Can customise <em>Play sounds</em>',
|
||||
'ACL_U_MCHAT_WHOIS_INDEX' => 'Can customise <em>Display who is chatting below the chat</em>',
|
||||
'ACL_U_MCHAT_STATS_INDEX' => 'Can customise <em>Display who is chatting in the stats section</em>',
|
||||
|
||||
'ACL_A_MCHAT' => 'Can manage mChat settings',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use \phpbb\db\migration\migration;
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_0_0 extends migration
|
||||
{
|
||||
|
||||
@@ -135,28 +135,39 @@ class mchat_2_0_0_rc3 extends migration
|
||||
array('module.add', array(
|
||||
'acp',
|
||||
'ACP_CAT_DOT_MODS',
|
||||
'ACP_CAT_MCHAT'
|
||||
'ACP_CAT_MCHAT',
|
||||
)),
|
||||
|
||||
// Add ACP preferences module
|
||||
array('module.add', array(
|
||||
'acp',
|
||||
'ACP_CAT_MCHAT',
|
||||
array('module_basename' => '\dmzx\mchat\acp\acp_mchat_module'),
|
||||
array(
|
||||
'module_basename' => '\dmzx\mchat\acp\acp_mchat_module',
|
||||
'modes' => array(
|
||||
'globalsettings',
|
||||
'globalusersettings',
|
||||
),
|
||||
),
|
||||
)),
|
||||
|
||||
// Add UCP category
|
||||
array('module.add', array(
|
||||
'ucp',
|
||||
0,
|
||||
'UCP_MCHAT_CONFIG'
|
||||
'UCP_MCHAT_CONFIG',
|
||||
)),
|
||||
|
||||
// Add UCP preferences module
|
||||
array('module.add', array(
|
||||
'ucp',
|
||||
'UCP_MCHAT_CONFIG',
|
||||
array('module_basename' => '\dmzx\mchat\ucp\ucp_mchat_module'),
|
||||
array(
|
||||
'module_basename' => '\dmzx\mchat\ucp\ucp_mchat_module',
|
||||
'modes' => array(
|
||||
'configuration',
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
32
migrations/mchat_2_0_1.php
Normal file
32
migrations/mchat_2_0_1.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2017 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use dmzx\mchat\core\settings;
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_0_1 extends migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\dmzx\mchat\migrations\mchat_2_0_0',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.update', array('mchat_version', '2.0.1')),
|
||||
array('config.add', array('mchat_archive_sort', settings::ARCHIVE_SORT_BOTTOM_TOP)),
|
||||
);
|
||||
}
|
||||
}
|
||||
39
migrations/mchat_2_0_2.php
Normal file
39
migrations/mchat_2_0_2.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2017 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_0_2 extends migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\dmzx\mchat\migrations\mchat_2_0_1',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.update', array('mchat_version', '2.0.2')),
|
||||
|
||||
array('config.add', array('mchat_posts_auth_check', 0)),
|
||||
|
||||
// Move rules and static message from config to config_text table
|
||||
array('config_text.add', array('mchat_rules', $this->config['mchat_rules'])),
|
||||
array('config_text.add', array('mchat_static_message', $this->config['mchat_static_message'])),
|
||||
|
||||
array('config.remove', array('mchat_rules')),
|
||||
array('config.remove', array('mchat_static_message')),
|
||||
);
|
||||
}
|
||||
}
|
||||
30
migrations/mchat_2_0_3.php
Normal file
30
migrations/mchat_2_0_3.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_0_3 extends migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\dmzx\mchat\migrations\mchat_2_0_2',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.update', array('mchat_version', '2.0.3')),
|
||||
);
|
||||
}
|
||||
}
|
||||
30
migrations/mchat_2_1_0.php
Normal file
30
migrations/mchat_2_1_0.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_1_0 extends migration
|
||||
{
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\dmzx\mchat\migrations\mchat_2_1_0_rc1',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['mchat_version', '2.1.0']],
|
||||
];
|
||||
}
|
||||
}
|
||||
66
migrations/mchat_2_1_0_rc1.php
Normal file
66
migrations/mchat_2_1_0_rc1.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_1_0_rc1 extends migration
|
||||
{
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\dmzx\mchat\migrations\mchat_2_0_3',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['mchat_version', '2.1.0-RC1']],
|
||||
|
||||
['config.remove', ['mchat_navbar_link']],
|
||||
|
||||
['config.add', ['mchat_max_input_height', 150]],
|
||||
|
||||
['config.add', ['mchat_log_enabled', 1]],
|
||||
|
||||
// Message reparser
|
||||
['config.add', ['dmzx.mchat.text_reparser.mchat_messages_cron_interval', 10]],
|
||||
['config.add', ['dmzx.mchat.text_reparser.mchat_messages_last_cron', 0]],
|
||||
|
||||
// Remove pause on input
|
||||
['config.remove', ['mchat_pause_on_input']],
|
||||
['permission.remove', ['u_mchat_pause_on_input', true]],
|
||||
];
|
||||
}
|
||||
|
||||
public function update_schema()
|
||||
{
|
||||
return [
|
||||
'drop_columns' => [
|
||||
$this->table_prefix . 'users' => [
|
||||
'user_mchat_pause_on_input',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function revert_schema()
|
||||
{
|
||||
return [
|
||||
'add_columns' => [
|
||||
$this->table_prefix . 'users' => [
|
||||
'user_mchat_pause_on_input' => ['BOOL', 0],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
55
migrations/mchat_2_1_1.php
Normal file
55
migrations/mchat_2_1_1.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_1_1 extends migration
|
||||
{
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\dmzx\mchat\migrations\mchat_2_1_0',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['mchat_version', '2.1.1']],
|
||||
|
||||
['config.remove', ['mchat_input_area']],
|
||||
['permission.remove', ['u_mchat_input_area', true]],
|
||||
];
|
||||
}
|
||||
|
||||
public function update_schema()
|
||||
{
|
||||
return [
|
||||
'drop_columns' => [
|
||||
$this->table_prefix . 'users' => [
|
||||
'user_mchat_input_area',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function revert_schema()
|
||||
{
|
||||
return [
|
||||
'add_columns' => [
|
||||
$this->table_prefix . 'users' => [
|
||||
'user_mchat_input_area' => ['BOOL', 1],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
30
migrations/mchat_2_1_2.php
Normal file
30
migrations/mchat_2_1_2.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_1_2 extends migration
|
||||
{
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\dmzx\mchat\migrations\mchat_2_1_1',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['mchat_version', '2.1.2']],
|
||||
];
|
||||
}
|
||||
}
|
||||
31
migrations/mchat_2_1_3.php
Normal file
31
migrations/mchat_2_1_3.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2019 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_1_3 extends migration
|
||||
{
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\dmzx\mchat\migrations\mchat_2_1_2',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['mchat_version', '2.1.3']],
|
||||
['config.add', ['mchat_flood_messages', 0]],
|
||||
];
|
||||
}
|
||||
}
|
||||
30
migrations/mchat_2_1_4.php
Normal file
30
migrations/mchat_2_1_4.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2020 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_1_4 extends migration
|
||||
{
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\dmzx\mchat\migrations\mchat_2_1_4_rc2',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['mchat_version', '2.1.4']],
|
||||
];
|
||||
}
|
||||
}
|
||||
30
migrations/mchat_2_1_4_rc1.php
Normal file
30
migrations/mchat_2_1_4_rc1.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2020 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_1_4_rc1 extends migration
|
||||
{
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\dmzx\mchat\migrations\mchat_2_1_3',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['mchat_version', '2.1.4-RC1']],
|
||||
];
|
||||
}
|
||||
}
|
||||
30
migrations/mchat_2_1_4_rc2.php
Normal file
30
migrations/mchat_2_1_4_rc2.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2020 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class mchat_2_1_4_rc2 extends migration
|
||||
{
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\dmzx\mchat\migrations\mchat_2_1_4_rc1',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['mchat_version', '2.1.4-RC2']],
|
||||
];
|
||||
}
|
||||
}
|
||||
BIN
sounds/add.mp3
BIN
sounds/add.mp3
Binary file not shown.
BIN
sounds/del.mp3
BIN
sounds/del.mp3
Binary file not shown.
BIN
sounds/edit.mp3
BIN
sounds/edit.mp3
Binary file not shown.
BIN
sounds/error.mp3
BIN
sounds/error.mp3
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat_absolution.css' %}
|
||||
18
styles/Absolution/theme/mchat_absolution.css
Normal file
18
styles/Absolution/theme/mchat_absolution.css
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
*
|
||||
* mChat CSS for Absolution
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
.mchat-nav-link-title {
|
||||
color: #082c51;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mchat-nav-link-title i {
|
||||
color: #EE8B0A;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat_allanstyle.css' %}
|
||||
<script>
|
||||
document.querySelector('#mchat-body').classList.add('topiclist');
|
||||
document.querySelector('#mchat-body').classList.add('forums');
|
||||
</script>
|
||||
17
styles/AllanStyle-SUBSILVER/theme/mchat_allanstyle.css
Normal file
17
styles/AllanStyle-SUBSILVER/theme/mchat_allanstyle.css
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
*
|
||||
* mChat CSS for AllanStyle SUBSILVER
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
@media only screen and (min-width: 700px), only screen and (min-device-width: 700px) {
|
||||
|
||||
.mchat-wrapper .list-inner {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat_cleansilver.css' %}
|
||||
26
styles/CleanSilver/theme/mchat_cleansilver.css
Normal file
26
styles/CleanSilver/theme/mchat_cleansilver.css
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
*
|
||||
* mChat CSS for CleanSilver
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2017 MannixMD
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
.mchat-panel-buttons .icon.fa.fa-smile-o {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.mchat-wrapper li.header dd {
|
||||
width: 95px;
|
||||
}
|
||||
|
||||
.mchat-wrapper li.header dd.lastpost {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.mchat-button-is-down {
|
||||
border-style: none;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat_hexagonreborn.css' %}
|
||||
26
styles/HexagonReborn/theme/mchat_hexagonreborn.css
Normal file
26
styles/HexagonReborn/theme/mchat_hexagonreborn.css
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
*
|
||||
* mChat CSS for Hexagon Reborn
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2017 MannixMD
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
.mchat-button-down {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.mchat-button-down .icon {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.mchat-button-is-down {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
.mchat-input-control button:hover .icon {
|
||||
color: #de7300;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat_myinvision.css' %}
|
||||
20
styles/MyInvision/theme/mchat_myinvision.css
Normal file
20
styles/MyInvision/theme/mchat_myinvision.css
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
*
|
||||
* mChat CSS for MyInvision
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2017 MannixMD
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
.mchat-status {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#mchat-panel {
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat_projectdurango.css' %}
|
||||
78
styles/Project_Durango/theme/mchat_projectdurango.css
Normal file
78
styles/Project_Durango/theme/mchat_projectdurango.css
Normal file
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
*
|
||||
* mChat CSS for Project Durango
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2017 MannixMD
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
.mchat-panel-buttons .button {
|
||||
border-color: #3a3a3a;
|
||||
background: #3a3a3a;
|
||||
}
|
||||
|
||||
.mchat-panel-buttons .button:hover {
|
||||
background: #5dc21e;
|
||||
border-color: #5dc21e;
|
||||
}
|
||||
|
||||
.mchat-panel-button .button .icon {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.mchat-panel-buttons .icon {
|
||||
color: #5dc21e;
|
||||
}
|
||||
|
||||
.mchat-input-control button:hover .icon {
|
||||
color: #5dc21e;
|
||||
}
|
||||
|
||||
ul#mchat-messages {
|
||||
background: #c2c2c2;
|
||||
}
|
||||
|
||||
.mchat-messages-top .row {
|
||||
border-bottom-color: #107c10;
|
||||
border-bottom-width: 4px;
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
.mchat-text {
|
||||
color: #3a3a3a;
|
||||
}
|
||||
|
||||
ul.mchat-buttons .icon {
|
||||
color: #107c10;
|
||||
}
|
||||
|
||||
.mchat-wrapper .mchat-buttons li {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
#mchat-main {
|
||||
border-top: 4px solid #107c10;
|
||||
}
|
||||
|
||||
#mchat-messages li.row:hover {
|
||||
background: #c2c2c2;
|
||||
}
|
||||
|
||||
.mchat-message-header {
|
||||
color: #3a3a3a;
|
||||
}
|
||||
|
||||
.mchat-button-add .icon {
|
||||
color: #107c10;
|
||||
}
|
||||
|
||||
#mchat-confirm textarea {
|
||||
color: #f1f1f1;
|
||||
}
|
||||
|
||||
#mchat-panel {
|
||||
background-color: #6b6b6b;
|
||||
}
|
||||
1
styles/SE_Gamer/template/event/overall_footer_after.html
Normal file
1
styles/SE_Gamer/template/event/overall_footer_after.html
Normal file
@@ -0,0 +1 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat_se_gamer.css' %}
|
||||
16
styles/SE_Gamer/theme/mchat_se_gamer.css
Normal file
16
styles/SE_Gamer/theme/mchat_se_gamer.css
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
*
|
||||
* mChat CSS for SE Gamer
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2018 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
.mchat-nav-link-title,
|
||||
.mchat-nav-link-title:hover,
|
||||
.mchat-nav-link,
|
||||
.mchat-nav-link:hover {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<!-- DEFINE $MCHAT_USE_WHITE_MESSAGE_ICONS = SOP_SKDARK_SW or FALSE -->
|
||||
@@ -1,2 +0,0 @@
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat.css -->
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat_custom.css -->
|
||||
@@ -1 +0,0 @@
|
||||
<li class="li-mchat"><a href="{U_MCHAT}" title="{MCHAT_TITLE_HINT}" class="mchat-nav-link-title"><i class="icon-mchat"></i><span class="mchat-nav-link">{MCHAT_TITLE}</span></a></li>
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
.icon-mchat {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.icon-mchat:before, #mChat + .inner li.header dt:before {
|
||||
content: '\e0e6';
|
||||
}
|
||||
6
styles/all/template/javascript/autosize.min.js
vendored
Normal file
6
styles/all/template/javascript/autosize.min.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
autosize 4.0.2
|
||||
license: MIT
|
||||
http://www.jacklmoore.com/autosize
|
||||
*/
|
||||
!function(e,t){if("function"==typeof define&&define.amd)define(["module","exports"],t);else if("undefined"!=typeof exports)t(module,exports);else{var n={exports:{}};t(n,n.exports),e.autosize=n.exports}}(this,function(e,t){"use strict";var n,o,p="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return-1<n.indexOf(e)},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);-1<t&&(n.splice(t,1),o.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function r(r){if(r&&r.nodeName&&"TEXTAREA"===r.nodeName&&!p.has(r)){var e,n=null,o=null,i=null,d=function(){r.clientWidth!==o&&a()},l=function(t){window.removeEventListener("resize",d,!1),r.removeEventListener("input",a,!1),r.removeEventListener("keyup",a,!1),r.removeEventListener("autosize:destroy",l,!1),r.removeEventListener("autosize:update",a,!1),Object.keys(t).forEach(function(e){r.style[e]=t[e]}),p.delete(r)}.bind(r,{height:r.style.height,resize:r.style.resize,overflowY:r.style.overflowY,overflowX:r.style.overflowX,wordWrap:r.style.wordWrap});r.addEventListener("autosize:destroy",l,!1),"onpropertychange"in r&&"oninput"in r&&r.addEventListener("keyup",a,!1),window.addEventListener("resize",d,!1),r.addEventListener("input",a,!1),r.addEventListener("autosize:update",a,!1),r.style.overflowX="hidden",r.style.wordWrap="break-word",p.set(r,{destroy:l,update:a}),"vertical"===(e=window.getComputedStyle(r,null)).resize?r.style.resize="none":"both"===e.resize&&(r.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),a()}function s(e){var t=r.style.width;r.style.width="0px",r.offsetWidth,r.style.width=t,r.style.overflowY=e}function u(){if(0!==r.scrollHeight){var e=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(r),t=document.documentElement&&document.documentElement.scrollTop;r.style.height="",r.style.height=r.scrollHeight+n+"px",o=r.clientWidth,e.forEach(function(e){e.node.scrollTop=e.scrollTop}),t&&(document.documentElement.scrollTop=t)}}function a(){u();var e=Math.round(parseFloat(r.style.height)),t=window.getComputedStyle(r,null),n="content-box"===t.boxSizing?Math.round(parseFloat(t.height)):r.offsetHeight;if(n<e?"hidden"===t.overflowY&&(s("scroll"),u(),n="content-box"===t.boxSizing?Math.round(parseFloat(window.getComputedStyle(r,null).height)):r.offsetHeight):"hidden"!==t.overflowY&&(s("hidden"),u(),n="content-box"===t.boxSizing?Math.round(parseFloat(window.getComputedStyle(r,null).height)):r.offsetHeight),i!==n){i=n;var o=c("autosize:resized");try{r.dispatchEvent(o)}catch(e){}}}}function i(e){var t=p.get(e);t&&t.destroy()}function d(e){var t=p.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return r(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],d),e}),t.default=l,e.exports=t.default});
|
||||
@@ -1,211 +0,0 @@
|
||||
// Based off https://code.google.com/p/gaequery/source/browse/trunk/src/static/scripts/jquery.autogrow-textarea.js?r=2
|
||||
// Modified by David Beck
|
||||
// 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 );
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
/*
|
||||
* Auto-growing textareas; technique ripped from Facebook
|
||||
*/
|
||||
$.fn.autogrow = function(options) {
|
||||
|
||||
options = $.extend( {
|
||||
vertical: true,
|
||||
horizontal: false,
|
||||
characterSlop: 0
|
||||
}, options);
|
||||
|
||||
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" );
|
||||
|
||||
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'),
|
||||
whiteSpace: 'pre-wrap',
|
||||
resize: 'none'
|
||||
} ).appendTo(document.body);
|
||||
|
||||
shadow.html( 'a' );
|
||||
var characterWidth = shadow.width();
|
||||
shadow.html( '' );
|
||||
var isTextarea = $this.is('textarea');
|
||||
|
||||
var update = function( val ) {
|
||||
|
||||
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( 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( $(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;
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
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;
|
||||
|
||||
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();
|
||||
} );
|
||||
|
||||
update.apply(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
|
||||
};
|
||||
|
||||
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();
|
||||
|
||||
var range = doc.selection.createRange(),
|
||||
range2 = doc.body.createTextRange();
|
||||
|
||||
res.text = range.text;
|
||||
|
||||
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 */
|
||||
}
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
var entityMap = {
|
||||
"&": "&",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
"/": '/',
|
||||
" ": ' '
|
||||
};
|
||||
|
||||
function escapeHtml(string) {
|
||||
return String(string).replace(/[&<>"'\/\ ]/g, function (s) {
|
||||
return entityMap[s];
|
||||
} );
|
||||
}
|
||||
} ) );
|
||||
53
styles/all/template/javascript/mchat.collapse.arty.js
Normal file
53
styles/all/template/javascript/mchat.collapse.arty.js
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
*
|
||||
* mchat.collapse.js - Collapse mChat container for styles by Arty
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2017 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
jQuery(function($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Most code below copied from elegance/template/forum_fn.js for phpBB 3.2.2
|
||||
|
||||
var $this = $('.mchat-wrapper li.header').first(),
|
||||
forum = $this.closest('.topiclist').next(),
|
||||
id = 'mchat',
|
||||
toggled = false,
|
||||
toggle;
|
||||
|
||||
// Add toggle code
|
||||
$this.append('<a class="forum-toggle" href="#"></a>');
|
||||
toggle = $this.find('.forum-toggle');
|
||||
toggle.click(function(event) {
|
||||
event.preventDefault();
|
||||
$(mChat).trigger('mchat_collapse_toggle_before', [{collapsed: !toggle}]);
|
||||
if (toggled) {
|
||||
forum.stop(true, true).slideDown(200, function() {
|
||||
$(mChat).trigger('mchat_collapse_toggle_after', [{collapsed: toggle}]);
|
||||
});
|
||||
toggled = false;
|
||||
toggle.removeClass('toggled');
|
||||
phpbb.deleteCookie('toggled-' + id, styleConfig.cookieConfig);
|
||||
return;
|
||||
}
|
||||
forum.stop(true, true).slideUp(200, function() {
|
||||
$(mChat).trigger('mchat_collapse_toggle_after', [{collapsed: toggle}]);
|
||||
});
|
||||
toggled = true;
|
||||
toggle.addClass('toggled');
|
||||
phpbb.setCookie('toggled-' + id, '1', styleConfig.cookieConfig);
|
||||
});
|
||||
|
||||
// Check default state
|
||||
if (phpbb.getCookie('toggled-' + id, styleConfig.cookieConfig) === '1') {
|
||||
forum.stop(true, true).slideUp(0);
|
||||
toggled = true;
|
||||
toggle.addClass('toggled');
|
||||
}
|
||||
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,64 +1,61 @@
|
||||
<!-- IF MCHAT_IS_ARCHIVE_PAGE or not (MCHAT_ALLOW_USE and S_BBCODE_ALLOWED) -->
|
||||
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
|
||||
<!-- ENDIF -->
|
||||
{% if MCHAT_PAGE == 'archive' or not (MCHAT_ALLOW_USE and S_BBCODE_ALLOWED) %}
|
||||
{% INCLUDEJS T_ASSETS_PATH ~ '/javascript/editor.js' %}
|
||||
{% endif %}
|
||||
{% if MCHAT_MAX_INPUT_HEIGHT %}
|
||||
{% INCLUDEJS '@dmzx_mchat/javascript/autosize.min.js' %}
|
||||
{% endif %}
|
||||
{% INCLUDEJS '@dmzx_mchat/javascript/jquery.titlealert.min.js' %}
|
||||
{% INCLUDEJS '@dmzx_mchat/javascript/mchat.js' %}
|
||||
|
||||
<!-- INCLUDEJS @dmzx_mchat/javascript/jquery.autogrow-textarea.js -->
|
||||
<!-- INCLUDEJS @dmzx_mchat/javascript/jquery.titlealert.min.js -->
|
||||
<!-- INCLUDEJS @dmzx_mchat/javascript/mchat.js -->
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
<script>
|
||||
var form_name = 'postform';
|
||||
var text_name = 'message';
|
||||
var mChat = {
|
||||
// General settings
|
||||
actionUrls : {
|
||||
<!-- BEGIN mchaturl -->
|
||||
{mchaturl.ACTION}: '{mchaturl.URL}'<!-- IF not mchaturl.IS_LAST -->,<!-- ENDIF -->
|
||||
<!-- END mchaturl -->
|
||||
{% for mchaturl in loops.mchaturl %}
|
||||
{{ mchaturl.ACTION }}: '{{ mchaturl.URL }}'{{ not loop.last ? ',' }}
|
||||
{% endfor %}
|
||||
},
|
||||
page : '{MCHAT_PAGE}',
|
||||
cookie : '{A_COOKIE_NAME}',
|
||||
customPage : <!-- IF MCHAT_IS_CUSTOM_PAGE -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
archivePage : <!-- IF MCHAT_IS_ARCHIVE_PAGE -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
pause : <!-- IF MCHAT_PAUSE_ON_INPUT -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
playSound : <!-- IF MCHAT_SOUND -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
messageTop : <!-- IF MCHAT_MESSAGE_TOP -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
allowBBCodes : <!-- IF S_BBCODE_ALLOWED -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
liveUpdates : <!-- IF MCHAT_LIVE_UPDATES -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
relativeTime : <!-- IF MCHAT_RELATIVE_TIME -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
showCharCount : <!-- IF MCHAT_CHARACTER_COUNT -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
page : '{{ MCHAT_PAGE | escape('js') }}',
|
||||
currentUrl : '{{ MCHAT_CURRENT_URL | escape('js') }}',
|
||||
cookie : '{{ COOKIE_NAME | escape('js') }}',
|
||||
playSound : {{ MCHAT_SOUND ? 'true' : 'false' }},
|
||||
messageTop : {{ MCHAT_MESSAGE_TOP ? 'true' : 'false' }},
|
||||
allowBBCodes : {{ S_BBCODE_ALLOWED ? 'true' : 'false' }},
|
||||
relativeTime : {{ MCHAT_RELATIVE_TIME ? 'true' : 'false' }},
|
||||
showCharCount : {{ MCHAT_CHARACTER_COUNT ? 'true' : 'false' }},
|
||||
jumpTo : {{ MCHAT_JUMP_TO }},
|
||||
|
||||
// Limits & timeouts
|
||||
refreshTime : {MCHAT_REFRESH_JS},
|
||||
whoisRefresh : {MCHAT_WHOIS_REFRESH},
|
||||
timeout : {MCHAT_TIMEOUT},
|
||||
mssgLngth : {MCHAT_MESSAGE_LNGTH},
|
||||
editDeleteLimit : {MCHAT_EDIT_DELETE_LIMIT},
|
||||
logId : {MCHAT_LOG_ID},
|
||||
removeBBCodes : '{A_MCHAT_DISALLOWED_BBCODES}',
|
||||
refreshTime : {{ MCHAT_REFRESH_JS }},
|
||||
whoisRefresh : {{ MCHAT_WHOIS_REFRESH }},
|
||||
timeout : {{ MCHAT_TIMEOUT }},
|
||||
mssgLngth : {{ MCHAT_MAX_MESSAGE_LENGTH }},
|
||||
maxInputHeight : {{ MCHAT_MAX_INPUT_HEIGHT }},
|
||||
editDeleteLimit : {{ MCHAT_EDIT_DELETE_LIMIT }},
|
||||
logId : {{ MCHAT_LOG_ID }},
|
||||
latestMessageId : {{ MCHAT_LATEST_MESSAGE_ID | default(0) }},
|
||||
removeBBCodes : '{{ MCHAT_DISALLOWED_BBCODES | escape('js') }}',
|
||||
|
||||
// Language
|
||||
lang: {
|
||||
minutesAgo : {
|
||||
<!-- BEGIN mchattime -->
|
||||
{mchattime.KEY}: '{mchattime.A_LANG}'<!-- IF not mchattime.IS_LAST -->,<!-- ENDIF -->
|
||||
<!-- END mchattime -->
|
||||
{% if MCHAT_RELATIVE_TIME %}
|
||||
{% for minute in 0..MCHAT_MINUTES_AGO_LIMIT-1 %}
|
||||
{{ minute }}: '{{ lang('MCHAT_MINUTES_AGO', minute) | escape('js') }}'{{ not loop.last ? ',' }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
},
|
||||
err : '{LA_ERROR}',
|
||||
parserErr : '{LA_AJAX_ERROR_TEXT_PARSERERROR}',
|
||||
newMessageAlert : '{LA_MCHAT_NEW_CHAT}',
|
||||
noMessageInput : '{LA_MCHAT_NOMESSAGEINPUT}',
|
||||
editInfo : '{LA_MCHAT_EDITINFO}',
|
||||
delConfirm : '{LA_MCHAT_DELCONFIRM}',
|
||||
sessOut : '{LA_MCHAT_SESSION_OUT}',
|
||||
sessEnds : '{LA_MCHAT_SESSION_ENDS_JS}',
|
||||
refreshYes : '{A_MCHAT_REFRESH_YES}',
|
||||
refreshNo : '{LA_MCHAT_REFRESH_NO}',
|
||||
charCount : '<!-- IF MCHAT_MESSAGE_LNGTH -->{LA_MCHAT_CHARACTER_COUNT_LIMIT}<!-- ELSE -->{LA_MCHAT_CHARACTER_COUNT}<!-- ENDIF -->',
|
||||
mssgLngthLong : '{A_MCHAT_MESS_LONG}',
|
||||
likes : '{LA_MCHAT_LIKES}'
|
||||
err : '{{ lang('ERROR') | escape('js') }}',
|
||||
parserErr : '{{ lang('AJAX_ERROR_TEXT_PARSERERROR') | escape('js') }}',
|
||||
newMessageAlert : '{{ lang('MCHAT_NEW_CHAT') | escape('js') }}',
|
||||
editInfo : '{{ lang('MCHAT_EDITINFO') | escape('js') }}',
|
||||
delConfirm : '{{ lang('MCHAT_DELCONFIRM') | escape('js') }}',
|
||||
mention : '{{ lang('MCHAT_MENTION') | escape('js') }}',
|
||||
charCount : '{{ lang(MCHAT_MAX_MESSAGE_LENGTH ? 'MCHAT_CHARACTER_COUNT_LIMIT' : 'MCHAT_CHARACTER_COUNT') | escape('js') }}',
|
||||
mssgLngthLong : '{{ lang('MCHAT_MESS_LONG', MCHAT_MAX_MESSAGE_LENGTH) | escape('js') }}',
|
||||
likes : '{{ lang('MCHAT_LIKES') | escape('js') }}'
|
||||
}
|
||||
};
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
2
styles/basic/template/event/overall_footer_after.html
Normal file
2
styles/basic/template/event/overall_footer_after.html
Normal file
@@ -0,0 +1,2 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat.arty.css' %}
|
||||
{% INCLUDEJS '@dmzx_mchat/javascript/mchat.collapse.arty.js' %}
|
||||
@@ -1,2 +0,0 @@
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat.css -->
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat_custom.css -->
|
||||
@@ -1 +0,0 @@
|
||||
<li class="tab mchat" data-select-match="mchat" data-responsive-class="tab small-icon icon-mchat"><a class="nav-link" href="{U_MCHAT}" title="{MCHAT_TITLE_HINT}" class="mchat-nav-link mchat-nav-link-title" role="menuitem">{MCHAT_TITLE}</a></li>
|
||||
@@ -1,77 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
.icon-mchat {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.icon-mchat:after {
|
||||
content: '\f086';
|
||||
font-family: 'FontAwesome';
|
||||
width: 18px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
height: 14px;
|
||||
margin-top: -7px;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
vertical-align: baseline;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
text-indent: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.navbar .nav-tabs .mchat .nav-link {
|
||||
position: relative;
|
||||
text-indent: 999px;
|
||||
width: 15px;
|
||||
padding: 0 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.navbar .nav-tabs .mchat .nav-link:after {
|
||||
content: '\f086';
|
||||
font-family: 'FontAwesome';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -7.5px;
|
||||
width: 15px;
|
||||
line-height: 15px;
|
||||
height: 15px;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
text-indent: 0;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
left:8px
|
||||
}
|
||||
|
||||
.rtl .navbar .nav-tabs .mchat .nav-link {
|
||||
padding-left: 12px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.rtl .navbar .nav-tabs .mchat .nav-link:after {
|
||||
left: auto;
|
||||
right: 8px;
|
||||
}
|
||||
|
||||
li.mchat-message:first-child {
|
||||
border-top-width: 1px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
li.mchat-message:last-child {
|
||||
border-bottom-width: 1px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<!-- DEFINE $MCHAT_USE_WHITE_MESSAGE_ICONS = TRUE -->
|
||||
1
styles/black/template/event/overall_footer_after.html
Normal file
1
styles/black/template/event/overall_footer_after.html
Normal file
@@ -0,0 +1 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat.arty.css' %}
|
||||
@@ -1,2 +0,0 @@
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat.css -->
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat_custom.css -->
|
||||
@@ -1 +0,0 @@
|
||||
<li class="tab mchat" data-select-match="mchat" data-responsive-class="tab small-icon icon-mchat"><a class="nav-link" href="{U_MCHAT}" title="{MCHAT_TITLE_HINT}" class="mchat-nav-link mchat-nav-link-title" role="menuitem">{MCHAT_TITLE}</a></li>
|
||||
@@ -1,67 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
.icon-mchat {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.icon-mchat:after {
|
||||
content: '\f086';
|
||||
font-family: 'FontAwesome';
|
||||
width: 18px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
height: 14px;
|
||||
margin-top: -7px;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
vertical-align: baseline;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
text-indent: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.navbar .nav-tabs .mchat .nav-link {
|
||||
position: relative;
|
||||
text-indent: 999px;
|
||||
width: 15px;
|
||||
padding: 0 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.navbar .nav-tabs .mchat .nav-link:after {
|
||||
content: '\f086';
|
||||
font-family: 'FontAwesome';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -7.5px;
|
||||
width: 15px;
|
||||
line-height: 15px;
|
||||
height: 15px;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
text-indent: 0;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
left:8px
|
||||
}
|
||||
|
||||
.rtl .navbar .nav-tabs .mchat .nav-link {
|
||||
padding-left: 12px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.rtl .navbar .nav-tabs .mchat .nav-link:after {
|
||||
left: auto;
|
||||
right: 8px;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
<!-- IF MCHAT_INDEX and MCHAT_LOCATION -->
|
||||
<!-- INCLUDE @dmzx_mchat/mchat_body.html -->
|
||||
<!-- ENDIF -->
|
||||
@@ -1 +0,0 @@
|
||||
<!-- Leave empty -->
|
||||
@@ -1,3 +0,0 @@
|
||||
<!-- IF MCHAT_ALLOW_USE -->
|
||||
<script>$.sceditor = false;</script>
|
||||
<!-- ENDIF -->
|
||||
@@ -1,2 +0,0 @@
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat.css -->
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat_custom.css -->
|
||||
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
ul#mchat-messages.topiclist li {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mchat-text {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
ul.mchat-buttons > li {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
#mchat-panel.cp-mini .button2 {
|
||||
float: none;
|
||||
}
|
||||
|
||||
#mchat-panel #st_editor_buttons {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.mchat-footer label {
|
||||
padding-left: 3px;
|
||||
}
|
||||
2
styles/digi/template/event/overall_footer_after.html
Normal file
2
styles/digi/template/event/overall_footer_after.html
Normal file
@@ -0,0 +1,2 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat.arty.css' %}
|
||||
{% INCLUDEJS '@dmzx_mchat/javascript/mchat.collapse.arty.js' %}
|
||||
2
styles/elegance/template/event/overall_footer_after.html
Normal file
2
styles/elegance/template/event/overall_footer_after.html
Normal file
@@ -0,0 +1,2 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat.arty.css' %}
|
||||
{% INCLUDEJS '@dmzx_mchat/javascript/mchat.collapse.arty.js' %}
|
||||
@@ -1,2 +0,0 @@
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat.css -->
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat_custom.css -->
|
||||
@@ -1 +0,0 @@
|
||||
<li class="tab mchat" data-select-match="mchat" data-responsive-class="tab small-icon icon-mchat"><a class="nav-link" href="{U_MCHAT}" title="{MCHAT_TITLE_HINT}" class="mchat-nav-link mchat-nav-link-title" role="menuitem">{MCHAT_TITLE}</a></li>
|
||||
@@ -1,67 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
.icon-mchat {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.icon-mchat:after {
|
||||
content: '\f086';
|
||||
font-family: 'FontAwesome';
|
||||
width: 18px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
height: 14px;
|
||||
margin-top: -7px;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
vertical-align: baseline;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
text-indent: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.navbar .nav-tabs .mchat .nav-link {
|
||||
position: relative;
|
||||
text-indent: 999px;
|
||||
width: 15px;
|
||||
padding: 0 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.navbar .nav-tabs .mchat .nav-link:after {
|
||||
content: '\f086';
|
||||
font-family: 'FontAwesome';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -7.5px;
|
||||
width: 15px;
|
||||
line-height: 15px;
|
||||
height: 15px;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
text-indent: 0;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
left:8px
|
||||
}
|
||||
|
||||
.rtl .navbar .nav-tabs .mchat .nav-link {
|
||||
padding-left: 12px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.rtl .navbar .nav-tabs .mchat .nav-link:after {
|
||||
left: auto;
|
||||
right: 8px;
|
||||
}
|
||||
2
styles/latte/template/event/overall_footer_after.html
Normal file
2
styles/latte/template/event/overall_footer_after.html
Normal file
@@ -0,0 +1,2 @@
|
||||
{% INCLUDECSS '@dmzx_mchat/mchat.arty.css' %}
|
||||
{% INCLUDEJS '@dmzx_mchat/javascript/mchat.collapse.arty.js' %}
|
||||
@@ -1,2 +0,0 @@
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat.css -->
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat_custom.css -->
|
||||
@@ -1 +0,0 @@
|
||||
<li class="tab mchat" data-select-match="mchat" data-responsive-class="tab small-icon icon-mchat"><a class="nav-link" href="{U_MCHAT}" title="{MCHAT_TITLE_HINT}" class="mchat-nav-link mchat-nav-link-title" role="menuitem">{MCHAT_TITLE}</a></li>
|
||||
@@ -1,67 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi - https://kasimi.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
.icon-mchat {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.icon-mchat:after {
|
||||
content: '\f086';
|
||||
font-family: 'FontAwesome';
|
||||
width: 18px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
height: 14px;
|
||||
margin-top: -7px;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
vertical-align: baseline;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
text-indent: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.navbar .nav-tabs .mchat .nav-link {
|
||||
position: relative;
|
||||
text-indent: 999px;
|
||||
width: 15px;
|
||||
padding: 0 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.navbar .nav-tabs .mchat .nav-link:after {
|
||||
content: '\f086';
|
||||
font-family: 'FontAwesome';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -7.5px;
|
||||
width: 15px;
|
||||
line-height: 15px;
|
||||
height: 15px;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
text-indent: 0;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
left:8px
|
||||
}
|
||||
|
||||
.rtl .navbar .nav-tabs .mchat .nav-link {
|
||||
padding-left: 12px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.rtl .navbar .nav-tabs .mchat .nav-link:after {
|
||||
left: auto;
|
||||
right: 8px;
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat.css -->
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat_custom.css -->
|
||||
@@ -1 +0,0 @@
|
||||
<li class="small-icon icon-mchat" data-last-responsive="true"><a href="{U_MCHAT}" title="{MCHAT_TITLE_HINT}" class="mchat-nav-link-title" role="menuitem"><span class="mchat-nav-link">{MCHAT_TITLE}</span></a></li>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user