Version 1.0.0-RC1

This commit is contained in:
dmzx
2016-02-15 21:14:22 +01:00
parent a4e20abe15
commit 560ab2ee81
27 changed files with 700 additions and 1472 deletions

View File

@@ -1,4 +1,4 @@
# phpBB mChat Extension
# mChat Extension for phpBB 3.1
[![Build Status](https://travis-ci.org/dmzx/mChat-Extension.svg?branch=master)](https://travis-ci.org/dmzx/mChat-Extension)
@@ -9,12 +9,12 @@
3. In the `ext` directory of your phpBB board, create a new directory named `dmzx` (if it does not already exist).
4. Copy the `mchat` folder to `/ext/dmzx/` (if done correctly, you'll have the main extension class at (your forum root)/ext/dmzx/mchat/composer.json).
5. Navigate in the ACP to `Customise -> Manage extensions`.
6. Look for `mChat Extension` under the Disabled Extensions list, and click its `Enable` link.
6. Look for `mChat Extension for phpBB 3.1` under the Disabled Extensions list, and click its `Enable` link.
## Uninstall
1. Navigate in the ACP to `Customise -> Extension Management -> Extensions`.
2. Look for `mChat Extension` under the Enabled Extensions list, and click its `Disable` link.
2. Look for `mChat Extension for phpBB 3.1` under the Enabled Extensions list, and click its `Disable` link.
3. To permanently uninstall, click `Delete Data` and then delete the `/ext/dmzx/mchat` folder.
## License

View File

@@ -1,11 +1,12 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace dmzx\mchat\acp;
@@ -18,9 +19,9 @@ class acp_mchat_info
'title' => 'ACP_CAT_MCHAT',
'modes' => array(
'configuration' => array(
'title' => 'ACP_MCHAT_CONFIG',
'auth' => 'ext_dmzx/mchat && acl_a_mchat',
'cat' => array('ACP_CAT_MCHAT')
'title' => 'ACP_MCHAT_CONFIG',
'auth' => 'ext_dmzx/mchat && acl_a_mchat',
'cat' => array('ACP_CAT_MCHAT'),
),
),
);

View File

@@ -1,11 +1,12 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace dmzx\mchat\acp;
@@ -15,31 +16,24 @@ class acp_mchat_module
public function main($id, $mode)
{
global $phpbb_container, $request, $user;
// Get an instance of the admin controller
$admin_controller = $phpbb_container->get('dmzx.mchat.admin.controller');
// Requests
$action = $request->variable('action', '');
if ($request->is_set_post('add'))
{
$action = 'add';
}
global $phpbb_container, $user;
// Add the ACP lang file
$user->add_lang_ext('dmzx/mchat', 'info_acp_mchat');
// Load the display settings handle in the admin controller
$admin_controller->display_options();
// Load a template from adm/style for our ACP page
$this->tpl_name = 'acp_mchat';
// Set the page title for our ACP page
$this->page_title = 'MCHAT_TITLE';
// Get an instance of the admin controller
$admin_controller = $phpbb_container->get('dmzx.mchat.admin.controller');
// Make the $u_action url available in the admin controller
$admin_controller->set_page_url($this->u_action);
// Load the display settings handle in the admin controller
$admin_controller->display_options();
}
}

View File

@@ -1,239 +1,227 @@
<!-- INCLUDECSS css/mchatacp.css -->
<!-- INCLUDE overall_header.html -->
<h1 class="ExtensionName"><!-- IF META_DISPLAY_NAME -->{META_DISPLAY_NAME}<!-- ENDIF --></h1>
<!-- IF S_VERSIONCHECK && S_UP_TO_DATE -->
<div class="description_bubble small_bubble" title="{UP_TO_DATE_MSG}">
<span class="description_name">{L_VERSION}</span>
<span class="description_value description_value_ok" id="meta_version">{META_VERSION}</span>
</div>
<!-- ELSE IF S_VERSIONCHECK && not S_UP_TO_DATE -->
<div class="description_bubble small_bubble" title="{UP_TO_DATE_MSG}">
<span class="description_name">{L_VERSION}</span>
<span class="description_value description_value_old" id="meta_version">{META_VERSION}</span>
</div>
<!-- ELSE -->
<div class="description_bubble small_bubble">
<span class="description_name">{L_VERSION}</span>
<span class="description_value" id="meta_version">{META_VERSION}</span>
</div>
<!-- ENDIF -->
<!-- IF S_VERSIONCHECK && not S_UP_TO_DATE -->
<!-- BEGIN updates_available -->
<fieldset>
<span class="requirements_title">{L_LATEST_VERSION}</span>
<div class="extension_latest_version_wrapper">
<strong class="extension_latest_version">{updates_available.current}</strong>
<!-- IF updates_available.download-->
<a href="{updates_available.download}" class="extension_author_link" title="{L_DOWNLOAD_LATEST}">{L_DOWNLOAD} {META_NAME} {LATEST_VERSION}</i></a>
<!-- ENDIF -->
<!-- IF updates_available.announcement -->
<a href="{updates_available.announcement}" class="extension_author_link" title="{L_ANNOUNCEMENT_TOPIC}">{L_RELEASE_ANNOUNCEMENT}</i></a>
<!-- ENDIF -->
</div>
</fieldset>
<!-- END updates_available -->
<!-- ENDIF -->
<!-- IF MCHAT_ERROR -->
<div class="errorbox"><h3>{L_WARNING}</h3>
<p>{MCHAT_ERROR}</p>
</div>
<!-- ENDIF -->
<h1>{L_ACP_MCHAT_TITLE}</h1>{L_ACP_MCHAT_VERSION}{L_COLON} <em>{MCHAT_VERSION}</em>
<form id="acp_mchat" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_MCHAT_MAIN}</legend>
<dl>
<dt><label for="mchat_message_top">{L_MCHAT_MESSAGE_TOP}{L_COLON}</label><br />
<span>{L_MCHAT_MESSAGE_TOP_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_message_top" value="1"<!-- IF MCHAT_MESSAGE_TOP --> id="mchat_message_top" checked="checked"<!-- ENDIF --> /> {L_MCHAT_TOP}</label>
<label><input type="radio" class="radio" name="mchat_message_top" value="0"<!-- IF not MCHAT_MESSAGE_TOP --> id="mchat_message_top" checked="checked"<!-- ENDIF --> /> {L_MCHAT_BOTTOM}</label></dd>
</dl>
<dl>
<dt><label for="mchat_new_posts_topic">{L_MCHAT_NEW_POSTS_TOPIC}{L_COLON}</label><br />
<span>{L_MCHAT_NEW_POSTS_TOPIC_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_new_posts_topic" value="1"<!-- IF MCHAT_NEW_POSTS_TOPIC --> id="mchat_new_posts_topic" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_new_posts_topic" value="0"<!-- IF not MCHAT_NEW_POSTS_TOPIC --> id="mchat_new_posts_topic" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_new_posts_reply">{L_MCHAT_NEW_POSTS_REPLY}{L_COLON}</label><br />
<span>{L_MCHAT_NEW_POSTS_REPLY_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_new_posts_reply" value="1"<!-- IF MCHAT_NEW_POSTS_REPLY --> id="mchat_new_posts_reply" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_new_posts_reply" value="0"<!-- IF not MCHAT_NEW_POSTS_REPLY --> id="mchat_new_posts_reply" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_new_posts_edit">{L_MCHAT_NEW_POSTS_EDIT}{L_COLON}</label><br />
<span>{L_MCHAT_NEW_POSTS_EDIT_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_new_posts_edit" value="1"<!-- IF MCHAT_NEW_POSTS_EDIT --> id="mchat_new_posts_edit" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_new_posts_edit" value="0"<!-- IF not MCHAT_NEW_POSTS_EDIT --> id="mchat_new_posts_edit" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_new_posts_quote">{L_MCHAT_NEW_POSTS_QUOTE}{L_COLON}</label><br />
<span>{L_MCHAT_NEW_POSTS_QUOTE_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_new_posts_quote" value="1"<!-- IF MCHAT_NEW_POSTS_QUOTE --> id="mchat_new_posts_quote" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_new_posts_quote" value="0"<!-- IF not MCHAT_NEW_POSTS_QUOTE --> id="mchat_new_posts_quote" checked="checked"<!-- ENDIF --> /> {L_NO}</label></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="3" cols="40">{MCHAT_STATIC_MESSAGE}</textarea></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}" /></dd>
</dl>
<dl>
<dt><label for="mchat_timeout">{L_MCHAT_USER_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}" /></dd>
</dl>
<dl>
<dt><label for="mchat_on_index">{L_MCHAT_ON_INDEX}{L_COLON}</label><br />
<span>{L_MCHAT_ON_INDEX_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_on_index" value="1"<!-- IF MCHAT_ON_INDEX --> id="mchat_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_on_index" value="0"<!-- IF not MCHAT_ON_INDEX --> id="mchat_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<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}" /></dd>
</dl>
<dl>
<dt><label for="mchat_message_num">{L_MCHAT_MESSAGE_NUM}{L_COLON}</label><br />
<span>{L_MCHAT_MESSAGE_NUM_EXPLAIN}</span></dt>
<dd><input type="text" name="mchat_message_num" id="mchat_message_num" size="10" maxlength="4" value="{MCHAT_MESSAGE_NUM}" /></dd>
</dl>
<dl>
<dt><label for="mchat_location">{L_MCHAT_LOCATION}{L_COLON}</label><br />
<span>{L_MCHAT_LOCATION_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_location" value="1"<!-- IF MCHAT_LOCATION --> id="mchat_location" checked="checked"<!-- ENDIF --> /> {L_MCHAT_TOP_OF_FORUM}</label>
<label><input type="radio" class="radio" name="mchat_location" value="0"<!-- IF not MCHAT_LOCATION --> id="mchat_location" checked="checked"<!-- ENDIF --> /> {L_MCHAT_BOTTOM_OF_FORUM}</label></dd>
</dl>
<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>
</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}" /></dd>
</dl>
<dl>
<dt><label for="mchat_prune">{L_MCHAT_PRUNE}{L_COLON}</label><br />
<span>{L_MCHAT_PRUNE_EXPLAIN}</span></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>
</dl>
<dl>
<dt><label for="mchat_prune_num">{L_MCHAT_PRUNE_NUM}{L_COLON}</label><br />
<span>{L_MCHAT_PRUNE_NUM_EXPLAIN}</span></dt>
<dd><input type="text" name="mchat_prune_num" size="10" id="mchat_prune_num" value="{MCHAT_PRUNE_NUM}" /></dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_MCHAT_MESSAGES}</legend>
<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}" /></dd>
</dl>
<dl>
<dt><label for="mchat_message_limit">{L_MCHAT_MESSAGE_LIMIT}{L_COLON}</label><br />
<span>{L_MCHAT_MESSAGE_LIMIT_EXPLAIN}</span></dt>
<dd><input type="text" name="mchat_message_limit" id="mchat_message_limit" size="10" value="{MCHAT_MESSAGE_LIMIT}" /></dd>
</dl>
<dl>
<dt><label for="mchat_archive_limit">{L_MCHAT_ARCHIVE_LIMIT}{L_COLON}</label><br />
<span>{L_MCHAT_ARCHIVE_LIMIT_EXPLAIN}</span></dt>
<dd><input type="text" name="mchat_archive_limit" id="mchat_archive_limit" size="10" value="{MCHAT_ARCHIVE_LIMIT}" /></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_avatars">{L_MCHAT_AVATARS}{L_COLON}</label><br />
<span>{L_MCHAT_AVATARS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_avatars" value="1"<!-- IF MCHAT_AVATARS --> id="mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_avatars" value="0"<!-- IF not MCHAT_AVATARS --> id="mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="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" class="radio" name="mchat_pause_on_input" value="1"<!-- IF MCHAT_PAUSE_ON_INPUT --> id="mchat_pause_on_input" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_pause_on_input" value="0"<!-- IF not MCHAT_PAUSE_ON_INPUT --> id="mchat_pause_on_input" checked="checked"<!-- ENDIF --> /> {L_NO}</label></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_edit_delete_limit">{L_MCHAT_EDIT_DELETE_LIMIT}{L_COLON}</label><br />
<span>{L_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}" /></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}" /></dd>
</dl>
<dl>
<dt><label for="mchat_dateoptions">{L_MCHAT_DATE_FORMAT}{L_COLON}</label><br /><span>{L_MCHAT_DATE_FORMAT_EXPLAIN}</span></dt>
<dd>
<select name="mchat_dateoptions" id="mchat_dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('mchat_date').value = default_dateformat; } else { document.getElementById('mchat_date').value = this.value; }">
{S_MCHAT_DATEFORMAT_OPTIONS}
</select>
</dd>
<dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="mchat_date" id="mchat_date" value="{MCHAT_DATE}" maxlength="30" /></div></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_ACP_MCHAT_RULES}{L_COLON}</label><br />
<span>{L_ACP_MCHAT_RULES_EXPLAIN}</span></dt>
<dd><textarea name="mchat_rules" id="mchat_rules" rows="8" cols="40">{MCHAT_RULES}</textarea></dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_MCHAT_STATS}</legend>
<dl>
<dt><label for="mchat_whois">{L_MCHAT_WHOIS}{L_COLON}</label><br />
<span>{L_MCHAT_WHOIS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_whois" value="1"<!-- IF MCHAT_WHOIS --> id="mchat_whois" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_whois" value="0"<!-- IF not MCHAT_WHOIS --> id="mchat_whois" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_stats_index">{L_MCHAT_STATS_INDEX}{L_COLON}</label><br />
<span>{L_MCHAT_STATS_INDEX_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_stats_index" value="1"<!-- IF MCHAT_STATS_INDEX --> id="mchat_stats_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_stats_index" value="0"<!-- IF not MCHAT_STATS_INDEX --> id="mchat_stats_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_whois">{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" size="10" value="{MCHAT_WHOIS_REFRESH}" /></dd>
</dl>
</fieldset>
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
{S_FORM_TOKEN}
</p>
<!-- IF MCHAT_PURGE and MCHAT_FOUNDER -->
<fieldset>
<legend>{L_CONFIRM}</legend>
<span>{L_MCHAT_PURGE_CONFIRM}{L_COLON}</span>
<p class="submit-buttons">
<input class="button1" type="submit" name="mchat_purge_confirm" value="{L_YES}" />&nbsp;
<input class="button2" type="submit" value="{L_NO}" />
{S_FORM_TOKEN}
</p>
</fieldset>
<!-- ELSE -->
<fieldset>
<legend>{L_MCHAT_SETTINGS_INDEX}</legend>
<dl>
<dt><label for="mchat_on_index">{L_MCHAT_ON_INDEX}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="mchat_on_index" value="1"<!-- IF MCHAT_ON_INDEX --> id="mchat_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_on_index" value="0"<!-- IF not MCHAT_ON_INDEX --> id="mchat_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_location">{L_MCHAT_LOCATION}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="mchat_location" value="1"<!-- IF MCHAT_LOCATION --> id="mchat_location" checked="checked"<!-- ENDIF --> /> {L_MCHAT_TOP_OF_FORUM}</label>
<label><input type="radio" class="radio" name="mchat_location" value="0"<!-- IF not MCHAT_LOCATION --> id="mchat_location" checked="checked"<!-- ENDIF --> /> {L_MCHAT_BOTTOM_OF_FORUM}</label></dd>
</dl>
<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}" /></dd>
</dl>
<dl>
<dt><label for="mchat_message_num">{L_MCHAT_MESSAGE_NUM}{L_COLON}</label><br />
<span>{L_MCHAT_MESSAGE_NUM_EXPLAIN}</span></dt>
<dd><input type="text" name="mchat_message_num" id="mchat_message_num" size="10" maxlength="4" value="{MCHAT_MESSAGE_NUM}" /></dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_MCHAT_SETTINGS_CUSTOM}</legend>
<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>
</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}" /></dd>
</dl>
<dl>
<dt><label for="mchat_message_limit">{L_MCHAT_MESSAGE_LIMIT}{L_COLON}</label><br />
<span>{L_MCHAT_MESSAGE_LIMIT_EXPLAIN}</span></dt>
<dd><input type="text" name="mchat_message_limit" id="mchat_message_limit" size="10" value="{MCHAT_MESSAGE_LIMIT}" /></dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_MCHAT_SETTINGS_ARCHIVE}</legend>
<dl>
<dt><label for="mchat_archive_limit">{L_MCHAT_ARCHIVE_LIMIT}{L_COLON}</label><br />
<span>{L_MCHAT_ARCHIVE_LIMIT_EXPLAIN}</span></dt>
<dd><input type="text" name="mchat_archive_limit" id="mchat_archive_limit" size="10" value="{MCHAT_ARCHIVE_LIMIT}" /></dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_MCHAT_SETTINGS_MESSAGES}</legend>
<dl>
<dt><label for="mchat_timeout">{L_MCHAT_USER_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}" /></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}" /></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></dt>
<dd><input type="text" name="mchat_edit_delete_limit" id="mchat_edit_delete_limit" size="10" value="{MCHAT_EDIT_DELETE_LIMIT}" /></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_message_top">{L_MCHAT_MESSAGE_TOP}{L_COLON}</label><br />
<span>{L_MCHAT_MESSAGE_TOP_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_message_top" value="1"<!-- IF MCHAT_MESSAGE_TOP --> id="mchat_message_top" checked="checked"<!-- ENDIF --> /> {L_MCHAT_TOP}</label>
<label><input type="radio" class="radio" name="mchat_message_top" value="0"<!-- IF not MCHAT_MESSAGE_TOP --> id="mchat_message_top" checked="checked"<!-- ENDIF --> /> {L_MCHAT_BOTTOM}</label></dd>
</dl>
<dl>
<dt><label for="mchat_avatars">{L_MCHAT_AVATARS}{L_COLON}</label><br />
<span>{L_MCHAT_AVATARS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_avatars" value="1"<!-- IF MCHAT_AVATARS --> id="mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_avatars" value="0"<!-- IF not MCHAT_AVATARS --> id="mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_dateoptions">{L_MCHAT_DATE_FORMAT}{L_COLON}</label><br /><span>{L_MCHAT_DATE_FORMAT_EXPLAIN}</span></dt>
<dd>
<select name="mchat_dateoptions" id="mchat_dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('mchat_date').value = default_dateformat; } else { document.getElementById('mchat_date').value = this.value; }">
{S_MCHAT_DATEFORMAT_OPTIONS}
</select>
</dd>
<dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="mchat_date" id="mchat_date" value="{MCHAT_DATE}" maxlength="30" /></div></dd>
</dl>
<dl>
<dt><label for="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" class="radio" name="mchat_pause_on_input" value="1"<!-- IF MCHAT_PAUSE_ON_INPUT --> id="mchat_pause_on_input" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_pause_on_input" value="0"<!-- IF not MCHAT_PAUSE_ON_INPUT --> id="mchat_pause_on_input" 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}" /></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}" /></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_ACP_MCHAT_RULES}{L_COLON}</label><br />
<span>{L_ACP_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>
</fieldset>
<fieldset>
<legend>{L_MCHAT_SETTINGS_POSTS}</legend>
<dl>
<dt><label for="mchat_new_posts_topic">{L_MCHAT_NEW_POSTS_TOPIC}{L_COLON}</label><br />
<span>{L_MCHAT_NEW_POSTS_TOPIC_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_new_posts_topic" value="1"<!-- IF MCHAT_NEW_POSTS_TOPIC --> id="mchat_new_posts_topic" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_new_posts_topic" value="0"<!-- IF not MCHAT_NEW_POSTS_TOPIC --> id="mchat_new_posts_topic" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_new_posts_reply">{L_MCHAT_NEW_POSTS_REPLY}{L_COLON}</label><br />
<span>{L_MCHAT_NEW_POSTS_REPLY_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_new_posts_reply" value="1"<!-- IF MCHAT_NEW_POSTS_REPLY --> id="mchat_new_posts_reply" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_new_posts_reply" value="0"<!-- IF not MCHAT_NEW_POSTS_REPLY --> id="mchat_new_posts_reply" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_new_posts_edit">{L_MCHAT_NEW_POSTS_EDIT}{L_COLON}</label><br />
<span>{L_MCHAT_NEW_POSTS_EDIT_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_new_posts_edit" value="1"<!-- IF MCHAT_NEW_POSTS_EDIT --> id="mchat_new_posts_edit" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_new_posts_edit" value="0"<!-- IF not MCHAT_NEW_POSTS_EDIT --> id="mchat_new_posts_edit" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_new_posts_quote">{L_MCHAT_NEW_POSTS_QUOTE}{L_COLON}</label><br />
<span>{L_MCHAT_NEW_POSTS_QUOTE_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_new_posts_quote" value="1"<!-- IF MCHAT_NEW_POSTS_QUOTE --> id="mchat_new_posts_quote" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_new_posts_quote" value="0"<!-- IF not MCHAT_NEW_POSTS_QUOTE --> id="mchat_new_posts_quote" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_MCHAT_SETTINGS_PRUNE}</legend>
<dl>
<dt><label for="mchat_prune">{L_MCHAT_PRUNE}{L_COLON}</label><br />
<span>{L_MCHAT_PRUNE_EXPLAIN}</span></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>
</dl>
<dl>
<dt><label for="mchat_prune_num">{L_MCHAT_PRUNE_NUM}{L_COLON}</label></dt>
<dd><input type="text" name="mchat_prune_num" size="10" id="mchat_prune_num" value="{MCHAT_PRUNE_NUM}" /></dd>
</dl>
<!-- IF MCHAT_FOUNDER -->
<dl>
<dt><label for="mchat_purge">{L_MCHAT_PURGE}{L_COLON}</label></dt>
<dd><input class="button1" type="submit" id="mchat_purge" name="mchat_purge" value="{L_MCHAT_PURGE}" /></dd>
</dl>
<!-- ENDIF -->
</fieldset>
<fieldset>
<legend>{L_MCHAT_SETTINGS_STATS}</legend>
<dl>
<dt><label for="mchat_whois">{L_MCHAT_WHOIS}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="mchat_whois" value="1"<!-- IF MCHAT_WHOIS --> id="mchat_whois" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_whois" value="0"<!-- IF not MCHAT_WHOIS --> id="mchat_whois" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_stats_index">{L_MCHAT_STATS_INDEX}{L_COLON}</label><br />
<span>{L_MCHAT_STATS_INDEX_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_stats_index" value="1"<!-- IF MCHAT_STATS_INDEX --> id="mchat_stats_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_stats_index" value="0"<!-- IF not MCHAT_STATS_INDEX --> id="mchat_stats_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="mchat_whois">{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" size="10" value="{MCHAT_WHOIS_REFRESH}" /></dd>
</dl>
</fieldset>
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
{S_FORM_TOKEN}
</p>
<!-- ENDIF -->
</form>
<!-- INCLUDE overall_footer.html -->

View File

@@ -1,103 +0,0 @@
/* Extension details */
.requirements_title {
display: inline-block;
color: #115098;
font-weight: bold;
vertical-align: top;
margin-top: 8px;
font-size: 1.1em;
}
.description_bubble {
display: inline-block;
overflow: hidden;
border-radius: 15px;
border: 1px solid #D7D7D7;
margin-right: 20px;
text-align: center;
}
.description_name {
display: inline-block;
padding: 7px 15px;
}
.description_value {
display: inline-block;
padding: 6px 15px;
border-left: 1px solid #D7D7D7;
font-weight: bold;
font-size: 1.1em;
}
.description_value_ok {
display: inline-block;
padding: 6px 15px;
border: 0;
border-radius: 15px;
color: #edfbf7;
font-weight: bold;
font-size: 1.1em;
background: #228822;
background: -moz-linear-gradient(top, #92d992 0%, #228822 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #92d992), color-stop(100%, #228822));
background: -webkit-linear-gradient(top, #92d992 0%, #228822 100%);
background: -o-linear-gradient(top, #92d992 0%, #228822 100%);
background: -ms-linear-gradient(top, #92d992 0%, #228822 100%);
background: linear-gradient(to bottom, #92d992 0%, #228822 100%);
}
.description_value_old {
display: inline-block;
padding: 6px 15px;
border: 0;
border-radius: 15px;
color: #edfbf7;
font-weight: bold;
font-size: 1.1em;
background: #BC2A4D;
background: -moz-linear-gradient(top, #e08389 0%, #BC2A4D 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e08389), color-stop(100%, #BC2A4D));
background: -webkit-linear-gradient(top, #e08389 0%, #BC2A4D 100%);
background: -o-linear-gradient(top, #e08389 0%, #BC2A4D 100%);
background: -ms-linear-gradient(top, #e08389 0%, #BC2A4D 100%);
background: linear-gradient(to bottom, #e08389 0%, #BC2A4D 100%);
}
fieldset {
border-radius: 15px;
}
h1.ExtensionName {
color: #115098;
}
.big_bubble .description_name {
width: 90px;
}
.big_bubble .description_value {
width: 210px;
}
.small_bubble .description_name {
width: 70px;
}
.small_bubble .description_value {
width: 80px;
}
.extension_author_link {
display: inline-block;
padding: 6px 15px;
border-radius: 15px;
font-weight: bold;
font-size: 1.1em;
border: 1px solid #D7D7D7;
}
.extension_author_link:hover {
background-color: #115098;
color: #edfbf7;
border: 1px solid #115098;
}
.extension_latest_version_wrapper {
display: inline-block;
overflow: hidden;
border-radius: 15px;
margin-left: 5px;
text-align: center;
font-size: 1.1em;
}
.extension_latest_version {
display: inline-block;
padding: 5px 15px;
}

View File

@@ -3,7 +3,7 @@
"type": "phpbb-extension",
"description": "mChat Extension for phpbb 3.1.x",
"homepage": "http://www.dmzx-web.net",
"version": "0.3.4",
"version": "1.0.0-RC1",
"time": "2015-03-10",
"keywords": ["phpbb", "extension", "mchat"],
"license": "GPL-2.0",
@@ -32,7 +32,7 @@
"phpbb/epv": "dev-master"
},
"extra": {
"display-name": "mChat Extension",
"display-name": "mChat Extension for phpBB 3.1",
"soft-require": {
"phpbb/phpbb": "3.1.*"
},

View File

@@ -10,4 +10,4 @@ dmzx_mchat_action_controller:
path: /mchat-{action}
defaults: { _controller: dmzx.mchat.main.controller:action }
requirements:
action: 'add|edit|del|clean|refresh|whois'
action: 'add|edit|del|refresh|whois'

View File

@@ -9,9 +9,10 @@ services:
- '@template'
- '@log'
- '@user'
- '@dbal.conn'
- '@cache'
- '@request'
- '@ext.manager'
- '%dmzx.mchat.table.mchat%'
- '%core.root_path%'
- '%core.php_ext%'
dmzx.mchat.main.controller:

View File

@@ -1,11 +1,12 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace dmzx\mchat\controller;
@@ -23,17 +24,20 @@ class admin_controller
/** @var \phpbb\user */
protected $user;
/** @var \phpbb\db\driver\driver_interface */
protected $db;
/** @var \phpbb\cache\service */
protected $cache;
/** @var \phpbb\request\request */
protected $request;
/** @var \phpbb\extension\manager */
protected $phpbb_extension_manager;
/** @var string */
protected $mchat_table;
/** @var string */
protected $phpbb_root_path;
protected $root_path;
/** @var string */
protected $php_ext;
@@ -42,37 +46,36 @@ class admin_controller
public $u_action;
/**
* Constructor
*
* @param \phpbb\config\config $config
* @param \phpbb\template\template $template
* @param \phpbb\log\log_interface $log
* @param \phpbb\user $user
* @param \phpbb\cache\service $cache
* @param \phpbb\request\request $request
* @param \phpbb\extension\manager $phpbb_extension_manager
* @param string $phpbb_root_path
* @param string $php_ext
*/
public function __construct(\phpbb\config\config $config, \phpbb\template\template $template, \phpbb\log\log_interface $log, \phpbb\user $user, \phpbb\cache\service $cache, \phpbb\request\request $request, \phpbb\extension\manager $phpbb_extension_manager, $phpbb_root_path, $php_ext)
* Constructor
*
* @param \phpbb\config\config $config
* @param \phpbb\template\template $template
* @param \phpbb\log\log_interface $log
* @param \phpbb\user $user
* @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\cache\service $cache
* @param \phpbb\request\request $request
* @param $mchat_table
* @param $root_path
* @param $php_ext
*/
public function __construct(\phpbb\config\config $config, \phpbb\template\template $template, \phpbb\log\log_interface $log, \phpbb\user $user, \phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, \phpbb\request\request $request, $mchat_table, $root_path, $php_ext)
{
$this->config = $config;
$this->template = $template;
$this->log = $log;
$this->user = $user;
$this->cache = $cache;
$this->request = $request;
$this->phpbb_extension_manager = $phpbb_extension_manager;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$this->config = $config;
$this->template = $template;
$this->log = $log;
$this->user = $user;
$this->db = $db;
$this->cache = $cache;
$this->request = $request;
$this->mchat_table = $mchat_table;
$this->root_path = $root_path;
$this->php_ext = $php_ext;
}
/**
* Display the options a user can configure for this extension
*
* @return null
* @access public
*/
* Display the options a user can configure for this extension
*/
public function display_options()
{
add_form_key('acp_mchat');
@@ -112,11 +115,25 @@ class admin_controller
'mchat_whois_refresh' => array('default' => 60, 'validation' => array('num', false, 30, 300)),
);
if ($this->request->is_set_post('submit'))
if ($this->request->is_set_post('mchat_purge'))
{
$this->template->assign_var('MCHAT_PURGE', true);
}
else if ($this->request->is_set_post('mchat_purge_confirm'))
{
if (check_form_key('acp_mchat') && $this->user->data['user_type'] == USER_FOUNDER)
{
$this->db->sql_query('TRUNCATE TABLE ' . $this->mchat_table);
$this->cache->destroy('sql', $this->mchat_table);
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_TABLE_PRUNED');
trigger_error($this->user->lang('LOG_MCHAT_TABLE_PRUNED') . adm_back_link($this->u_action));
}
}
else if ($this->request->is_set_post('submit'))
{
if (!function_exists('validate_data'))
{
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include($this->root_path . 'includes/functions_user.' . $this->php_ext);
}
$mchat_new_config = array();
@@ -190,70 +207,20 @@ class admin_controller
$this->template->assign_vars(array_merge($template_variables, array(
'MCHAT_ERROR' => !empty($error) ? implode('<br />', $error) : '',
'MCHAT_VERSION' => $this->config['mchat_version'],
'L_MCHAT_BBCODES_DISALLOWED_EXPLAIN' => sprintf($this->user->lang('MCHAT_BBCODES_DISALLOWED_EXPLAIN'), '<a href="' . append_sid("{$this->phpbb_root_path}adm/index.$this->php_ext", 'i=bbcodes', true, $this->user->session_id) . '">', '</a>'),
'L_MCHAT_TIMEOUT_EXPLAIN' => sprintf($this->user->lang('MCHAT_USER_TIMEOUT_EXPLAIN'),'<a href="' . append_sid("{$this->phpbb_root_path}adm/index.$this->php_ext", 'i=board&amp;mode=load', true, $this->user->session_id) . '">', '</a>', $this->config['session_length']),
'MCHAT_FOUNDER' => $this->user->data['user_type'] == USER_FOUNDER,
'L_MCHAT_BBCODES_DISALLOWED_EXPLAIN' => sprintf($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' => sprintf($this->user->lang('MCHAT_USER_TIMEOUT_EXPLAIN'),'<a href="' . append_sid("{$this->root_path}adm/index.$this->php_ext", 'i=board&amp;mode=load', true, $this->user->session_id) . '">', '</a>', $this->config['session_length']),
'S_MCHAT_DATEFORMAT_OPTIONS' => $dateformat_options,
'S_CUSTOM_DATEFORMAT' => $s_custom,
'U_ACTION' => $this->u_action,
)));
// Version check
$this->user->add_lang(array('install', 'acp/extensions', 'migrator'));
$ext_name = 'dmzx/mchat';
$md_manager = new \phpbb\extension\metadata_manager($ext_name, $this->config, $this->phpbb_extension_manager, $this->template, $this->user, $this->phpbb_root_path);
try
{
$this->metadata = $md_manager->get_metadata('all');
}
catch(\phpbb\extension\exception $e)
{
trigger_error($e, E_USER_WARNING);
}
$md_manager->output_template_data();
try
{
$updates_available = $this->version_check($md_manager, $this->request->variable('versioncheck_force', false));
$this->template->assign_vars(array(
'S_UP_TO_DATE' => empty($updates_available),
'S_VERSIONCHECK' => true,
'UP_TO_DATE_MSG' => $this->user->lang(empty($updates_available) ? 'UP_TO_DATE' : 'NOT_UP_TO_DATE', $md_manager->get_metadata('display-name')),
));
foreach ($updates_available as $branch => $version_data)
{
$this->template->assign_block_vars('updates_available', $version_data);
}
}
catch (\RuntimeException $e)
{
$this->template->assign_vars(array(
'S_VERSIONCHECK_STATUS' => $e->getCode(),
'VERSIONCHECK_FAIL_REASON' => $e->getMessage() !== $this->user->lang('VERSIONCHECK_FAIL') ? $e->getMessage() : '',
));
}
}
protected function version_check(\phpbb\extension\metadata_manager $md_manager, $force_update = false, $force_cache = false)
{
$meta = $md_manager->get_metadata('all');
if (!isset($meta['extra']['version-check']))
{
throw new \RuntimeException($this->user->lang('NO_VERSIONCHECK'), 1);
}
$version_check = $meta['extra']['version-check'];
$version_helper = new \phpbb\version_helper($this->cache, $this->config, new \phpbb\file_downloader(), $this->user);
$version_helper->set_current_version($meta['version']);
$version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename']);
$version_helper->force_stability($this->config['extension_force_unstable'] ? 'unstable' : null);
return $updates = $version_helper->get_suggested_updates($force_update, $force_cache);
}
/**
* Set page url
*
* @param string $u_action Custom form action
* @return null
* @access public
*/
* Set page url
*
* @param string $u_action Custom form action
*/
public function set_page_url($u_action)
{
$this->u_action = $u_action;

View File

@@ -1,4 +1,5 @@
<?php
/**
*
* @package phpBB Extension - mChat
@@ -34,7 +35,7 @@ class main_controller
/**
* Controller for mChat
*
* @param $page The page to render, one of custom|archive|rules|whois
* @param string $page The page to render, one of custom|archive|rules|whois
* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
*/
public function page($page)
@@ -45,8 +46,8 @@ class main_controller
/**
* Controller for mChat actions called with Ajax requests
*
* @param $action The action to perform, one of add|edit|del|clean|refresh|whois
* @return A Symfony JsonResponse object
* @param string $action The action to perform, one of add|edit|del|refresh|whois
* @return \Symfony\Component\HttpFoundation\JsonResponse A Symfony JsonResponse object
*/
public function action($action)
{

View File

@@ -1,4 +1,5 @@
<?php
/**
*
* @package phpBB Extension - mChat
@@ -30,7 +31,7 @@ class functions_mchat
protected $cache;
/** @var string */
protected $phpbb_root_path;
protected $root_path;
/** @var string */
protected $php_ext;
@@ -53,12 +54,12 @@ class functions_mchat
* @param \phpbb\log\log_interface $log
* @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\cache\driver\driver_interface $cache
* @param string $phpbb_root_path
* @param string $root_path
* @param string $php_ext
* @param string $mchat_table
* @param string $mchat_sessions_table
*/
function __construct(\phpbb\config\config $config, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\log\log_interface $log, \phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, $phpbb_root_path, $php_ext, $mchat_table, $mchat_sessions_table)
function __construct(\phpbb\config\config $config, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\log\log_interface $log, \phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, $root_path, $php_ext, $mchat_table, $mchat_sessions_table)
{
$this->config = $config;
$this->user = $user;
@@ -66,15 +67,18 @@ class functions_mchat
$this->log = $log;
$this->db = $db;
$this->cache = $cache;
$this->phpbb_root_path = $phpbb_root_path;
$this->root_path = $root_path;
$this->php_ext = $php_ext;
$this->mchat_table = $mchat_table;
$this->mchat_sessions_table = $mchat_sessions_table;
}
/**
* Converts a number of seconds to a string in the format 'x hours y minutes z seconds'
*/
* Converts a number of seconds to a string in the format 'x hours y minutes z seconds'
*
* @param int $time
* @return string
*/
protected function mchat_format_seconds($time)
{
$times = array();
@@ -83,36 +87,40 @@ class functions_mchat
if ($hours)
{
$time -= $hours * 3600;
$times[] = $hours . '&nbsp;' . $this->user->lang($hours > 1 ? 'MCHAT_HOURS' : 'MCHAT_HOUR');
$times[] = $this->user->lang('MCHAT_HOURS', $hours);
}
$minutes = floor($time / 60);
if ($minutes)
{
$time -= $minutes * 60;
$times[] = $minutes . '&nbsp;' . $this->user->lang($minutes > 1 ? 'MCHAT_MINUTES' : 'MCHAT_MINUTE');
$times[] = $this->user->lang('MCHAT_MINUTES', $minutes);
}
$seconds = ceil($time);
if ($seconds)
{
$times[] = $seconds . '&nbsp;' . $this->user->lang($seconds > 1 ? 'MCHAT_SECONDS' : 'MCHAT_SECOND');
$times[] = $this->user->lang('MCHAT_SECONDS', $seconds);
}
return sprintf($this->user->lang('MCHAT_ONLINE_EXPLAIN'), implode('&nbsp;', $times));
return $this->user->lang('MCHAT_ONLINE_EXPLAIN', implode('&nbsp;', $times));
}
/**
* Returns the total session time in seconds
*/
* Returns the total session time in seconds
*
* @return string
*/
protected function mchat_session_time()
{
return !empty($this->config['mchat_timeout']) ? $this->config['mchat_timeout'] : (!empty($this->config['load_online_time']) ? $this->config['load_online_time'] * 60 : $this->config['session_length']);
}
/**
* Returns data about users who are currently chatting
*/
* Returns data about users who are currently chatting
*
* @return array
*/
public function mchat_active_users()
{
$mchat_users = array();
@@ -146,14 +154,14 @@ class functions_mchat
return array(
'online_userlist' => implode($this->user->lang('COMMA_SEPARATOR'), $mchat_users),
'mchat_users_count' => count($mchat_users) ? $this->user->lang(count($mchat_users) > 1 ? 'MCHAT_ONLINE_USERS_TOTAL' : 'MCHAT_ONLINE_USER_TOTAL', count($mchat_users)) : $this->user->lang('MCHAT_NO_CHATTERS'),
'mchat_users_count' => $this->user->lang('MCHAT_ONLINE_USERS_TOTAL', count($mchat_users)),
'refresh_message' => $this->mchat_format_seconds($this->mchat_session_time()),
);
}
/**
* Inserts the current user into the mchat_sessions table
*/
* Inserts the current user into the mchat_sessions table
*/
public function mchat_add_user_session()
{
// Remove expired sessions from the database
@@ -191,8 +199,8 @@ class functions_mchat
}
/**
* Prune messages
*/
* Prune messages
*/
public function mchat_prune()
{
if ($this->config['mchat_prune'])
@@ -218,16 +226,23 @@ class functions_mchat
}
/**
* Returns the total number of messages
*/
* Returns the total number of messages
*
* @return string
*/
public function mchat_total_message_count()
{
return $this->db->get_row_count($this->mchat_table);
}
/**
* Fetch messages from the database
*/
* Fetch messages from the database
*
* @param $sql_where
* @param int $total
* @param int $offset
* @return array
*/
public function mchat_get_messages($sql_where, $total = 0, $offset = 0)
{
$sql_array = array(
@@ -252,8 +267,10 @@ class functions_mchat
}
/**
* Generates the user legend markup
*/
* Generates the user legend markup
*
* @return array Array of HTML markup for each group
*/
public function mchat_legend()
{
// Grab group details for legend display for who is online on the custom page
@@ -290,7 +307,7 @@ class functions_mchat
}
else
{
$legend[] = '<a' . $colour_text . ' href="' . append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=group&amp;g='.$row['group_id']) . '">' . $group_name . '</a>';
$legend[] = '<a' . $colour_text . ' href="' . append_sid("{$this->root_path}memberlist.{$this->php_ext}", 'mode=group&amp;g='. $row['group_id']) . '">' . $group_name . '</a>';
}
}
@@ -298,8 +315,10 @@ class functions_mchat
}
/**
* Returns a list of all foes of the current user
*/
* Returns a list of all foes of the current user
*
* @return array Array of user IDs
*/
public function mchat_foes()
{
if (is_null($this->foes))
@@ -322,8 +341,11 @@ class functions_mchat
}
/**
* Adds forbidden BBCodes to the passed SQL where statement
*/
* Adds forbidden BBCodes to the passed SQL where statement
*
* @param string $sql_where
* @return string
*/
public function mchat_sql_append_forbidden_bbcodes($sql_where)
{
$disallowed_bbcodes = explode('|', strtoupper($this->config['mchat_bbcode_disallowed']));
@@ -337,8 +359,11 @@ class functions_mchat
}
/**
* Inserts a message with posting information into the database
*/
* Inserts a message with posting information into the database
*
* @param string $mode One of post|quote|edit|reply
* @param $data The post data
*/
public function mchat_insert_posting($mode, $data)
{
$mode_config = array(
@@ -353,9 +378,10 @@ class functions_mchat
return;
}
$mchat_new_data = $this->user->lang('MCHAT_NEW_' . strtoupper($mode));
$message = utf8_normalize_nfc($mchat_new_data . ': [url=' . generate_board_url() . '/viewtopic.' . $this->php_ext . '?p=' . $data['post_id'] . '#p' . $data['post_id'] . ']' . $data['post_subject'] . '[/url] '. $this->user->lang('MCHAT_IN') . ' [url=' . generate_board_url() . '/viewforum.' . $this->php_ext . '?f=' . $data['forum_id'] . ']' . $data['forum_name'] . ' [/url] ' . $this->user->lang('MCHAT_IN_SECTION'));
$board_url = generate_board_url();
$topic_url = '[url=' . $board_url . '/viewtopic.' . $this->php_ext . '?p=' . $data['post_id'] . '#p' . $data['post_id'] . ']' . $data['post_subject'] . '[/url]';
$forum_url = '[url=' . $board_url . '/viewforum.' . $this->php_ext . '?f=' . $data['forum_id'] . ']' . $data['forum_name'] . '[/url]';
$message = $this->user->lang('MCHAT_NEW_' . strtoupper($mode), $topic_url, $forum_url);
$uid = $bitfield = $options = ''; // will be modified by generate_text_for_storage
generate_text_for_storage($message, $uid, $bitfield, $options, true, false, false);
@@ -364,19 +390,21 @@ class functions_mchat
'post_id' => $data['post_id'],
'user_id' => $this->user->data['user_id'],
'user_ip' => $this->user->data['session_ip'],
'message' => $message,
'message' => utf8_normalize_nfc($message),
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'bbcode_options' => $options,
'message_time' => time(),
);
$sql = 'INSERT INTO ' . $this->mchat_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
$sql = 'INSERT INTO ' . $this->mchat_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
$this->db->sql_query($sql);
}
/**
* Checks if the current user is flooding the chat
*/
* Checks if the current user is flooding the chat
*
* @return bool
*/
public function mchat_is_user_flooding()
{
if (!$this->config['mchat_flood_time'] || $this->auth->acl_get('u_mchat_flood_ignore'))
@@ -396,8 +424,11 @@ class functions_mchat
}
/**
* Returns user ID & name of the specified message
*/
* Returns user ID & name of the specified message
*
* @param $message_id
* @return array
*/
public function mchat_author_for_message($message_id)
{
$sql = 'SELECT u.user_id, u.username, m.message_time
@@ -412,8 +443,12 @@ class functions_mchat
}
/**
* Returns an array of message IDs that have been deleted from the message table
*/
* Returns an array of message IDs that have been deleted from the message table
*
* @param $start_id
* @param $end_id
* @return array
*/
public function mchat_missing_ids($start_id, $end_id)
{
if ($this->config['mchat_edit_delete_limit'])
@@ -498,8 +533,13 @@ class functions_mchat
}
/**
* Performs add|edit|del|clean|prune actions
*/
* Performs AJAX actions
*
* @param string $action One of add|edit|del|clean|prune
* @param array $sql_ary
* @param int $message_id
* @param string $log_username
*/
public function mchat_action($action, $sql_ary = null, $message_id = 0, $log_username = '')
{
switch ($action)
@@ -522,12 +562,6 @@ class functions_mchat
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_DELETED_MCHAT', false, array($log_username));
$this->cache->destroy('sql', $this->mchat_table);
break;
// Founder purges all messages
case 'clean':
$sql = 'TRUNCATE TABLE ' . $this->mchat_table;
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_TABLE_PRUNED');
$this->cache->destroy('sql', $this->mchat_table);
break;
// User triggers messages to be pruned
case 'prune':
$sql = 'DELETE FROM ' . $this->mchat_table . ' WHERE message_id < ' . (int) $message_id;

View File

@@ -51,31 +51,31 @@ class mchat
/**
* Constructor
*
* @param \dmzx\mchat\core\functions_mchat $functions_mchat
* @param \phpbb\config\config $config
* @param \phpbb\controller\helper $helper
* @param \phpbb\template\template $template
* @param \phpbb\user $user
* @param \phpbb\auth\auth $auth
* @param \phpbb\pagination $pagination
* @param \phpbb\request\request $request
* @param \dmzx\mchat\core\functions_mchat $functions_mchat
* @param \phpbb\config\config $config
* @param \phpbb\controller\helper $helper
* @param \phpbb\template\template $template
* @param \phpbb\user $user
* @param \phpbb\auth\auth $auth
* @param \phpbb\pagination $pagination
* @param \phpbb\request\request $request
* @param \phpbb\event\dispatcher_interface $dispatcher
* @param string $root_path
* @param string $php_ext
* @param string $root_path
* @param string $php_ext
*/
public function __construct(\dmzx\mchat\core\functions_mchat $functions_mchat, \phpbb\config\config $config, \phpbb\controller\helper $helper, \phpbb\template\template $template, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \phpbb\request\request $request, \phpbb\event\dispatcher_interface $dispatcher, $root_path, $php_ext)
{
$this->functions_mchat = $functions_mchat;
$this->config = $config;
$this->helper = $helper;
$this->template = $template;
$this->user = $user;
$this->auth = $auth;
$this->pagination = $pagination;
$this->request = $request;
$this->dispatcher = $dispatcher;
$this->root_path = $root_path;
$this->php_ext = $php_ext;
$this->functions_mchat = $functions_mchat;
$this->config = $config;
$this->helper = $helper;
$this->template = $template;
$this->user = $user;
$this->auth = $auth;
$this->pagination = $pagination;
$this->request = $request;
$this->dispatcher = $dispatcher;
$this->root_path = $root_path;
$this->php_ext = $php_ext;
}
/**
@@ -95,18 +95,6 @@ class mchat
return;
}
// TODO This might be redundant
// If mChat is used on the index by a user without an avatar, a default avatar is used.
// However, T_THEME_PATH points to ./../styles/... because the controller at /mchat is called, but we need it to be ./styles...
// Setting this value to true solves this.
if (!defined('PHPBB_USE_BOARD_URL_PATH'))
{
define('PHPBB_USE_BOARD_URL_PATH', true);
}
global $root_path;
$root_path = './';
$this->assign_bbcodes_smilies();
$this->render_page('index');
@@ -207,20 +195,21 @@ class mchat
*/
public function page_rules()
{
if (empty($this->config['mchat_rules']) && empty($this->user->lang['MCHAT_RULES']))
if (empty($this->config['mchat_rules']) && !$this->user->lang('MCHAT_RULES_MESSAGE'))
{
throw new \phpbb\exception\http_exception(404, 'MCHAT_NO_RULES');
}
// If the rules are defined in the language file use them, else just use the entry in the database
$mchat_rules = isset($this->user->lang['MCHAT_RULES']) ? $this->user->lang('MCHAT_RULES') : $this->config['mchat_rules'];
$mchat_rules = $this->user->lang('MCHAT_RULES_MESSAGE');
$mchat_rules = !empty($mchat_rules) ? $mchat_rules : $this->config['mchat_rules'];
$mchat_rules = explode("\n", $mchat_rules);
$mchat_rules = array_map('utf8_htmlspecialchars', $mchat_rules);
$mchat_rules = array_map('htmlspecialchars_decode', $mchat_rules);
$mchat_rules = implode('<br />', $mchat_rules);
$this->template->assign_var('MCHAT_RULES', $mchat_rules);
return $this->helper->render('mchat_rules.html', $this->user->lang('MCHAT_HELP'));
return $this->helper->render('mchat_rules.html', $this->user->lang('MCHAT_RULES'));
}
/**
@@ -268,6 +257,7 @@ class mchat
*/
public function action_edit()
{
// Fix avatar path when editing archived messages
if (!defined('PHPBB_USE_BOARD_URL_PATH'))
{
define('PHPBB_USE_BOARD_URL_PATH', true);
@@ -347,23 +337,6 @@ class mchat
return array('del' => true);
}
/**
* User purges all messagas
*
* @return array data sent to client as JSON
*/
public function action_clean()
{
if ($this->user->data['user_type'] != USER_FOUNDER || !check_form_key('mchat', -1))
{
throw new \phpbb\exception\http_exception(403, 'MCHAT_NOACCESS');
}
$this->functions_mchat->mchat_action('clean');
return array('clean' => true);
}
/**
* User checks for new messages
*
@@ -371,11 +344,6 @@ class mchat
*/
public function action_refresh()
{
if (!defined('PHPBB_USE_BOARD_URL_PATH'))
{
define('PHPBB_USE_BOARD_URL_PATH', true);
}
$message_first_id = $this->request->variable('message_first_id', 0);
$message_last_id = $this->request->variable('message_last_id', 0);
$message_edits = $this->request->variable('message_edits', array(0));
@@ -469,7 +437,7 @@ class mchat
/**
* Appends a condition to the WHERE key of the SQL array to not fetch disallowed BBCodes from the database
*
* @param $sql_ary array
* @param array $sql_ary
* @return array
*/
public function remove_disallowed_bbcodes($sql_ary)
@@ -486,7 +454,7 @@ class mchat
/**
* Renders data for a page
*
* @param $page The page we are rendering for, one of index|custom|archive
* @param string $page The page we are rendering for, one of index|custom|archive
*/
protected function render_page($page)
{
@@ -494,16 +462,14 @@ class mchat
$this->user->add_lang('posting');
// If the static message is defined in the language file use it, else the entry in the database is used
if (isset($this->user->lang['STATIC_MESSAGE']))
{
$this->config['mchat_static_message'] = $this->user->lang('STATIC_MESSAGE');
}
$lang_static_message = $this->user->lang('MCHAT_STATIC_MESSAGE');
$static_message = !empty($lang_static_message) ? $lang_static_message : $this->config['mchat_static_message'];
$this->template->assign_vars(array(
'MCHAT_FILE_NAME' => $this->helper->route('dmzx_mchat_controller'),
'MCHAT_REFRESH_JS' => 1000 * $this->config['mchat_refresh'],
'MCHAT_INPUT_TYPE' => $this->user->data['user_mchat_input_area'],
'MCHAT_RULES' => !empty($this->user->lang['MCHAT_RULES']) || !empty($this->config['mchat_rules']),
'MCHAT_RULES' => $this->user->lang('MCHAT_RULES_MESSAGE') || !empty($this->config['mchat_rules']),
'MCHAT_ALLOW_USE' => $this->auth->acl_get('u_mchat_use'),
'MCHAT_ALLOW_SMILES' => $this->config['allow_smilies'] && $this->auth->acl_get('u_mchat_smilies'),
'MCHAT_ALLOW_BBCODES' => $this->config['allow_bbcode'] && $this->auth->acl_get('u_mchat_bbcode'),
@@ -512,8 +478,7 @@ class mchat
'MCHAT_INDEX_HEIGHT' => $this->config['mchat_index_height'],
'MCHAT_CUSTOM_HEIGHT' => $this->config['mchat_custom_height'],
'MCHAT_READ_ARCHIVE_BUTTON' => $this->auth->acl_get('u_mchat_archive'),
'MCHAT_FOUNDER' => $this->user->data['user_type'] == USER_FOUNDER,
'MCHAT_STATIC_MESS' => !empty($this->config['mchat_static_message']) ? htmlspecialchars_decode($this->config['mchat_static_message']) : '',
'MCHAT_STATIC_MESS' => htmlspecialchars_decode($static_message),
'L_MCHAT_COPYRIGHT' => base64_decode('PGEgaHJlZj0iaHR0cDovL3JtY2dpcnI4My5vcmciPlJNY0dpcnI4MzwvYT4gJmNvcHk7IDxhIGhyZWY9Imh0dHA6Ly93d3cuZG16eC13ZWIubmV0IiB0aXRsZT0id3d3LmRtengtd2ViLm5ldCI+ZG16eDwvYT4='),
'MCHAT_MESSAGE_LNGTH' => $this->config['mchat_max_message_lngth'],
'MCHAT_MESS_LONG' => sprintf($this->user->lang('MCHAT_MESS_LONG'), $this->config['mchat_max_message_lngth']),
@@ -602,7 +567,7 @@ class mchat
/**
* Assigns all message rows to the template
*
* @param $rows array
* @param array $rows
*/
protected function assign_messages($rows)
{
@@ -631,8 +596,8 @@ class mchat
$user_avatars[$row['user_id']] = !$display_avatar ? '' : phpbb_get_user_avatar(array(
'avatar' => $row['user_avatar'],
'avatar_type' => $row['user_avatar_type'],
'avatar_width' => $row['user_avatar_width'] > $row['user_avatar_height'] ? 40 : (40 / $row['user_avatar_height']) * $row['user_avatar_width'],
'avatar_height' => $row['user_avatar_height'] > $row['user_avatar_width'] ? 40 : (40 / $row['user_avatar_width']) * $row['user_avatar_height'],
'avatar_width' => $row['user_avatar_width'] >= $row['user_avatar_height'] ? 40 : 0,
'avatar_height' => $row['user_avatar_width'] >= $row['user_avatar_height'] ? 0 : 40,
));
}
}
@@ -658,14 +623,6 @@ class mchat
$row['username'] = mb_ereg_replace("'", "&#146;", $row['username']);
$message = str_replace("'", '&rsquo;', $row['message']);
$username_full = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang('GUEST'));
// Remove root path if we render messages for the index page
if (strpos($this->user->data['session_page'], 'app.' . $this->php_ext) === false)
{
$username_full = str_replace('.' . $this->root_path, '', $username_full);
}
$this->template->assign_block_vars('mchatrow', array(
'S_ROW_COUNT' => $i,
'MCHAT_ALLOW_BAN' => $this->auth->acl_get('a_authusers'),
@@ -677,10 +634,10 @@ class mchat
'MCHAT_PM' => $row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id'] && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_')) ? generate_board_url() . append_sid("/{$this->root_path}ucp.{$this->php_ext}", 'i=pm&amp;mode=compose&amp;u=' . $row['user_id']) : '',
'MCHAT_MESSAGE_EDIT' => $message_edit,
'MCHAT_MESSAGE_ID' => $row['message_id'],
'MCHAT_USERNAME_FULL' => $username_full,
'MCHAT_USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang('GUEST')),
'MCHAT_USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang('GUEST')),
'MCHAT_USERNAME_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang('GUEST')),
'MCHAT_USER_IP' => $row['user_ip'],
'MCHAT_WHOIS_USER' => $this->user->lang('MCHAT_WHOIS_USER', $row['user_ip']),
'MCHAT_U_IP' => $this->helper->route('dmzx_mchat_page_controller', array('page' => 'whois', 'ip' => $row['user_ip'])),
'MCHAT_U_BAN' => generate_board_url() . append_sid("/{$this->root_path}adm/index.{$this->php_ext}" ,'i=permissions&amp;mode=setting_user_global&amp;user_id[0]=' . $row['user_id'], true, $this->user->session_id),
'MCHAT_MESSAGE' => censor_text(generate_text_for_display($row['message'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options'])),
@@ -754,9 +711,9 @@ class mchat
/**
* Checks whether an author has edit or delete permissions for a message
*
* @param $permission string One of u_mchat_edit|u_mchat_delete
* @param $author_id int The user id of the message
* @param $message_time int The message created time
* @param string $permission One of u_mchat_edit|u_mchat_delete
* @param int $author_id The user id of the message
* @param int $message_time The message created time
* @return bool
*/
protected function auth_message($permission, $author_id, $message_time)
@@ -779,8 +736,8 @@ class mchat
* Performs bound checks on the message and returns an array containing the message,
* BBCode options and additional data ready to be sent to the database
*
* @param $message string
* @param $merge_ary array
* @param string $message
* @param array $merge_ary
* @return array
*/
protected function process_message($message, $merge_ary)
@@ -793,10 +750,13 @@ class mchat
}
// Must not exceed character limit, excluding whitespaces
$message_chars = preg_replace('#\s#m', '', $message);
if (utf8_strlen($message_chars) > $this->config['mchat_max_message_lngth'])
if ($this->config['mchat_max_message_lngth'])
{
throw new \phpbb\exception\http_exception(413, 'MCHAT_MESS_LONG', array($this->config['mchat_max_message_lngth']));
$message_chars = preg_replace('#\s#m', '', $message);
if (utf8_strlen($message_chars) > $this->config['mchat_max_message_lngth'])
{
throw new \phpbb\exception\http_exception(413, 'MCHAT_MESS_LONG', array($this->config['mchat_max_message_lngth']));
}
}
// We override the $this->config['min_post_chars'] entry?
@@ -860,7 +820,7 @@ class mchat
/**
* Renders a template file and returns it
*
* @param $template_file string
* @param string $template_file
* @return string
*/
protected function render_template($template_file)

View File

@@ -1,11 +1,12 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace dmzx\mchat\event;
@@ -46,6 +47,9 @@ class listener implements EventSubscriberInterface
$this->php_ext = $php_ext;
}
/**
* @return array
*/
static public function getSubscribedEvents()
{
return array(
@@ -60,8 +64,8 @@ class listener implements EventSubscriberInterface
}
/**
*
*/
* @param object $event The event object
*/
public function add_page_viewonline($event)
{
if (strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/mchat') === 0)
@@ -72,8 +76,8 @@ class listener implements EventSubscriberInterface
}
/**
*
*/
* @param object $event The event object
*/
public function load_language_on_setup($event)
{
$lang_set_ext = $event['lang_set_ext'];
@@ -85,12 +89,10 @@ class listener implements EventSubscriberInterface
}
/**
* Create a URL to the mchat controller file for the header linklist
*
* @param object $event The event object
* @return null
* @access public
*/
* Create a URL to the mchat controller file for the header linklist
*
* @param object $event The event object
*/
public function add_page_header_link($event)
{
$this->mchat->render_page_header_link();
@@ -100,8 +102,6 @@ class listener implements EventSubscriberInterface
* Check if mchat should be displayed on index.
*
* @param object $event The event object
* @return null
* @access public
*/
public function display_mchat_on_index($event)
{
@@ -109,8 +109,8 @@ class listener implements EventSubscriberInterface
}
/**
*
*/
* @param object $event The event object
*/
public function posting_modify_submit_post_after($event)
{
$this->functions_mchat->mchat_insert_posting($event['mode'], array(
@@ -122,16 +122,16 @@ class listener implements EventSubscriberInterface
}
/**
*
*/
* @param object $event The event object
*/
public function display_custom_bbcodes_modify_sql($event)
{
$event['sql_ary'] = $this->mchat->remove_disallowed_bbcodes($event['sql_ary']);
}
/**
*
*/
* @param object $event The event object
*/
public function permissions($event)
{
$event['permissions'] = array_merge($event['permissions'], array(

View File

@@ -1,126 +0,0 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.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 = array();
}
// 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
$lang = array_merge($lang, array(
'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_ADD' => 'Senden',
'MCHAT_IN' => 'in',
'MCHAT_IN_SECTION' => 'Abschnitt',
'MCHAT_LIKES' => 'Mag diesen Beitrag',
'MCHAT_ANNOUNCEMENT' => 'Ankündigen',
'MCHAT_ARCHIVE' => 'Archiv',
'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archiv',
'MCHAT_BBCODES' => 'BBCodes',
'MCHAT_CLEAN' => 'Alle Nachrichten im mChat löschen',
'MCHAT_CLEANED' => 'Alle Nachrichten wurden erfolgreich gelöscht',
'MCHAT_CLEAR_INPUT' => 'Zurücksetzen',
'MCHAT_COPYRIGHT' => '<a href="http://rmcgirr83.org">RMcGirr83</a> &copy; <a href="http://www.dmzx-web.net" title="www.dmzx-web.net">dmzx</a>',
'MCHAT_CUSTOM_BBCODES' => 'Eigene BBCodes',
'MCHAT_DELALLMESS' => 'Alle Nachrichten löschen?',
'MCHAT_DELCONFIRM' => 'Nachricht endgültig löschen?',
'MCHAT_DELITE' => 'Löschen',
'MCHAT_EDIT' => 'Bearbeiten',
'MCHAT_EDITINFO' => 'Bearbeite die Nachricht und klick auf OK',
'MCHAT_ERROR' => 'Fehler',
'MCHAT_FLOOD' => 'Du kannst keine Nachricht so schnell nach deiner letzten Nachricht schreiben',
'MCHAT_FOE' => 'Die Nachricht wurde von <strong>% 1 $ s </ strong> gemacht, der derzeit auf der Ignorieren-Liste steht.',
'MCHAT_HELP' => 'mChat Regeln',
'MCHAT_HIDE_LIST' => 'Verstecke Liste',
'MCHAT_HOUR' => 'Stunde ',
'MCHAT_HOURS' => 'Stunden',
'MCHAT_IP' => 'IP whois für',
'MCHAT_MINUTE' => 'Minute ',
'MCHAT_MINUTES' => 'Minuten ',
'MCHAT_MESS_LONG' => 'Deine Nachricht ist zu lang.\nBitte kürze deine Nachricht auf %s Zeichen',
'MCHAT_NO_CUSTOM_PAGE' => 'Die separate Seite für mChat ist derzeit nicht aktiviert!',
'MCHAT_NO_RULES' => 'The mChat rules page is not activated at this time!',
'MCHAT_NOACCESS' => 'Du hast keine Berechtigung im mChat zu schreiben',
'MCHAT_NOACCESS_ARCHIVE' => 'Du hast keine Berechtigung das Archiv zu sehen',
'MCHAT_NOJAVASCRIPT' => 'Dein Browser unterstützt kein Javascript oder Javascript ist deaktiviert',
'MCHAT_NOMESSAGE' => 'Keine Nachrichten',
'MCHAT_NOMESSAGEINPUT' => 'Du hast keine Nachricht eingegeben',
'MCHAT_NOSMILE' => 'Keine Smilies gefunden',
'MCHAT_NOTINSTALLED_USER' => 'Der mChat ist nicht installiert. Bitte kontaktiere den Boardgründer.',
'MCHAT_NOT_INSTALLED' => 'Die mChat Datenbankeinträge fehlen.<br />Führe bitte den %sInstaller%s aus, um die Datenbankänderungen für mChat durchzuführen.',
'MCHAT_OK' => 'OK',
'MCHAT_PAUSE' => 'Pausiert',
'MCHAT_LOAD' => 'Wird geladen',
'MCHAT_PERMISSIONS' => 'Ändere die Benutzerrechte',
'MCHAT_REFRESHING' => 'Aktualisiere...',
'MCHAT_REFRESH_NO' => 'Automatische Aktualisierung ist ausgeschaltet',
'MCHAT_REFRESH_YES' => 'Automatische Aktualisierung alle <strong>%d</strong> Sekunden',
'MCHAT_RESPOND' => 'Antworte dem Benutzer',
'MCHAT_RESET_QUESTION' => 'Lösche den Eingabebereich?',
'MCHAT_SESSION_OUT' => 'mChat Sitzung ist abgelaufen',
'MCHAT_SHOW_LIST' => 'Zeige Liste',
'MCHAT_SECOND' => 'Sekunde ',
'MCHAT_SECONDS' => 'Sekunden ',
'MCHAT_SESSION_ENDS' => 'Deine mChat-Sitzung endet in',
'MCHAT_SMILES' => 'Smilies',
'MCHAT_TOTALMESSAGES' => 'Nachrichten insgesamt: <strong>%s</strong>',
'MCHAT_USESOUND' => 'Sound aktivieren?',
'MCHAT_ONLINE_USERS_TOTAL' => 'Insgesamt sind <strong>%d</strong> Benutzer im mChat ',
'MCHAT_ONLINE_USER_TOTAL' => 'Insgesamt ist <strong>%d</strong> Benutzer im mChat ',
'MCHAT_NO_CHATTERS' => 'Derzeit sind keine Benutzer im mChat',
'MCHAT_ONLINE_EXPLAIN' => '(basierend auf den aktiven Besuchern der letzten %s)',
'WHO_IS_CHATTING' => 'Wer ist im mChat',
'WHO_IS_REFRESH_EXPLAIN' => 'Aktualisieren alle <strong>%d</strong> Sekunden',
'MCHAT_NEW_POST' => 'Neues Thema',
'MCHAT_NEW_REPLY' => 'Erstelle eine neue Antwort',
'MCHAT_NEW_QUOTE' => 'Antworte mit einem Zitat',
'MCHAT_NEW_EDIT' => 'Bearbeite',
// UCP
'UCP_PROFILE_MCHAT' => 'mChat Einstellung',
'DISPLAY_MCHAT' => 'mChat auf der Indexseite anzeigen',
'SOUND_MCHAT' => 'Aktiviere Sound für mChat',
'DISPLAY_STATS_INDEX' => 'Zeige die "Wer ist im mChat" Statistik auf der Indexseite an',
'DISPLAY_NEW_TOPICS' => 'Zeige neue Beiträge im mChat an',
'DISPLAY_AVATARS' => 'Zeige Avatare im mChat an',
'CHAT_AREA' => 'Chat Umgebung',
'CHAT_AREA_EXPLAIN' => 'Wähle welche Art von Umgebung für die Eingabe mit einem Chat: <br /> Ein Textbereich oder <br /> einem Eingangsbereich',
'INPUT_AREA' => 'Eingangsbereich',
'TEXT_AREA' => 'Textbereich',
'UCP_CAT_MCHAT' => 'mChat',
'UCP_MCHAT_CONFIG' => 'mChat',
// Preferences
'LOG_MCHAT_TABLE_PRUNED' => 'mChat Tabelle löschen',
'ACP_USER_MCHAT' => 'mChat Einstellung',
'LOG_DELETED_MCHAT' => '<strong>Lösche mChat Nachricht</strong><br />» %1$en',
'LOG_EDITED_MCHAT' => '<strong>Editiere mChat Nachricht</strong><br />» %1$en',
'MCHAT_TOP_POSTERS' => 'Top Poster',
'MCHAT_NEW_CHAT' => 'Neue mChat Nachricht!',
'MCHAT_SEND_PM' => 'Sende private Nachricht',
// Custom edits
'REPLY_WITH_LIKE' => 'mir gefällt dieser Beitrag',
));

View File

@@ -1,169 +0,0 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.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 = array();
}
// 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, array(
// UMIL stuff
'ACP_MCHAT_CONFIG' => 'Konfiguration',
'ACP_CAT_MCHAT' => 'mChat',
'ACP_MCHAT_TITLE' => 'Mini-Chat',
'ACP_MCHAT_TITLE_EXPLAIN' => 'Ein Mini-Chat (aka Shoutbox) für dein Forum',
'MCHAT_TABLE_DELETED' => 'Die mChat Tabelle wurde erfolgreich gelöscht',
'MCHAT_TABLE_CREATED' => 'Die mChat Tabelle wurde erfolgreich erstellt',
'MCHAT_TABLE_UPDATED' => 'Die mChat Tabelle wurde erfolgreich upgedated',
'MCHAT_NOTHING_TO_UPDATE' => 'Es gibt nichts zu tun....fahre fort',
'UCP_CAT_MCHAT' => 'mChat Präferenzen',
'UCP_MCHAT_CONFIG' => 'mChat Benutzerpräferenzen',
// ACP entries
'ACP_MCHAT_RULES' => 'Regeln',
'ACP_MCHAT_RULES_EXPLAIN' => 'Gib deine Regeln hier ein. Jeder Regel in eine neue Zeile.<br />Lass das Feld frei um die Anzeige zu deaktivieren. Das Limit liegt bei 255 Zeichen.<br /><strong>Diese Nachricht kann übersetzt werden.</strong> (editiere hierzu die Datei: mchat_lang.php und lies die Anweisungen).',
'LOG_MCHAT_CONFIG_UPDATE' => '<strong>mChat-Konfiguration erfolgreich geändert</strong>',
'MCHAT_CONFIG_SAVED' => 'Die mChat-Konfiguration wurde erfolgreich geändert',
'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_VERSION' => 'Version:',
'MCHAT_AVATARS' => 'Avatare anzeigen',
'MCHAT_AVATARS_EXPLAIN' => 'Wenn ja gesetzt ist, wird ein in der Größe verändertes Benutzer Avatare angezeigt.',
'MCHAT_ON_INDEX' => 'mChat im Index',
'MCHAT_ON_INDEX_EXPLAIN' => 'Ermöglicht die Anzeige des MCHAT auf der Indexseite.',
'MCHAT_INDEX_HEIGHT' => 'Index Seiten Höhe',
'MCHAT_INDEX_HEIGHT_EXPLAIN' => 'Die Höhe der Chat Box in Pixeln auf der Index-Seite des Forums.<br /><em>Du kannst nur von 50 bis 1000 Pixel einstellen</em>.',
'MCHAT_LOCATION' => 'Platzierung im Forum',
'MCHAT_LOCATION_EXPLAIN' => 'Wähle die Position von mChat auf der Startseite.',
'MCHAT_TOP_OF_FORUM' => 'Oberhalb des Forums',
'MCHAT_BOTTOM_OF_FORUM' => 'Unterhalb des Forums',
'MCHAT_REFRESH' => 'Aktualisieren',
'MCHAT_REFRESH_EXPLAIN' => 'Anzahl der Sekunden, bevor Chat automatisch aktualisiert wird.<br /><em>Sie sind von 5 bis 60 Sekunden begrenzt</em>.',
'MCHAT_LIVE_UPDATES' => 'Live Updates von bearbeiteten und gelöschten Nachrichten',
'MCHAT_LIVE_UPDATES_EXPLAIN' => 'Wenn ein Benutzer Nachrichten bearbeitet oder löscht, werden die Änderungen für alle anderen live aktualisiert, ohne dass sich die Seite zu aktualisiert. Deaktivieren Sie diese Option, wenn Leistungsprobleme auftreten.',
'MCHAT_PRUNE' => 'Automatisches Löschen erlauben',
'MCHAT_PRUNE_EXPLAIN' => 'Stelle JA ein, um die automatische Löschfunktion zu aktivieren.<br /><em>Hat nur Auswirkung, wenn ein Benutzer die separate Seite oder das Archiv betrachtet.</em.',
'MCHAT_PRUNE_NUM' => 'Anzahl verbleibender Nachrichten nach dem automatischem Löschen',
'MCHAT_PRUNE_NUM_EXPLAIN' => 'Die Anzahl der Nachrichten, die nach dem Löschen im Chat verbleiben.',
'MCHAT_MESSAGE_LIMIT' => 'Nachrichtenlimit',
'MCHAT_MESSAGE_LIMIT_EXPLAIN' => 'Die maximale Anzahl der Nachrichten, die auf der Hauptseite des Forums angezeigt werden soll.<br /><em>Empfohlen sind zwischen 10 und 20</em>.',
'MCHAT_MESSAGE_NUM' => 'Nachrichtengrenze',
'MCHAT_MESSAGE_NUM_EXPLAIN' => 'Die maximale Anzahl von Nachrichten im Chat-Bereich die auf der Indexseite angezeigt werden. <br /> <Em> Empfohlen von 10 bis 50 </ em>.',
'MCHAT_ARCHIVE_LIMIT' => 'Archivlimit',
'MCHAT_ARCHIVE_LIMIT_EXPLAIN' => 'Die maximale Anzahl Nachrichten pro Seite im Archiv.<br /> <em>Empfohlen sind 25 bis 50</e.',
'MCHAT_FLOOD_TIME' => 'Flood-Intervall',
'MCHAT_FLOOD_TIME_EXPLAIN' => 'Die Zeit in Sekunden, die ein Benutzer warten muß, bis er eine neue Nachricht im mChat absenden kann.<br /><em>Empfohlen sind 5 bis 30, stelle 0 ein, um die Funktion zu deaktivieren</.',
'MCHAT_EDIT_DELETE_LIMIT' => 'Frist für die Bearbeitung und das Löschen von Nachrichten',
'MCHAT_EDIT_DELETE_LIMIT_EXPLAIN' => 'Nachrichten, die älter als die angegebene Anzahl von Sekunden können vom Autor nicht mehr bearbeitet oder gelöscht werden.<br />Benutzer, die bearbeiten/löschen dürfen und von der <em>Moderator Genehmigung befreit sind</ me> von dieser Frist. <br /> Bei 0 wird unbegrenztes Bearbeiten und Löschen ermöglicht.',
'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_CUSTOM_PAGE' => 'Eigenständige Seite',
'MCHAT_CUSTOM_PAGE_EXPLAIN' => 'Erlaubt die Benutzung des Chats auf einer eigenständigen Seite.',
'MCHAT_CUSTOM_HEIGHT' => 'Höhe der eigenen mChat Seite',
'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'Die Höhe der Chat-Box in Pixeln auf der eigenen mChat Seite.<br /><em>Du kannst nur von 50 bis 1000 Pixel einstellen</em>.',
'MCHAT_DATE_FORMAT' => 'Datums-Format',
'MCHAT_DATE_FORMAT_EXPLAIN' => 'Die Syntax entspricht der der date()-Funktion von PHP <a href="http://www.php.net/date">date()</a>',
'MCHAT_CUSTOM_DATEFORMAT' => 'Eigenes…',
'MCHAT_WHOIS' => 'Whois',
'MCHAT_WHOIS_EXPLAIN' => 'Erlaubt es die Benutzer anzuzeigen, die sich gerade auf der mChat-Seite befinden.',
'MCHAT_WHOIS_REFRESH' => 'Whois aktualisieren',
'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Die Anzahl Sekunden, bis die Whois-anzeige aktualisiert wird.<br /><strong>Nicht unter 30 Sekunden einstellen!</strong>.',
'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 />BBcodes mit einem senkrechten Strich trennen, beispielsweise: b|u|code',
'MCHAT_STATIC_MESSAGE' => 'Permanente Nachricht in der Chatbox',
'MCHAT_STATIC_MESSAGE_EXPLAIN' => 'Hier kannst du eine permanente Nachricht für die Benutzer des mChats eingeben.<br />Lass es frei um keine Nachricht anzuzeigen. Deine Nachricht kann 255 Zeichen umfassen.<br /><strong>Diese Nachricht kann auch übersetzt werden.</strong> (Editiere hierzu die Datei mchat_lang.php file und lies die Anweisungen.).',
'MCHAT_USER_TIMEOUT' => 'Zeitüberschreitung für Benutzer',
'MCHAT_USER_TIMEOUT_EXPLAIN' => 'Stelle einen Wert für die Zeitüberschreitung in Sekunden ein, nach der die Sitzung für einen Benutzer im mChat endet. Stelle 0 ein für kein Timeout Limit.<br /><em>Das Limit ist das Selbe, wie in deinen %sForum Einstellungen für Sitzungen%s. Derzeit beträgt dieser Wert %s Sekunden.</em>',
'MCHAT_OVERRIDE_SMILIE_LIMIT' => 'Smilielimit überschreiben?',
'MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN' => 'Falls JA eingestellt ist, wird das eingestellte Limit im Forum für Smilies im mChat aufgehoben.',
'MCHAT_OVERRIDE_MIN_POST_CHARS' => 'Minimale Anzahl von Zeichen aufheben?',
'MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Falls ja eingestellt ist, wird das Limit für die minimale Anzahl an Zeichen für mChat-Nachrichten aufgehoben.',
'MCHAT_NEW_POSTS_TOPIC' => 'Zeige New Topic Beiträge an',
'MCHAT_NEW_POSTS_TOPIC_EXPLAIN' => 'Stelle auf Ja, damit neue Themen und Beiträge aus dem Forum im Chat Nachrichtenbereich angezeigt werden.',
'MCHAT_NEW_POSTS_REPLY' => 'Zeige neue Antworten in Beiträgen an',
'MCHAT_NEW_POSTS_REPLY_EXPLAIN' => 'Stelle auf Ja, damit beantwortete Beiträge aus dem Forum im Chat Nachrichtenbereich angezeigt werden.',
'MCHAT_NEW_POSTS_EDIT' => 'Zeige editierte Beiträge an',
'MCHAT_NEW_POSTS_EDIT_EXPLAIN' => 'Stelle auf Ja, damit bearbeitete Beiträge aus dem Forum im Chat Nachrichtenbereich angezeigt werden.',
'MCHAT_NEW_POSTS_QUOTE' => 'Zeige zitierte Beiträge an',
'MCHAT_NEW_POSTS_QUOTE_EXPLAIN' => 'Stelle auf Ja, damit die zitierten Beiträge aus dem Forum im Chat Nachrichtenbereich angezeigt werden.',
'MCHAT_MAIN' => 'Hauptkonfiguration',
'MCHAT_STATS' => 'Wer ist im mChat?',
'MCHAT_STATS_INDEX' => 'Anzeige auf dem Index',
'MCHAT_STATS_INDEX_EXPLAIN' => 'Zeigt auf dem Index an wer im Mini-Chat ist.',
'MCHAT_MESSAGE_TOP' => 'Nachricht unten / oben',
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'Hier kannst Du einstellen, ob der Nachrichtenbereich oben oder unten angezeigt werden soll.',
'MCHAT_BOTTOM' => 'Unten',
'MCHAT_TOP' => 'Oben',
'MCHAT_MESSAGES' => 'Nachrichten-Einstellungen',
'MCHAT_PAUSE_ON_INPUT' => 'Den Chat während einer Nachrichteneingabe nicht aktualisieren',
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Falls JA eingestellt ist, ist das automatische Aktualisieren während der Eingabe einer Nachricht deaktiviert.',
// Error reporting
'TOO_LONG_DATE' => 'Das angegebene Datumsformat ist zu lang.',
'TOO_SHORT_DATE' => 'Das angegebene Datumsformat ist zu kurz.',
'TOO_SMALL_REFRESH' => 'Das Aktualisierungsintervall ist zu kurz.',
'TOO_LARGE_REFRESH' => 'Das Aktualisierungsintervall ist zu lang.',
'TOO_SMALL_MESSAGE_LIMIT' => 'Das Nachrichtenlimit ist zu klein.',
'TOO_LARGE_MESSAGE_LIMIT' => 'Das Nachrichtenlimit ist zu groß.',
'TOO_SMALL_ARCHIVE_LIMIT' => 'Der Wert des Archivlimits ist zu klein.',
'TOO_LARGE_ARCHIVE_LIMIT' => 'Der Wert des Archivlimits ist zu groß.',
'TOO_SMALL_FLOOD_TIME' => 'Das Flood-Intervall ist zu kurz.',
'TOO_LARGE_FLOOD_TIME' => 'Das Flood-Intervall ist zu lang.',
'TOO_SMALL_MAX_MESSAGE_LNGTH' => 'Der Wert der maximalen Nachrichtenlänge ist zu klein.',
'TOO_LARGE_MAX_MESSAGE_LNGTH' => 'Der Wert der maximalen Nachrichtenlänge ist zu groß.',
'TOO_SMALL_MAX_WORDS_LNGTH' => 'Der Wert der maximalen Wortlänge ist zu groß.',
'TOO_LARGE_MAX_WORDS_LNGTH' => 'Der Wert für die maximale Wortlänge ist zu groß.',
'TOO_SMALL_WHOIS_REFRESH' => 'Der Wert für die Whois-Aktualisierung ist zu klein.',
'TOO_LARGE_WHOIS_REFRESH' => 'Der Wert für die Whois-Aktualisierung ist zu groß.',
'TOO_SMALL_INDEX_HEIGHT' => 'Der Wert für die Höhe des Index ist zu klein.',
'TOO_LARGE_INDEX_HEIGHT' => 'Der Wert für die Höhe des Index ist zu groß.',
'TOO_SMALL_CUSTOM_HEIGHT' => 'Der Wert für die Höhe des Chats auf einer separaten Seite ist zu klein.',
'TOO_LARGE_CUSTOM_HEIGHT' => 'Der Wert für die Höhe des Chats auf einer separaten Seite ist zu groß',
'TOO_SHORT_STATIC_MESSAGE' => 'Der Wert für die Länge der permanenten Nachricht ist zu klein.',
'TOO_LONG_STATIC_MESSAGE' => 'Der Wert für die Länge der permanenten Nachricht ist zu groß.',
'TOO_SMALL_TIMEOUT' => 'Der Wert für die Zeitüberschreitung eines Benutzers ist zu klein.',
'TOO_LARGE_TIMEOUT' => 'Der Wert für die Zeitüberschreitung eines Benutzers ist zu groß.',
// User perms
'ACL_U_MCHAT_USE' => 'Kann mChat benutzen',
'ACL_U_MCHAT_VIEW' => 'Kann mChat sehen',
'ACL_U_MCHAT_EDIT' => 'Kann mChat bearbeiten',
'ACL_U_MCHAT_DELETE' => 'Kann mChat Nachricht löschen',
'ACL_U_MCHAT_IP' => 'Kann mChat IP sehen',
'ACL_U_MCHAT_PM' => 'Kann Private Nachricht im mChat verwenden',
'ACL_U_MCHAT_LIKE' => 'Kann "gefällt mir" Nachrichten im mChat verwenden',
'ACL_U_MCHAT_QUOTE' => 'Kann Zitate im mChat verwenden',
'ACL_U_MCHAT_FLOOD_IGNORE' => 'Kann den mChat Flood ignorieren',
'ACL_U_MCHAT_ARCHIVE' => 'Kann das mChat Archiv sehen',
'ACL_U_MCHAT_BBCODE' => 'Kann BBCode im mChat verwenden',
'ACL_U_MCHAT_SMILIES' => 'Kann Smilies im mChat verwenden',
'ACL_U_MCHAT_URLS' => 'Kann Url im mChat posten',
// Admin perms
'ACL_A_MCHAT' => 'Kann mChat Einstellung managen',
));

View File

@@ -1,11 +1,12 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
if (!defined('IN_PHPBB'))
{
@@ -30,36 +31,33 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_TITLE' => 'mChat',
'MCHAT_ADD' => 'Send',
'MCHAT_IN' => 'in',
'MCHAT_IN_SECTION' => 'section',
'MCHAT_LIKES' => 'Likes this post',
'MCHAT_ANNOUNCEMENT' => 'Announcement',
'MCHAT_ARCHIVE' => 'Archive',
'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archive',
'MCHAT_ARCHIVE_PAGE' => 'mChat Archive',
'MCHAT_BBCODES' => 'BBCodes',
'MCHAT_CLEAN' => 'Purge',
'MCHAT_CLEANED' => 'All messages have been successfully removed',
'MCHAT_CLEAR_INPUT' => 'Reset',
'MCHAT_COPYRIGHT' => '<a href="http://rmcgirr83.org">RMcGirr83</a> &copy; <a href="http://www.dmzx-web.net" title="www.dmzx-web.net">dmzx</a>',
'MCHAT_CUSTOM_BBCODES' => 'Custom BBCodes',
'MCHAT_DELALLMESS' => 'Remove all messages?',
'MCHAT_DELCONFIRM' => 'Do you confirm removal?',
'MCHAT_DELITE' => 'Delete',
'MCHAT_EDIT' => 'Edit',
'MCHAT_EDITINFO' => 'Edit the message and click OK',
'MCHAT_ERROR' => 'Error',
'MCHAT_FLOOD' => 'You can not post another message so soon after your last',
'MCHAT_FOE' => 'This message was made by <strong>%1$s</strong> who is currently on your ignore list.',
'MCHAT_HELP' => 'mChat Rules',
'MCHAT_HIDE_LIST' => 'Hide List',
'MCHAT_HOUR' => 'hour',
'MCHAT_HOURS' => 'hours',
'MCHAT_IP' => 'IP whois for',
'MCHAT_MINUTE' => 'minute',
'MCHAT_MINUTES' => 'minutes',
'MCHAT_MESS_LONG' => 'Your message is too long.\nPlease limit it to %s characters',
'MCHAT_RULES' => 'Rules',
'MCHAT_HOURS' => array(
1 => '%1$d hour',
2 => '%1$d hours',
),
'MCHAT_MINUTES' => array(
1 => '%1$d minute',
2 => '%1$d minutes',
),
'MCHAT_SECONDS' => array(
1 => '%1$d second',
2 => '%1$d seconds',
),
'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_RULES' => 'The mChat rules page is not activated at this time!',
'MCHAT_NOACCESS' => 'You dont have permission to post in the mChat',
@@ -68,59 +66,58 @@ $lang = array_merge($lang, array(
'MCHAT_NOMESSAGE' => 'No messages',
'MCHAT_NOMESSAGEINPUT' => 'You have not entered a message',
'MCHAT_NOSMILE' => 'Smilies not found',
'MCHAT_NOTINSTALLED_USER' => 'mChat is not installed. Please notify the board founder.',
'MCHAT_NOT_INSTALLED' => 'mChat database entries are missing.<br />Please run the %sinstaller%s to make the database changes for the modification.',
'MCHAT_OK' => 'OK',
'MCHAT_PAUSE' => 'Paused',
'MCHAT_LOAD' => 'Loading',
'MCHAT_PERMISSIONS' => 'Change users permissions',
'MCHAT_REFRESHING' => 'Refreshing...',
'MCHAT_REFRESH_NO' => 'Autoupdate is off',
'MCHAT_REFRESH_YES' => 'Autoupdate every <strong>%d</strong> seconds',
'MCHAT_REFRESH_NO' => 'Update is off',
'MCHAT_REFRESH_YES' => 'Updates every <strong>%1$d</strong> seconds',
'MCHAT_RESPOND' => 'Respond to user',
'MCHAT_RESET_QUESTION' => 'Clear the input area?',
'MCHAT_SESSION_OUT' => 'Chat session has expired',
'MCHAT_SHOW_LIST' => 'Show List',
'MCHAT_SECOND' => 'second',
'MCHAT_SECONDS' => 'seconds',
'MCHAT_SESSION_ENDS' => 'Chat session ends in',
'MCHAT_SMILES' => 'Smilies',
'MCHAT_TOTALMESSAGES' => 'Total messages: <strong>%s</strong>',
'MCHAT_USESOUND' => 'Use sound?',
'MCHAT_ONLINE_USERS_TOTAL' => 'In total there are <strong>%d</strong> users chatting',
'MCHAT_ONLINE_USER_TOTAL' => 'In total there is <strong>%d</strong> user chatting',
'MCHAT_NO_CHATTERS' => 'No one is chatting',
'MCHAT_ONLINE_EXPLAIN' => 'based on users active over the past %s',
'MCHAT_TOTALMESSAGES' => 'Total messages: <strong>%1$d</strong>',
'MCHAT_USESOUND' => 'Use sound',
'MCHAT_ONLINE_USERS_TOTAL' => array(
0 => 'No one is chatting',
1 => 'In total there is <strong>%1$d</strong> user chatting',
2 => 'In total there are <strong>%1$d</strong> users chatting',
),
'MCHAT_ONLINE_EXPLAIN' => 'based on users active over the past %1$s',
'WHO_IS_CHATTING' => 'Who is chatting',
'WHO_IS_REFRESH_EXPLAIN' => 'Refreshes every <strong>%d</strong> seconds',
'MCHAT_NEW_POST' => 'Made A New Topic',
'MCHAT_NEW_REPLY' => 'Made A New Reply',
'MCHAT_NEW_QUOTE' => 'Replied with a Quote',
'MCHAT_NEW_EDIT' => 'Made A Edit',
'MCHAT_NEW_POST' => 'Posted a new topic: %1$s in %2$s',
'MCHAT_NEW_REPLY' => 'Posted a reply: %1$s in %2$s',
'MCHAT_NEW_QUOTE' => 'Replied with a quote: %1$s in %2$s',
'MCHAT_NEW_EDIT' => 'Edited a post: %1$s in %2$s',
// UCP
'UCP_PROFILE_MCHAT' => 'mChat Preferences',
'DISPLAY_MCHAT' => 'Display mChat on Index',
'UCP_PROFILE_MCHAT' => 'mChat preferences',
'DISPLAY_MCHAT' => 'Display mChat on index',
'SOUND_MCHAT' => 'Enable mChat sound',
'DISPLAY_STATS_INDEX' => 'Display Who is Chatting on Index',
'DISPLAY_STATS_INDEX' => 'Display who is chatting on index',
'DISPLAY_NEW_TOPICS' => 'Display new topics in the chat',
'DISPLAY_AVATARS' => 'Display avatars in the chat',
'CHAT_AREA' => 'Input type',
'CHAT_AREA_EXPLAIN' => 'Choose which type of area to use to input a chat:<br />A text area or<br />an input area',
'CHAT_AREA_EXPLAIN' => 'The type of area to use for writing messages',
'INPUT_AREA' => 'Input area',
'TEXT_AREA' => 'Text area',
'UCP_CAT_MCHAT' => 'mChat',
'UCP_MCHAT_CONFIG' => 'mChat',
// Preferences
'LOG_MCHAT_TABLE_PRUNED' => 'mChat Table was pruned',
'ACP_USER_MCHAT' => 'mChat Settings',
'LOG_MCHAT_TABLE_PRUNED' => 'mChat messages were pruned',
'ACP_USER_MCHAT' => 'mChat settings',
'LOG_DELETED_MCHAT' => '<strong>Deleted mChat message</strong><br />» %1$s',
'LOG_EDITED_MCHAT' => '<strong>Edited mChat message</strong><br />» %1$s',
'MCHAT_TOP_POSTERS' => 'Top Spammers',
'MCHAT_NEW_CHAT' => 'New Chat Message!',
'MCHAT_SEND_PM' => 'Send Private Message',
'MCHAT_NEW_CHAT' => 'New chat message!',
'MCHAT_SEND_PM' => 'Send private message',
'MCHAT_LIKE' => 'Like this post',
'MCHAT_LIKES' => 'Likes this post',
// Custom edits
'REPLY_WITH_LIKE' => 'Like This Post',
// Custom translations for administrators
'MCHAT_RULES_MESSAGE' => '',
'MCHAT_STATIC_MESSAGE' => '',
));

View File

@@ -1,11 +1,12 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
if (!defined('IN_PHPBB'))
{
@@ -33,121 +34,121 @@ if (empty($lang) || !is_array($lang))
// » “ ” …
$lang = array_merge($lang, array(
// UMIL stuff
'ACP_MCHAT_CONFIG' => 'Configuration',
'ACP_CAT_MCHAT' => 'mChat',
'ACP_MCHAT_TITLE' => 'Mini-Chat',
'ACP_MCHAT_TITLE_EXPLAIN' => 'A mini chat (aka “shout box”) for your forum',
'MCHAT_TABLE_DELETED' => 'The mChat table was successfully deleted',
'MCHAT_TABLE_CREATED' => 'The mChat table was successfully created',
'MCHAT_TABLE_UPDATED' => 'The mChat table was successfully updated',
'MCHAT_NOTHING_TO_UPDATE' => 'Nothing to do....continuing',
'ACP_MCHAT_TITLE' => 'mChat Extension for phpBB 3.1',
'ACP_MCHAT_VERSION' => 'Version',
'UCP_CAT_MCHAT' => 'mChat Prefs',
'UCP_MCHAT_CONFIG' => 'User mChat Prefs',
// ACP configuration sections
'MCHAT_SETTINGS_INDEX' => 'Index page settings',
'MCHAT_SETTINGS_CUSTOM' => 'Custom page settings',
'MCHAT_SETTINGS_ARCHIVE' => 'Archive page settings',
'MCHAT_SETTINGS_POSTS' => 'New posts settings',
'MCHAT_SETTINGS_MESSAGES' => 'Message settings',
'MCHAT_SETTINGS_PRUNE' => 'Pruning settings',
'MCHAT_SETTINGS_STATS' => 'Who is chatting settings',
// ACP entries
'ACP_MCHAT_RULES' => 'Rules',
'ACP_MCHAT_RULES_EXPLAIN' => 'Enter the rules of the forum here. Each rule on a new line.<br />You are limited to 255 characters.<br /><strong>This message can be translated.</strong> (you must edit the mchat_lang.php file and read the instructions).',
'LOG_MCHAT_CONFIG_UPDATE' => '<strong>Updated mChat config </strong>',
'MCHAT_CONFIG_SAVED' => 'Mini Chat configuration has been updated',
'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_VERSION' => 'Version:',
'ACP_MCHAT_RULES_EXPLAIN' => 'Enter the rules of the forum here. Each rule on a new line. 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/common.php.',
'LOG_MCHAT_CONFIG_UPDATE' => '<strong>Updated mChat config</strong>',
'MCHAT_CONFIG_SAVED' => 'mChat configuration has been updated',
'MCHAT_TITLE' => 'mChat',
'MCHAT_AVATARS' => 'Display avatars',
'MCHAT_AVATARS_EXPLAIN' => 'If set yes, resized user avatars will be displayed',
'MCHAT_ON_INDEX' => 'mChat On Index',
'MCHAT_ON_INDEX_EXPLAIN' => 'Allow the display of the 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 of the forum.<br /><em>You are limited from 50 to 1000</em>.',
'MCHAT_LOCATION' => 'Location on Forum',
'MCHAT_LOCATION_EXPLAIN' => 'Choose the location of the mChat on the index page.',
'MCHAT_TOP_OF_FORUM' => 'Top of Forum',
'MCHAT_BOTTOM_OF_FORUM' => 'Bottom of Forum',
'MCHAT_REFRESH' => 'Refresh',
'MCHAT_REFRESH_EXPLAIN' => 'Number of seconds before chat automatically refreshes.<br /><em>You are limited from 5 to 60 seconds</em>.',
'MCHAT_AVATARS_EXPLAIN' => 'If set to yes, resized user avatars will be displayed',
'MCHAT_ON_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.</em>',
'MCHAT_LOCATION' => 'Location of mChat on the index page',
'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.</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 Prune',
'MCHAT_PRUNE_EXPLAIN' => 'Set to yes to enable the prune feature.<br /><em>Only occurs if a user views the custom or archive pages</em>.',
'MCHAT_PRUNE_NUM' => 'Prune Number',
'MCHAT_PRUNE_NUM_EXPLAIN' => 'The number of messages to retain in the chat.',
'MCHAT_MESSAGE_LIMIT' => 'Message limit',
'MCHAT_MESSAGE_LIMIT_EXPLAIN' => 'The maximum number of messages to show in the chat area.<br /><em>Recommended from 10 to 30</em>.',
'MCHAT_MESSAGE_NUM' => 'Index page message limit',
'MCHAT_MESSAGE_NUM_EXPLAIN' => 'The maximum number of messages to show in the chat area on the index page.<br /><em>Recommended from 10 to 50</em>.',
'MCHAT_ARCHIVE_LIMIT' => 'Archive limit',
'MCHAT_ARCHIVE_LIMIT_EXPLAIN' => 'The maximum number of messages to show per page on the archive page.<br /> <em>Recommended from 25 to 50</em>.',
'MCHAT_PRUNE' => 'Enable message pruning',
'MCHAT_PRUNE_EXPLAIN' => 'Only occurs if a user views the custom or archive pages.',
'MCHAT_PRUNE_NUM' => 'Number of messages to retain when pruning',
'MCHAT_MESSAGE_LIMIT' => 'Number of messages to display on the custom page',
'MCHAT_MESSAGE_LIMIT_EXPLAIN' => 'The maximum number of messages to show on the custom page.<br /><em>Recommended from 10 to 30.</em>',
'MCHAT_MESSAGE_NUM' => 'Number of messages to display on the index page',
'MCHAT_MESSAGE_NUM_EXPLAIN' => 'The maximum number of messages to show on the index page.<br /><em>Recommended from 10 to 50.</em>',
'MCHAT_ARCHIVE_LIMIT' => 'Number of messages to display on the archive page',
'MCHAT_ARCHIVE_LIMIT_EXPLAIN' => 'The maximum number of messages to show per page on the archive page.<br /><em>Recommended from 25 to 50.</em>',
'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>Recommended 5 to 30, 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>Recommended 5 to 30, 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 edit/delete permission as well as <em>moderator permission are exempt</em> from this time limit.<br />Set to 0 to allow unlimited editing and deleting.',
'MCHAT_MAX_MESSAGE_LENGTH' => 'Max message length',
'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Max number of characters allowed per message posted.<br /><em>Recommended from 100 to 500, set to 0 to disable</em>.',
'MCHAT_CUSTOM_PAGE' => 'Custom Page',
'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>Recommended from 100 to 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 separate mChat page.<br /><em>You are limited from 50 to 1000</em>.',
'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.</em>',
'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…',
'MCHAT_WHOIS' => 'Whois',
'MCHAT_WHOIS_EXPLAIN' => 'Allow a display of users who are chatting',
'MCHAT_WHOIS_REFRESH' => 'Whois refresh',
'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Number of seconds before whois stats refreshes.<br /><em>You are limited from 30 to 300 seconds</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 %scustom bbcode tag name%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. You are limited to 255 characters.<br /><strong>This message can be translated.</strong> (you must edit the mchat_lang.php file and read the instructions).',
'MCHAT_USER_TIMEOUT' => 'User Timeout',
'MCHAT_USER_TIMEOUT_EXPLAIN' => 'Set the amount of time, in seconds, until a users session in the chat ends. Set to 0 for no timeout.<br /><em>You are limited to the %sforum config setting for sessions%s which is currently set to %s seconds</em>',
'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/common.php.',
'MCHAT_USER_TIMEOUT' => 'User session timeout',
'MCHAT_USER_TIMEOUT_EXPLAIN' => 'Set the amount of time in seconds until a user session in the chat ends. Set to 0 for no timeout.<br /><em>You are limited to the %1$sforum config setting for sessions%2$s which is currently set to %3$d seconds</em>',
'MCHAT_OVERRIDE_SMILIE_LIMIT' => 'Override smilie limit',
'MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN' => 'Set to yes to override the forums smilie limit setting for chat messages',
'MCHAT_OVERRIDE_MIN_POST_CHARS' => 'Override minimum characters limit',
'MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Set to yes to override the forums minimum characters setting for chat messages',
'MCHAT_NEW_POSTS_TOPIC' => 'Display New Topic Posts',
'MCHAT_NEW_POSTS_TOPIC_EXPLAIN' => 'Set to yes to allow new topic posts from the forum to be posted into the chat message area.',
'MCHAT_NEW_POSTS_REPLY' => 'Display New Replied Posts',
'MCHAT_NEW_POSTS_REPLY_EXPLAIN' => 'Set to yes to allow replied posts from the forum to be posted into the chat message area.',
'MCHAT_NEW_POSTS_EDIT' => 'Display Edited Posts',
'MCHAT_NEW_POSTS_EDIT_EXPLAIN' => 'Set to yes to allow edited posts from the forum to be posted into the chat message area.',
'MCHAT_NEW_POSTS_QUOTE' => 'Display Quoted Posts',
'MCHAT_NEW_POSTS_QUOTE_EXPLAIN' => 'Set to yes to allow quoted posts from the forum to be posted into the chat message area.',
'MCHAT_MAIN' => 'Main Configuration',
'MCHAT_STATS' => 'Whois Chatting',
'MCHAT_STATS_INDEX' => 'Stats on Index',
'MCHAT_STATS_INDEX_EXPLAIN' => 'Show who is chatting with in the stats section of the forum',
'MCHAT_MESSAGE_TOP' => 'Keep message on Bottom / Top',
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'This will post the message bottom or top in the chat message area.',
'MCHAT_NEW_POSTS_TOPIC' => 'Display new topics',
'MCHAT_NEW_POSTS_TOPIC_EXPLAIN' => 'Allow topics from the forum to be posted in the chat.',
'MCHAT_NEW_POSTS_REPLY' => 'Display new replies',
'MCHAT_NEW_POSTS_REPLY_EXPLAIN' => 'Allow replies from the forum to be posted in the chat.',
'MCHAT_NEW_POSTS_EDIT' => 'Display edited posts',
'MCHAT_NEW_POSTS_EDIT_EXPLAIN' => 'Allow edited posts from the forum to be posted in the chat.',
'MCHAT_NEW_POSTS_QUOTE' => 'Display quoted posts',
'MCHAT_NEW_POSTS_QUOTE_EXPLAIN' => 'Allow quoted posts from the forum to be posted in the chat.',
'MCHAT_WHOIS' => 'Display <em>Who is chatting</em> below the chat',
'MCHAT_STATS_INDEX' => 'Display <em>Who is chatting</em> in the stats section',
'MCHAT_STATS_INDEX_EXPLAIN' => 'Displays who is chatting below the <em>Who is online</em> section on the index page',
'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 30 to 300 seconds.</em>',
'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_BOTTOM' => 'Bottom',
'MCHAT_TOP' => 'Top',
'MCHAT_MESSAGES' => 'Message Settings',
'MCHAT_PAUSE_ON_INPUT' => 'Pause on input',
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'If set Yes, then the chat will not autoupdate upon a user entering a message in the input area',
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Do not autoupdate upon a user entering a message in the input area',
'MCHAT_PURGE' => 'Delete all messages now',
'MCHAT_PURGE_CONFIRM' => 'Confirm deleting all messages',
'MCHAT_PURGED' => 'All mChat messages have been successfully deleted',
// Error reporting
'TOO_LONG_DATE' => 'The date format you entered is too long.',
'TOO_SHORT_DATE' => 'The date format you entered is too short.',
'TOO_SMALL_REFRESH' => 'The refresh value is too small.',
'TOO_LARGE_REFRESH' => 'The refresh value is too large.',
'TOO_SMALL_MESSAGE_LIMIT' => 'The message limit value is too small.',
'TOO_LARGE_MESSAGE_LIMIT' => 'The message limit value is too large.',
'TOO_SMALL_ARCHIVE_LIMIT' => 'The archive limit value is too small.',
'TOO_LARGE_ARCHIVE_LIMIT' => 'The archive limit value is too large.',
'TOO_SMALL_FLOOD_TIME' => 'The flood time value is too small.',
'TOO_LARGE_FLOOD_TIME' => 'The flood time value is too large.',
'TOO_SMALL_MAX_MESSAGE_LNGTH' => 'The max message length value is too small.',
'TOO_LARGE_MAX_MESSAGE_LNGTH' => 'The max message length value is too large.',
'TOO_SMALL_MAX_WORDS_LNGTH' => 'The max words length value is too small.',
'TOO_LARGE_MAX_WORDS_LNGTH' => 'The max words length value is too large.',
'TOO_SMALL_WHOIS_REFRESH' => 'The whois refresh value is too small.',
'TOO_LARGE_WHOIS_REFRESH' => 'The whois refresh value is too large.',
'TOO_SMALL_INDEX_HEIGHT' => 'The index height value is too small.',
'TOO_LARGE_INDEX_HEIGHT' => 'The index height value is too large.',
'TOO_SMALL_CUSTOM_HEIGHT' => 'The custom height value is too small.',
'TOO_LARGE_CUSTOM_HEIGHT' => 'The custom height value is too large.',
'TOO_SHORT_STATIC_MESSAGE' => 'The static message value is too short.',
'TOO_LONG_STATIC_MESSAGE' => 'The static message value is too long.',
'TOO_SMALL_TIMEOUT' => 'The user timeout value is too small.',
'TOO_LARGE_TIMEOUT' => 'The user timeout value is too large.',
'TOO_SMALL_MCHAT_ARCHIVE_LIMIT' => 'The archive limit value is too small.',
'TOO_LARGE_MCHAT_ARCHIVE_LIMIT' => 'The archive limit value is too large.',
'TOO_LONG_MCHAT_BBCODE_DISALLOWED' => 'The disallowed bbcodes value is too long.',
'TOO_SMALL_MCHAT_CUSTOM_HEIGHT' => 'The custom height value is too small.',
'TOO_LARGE_MCHAT_CUSTOM_HEIGHT' => 'The custom height value is too large.',
'TOO_LONG_MCHAT_DATE' => 'The date format you entered is too long.',
'TOO_SHORT_MCHAT_DATE' => 'The date format you entered is too short.',
'TOO_SMALL_MCHAT_FLOOD_TIME' => 'The flood time value is too small.',
'TOO_LARGE_MCHAT_FLOOD_TIME' => 'The flood time value is too large.',
'TOO_SMALL_MCHAT_INDEX_HEIGHT' => 'The index height value is too small.',
'TOO_LARGE_MCHAT_INDEX_HEIGHT' => 'The index height value is too large.',
'TOO_SMALL_MCHAT_MAX_MESSAGE_LNGTH' => 'The max message length value is too small.',
'TOO_LARGE_MCHAT_MAX_MESSAGE_LNGTH' => 'The max message length value is too large.',
'TOO_SMALL_MCHAT_MESSAGE_LIMIT' => 'The message limit value is too small.',
'TOO_LARGE_MCHAT_MESSAGE_LIMIT' => 'The message limit value is too large.',
'TOO_SMALL_MCHAT_MESSAGE_NUM' => 'The number of messages to display on the index page is too small.',
'TOO_LARGE_MCHAT_MESSAGE_NUM' => 'The number of messages to display on the index 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.',
// User perms
'ACL_U_MCHAT_USE' => 'Can use mChat',
@@ -156,13 +157,13 @@ $lang = array_merge($lang, array(
'ACL_U_MCHAT_DELETE' => 'Can delete messages',
'ACL_U_MCHAT_IP' => 'Can view IP addresses',
'ACL_U_MCHAT_PM' => 'Can use private message',
'ACL_U_MCHAT_LIKE' => 'Can use like message',
'ACL_U_MCHAT_QUOTE' => 'Can use quote message',
'ACL_U_MCHAT_FLOOD_IGNORE' => 'Can ignore flood',
'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_ARCHIVE' => 'Can view the archive',
'ACL_U_MCHAT_BBCODE' => 'Can use bbcode',
'ACL_U_MCHAT_BBCODE' => 'Can use bbcodes',
'ACL_U_MCHAT_SMILIES' => 'Can use smilies',
'ACL_U_MCHAT_URLS' => 'Can post urls',
'ACL_U_MCHAT_URLS' => 'Can post URLs',
// Admin perms
'ACL_A_MCHAT' => 'Can manage mChat settings',

View File

@@ -1,126 +0,0 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.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 = array();
}
// 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
$lang = array_merge($lang, array(
'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_ADD' => 'Enviar',
'MCHAT_IN' => 'en',
'MCHAT_IN_SECTION' => 'sección',
'MCHAT_LIKES' => 'Me Gusta este mensaje',
'MCHAT_ANNOUNCEMENT' => 'Anuncio',
'MCHAT_ARCHIVE' => 'Archivo',
'MCHAT_ARCHIVE_PAGE' => 'Archivo de Mini-Chat',
'MCHAT_BBCODES' => 'BBCodes',
'MCHAT_CLEAN' => 'Purge',
'MCHAT_CLEANED' => 'Todos los mensajes han sido eliminados correctamente',
'MCHAT_CLEAR_INPUT' => 'Reiniciar',
'MCHAT_COPYRIGHT' => '<a href="http://rmcgirr83.org">RMcGirr83</a> &copy; <a href="http://www.dmzx-web.net" title="www.dmzx-web.net">dmzx</a>',
'MCHAT_CUSTOM_BBCODES' => 'BBCodes personalizados',
'MCHAT_DELALLMESS' => '¿Eliminar todos los mensajes?',
'MCHAT_DELCONFIRM' => '¿Quiere confirmar el borrado?',
'MCHAT_DELITE' => 'Borrar',
'MCHAT_EDIT' => 'Editar',
'MCHAT_EDITINFO' => 'Editar el mensaje y haga clic en OK',
'MCHAT_ERROR' => 'Error',
'MCHAT_FLOOD' => 'No puede enviar otro mensaje tan pronto después de su último mensaje',
'MCHAT_FOE' => 'Este mensaje fue creado por <strong>%1$s</strong> que se encuentra actualmente en su lista de ignorados.',
'MCHAT_HELP' => 'Normas de mChat',
'MCHAT_HIDE_LIST' => 'Ocultar Lista',
'MCHAT_HOUR' => 'hora',
'MCHAT_HOURS' => 'horas',
'MCHAT_IP' => 'IP whois de',
'MCHAT_MINUTE' => 'minuto',
'MCHAT_MINUTES' => 'minutos',
'MCHAT_MESS_LONG' => 'Su mensaje es demasiado largo.\nPor favor, debe limitarlo a %s caracteres',
'MCHAT_NO_CUSTOM_PAGE' => '¡La página personalizada de mChat no está habilitada en este momento!',
'MCHAT_NO_RULES' => '¡Las normas de mChat no están habilitadas en este momento!',
'MCHAT_NOACCESS' => 'Usted no tiene permiso para publicar en el mChat',
'MCHAT_NOACCESS_ARCHIVE' => 'Usted no tiene permiso para ver el archivo',
'MCHAT_NOJAVASCRIPT' => 'Su navegador no soporta JavaScript, o JavaScript está desactivado',
'MCHAT_NOMESSAGE' => 'No hay mensajes',
'MCHAT_NOMESSAGEINPUT' => 'No ha escrito ningún mensaje',
'MCHAT_NOSMILE' => 'No se encontraron los Emoticonos',
'MCHAT_NOTINSTALLED_USER' => 'mChat no está instalado. Por favor, notifique al fundador del foro.',
'MCHAT_NOT_INSTALLED' => 'Faltan las entradas de mChat en la base de datos.<br />Por favor, ejecute el %sinstalador%s para hacer los cambios en la base de datos para está modificación.',
'MCHAT_OK' => 'OK',
'MCHAT_PAUSE' => 'Pausado',
'MCHAT_LOAD' => 'Cargando',
'MCHAT_PERMISSIONS' => 'Change users permissions',
'MCHAT_REFRESHING' => 'Refrescando...',
'MCHAT_REFRESH_NO' => 'La actualización automática está desactivada',
'MCHAT_REFRESH_YES' => 'Actualización automática cada <strong>%d</strong> segundos',
'MCHAT_RESPOND' => 'Responder al usuario',
'MCHAT_RESET_QUESTION' => '¿Limpiar el área de entrada?',
'MCHAT_SESSION_OUT' => 'La sesión de Chat ha expirado',
'MCHAT_SHOW_LIST' => 'Mostrar Lista',
'MCHAT_SECOND' => 'segundo',
'MCHAT_SECONDS' => 'segundos',
'MCHAT_SESSION_ENDS' => 'La sesión del Chat finaliza en',
'MCHAT_SMILES' => 'Emoticonos',
'MCHAT_TOTALMESSAGES' => 'Mensajes Totales: <strong>%s</strong>',
'MCHAT_USESOUND' => '¿Usar sonido?',
'MCHAT_ONLINE_USERS_TOTAL' => 'En total hay <strong>%d</strong> usuarios chateando',
'MCHAT_ONLINE_USER_TOTAL' => 'En total hay <strong>%d</strong> usuario chateando',
'MCHAT_NO_CHATTERS' => 'Nadie está charlando',
'MCHAT_ONLINE_EXPLAIN' => 'basado en usuarios activos en los últimos %s',
'WHO_IS_CHATTING' => 'Quién está chateando',
'WHO_IS_REFRESH_EXPLAIN' => 'Se refresca cada <strong>%d</strong> segundos',
'MCHAT_NEW_POST' => 'Realizar un nuevo tema',
'MCHAT_NEW_REPLY' => 'Realizar una nueva respuesta',
'MCHAT_NEW_QUOTE' => 'Responder citando',
'MCHAT_NEW_EDIT' => 'Realizar una edición',
// UCP
'UCP_PROFILE_MCHAT' => 'Preferencias de mChat',
'DISPLAY_MCHAT' => 'Mostrar mChat en el índice',
'SOUND_MCHAT' => 'Habilitar sonido en mChat',
'DISPLAY_STATS_INDEX' => 'Mostrar quién está chateando en el índice',
'DISPLAY_NEW_TOPICS' => 'Mostrar nuevos temas en el chat',
'DISPLAY_AVATARS' => 'Mostrar avatares en el chat',
'CHAT_AREA' => 'Tipo de entrada',
'CHAT_AREA_EXPLAIN' => 'Elija qué tipo de área va a utilizar para introducir en el chat:<br />Un área de texto o<br />un área de entrada',
'INPUT_AREA' => 'Área de entrada (Input)',
'TEXT_AREA' => 'Área de texto (Textarea)',
'UCP_CAT_MCHAT' => 'mChat',
'UCP_MCHAT_CONFIG' => 'mChat',
// Preferences
'LOG_MCHAT_TABLE_PRUNED' => 'La tabla de mChat ha sido purgada',
'ACP_USER_MCHAT' => 'Ajustes de mChat',
'LOG_DELETED_MCHAT' => '<strong>Mensaje de mChat borrado</strong><br />» %1$s',
'LOG_EDITED_MCHAT' => '<strong>Mensaje de mChat editado</strong><br />» %1$s',
'MCHAT_TOP_POSTERS' => 'Top Spammers',
'MCHAT_NEW_CHAT' => '¡Nuevo mensaje de Chat!',
'MCHAT_SEND_PM' => 'Enviar mensaje privado',
// Custom edits
'REPLY_WITH_LIKE' => 'Me Gusta este mensaje',
));

View File

@@ -1,169 +0,0 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.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 = array();
}
// 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, array(
// UMIL stuff
'ACP_MCHAT_CONFIG' => 'Configuración',
'ACP_CAT_MCHAT' => 'mChat',
'ACP_MCHAT_TITLE' => 'Mini-Chat',
'ACP_MCHAT_TITLE_EXPLAIN' => 'Un mini chat (aquí “cuadro de charla”) para su foro',
'MCHAT_TABLE_DELETED' => 'La tabla de mChat ha sido borrada correctamente',
'MCHAT_TABLE_CREATED' => 'La tabla de mChat ha sido creada correctamente',
'MCHAT_TABLE_UPDATED' => 'La tabla de mChat ha sido actualizada correctamente',
'MCHAT_NOTHING_TO_UPDATE' => 'Nada que ver.... Continuar',
'UCP_CAT_MCHAT' => 'Preferencias de mChat',
'UCP_MCHAT_CONFIG' => 'Preferencias de Usuario de mChat',
// ACP entries
'ACP_MCHAT_RULES' => 'Normas',
'ACP_MCHAT_RULES_EXPLAIN' => 'Introduzca las normas del foro aquí. Cada norma en una nueva línea.<br />Está limitado a 255 caracteres.<br /><strong>Este mensaje puede ser traducido.</strong> (debe editar el archivo mchat_lang.php y leer las instrucciones).',
'LOG_MCHAT_CONFIG_UPDATE' => '<strong>Updated mChat config </strong>',
'MCHAT_CONFIG_SAVED' => 'La configuración de Mini Chat ha sido actualizada',
'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_VERSION' => 'Versión:',
'MCHAT_AVATARS' => 'Mostrar avatares',
'MCHAT_AVATARS_EXPLAIN' => 'Si se establece en Si, se mostrarán los avatares redimensionados de los usuarios',
'MCHAT_ON_INDEX' => 'mChat en el índice',
'MCHAT_ON_INDEX_EXPLAIN' => 'Permite mostrar el mChat en la página índice.',
'MCHAT_INDEX_HEIGHT' => 'Altura en la página índice',
'MCHAT_INDEX_HEIGHT_EXPLAIN' => 'La altura de la ventana del chat en píxeles en la página índice del foro.<br /><em>Está limitado de 50 a 1000</em>.',
'MCHAT_LOCATION' => 'Ubicación en el foro',
'MCHAT_LOCATION_EXPLAIN' => 'Elija la ubicación del mChat en la página índice.',
'MCHAT_TOP_OF_FORUM' => 'Encima del foro',
'MCHAT_BOTTOM_OF_FORUM' => 'Debajo del foro',
'MCHAT_REFRESH' => 'Refrescar',
'MCHAT_REFRESH_EXPLAIN' => 'Número de segundos antes de que el chat se actualice automáticamente.<br /><em>Está limitado de 5 a 60 segundos</em>.',
'MCHAT_LIVE_UPDATES' => 'Actualizar en tiempo real los mensajes editados y eliminados',
'MCHAT_LIVE_UPDATES_EXPLAIN' => 'Cuando un usuario edita o elimina los mensajes, los cambios se actualizan en vivo para todos los demás, sin que tengan que actualizar la página. Desactive esta opción si experimenta problemas de rendimiento.',
'MCHAT_PRUNE' => 'Habilitar la limpieza (purga)',
'MCHAT_PRUNE_EXPLAIN' => 'Establezca esto en Si, para activar la función de limpieza (purga).<br /><em>Sólo se produce si un usuario visita páginas personalizadas o archivo</em>.',
'MCHAT_PRUNE_NUM' => 'Número de limpieza (purga)',
'MCHAT_PRUNE_NUM_EXPLAIN' => 'El número de mensajes a retener en el chat.',
'MCHAT_MESSAGE_LIMIT' => 'Límite de mensajes',
'MCHAT_MESSAGE_LIMIT_EXPLAIN' => 'El número máximo de mensajes que se muestran en el área de chat.<br /><em>Recomendado de 10 a 30</em>.',
'MCHAT_MESSAGE_NUM' => 'Límite de mensajes en la página índice',
'MCHAT_MESSAGE_NUM_EXPLAIN' => 'El número máximo de mensajes que se muestran en el área de chat en la página índice.<br /><em>Recomendado de 10 a 50</em>.',
'MCHAT_ARCHIVE_LIMIT' => 'Límite del archivo',
'MCHAT_ARCHIVE_LIMIT_EXPLAIN' => 'El número máximo de mensajes a mostrar por página en la página del archivo.<br /><em>Recomendado de 25 a 50</em>.',
'MCHAT_FLOOD_TIME' => 'Tiempo de flujo',
'MCHAT_FLOOD_TIME_EXPLAIN' => 'El número de segundos que un usuario debe esperar antes de poder enviar otro mensaje en el chat.<br /><em>Recomendado de 5 a 30, establezca esto en 0 para deshabilitar</em>.',
'MCHAT_EDIT_DELETE_LIMIT' => 'Tiempo límite para la edición de mensajes y su borrado',
'MCHAT_EDIT_DELETE_LIMIT_EXPLAIN' => 'Los mensajes que superen el número de segundos especificado, no podrán ser editados o borrados por el autor tras dicho tiempo.<br />Los usuarios que tienen el permiso de editar/borrar, así como <em>permiso de Moderador están exentos</em> de este tiempo límite.<br />Establezca en 0 para permitir la edición y el borrado sin límite.',
'MCHAT_MAX_MESSAGE_LENGTH' => 'Longitud máxima del mensaje',
'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Número máximo de caracteres permitidos por cada mensaje publicado.<br /><em>Recomendado de 100 a 500, establezca esto en 0 para deshabilitar</em>.',
'MCHAT_CUSTOM_PAGE' => 'Página personalizada',
'MCHAT_CUSTOM_PAGE_EXPLAIN' => 'Permitir el uso de página personalizada',
'MCHAT_CUSTOM_HEIGHT' => 'Altura de la página personalizado',
'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'La altura de la ventana del chat en píxeles en la página separada de mChat.<br /><em>Está límitado de 50 a 1000</em>.',
'MCHAT_DATE_FORMAT' => 'Formato de fecha',
'MCHAT_DATE_FORMAT_EXPLAIN' => 'La sintaxis utilizada es idéntica a la función de PHP <a href="http://www.php.net/date">date()</a>.',
'MCHAT_CUSTOM_DATEFORMAT' => 'Personalizada…',
'MCHAT_WHOIS' => 'Quién es',
'MCHAT_WHOIS_EXPLAIN' => 'Allow a display of users who are chatting',
'MCHAT_WHOIS_REFRESH' => 'Refrescar Quien es',
'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Number of seconds before whois stats refreshes.<br /><em>Está límitado de 30 a 300 segundos</em>.',
'MCHAT_BBCODES_DISALLOWED' => 'BBCodes deshabilitados',
'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Aquí puede introducir los BBCodes que <strong>no</strong> se pueden usar en los mensajes.<br />Separar los BBCodes con una barra vertical, por ejemplo: <br />b|i|u|code|list|list=|flash|quote y/o un %snombre de etiqueta de BBCode personalizado%s',
'MCHAT_STATIC_MESSAGE' => 'Mensaje estático',
'MCHAT_STATIC_MESSAGE_EXPLAIN' => 'Aquí puede definir un mensaje estático para mostrar a los usuarios de la chat. Código HTML está permitido.<br />Deje esto en blanco para deshabilitar esto. Está límitado a 255 caracteres.<br /><strong>Este mensaje puede ser traducido.</strong> (debe editar el archivo mchat_lang.php y leer las instrucciones).',
'MCHAT_USER_TIMEOUT' => 'Tiempo de espera del usuario',
'MCHAT_USER_TIMEOUT_EXPLAIN' => 'Establezca la cantidad de tiempo, en segundos, hasta que una sesión de usuario en el chat termina. Se establece en 0 para que no haya tiempo de espera.<br /><em>Está límitado a %sconfiguración de sesiones del foro%s que está actualmente en %s segundos</em>',
'MCHAT_OVERRIDE_SMILIE_LIMIT' => 'Anular límite de emoticonos',
'MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN' => 'Establezca en Sí, para anular el ajustes del límite de emoticonos en los foros, para mensajes del chat',
'MCHAT_OVERRIDE_MIN_POST_CHARS' => 'Anular límite mínimo caracteres',
'MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Establezca en Sí, para anular el ajustes del límite mínimo de caracteres en los foros, para mensajes del chat',
'MCHAT_NEW_POSTS_TOPIC' => 'Mostrar mensaje de Nuevo Tema',
'MCHAT_NEW_POSTS_TOPIC_EXPLAIN' => 'Establezca en Sí, para permitir que los nuevos temas del foro puedan ser publicados en el área de mensajes del chat.',
'MCHAT_NEW_POSTS_REPLY' => 'Mostrar mensaje de Nueva Respuesta',
'MCHAT_NEW_POSTS_REPLY_EXPLAIN' => 'Establezca en Sí, para permitir que las respuestas de mensajes del foro puedan ser publicadas en el área de mensajes del chat.',
'MCHAT_NEW_POSTS_EDIT' => 'Mostrar mensajes editados',
'MCHAT_NEW_POSTS_EDIT_EXPLAIN' => 'Establezca en Sí, para permitir que los mensajes editados desde el foro sean publicados en el área de mensajes del chat.',
'MCHAT_NEW_POSTS_QUOTE' => 'Mostrar mensajes citados',
'MCHAT_NEW_POSTS_QUOTE_EXPLAIN' => 'Establezca en Sí, para permitir que los mensajes citados del foro sean publicados en el área de mensajes del chat.',
'MCHAT_MAIN' => 'Configuración principal',
'MCHAT_STATS' => 'Quién está chateando',
'MCHAT_STATS_INDEX' => 'Estadísticas en el Índice',
'MCHAT_STATS_INDEX_EXPLAIN' => 'Mostrar quién está chateando en la sección de estadísticas del foro',
'MCHAT_MESSAGE_TOP' => 'Mantener mensaje Debajo / Encima',
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'Esta publicará el mensaje en la parte inferior o superior en el área de mensajes del chat',
'MCHAT_BOTTOM' => 'Debajo',
'MCHAT_TOP' => 'Encima',
'MCHAT_MESSAGES' => 'Ajustes de mensaje',
'MCHAT_PAUSE_ON_INPUT' => 'Pausa en la entrada',
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Si se establece en Si, el chat no actualizará automáticamente a un usuario al introducir un mensaje en el área de entrada',
// Error reporting
'TOO_LONG_DATE' => 'El formato de la fecha que ha escrito es demasiado largo.',
'TOO_SHORT_DATE' => 'El formato de la fecha que ha escrito es demasiado corto.',
'TOO_SMALL_REFRESH' => 'El valor de actualización es demasiado pequeño.',
'TOO_LARGE_REFRESH' => 'El valor de actualización es demasiado grande.',
'TOO_SMALL_MESSAGE_LIMIT' => 'El valor límite de mensajes es demasiado pequeño.',
'TOO_LARGE_MESSAGE_LIMIT' => 'El valor límite de mensajes es demasiado grande.',
'TOO_SMALL_ARCHIVE_LIMIT' => 'El valor límite de archivo es demasiado pequeño.',
'TOO_LARGE_ARCHIVE_LIMIT' => 'El valor límite de archivo es demasiado grande.',
'TOO_SMALL_FLOOD_TIME' => 'El valor de tiempo de flujo es demasiado pequeño.',
'TOO_LARGE_FLOOD_TIME' => 'El valor de tiempo de flujo es demasiado grande.',
'TOO_SMALL_MAX_MESSAGE_LNGTH' => 'El valor de longitud máxima de mensaje es demasiado pequeño.',
'TOO_LARGE_MAX_MESSAGE_LNGTH' => 'El valor de longitud máxima de mensaje es demasiado grande.',
'TOO_SMALL_MAX_WORDS_LNGTH' => 'El valor de la longitud de palabras máximas es demasiado pequeño.',
'TOO_LARGE_MAX_WORDS_LNGTH' => 'El valor de la longitud de palabras máximas es demasiado grande.',
'TOO_SMALL_WHOIS_REFRESH' => 'El valor de refresco whois es demasiado pequeño.',
'TOO_LARGE_WHOIS_REFRESH' => 'El valor de refresco whois es demasiado grande.',
'TOO_SMALL_INDEX_HEIGHT' => 'El valor de la altura de índice es demasiado pequeño.',
'TOO_LARGE_INDEX_HEIGHT' => 'El valor de la altura de índice es demasiado grande.',
'TOO_SMALL_CUSTOM_HEIGHT' => 'El valor de altura a medida es demasiado pequeña.',
'TOO_LARGE_CUSTOM_HEIGHT' => 'El valor de altura a medida es demasiado grande.',
'TOO_SHORT_STATIC_MESSAGE' => 'El valor de mensaje estático es demasiado corto.',
'TOO_LONG_STATIC_MESSAGE' => 'El valor de mensaje estático es demasiado largo.',
'TOO_SMALL_TIMEOUT' => 'El valor de tiempo de espera del usuario es demasiado pequeño.',
'TOO_LARGE_TIMEOUT' => 'El valor de tiempo de espera del usuario es demasiado grande.',
// User perms
'ACL_U_MCHAT_USE' => 'Puede usar mChat',
'ACL_U_MCHAT_VIEW' => 'Puede ver mChat',
'ACL_U_MCHAT_EDIT' => 'Puede editar mensajes',
'ACL_U_MCHAT_DELETE' => 'Puede borrar mensajes',
'ACL_U_MCHAT_IP' => 'Puede ver direcciones IP',
'ACL_U_MCHAT_PM' => 'Puede usar mensajes privados',
'ACL_U_MCHAT_LIKE' => 'Puede usar Me Gusta en los mensajes',
'ACL_U_MCHAT_QUOTE' => 'Puede usar citar un mensajee',
'ACL_U_MCHAT_FLOOD_IGNORE' => 'Puede ignorar el flujo',
'ACL_U_MCHAT_ARCHIVE' => 'Puede ver el archivo',
'ACL_U_MCHAT_BBCODE' => 'Puede usar BBCode',
'ACL_U_MCHAT_SMILIES' => 'Puede usar emoticonos',
'ACL_U_MCHAT_URLS' => 'Puede publicar URLs',
// Admin perms
'ACL_A_MCHAT' => 'Puede gestionar los ajustes de mChat',
));

View File

@@ -1,11 +1,12 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace dmzx\mchat\migrations;
@@ -13,7 +14,7 @@ class install_mchat extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return isset($this->config['mchat_version']) && version_compare($this->config['mchat_version'], '0.3.4', '>=');
return isset($this->config['mchat_version']) && version_compare($this->config['mchat_version'], '1.0.0-RC1', '>=');
}
static public function depends_on()
@@ -25,7 +26,7 @@ class install_mchat extends \phpbb\db\migration\migration
{
return array(
// Add configs
array('config.add', array('mchat_version', '0.3.4')),
array('config.add', array('mchat_version', '1.0.0-RC1')),
array('config.add', array('mchat_archive_limit', 25)),
array('config.add', array('mchat_avatars', 1)),
array('config.add', array('mchat_bbcode_disallowed', '')),

View File

@@ -74,9 +74,11 @@ jQuery(function($) {
sound: function(file) {
if (!mChat.pageIsUnloading && !Cookies.get('mchat_no_sound')) {
var audio = mChat.$$('sound-' + file).get(0);
audio.pause();
audio.currentTime = 0;
audio.play();
if (audio.duration) {
audio.pause();
audio.currentTime = 0;
audio.play();
}
}
},
notice: function() {
@@ -103,7 +105,7 @@ jQuery(function($) {
return;
}
var messChars = mChat.$$('input').val().replace(/\s/g, '');
if (messChars.length > mChat.mssgLngth) {
if (mChat.mssgLngth && messChars.length > mChat.mssgLngth) {
alert(mChat.mssgLngthLong);
return;
}
@@ -259,19 +261,6 @@ jQuery(function($) {
}
});
},
clean: function() {
mChat.$$('confirm').find('textarea').hide();
mChat.$$('confirm').find('p').text(mChat.cleanConfirm);
phpbb.confirm(mChat.$$('confirm'), function() {
mChat.pauseSession();
ajaxRequest('clean', true, {}).done(function() {
phpbb.alert('mChat', mChat.cleanDone);
setTimeout(function() {
location.reload();
}, 2000);
});
});
},
timeLeft: function(sessionTime) {
return (new Date(sessionTime * 1000)).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0];
},
@@ -457,12 +446,14 @@ jQuery(function($) {
}
});
$('#mchat-form').on('keypress', function(e) {
if (e.which == 13) {
mChat.add();
e.preventDefault();
}
});
if (mChat.$$('input').is('input')) {
$('#mchat-form').on('keypress', function(e) {
if (e.which == 13) {
mChat.add();
e.preventDefault();
}
});
}
mChat.$$('input').autoGrowInput();
}

View File

@@ -20,12 +20,14 @@
<!-- ENDIF -->
<!-- EVENT dmzx_mchat_body_before -->
<a id="mChat"></a>
<div class="forabg">
<div class="inner"><a name="mChat"></a>
<div class="inner">
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt><!-- IF MCHAT_ARCHIVE_PAGE -->{L_MCHAT_ARCHIVE_PAGE}<!-- ELSEIF S_MCHAT_CUSTOM_PAGE --><a href="{MCHAT_FILE_NAME}" title="{L_MCHAT_TITLE}">{L_MCHAT_TITLE}</a><!-- ELSE -->{L_MCHAT_TITLE}<!-- ENDIF --></dt>
<dd style="border:none">&nbsp;</dd>
</dl>
</li>
</ul>
@@ -60,10 +62,6 @@
editInfo : '{LA_MCHAT_EDITINFO}',
noAccess : '{LA_NO_AUTH_OPERATION}',
flood : '{LA_MCHAT_FLOOD}',
<!-- IF MCHAT_FOUNDER -->
cleanConfirm : '{LA_MCHAT_DELALLMESS}',
cleanDone : '{LA_MCHAT_CLEANED}',
<!-- ENDIF -->
delConfirm : '{LA_MCHAT_DELCONFIRM}',
clearConfirm : '{LA_MCHAT_RESET_QUESTION}',
sessOut : '{LA_MCHAT_SESSION_OUT}',
@@ -71,7 +69,7 @@
refreshYes : '{MCHAT_REFRESH_YES}',
refreshNo : '{LA_MCHAT_REFRESH_NO}',
mssgLngthLong : '{MCHAT_MESS_LONG}',
likes : '{LA_MCHAT_LIKES}',
likes : '{LA_MCHAT_LIKES}'
};
// ]]>
</script>
@@ -96,7 +94,7 @@
<!-- IF not .mchatrow --><div id="mchat-no-messages">{L_MCHAT_NOMESSAGE}</div><!-- ENDIF -->
</div>
<!-- IF MCHAT_STATIC_MESS -->
<!-- IF MCHAT_STATIC_MESS and not MCHAT_ARCHIVE_PAGE -->
<div id="mchat-static"><strong>{L_MCHAT_ANNOUNCEMENT}{L_COLON}</strong> <span>{MCHAT_STATIC_MESS}</span></div>
<!-- ENDIF -->
@@ -118,7 +116,7 @@
<br />
<input id="mchat-add" type="button" class="button2" data-mchat-action="add" value="{L_MCHAT_ADD}" />
<!-- IF MCHAT_USER_TIMEOUT or MCHAT_PAUSE_ON_INPUT -->
<input id="mchat-clear" type="button" class="button2" data-mchat-action="clear" value="{L_MCHAT_CLEAR_INPUT}" />
<input id="mchat-clear" type="button" class="button2" data-mchat-action="clear" value="{L_RESET}" />
<!-- ENDIF -->
<!-- IF MCHAT_ALLOW_SMILES and .smiley -->
<input type="button" class="button2" data-mchat-toggle="smilies" value="{L_MCHAT_SMILES}" />
@@ -131,12 +129,9 @@
<!-- IF MCHAT_READ_ARCHIVE_BUTTON -->
<input type="button" class="button2" onclick="window.location.href = '{MCHAT_ARCHIVE_URL}';" value="{L_MCHAT_ARCHIVE}" />
<!-- ENDIF -->
<!-- IF MCHAT_FOUNDER -->
<input id="mchat-clean" type="button" class="button2" data-mchat-action="clean" value="{L_MCHAT_CLEAN}" />
<!-- ENDIF -->
<!-- IF MCHAT_ALLOW_USE -->
<!-- IF MCHAT_RULES -->
<input type="button" class="button2" onclick="popup('{U_MCHAT_RULES}', 450, 275); return false;" value="{L_MCHAT_HELP}" />
<input type="button" class="button2" onclick="popup('{U_MCHAT_RULES}', 450, 275); return false;" value="{L_MCHAT_RULES}" />
<!-- ENDIF -->
<!-- EVENT dmzx_mchat_buttons_after -->
<!-- IF MCHAT_ALLOW_BBCODES -->
@@ -153,10 +148,10 @@
<!-- ENDIF -->
<!-- EVENT dmzx_mchat_body_smiley_after -->
<div id="mchat-status">
<img src="{EXT_URL}styles/prosilver/theme/images/load.gif" alt="{L_MCHAT_LOAD}" title="{L_MCHAT_LOAD}" id="mchat-refresh-load" />
<img src="{EXT_URL}styles/prosilver/theme/images/load.gif" alt="{L_LOADING}" title="{L_LOADING}" id="mchat-refresh-load" />
<img src="{EXT_URL}styles/prosilver/theme/images/ok.gif" alt="{L_MCHAT_OK}" title="{L_MCHAT_OK}" id="mchat-refresh-ok" />
<img src="{EXT_URL}styles/prosilver/theme/images/error.gif" alt="{L_MCHAT_ERROR}" title="{L_MCHAT_ERROR}" id="mchat-refresh-error" />
<img src="{EXT_URL}styles/prosilver/theme/images/paused.gif" alt="{L_MCHAT_PAUSE}" title="{L_MCHAT_PAUSE}" id="mchat-refresh-paused" />
<img src="{EXT_URL}styles/prosilver/theme/images/error.gif" alt="{L_ERROR}" title="{L_ERROR}" id="mchat-refresh-error" />
<span id="mchat-refresh-text">{MCHAT_REFRESH_YES}</span>
<!-- IF MCHAT_USER_TIMEOUT --> &bull; <span id="mchat-session">{L_MCHAT_SESSION_ENDS} {MCHAT_USER_TIMEOUT_TIME}</span><!-- ENDIF --> &bull; <label for="mchat-user-sound">{L_MCHAT_USESOUND} <input type="checkbox" id="mchat-user-sound"<!-- IF S_MCHAT_SOUND_YES --> checked="checked"<!-- ENDIF --> /></label>
{L_MCHAT_COPYRIGHT}

View File

@@ -3,7 +3,7 @@
<!-- IF S_MCHAT_AVATARS -->
<div class="mchat-avatar">
<!-- IF mchatrow.U_VIEWPROFILE --><a href="{mchatrow.U_VIEWPROFILE}" title="{L_READ_PROFILE}"><!-- ENDIF -->
<!-- IF mchatrow.MCHAT_USER_AVATAR -->{mchatrow.MCHAT_USER_AVATAR}<!-- ELSE --><img src="{STYLE_PATH}/theme/images/no_avatar.gif" width="40px;" height="40px;" alt="" /><!-- ENDIF -->
<!-- IF mchatrow.MCHAT_USER_AVATAR -->{mchatrow.MCHAT_USER_AVATAR}<!-- ELSE --><img src="{STYLE_PATH}/theme/images/no_avatar.gif" class="mchat-avatar" alt="{L_READ_PROFILE}" /><!-- ENDIF -->
<!-- IF mchatrow.U_VIEWPROFILE --></a><!-- ENDIF -->
</div>
<!-- ENDIF -->
@@ -13,12 +13,12 @@
</div>
<div class="mchat-message-icons">
<!-- IF MCHAT_ALLOW_PM and mchatrow.MCHAT_PM and mchatrow.U_VIEWPROFILE --><a href="{mchatrow.MCHAT_PM}" title="{L_MCHAT_SEND_PM}"><img src="{EXT_URL}styles/prosilver/theme/images/message.gif" alt="{L_MCHAT_SEND_PM}" title="{L_MCHAT_SEND_PM}" /></a><!-- ENDIF -->
<!-- IF MCHAT_ALLOW_LIKE and not MCHAT_ARCHIVE_PAGE and not mchatrow.MCHAT_IS_POSTER --><img src="{EXT_URL}styles/prosilver/theme/images/like.png" alt="{L_REPLY_WITH_LIKE}" title="{L_REPLY_WITH_LIKE}" data-mchat-action="like" /></a><!-- ENDIF -->
<!-- IF MCHAT_ALLOW_LIKE and not MCHAT_ARCHIVE_PAGE and not mchatrow.MCHAT_IS_POSTER --><img src="{EXT_URL}styles/prosilver/theme/images/like.png" alt="{L_MCHAT_LIKE}" title="{L_MCHAT_LIKE}" data-mchat-action="like" /></a><!-- ENDIF -->
<!-- IF MCHAT_ALLOW_QUOTE and not MCHAT_ARCHIVE_PAGE and not mchatrow.MCHAT_IS_POSTER --><img src="{EXT_URL}styles/prosilver/theme/images/quota.png" alt="{L_REPLY_WITH_QUOTE}" title="{L_REPLY_WITH_QUOTE}" data-mchat-action="quote" /><!-- ENDIF -->
<!-- IF MCHAT_ALLOW_IP --><a href="{mchatrow.MCHAT_U_IP}" onclick="popup(this.href, 750, 500); return false;"><img src="{EXT_URL}styles/prosilver/theme/images/ip.gif" alt="{L_MCHAT_IP} {mchatrow.MCHAT_USER_IP}" title="{L_MCHAT_IP} {mchatrow.MCHAT_USER_IP}" /></a><!-- ENDIF -->
<!-- IF MCHAT_ALLOW_IP --><a href="{mchatrow.MCHAT_U_IP}" onclick="popup(this.href, 750, 500); return false;"><img src="{EXT_URL}styles/prosilver/theme/images/ip.gif" alt="{mchatrow.MCHAT_WHOIS_USER}" title="{mchatrow.MCHAT_WHOIS_USER}" /></a><!-- ENDIF -->
<!-- IF mchatrow.MCHAT_ALLOW_BAN --><a href="{mchatrow.MCHAT_U_BAN}"><img src="{EXT_URL}styles/prosilver/theme/images/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" /></a><!-- ENDIF -->
<!-- IF mchatrow.MCHAT_ALLOW_EDIT --><img src="{EXT_URL}styles/prosilver/theme/images/edit.gif" alt="{L_MCHAT_EDIT}" title="{L_MCHAT_EDIT}" data-mchat-action="edit" /><!-- ENDIF -->
<!-- IF mchatrow.MCHAT_ALLOW_DEL --><img src="{EXT_URL}styles/prosilver/theme/images/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" data-mchat-action="del" /><!-- ENDIF -->
<!-- IF mchatrow.MCHAT_ALLOW_DEL --><img src="{EXT_URL}styles/prosilver/theme/images/del.gif" alt="{L_DELETE}" title="{L_DELETE}" data-mchat-action="del" /><!-- ENDIF -->
</div>
<br />
<div class="mchat-text">{mchatrow.MCHAT_MESSAGE}</div>

View File

@@ -1,10 +1,10 @@
<!-- INCLUDE simple_header.html -->
<h2>{L_MCHAT_HELP}</h2>
<h2>{L_MCHAT_RULES}</h2>
<div class="rules">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="inner">
{MCHAT_RULES}
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>

View File

@@ -145,6 +145,7 @@
.mchat-avatar {
float: left;
width: 40px;
padding-right: 5px;
}

View File

@@ -1,11 +1,12 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace dmzx\mchat\ucp;
@@ -22,8 +23,9 @@ class ucp_mchat_info
'modes' => array(
'configuration' => array(
'title' => 'UCP_MCHAT_CONFIG',
'auth' => 'ext_dmzx/mchat && acl_u_mchat_use',
'cat' => array('UCP_MCHAT_CONFIG')),
'auth' => 'ext_dmzx/mchat && acl_u_mchat_use',
'cat' => array('UCP_MCHAT_CONFIG'),
),
),
);
}

View File

@@ -1,11 +1,12 @@
<?php
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
*
* @package phpBB Extension - mChat
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace dmzx\mchat\ucp;
@@ -13,9 +14,8 @@ class ucp_mchat_module
{
function main($id, $mode)
{
global $cache, $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request;
global $config, $db, $user, $template, $request;
$submit = (isset($_POST['submit'])) ? true : false;
$error = $data = array();
switch ($mode)
@@ -33,7 +33,7 @@ class ucp_mchat_module
add_form_key('ucp_mchat');
if ($submit)
if ($request->is_set_post('submit'))
{
if (!check_form_key('ucp_mchat'))
{
@@ -42,25 +42,13 @@ class ucp_mchat_module
if (!sizeof($error))
{
$sql_ary = array(
'user_mchat_index' => $data['user_mchat_index'],
'user_mchat_sound' => $data['user_mchat_sound'],
'user_mchat_stats_index' => $data['user_mchat_stats_index'],
'user_mchat_topics' => $data['user_mchat_topics'],
'user_mchat_avatars' => $data['user_mchat_avatars'],
'user_mchat_input_area' => $data['user_mchat_input_area'],
);
if (sizeof($sql_ary))
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);
}
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $data) . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);
meta_refresh(3, $this->u_action);
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
$message = $user->lang('PROFILE_UPDATED') . '<br /><br />' . sprintf($user->lang('RETURN_UCP'), '<a href="' . $this->u_action . '">', '</a>');
trigger_error($message);
}
@@ -69,7 +57,7 @@ class ucp_mchat_module
//$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
foreach ($error as $i => $err)
{
$lang = $this->user->lang($err);
$lang = $user->lang($err);
if (!empty($lang))
{
$error[$i] = $lang;
@@ -78,7 +66,7 @@ class ucp_mchat_module
}
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'ERROR' => sizeof($error) ? implode('<br />', $error) : '',
'S_DISPLAY_MCHAT' => $data['user_mchat_index'],
'S_SOUND_MCHAT' => $data['user_mchat_sound'],
@@ -92,12 +80,11 @@ class ucp_mchat_module
'S_MCHAT_AVATARS' => $config['mchat_avatars'],
));
break;
}
$template->assign_vars(array(
'L_TITLE' => $user->lang['UCP_PROFILE_MCHAT'],
'S_UCP_ACTION' => $this->u_action
'L_TITLE' => $user->lang('UCP_PROFILE_MCHAT'),
'S_UCP_ACTION' => $this->u_action,
));
// Set desired template