diff --git a/README.md b/README.md index 4cb354d..79d6457 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/acp/acp_mchat_info.php b/acp/acp_mchat_info.php index c50fff2..bffff83 100644 --- a/acp/acp_mchat_info.php +++ b/acp/acp_mchat_info.php @@ -1,11 +1,12 @@ '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'), ), ), ); diff --git a/acp/acp_mchat_module.php b/acp/acp_mchat_module.php index 4ca6bee..9a7b508 100644 --- a/acp/acp_mchat_module.php +++ b/acp/acp_mchat_module.php @@ -1,11 +1,12 @@ 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(); } } diff --git a/adm/style/acp_mchat.html b/adm/style/acp_mchat.html index b19d7b1..5a5350b 100644 --- a/adm/style/acp_mchat.html +++ b/adm/style/acp_mchat.html @@ -1,239 +1,227 @@ - -

{META_DISPLAY_NAME}

- -
- {L_VERSION} - {META_VERSION} -
- -
- {L_VERSION} - {META_VERSION} -
- -
- {L_VERSION} - {META_VERSION} -
- - - -
- {L_LATEST_VERSION} -
- {updates_available.current} - - {L_DOWNLOAD} {META_NAME} {LATEST_VERSION} - - - {L_RELEASE_ANNOUNCEMENT} - -
-
- - - -

{L_WARNING}

-

{MCHAT_ERROR}

-
- + +

{L_ACP_MCHAT_TITLE}

{L_ACP_MCHAT_VERSION}{L_COLON} {MCHAT_VERSION}
-
- {L_MCHAT_MAIN} -
-

- {L_MCHAT_MESSAGE_TOP_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_NEW_POSTS_TOPIC_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_NEW_POSTS_REPLY_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_NEW_POSTS_EDIT_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_NEW_POSTS_QUOTE_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_STATIC_MESSAGE_EXPLAIN}
-
-
-
-

- {L_MCHAT_REFRESH_EXPLAIN}
-
-
-
-

- {L_MCHAT_TIMEOUT_EXPLAIN}
-
-
-
-

- {L_MCHAT_ON_INDEX_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_INDEX_HEIGHT_EXPLAIN}
-
-
-
-

- {L_MCHAT_MESSAGE_NUM_EXPLAIN}
-
-
-
-

- {L_MCHAT_LOCATION_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_CUSTOM_PAGE_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_CUSTOM_HEIGHT_EXPLAIN}
-
-
-
-

- {L_MCHAT_PRUNE_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_PRUNE_NUM_EXPLAIN}
-
-
-
-
- {L_MCHAT_MESSAGES} -
-

- {L_MCHAT_FLOOD_TIME_EXPLAIN}
-
-
-
-

- {L_MCHAT_MESSAGE_LIMIT_EXPLAIN}
-
-
-
-

- {L_MCHAT_ARCHIVE_LIMIT_EXPLAIN}
-
-
-
-

- {L_MCHAT_LIVE_UPDATES_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_AVATARS_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_PAUSE_ON_INPUT_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_EDIT_DELETE_LIMIT_EXPLAIN}
-
-
-
-

- {L_MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN}
-
-
-
-

{L_MCHAT_DATE_FORMAT_EXPLAIN}
-
- -
-
style="display:none;">
-
-
-

- {L_MCHAT_BBCODES_DISALLOWED_EXPLAIN}
-
-
-
-

- {L_ACP_MCHAT_RULES_EXPLAIN}
-
-
-
-
- {L_MCHAT_STATS} -
-

- {L_MCHAT_WHOIS_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_STATS_INDEX_EXPLAIN}
-
-
-
-
-

- {L_MCHAT_WHOIS_REFRESH_EXPLAIN}
-
-
- -
-

-   - - {S_FORM_TOKEN} -

+ +
+ {L_CONFIRM} + {L_MCHAT_PURGE_CONFIRM}{L_COLON} +

+   + + {S_FORM_TOKEN} +

+
+ +
+ {L_MCHAT_SETTINGS_INDEX} +
+
+
+
+
+
+
+
+
+
+
+

+ {L_MCHAT_INDEX_HEIGHT_EXPLAIN}
+
+
+
+

+ {L_MCHAT_MESSAGE_NUM_EXPLAIN}
+
+
+
+
+ {L_MCHAT_SETTINGS_CUSTOM} +
+

+ {L_MCHAT_CUSTOM_PAGE_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_CUSTOM_HEIGHT_EXPLAIN}
+
+
+
+

+ {L_MCHAT_MESSAGE_LIMIT_EXPLAIN}
+
+
+
+
+ {L_MCHAT_SETTINGS_ARCHIVE} +
+

+ {L_MCHAT_ARCHIVE_LIMIT_EXPLAIN}
+
+
+
+
+ {L_MCHAT_SETTINGS_MESSAGES} +
+

+ {L_MCHAT_TIMEOUT_EXPLAIN}
+
+
+
+

+ {L_MCHAT_REFRESH_EXPLAIN}
+
+
+
+

+ {L_MCHAT_EDIT_DELETE_LIMIT_EXPLAIN}
+
+
+
+

+ {L_MCHAT_LIVE_UPDATES_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_MESSAGE_TOP_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_AVATARS_EXPLAIN}
+
+
+
+
+

{L_MCHAT_DATE_FORMAT_EXPLAIN}
+
+ +
+
style="display:none;">
+
+
+

+ {L_MCHAT_PAUSE_ON_INPUT_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_FLOOD_TIME_EXPLAIN}
+
+
+
+

+ {L_MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN}
+
+
+
+

+ {L_MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_BBCODES_DISALLOWED_EXPLAIN}
+
+
+
+

+ {L_ACP_MCHAT_RULES_EXPLAIN}
+
+
+
+

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

+ {L_MCHAT_NEW_POSTS_TOPIC_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_NEW_POSTS_REPLY_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_NEW_POSTS_EDIT_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_NEW_POSTS_QUOTE_EXPLAIN}
+
+
+
+
+
+ {L_MCHAT_SETTINGS_PRUNE} +
+

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

+ {L_MCHAT_STATS_INDEX_EXPLAIN}
+
+
+
+
+

+ {L_MCHAT_WHOIS_REFRESH_EXPLAIN}
+
+
+
+

+   + + {S_FORM_TOKEN} +

+
diff --git a/adm/style/css/mchatacp.css b/adm/style/css/mchatacp.css deleted file mode 100644 index 6341aab..0000000 --- a/adm/style/css/mchatacp.css +++ /dev/null @@ -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; -} diff --git a/composer.json b/composer.json index d943eb3..21ecf2e 100644 --- a/composer.json +++ b/composer.json @@ -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.*" }, diff --git a/config/routing.yml b/config/routing.yml index bedd78d..5b0e1e4 100644 --- a/config/routing.yml +++ b/config/routing.yml @@ -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' diff --git a/config/services.yml b/config/services.yml index 2d2bb43..d74ada4 100644 --- a/config/services.yml +++ b/config/services.yml @@ -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: diff --git a/controller/admin_controller.php b/controller/admin_controller.php index 71967f6..41c96dd 100644 --- a/controller/admin_controller.php +++ b/controller/admin_controller.php @@ -1,11 +1,12 @@ 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('
', $error) : '', 'MCHAT_VERSION' => $this->config['mchat_version'], - 'L_MCHAT_BBCODES_DISALLOWED_EXPLAIN' => sprintf($this->user->lang('MCHAT_BBCODES_DISALLOWED_EXPLAIN'), 'phpbb_root_path}adm/index.$this->php_ext", 'i=bbcodes', true, $this->user->session_id) . '">', ''), - 'L_MCHAT_TIMEOUT_EXPLAIN' => sprintf($this->user->lang('MCHAT_USER_TIMEOUT_EXPLAIN'),'phpbb_root_path}adm/index.$this->php_ext", 'i=board&mode=load', true, $this->user->session_id) . '">', '', $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'), 'root_path}adm/index.$this->php_ext", 'i=bbcodes', true, $this->user->session_id) . '">', ''), + 'L_MCHAT_TIMEOUT_EXPLAIN' => sprintf($this->user->lang('MCHAT_USER_TIMEOUT_EXPLAIN'),'root_path}adm/index.$this->php_ext", 'i=board&mode=load', true, $this->user->session_id) . '">', '', $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; diff --git a/controller/main_controller.php b/controller/main_controller.php index 9b63bca..104c2da 100644 --- a/controller/main_controller.php +++ b/controller/main_controller.php @@ -1,4 +1,5 @@ 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 . ' ' . $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 . ' ' . $this->user->lang($minutes > 1 ? 'MCHAT_MINUTES' : 'MCHAT_MINUTE'); + $times[] = $this->user->lang('MCHAT_MINUTES', $minutes); } $seconds = ceil($time); if ($seconds) { - $times[] = $seconds . ' ' . $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(' ', $times)); + return $this->user->lang('MCHAT_ONLINE_EXPLAIN', implode(' ', $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[] = 'phpbb_root_path}memberlist.{$this->php_ext}", 'mode=group&g='.$row['group_id']) . '">' . $group_name . ''; + $legend[] = 'root_path}memberlist.{$this->php_ext}", 'mode=group&g='. $row['group_id']) . '">' . $group_name . ''; } } @@ -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; diff --git a/core/mchat.php b/core/mchat.php index c149136..4aa9500 100644 --- a/core/mchat.php +++ b/core/mchat.php @@ -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('
', $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("'", "’", $row['username']); $message = str_replace("'", '’', $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&mode=compose&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&mode=setting_user_global&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) diff --git a/event/listener.php b/event/listener.php index 010b19d..fc8a616 100644 --- a/event/listener.php +++ b/event/listener.php @@ -1,11 +1,12 @@ 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( diff --git a/language/de/common.php b/language/de/common.php deleted file mode 100644 index 33c17c3..0000000 --- a/language/de/common.php +++ /dev/null @@ -1,126 +0,0 @@ - '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' => 'RMcGirr83 © dmzx', - '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 % 1 $ s 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.
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 %d 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: %s', - 'MCHAT_USESOUND' => 'Sound aktivieren?', - 'MCHAT_ONLINE_USERS_TOTAL' => 'Insgesamt sind %d Benutzer im mChat ', - 'MCHAT_ONLINE_USER_TOTAL' => 'Insgesamt ist %d 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 %d 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:
Ein Textbereich oder
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' => 'Lösche mChat Nachricht
» %1$en', - 'LOG_EDITED_MCHAT' => 'Editiere mChat Nachricht
» %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', -)); diff --git a/language/de/info_acp_mchat.php b/language/de/info_acp_mchat.php deleted file mode 100644 index 0693b67..0000000 --- a/language/de/info_acp_mchat.php +++ /dev/null @@ -1,169 +0,0 @@ - '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.
Lass das Feld frei um die Anzeige zu deaktivieren. Das Limit liegt bei 255 Zeichen.
Diese Nachricht kann übersetzt werden. (editiere hierzu die Datei: mchat_lang.php und lies die Anweisungen).', - 'LOG_MCHAT_CONFIG_UPDATE' => 'mChat-Konfiguration erfolgreich geändert', - '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.
Du kannst nur von 50 bis 1000 Pixel einstellen.', - '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.
Sie sind von 5 bis 60 Sekunden begrenzt.', - '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.
Hat nur Auswirkung, wenn ein Benutzer die separate Seite oder das Archiv betrachtet. '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.
Empfohlen sind zwischen 10 und 20.', - 'MCHAT_MESSAGE_NUM' => 'Nachrichtengrenze', - 'MCHAT_MESSAGE_NUM_EXPLAIN' => 'Die maximale Anzahl von Nachrichten im Chat-Bereich die auf der Indexseite angezeigt werden.
Empfohlen von 10 bis 50 .', - 'MCHAT_ARCHIVE_LIMIT' => 'Archivlimit', - 'MCHAT_ARCHIVE_LIMIT_EXPLAIN' => 'Die maximale Anzahl Nachrichten pro Seite im Archiv.
Empfohlen sind 25 bis 50 'Flood-Intervall', - 'MCHAT_FLOOD_TIME_EXPLAIN' => 'Die Zeit in Sekunden, die ein Benutzer warten muß, bis er eine neue Nachricht im mChat absenden kann.
Empfohlen sind 5 bis 30, stelle 0 ein, um die Funktion zu deaktivieren '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.
Benutzer, die bearbeiten/löschen dürfen und von der Moderator Genehmigung befreit sind von dieser Frist.
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.
Empfohlen sind 100 bis 500, stelle 0 ein, um die Funktion zu deaktivieren.', - '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.
Du kannst nur von 50 bis 1000 Pixel einstellen.', - 'MCHAT_DATE_FORMAT' => 'Datums-Format', - 'MCHAT_DATE_FORMAT_EXPLAIN' => 'Die Syntax entspricht der der date()-Funktion von PHP date()', - '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.
Nicht unter 30 Sekunden einstellen!.', - 'MCHAT_BBCODES_DISALLOWED' => 'Nicht erlaubte BBcodes', - 'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Hier kann man BBcodes eintragen, die nicht in einer Nachricht verwendet werden dürfen.
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.
Lass es frei um keine Nachricht anzuzeigen. Deine Nachricht kann 255 Zeichen umfassen.
Diese Nachricht kann auch übersetzt werden. (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.
Das Limit ist das Selbe, wie in deinen %sForum Einstellungen für Sitzungen%s. Derzeit beträgt dieser Wert %s Sekunden.', - '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', -)); diff --git a/language/en/common.php b/language/en/common.php index 95f2393..590d6a1 100644 --- a/language/en/common.php +++ b/language/en/common.php @@ -1,11 +1,12 @@ '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' => 'RMcGirr83 © dmzx', '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 %1$s 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 don’t 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.
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 user’s permissions', 'MCHAT_REFRESHING' => 'Refreshing...', - 'MCHAT_REFRESH_NO' => 'Autoupdate is off', - 'MCHAT_REFRESH_YES' => 'Autoupdate every %d seconds', + 'MCHAT_REFRESH_NO' => 'Update is off', + 'MCHAT_REFRESH_YES' => 'Updates every %1$d seconds', 'MCHAT_RESPOND' => 'Respond to user', 'MCHAT_RESET_QUESTION' => 'Clear the input area?', 'MCHAT_SESSION_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: %s', - 'MCHAT_USESOUND' => 'Use sound?', - 'MCHAT_ONLINE_USERS_TOTAL' => 'In total there are %d users chatting', - 'MCHAT_ONLINE_USER_TOTAL' => 'In total there is %d user chatting', - 'MCHAT_NO_CHATTERS' => 'No one is chatting', - 'MCHAT_ONLINE_EXPLAIN' => 'based on users active over the past %s', + 'MCHAT_TOTALMESSAGES' => 'Total messages: %1$d', + 'MCHAT_USESOUND' => 'Use sound', + 'MCHAT_ONLINE_USERS_TOTAL' => array( + 0 => 'No one is chatting', + 1 => 'In total there is %1$d user chatting', + 2 => 'In total there are %1$d 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 %d 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:
A text area or
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' => 'Deleted mChat message
» %1$s', 'LOG_EDITED_MCHAT' => 'Edited mChat message
» %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' => '', )); diff --git a/language/en/info_acp_mchat.php b/language/en/info_acp_mchat.php index 0d1c96a..a36fcd6 100644 --- a/language/en/info_acp_mchat.php +++ b/language/en/info_acp_mchat.php @@ -1,11 +1,12 @@ '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.
You are limited to 255 characters.
This message can be translated. (you must edit the mchat_lang.php file and read the instructions).', - 'LOG_MCHAT_CONFIG_UPDATE' => 'Updated mChat config ', - '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. You are limited to 255 characters.
This message can be translated: edit the MCHAT_RULES_MESSAGE language key in /ext/dmzx/mchat/language/XX/common.php.', + 'LOG_MCHAT_CONFIG_UPDATE' => 'Updated mChat config', + '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.
You are limited from 50 to 1000.', - '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.
You are limited from 5 to 60 seconds.', + '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.
You are limited from 50 to 1000.', + '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.
You are limited from 5 to 60 seconds.', '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.
Only occurs if a user views the custom or archive pages.', - '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.
Recommended from 10 to 30.', - '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.
Recommended from 10 to 50.', - 'MCHAT_ARCHIVE_LIMIT' => 'Archive limit', - 'MCHAT_ARCHIVE_LIMIT_EXPLAIN' => 'The maximum number of messages to show per page on the archive page.
Recommended from 25 to 50.', + '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.
Recommended from 10 to 30.', + '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.
Recommended from 10 to 50.', + '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.
Recommended from 25 to 50.', 'MCHAT_FLOOD_TIME' => 'Flood time', - 'MCHAT_FLOOD_TIME_EXPLAIN' => 'The number of seconds a user must wait before posting another message in the chat.
Recommended 5 to 30, set to 0 to disable.', + 'MCHAT_FLOOD_TIME_EXPLAIN' => 'The number of seconds a user must wait before posting another message in the chat.
Recommended 5 to 30, set to 0 to disable.', 'MCHAT_EDIT_DELETE_LIMIT' => 'Time limit for editing and deleting messages', - 'MCHAT_EDIT_DELETE_LIMIT_EXPLAIN' => 'Messages older than the specified number of seconds cannot be edited or deleted by the author any more.
Users who have edit/delete permission as well as moderator permission are exempt from this time limit.
Set to 0 to allow unlimited editing and deleting.', - 'MCHAT_MAX_MESSAGE_LENGTH' => 'Max message length', - 'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Max number of characters allowed per message posted.
Recommended from 100 to 500, set to 0 to disable.', - '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.
Users who have edit/delete permission as well as moderator permission are exempt from this time limit.
Set to 0 to allow unlimited editing and deleting.', + 'MCHAT_MAX_MESSAGE_LENGTH' => 'Maximum message length', + 'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Maximum number of characters allowed per message posted.
Recommended from 100 to 500, set to 0 to disable.', + 'MCHAT_CUSTOM_PAGE' => 'Enable custom Page', 'MCHAT_CUSTOM_PAGE_EXPLAIN' => 'Allow the use of the custom page', - 'MCHAT_CUSTOM_HEIGHT' => 'Custom Page Height', - 'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the separate mChat page.
You are limited from 50 to 1000.', + 'MCHAT_CUSTOM_HEIGHT' => 'Custom page height', + 'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the custom page.
You are limited from 50 to 1000.', 'MCHAT_DATE_FORMAT' => 'Date format', 'MCHAT_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP date() 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.
You are limited from 30 to 300 seconds.', 'MCHAT_BBCODES_DISALLOWED' => 'Disallowed bbcodes', - 'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Here you can input the bbcodes that are not to be used in a message.
Separate bbcodes with a vertical bar, for example:
b|i|u|code|list|list=|flash|quote and/or a %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.
Set to empty to disable the display. You are limited to 255 characters.
This message can be translated. (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.
You are limited to the %sforum config setting for sessions%s which is currently set to %s seconds', + 'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Here you can input the bbcodes that are not to be used in a message.
Separate bbcodes with a vertical bar, for example:
b|i|u|code|list|list=|flash|quote and/or a %1$scustom bbcode tag name%2$s', + 'MCHAT_STATIC_MESSAGE' => 'Static message', + 'MCHAT_STATIC_MESSAGE_EXPLAIN' => 'Here you can define a static message to display to users of the chat. HTML code is allowed.
Set to empty to disable the display. You are limited to 255 characters.
This message can be translated: edit the MCHAT_STATIC_MESSAGE language key in /ext/dmzx/mchat/language/XX/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.
You are limited to the %1$sforum config setting for sessions%2$s which is currently set to %3$d seconds', 'MCHAT_OVERRIDE_SMILIE_LIMIT' => 'Override smilie limit', 'MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN' => 'Set to yes to override the forums smilie limit setting for chat messages', 'MCHAT_OVERRIDE_MIN_POST_CHARS' => 'Override minimum characters limit', 'MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Set to yes to override the forums minimum characters setting for chat messages', - 'MCHAT_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 Who is chatting below the chat', + 'MCHAT_STATS_INDEX' => 'Display Who is chatting in the stats section', + 'MCHAT_STATS_INDEX_EXPLAIN' => 'Displays who is chatting below the Who is online 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.
You are limited from 30 to 300 seconds.', + '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', diff --git a/language/es/common.php b/language/es/common.php deleted file mode 100644 index d130383..0000000 --- a/language/es/common.php +++ /dev/null @@ -1,126 +0,0 @@ - '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' => 'RMcGirr83 © dmzx', - '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 %1$s 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.
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 user’s permissions', - 'MCHAT_REFRESHING' => 'Refrescando...', - 'MCHAT_REFRESH_NO' => 'La actualización automática está desactivada', - 'MCHAT_REFRESH_YES' => 'Actualización automática cada %d 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: %s', - 'MCHAT_USESOUND' => '¿Usar sonido?', - 'MCHAT_ONLINE_USERS_TOTAL' => 'En total hay %d usuarios chateando', - 'MCHAT_ONLINE_USER_TOTAL' => 'En total hay %d 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 %d 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:
Un área de texto o
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' => 'Mensaje de mChat borrado
» %1$s', - 'LOG_EDITED_MCHAT' => 'Mensaje de mChat editado
» %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', -)); diff --git a/language/es/info_acp_mchat.php b/language/es/info_acp_mchat.php deleted file mode 100644 index 4009d30..0000000 --- a/language/es/info_acp_mchat.php +++ /dev/null @@ -1,169 +0,0 @@ - '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.
Está limitado a 255 caracteres.
Este mensaje puede ser traducido. (debe editar el archivo mchat_lang.php y leer las instrucciones).', - 'LOG_MCHAT_CONFIG_UPDATE' => 'Updated mChat config ', - '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.
Está limitado de 50 a 1000.', - '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.
Está limitado de 5 a 60 segundos.', - '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).
Sólo se produce si un usuario visita páginas personalizadas o archivo.', - '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.
Recomendado de 10 a 30.', - '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.
Recomendado de 10 a 50.', - '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.
Recomendado de 25 a 50.', - '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.
Recomendado de 5 a 30, establezca esto en 0 para deshabilitar.', - '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.
Los usuarios que tienen el permiso de editar/borrar, así como permiso de Moderador están exentos de este tiempo límite.
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.
Recomendado de 100 a 500, establezca esto en 0 para deshabilitar.', - '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.
Está límitado de 50 a 1000.', - 'MCHAT_DATE_FORMAT' => 'Formato de fecha', - 'MCHAT_DATE_FORMAT_EXPLAIN' => 'La sintaxis utilizada es idéntica a la función de PHP date().', - '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.
Está límitado de 30 a 300 segundos.', - 'MCHAT_BBCODES_DISALLOWED' => 'BBCodes deshabilitados', - 'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Aquí puede introducir los BBCodes que no se pueden usar en los mensajes.
Separar los BBCodes con una barra vertical, por ejemplo:
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.
Deje esto en blanco para deshabilitar esto. Está límitado a 255 caracteres.
Este mensaje puede ser traducido. (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.
Está límitado a %sconfiguración de sesiones del foro%s que está actualmente en %s segundos', - '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', -)); diff --git a/migrations/install_mchat.php b/migrations/install_mchat.php index ca5bef2..352e2c9 100644 --- a/migrations/install_mchat.php +++ b/migrations/install_mchat.php @@ -1,11 +1,12 @@ 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', '')), diff --git a/styles/prosilver/template/mchat.js b/styles/prosilver/template/mchat.js index 5beda7d..ae0f4dd 100644 --- a/styles/prosilver/template/mchat.js +++ b/styles/prosilver/template/mchat.js @@ -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(); } diff --git a/styles/prosilver/template/mchat_body.html b/styles/prosilver/template/mchat_body.html index c53c5d0..0a38e46 100644 --- a/styles/prosilver/template/mchat_body.html +++ b/styles/prosilver/template/mchat_body.html @@ -20,12 +20,14 @@ +
-
+
@@ -60,10 +62,6 @@ editInfo : '{LA_MCHAT_EDITINFO}', noAccess : '{LA_NO_AUTH_OPERATION}', flood : '{LA_MCHAT_FLOOD}', - - cleanConfirm : '{LA_MCHAT_DELALLMESS}', - cleanDone : '{LA_MCHAT_CLEANED}', - 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}' }; // ]]> @@ -96,7 +94,7 @@
{L_MCHAT_NOMESSAGE}
- +
{L_MCHAT_ANNOUNCEMENT}{L_COLON} {MCHAT_STATIC_MESS}
@@ -118,7 +116,7 @@
- + @@ -131,12 +129,9 @@ - - - - + @@ -153,10 +148,10 @@
- {L_MCHAT_LOAD} + {L_LOADING} {L_MCHAT_OK} - {L_MCHAT_ERROR} {L_MCHAT_PAUSE} + {L_ERROR} {MCHAT_REFRESH_YES} {L_MCHAT_SESSION_ENDS} {MCHAT_USER_TIMEOUT_TIME} {L_MCHAT_COPYRIGHT} diff --git a/styles/prosilver/template/mchat_messages.html b/styles/prosilver/template/mchat_messages.html index ab510cb..b8dcf62 100644 --- a/styles/prosilver/template/mchat_messages.html +++ b/styles/prosilver/template/mchat_messages.html @@ -3,7 +3,7 @@ @@ -13,12 +13,12 @@
{L_MCHAT_SEND_PM} - {L_REPLY_WITH_LIKE} + {L_MCHAT_LIKE} {L_REPLY_WITH_QUOTE} - {L_MCHAT_IP} {mchatrow.MCHAT_USER_IP} + {mchatrow.MCHAT_WHOIS_USER} {L_MCHAT_PERMISSIONS} {L_MCHAT_EDIT} - {L_MCHAT_DELITE} + {L_DELETE}

{mchatrow.MCHAT_MESSAGE}
diff --git a/styles/prosilver/template/mchat_rules.html b/styles/prosilver/template/mchat_rules.html index 71c0c44..f30bcea 100644 --- a/styles/prosilver/template/mchat_rules.html +++ b/styles/prosilver/template/mchat_rules.html @@ -1,10 +1,10 @@ -

{L_MCHAT_HELP}

+

{L_MCHAT_RULES}

-
+
{MCHAT_RULES} -
+
{L_CLOSE_WINDOW} diff --git a/styles/prosilver/theme/mchat.css b/styles/prosilver/theme/mchat.css index 3326ccb..1150233 100644 --- a/styles/prosilver/theme/mchat.css +++ b/styles/prosilver/theme/mchat.css @@ -145,6 +145,7 @@ .mchat-avatar { float: left; + width: 40px; padding-right: 5px; } diff --git a/ucp/ucp_mchat_info.php b/ucp/ucp_mchat_info.php index 566e6a1..32c8dc1 100644 --- a/ucp/ucp_mchat_info.php +++ b/ucp/ucp_mchat_info.php @@ -1,11 +1,12 @@ 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'), + ), ), ); } diff --git a/ucp/ucp_mchat_module.php b/ucp/ucp_mchat_module.php index 18d3ad0..2722ae7 100644 --- a/ucp/ucp_mchat_module.php +++ b/ucp/ucp_mchat_module.php @@ -1,11 +1,12 @@ 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'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + $message = $user->lang('PROFILE_UPDATED') . '

' . sprintf($user->lang('RETURN_UCP'), '', ''); 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('
', $error) : '', + 'ERROR' => sizeof($error) ? implode('
', $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