From 7289650443e32f3deebea0af5e4cce23409c7412 Mon Sep 17 00:00:00 2001 From: dmzx Date: Sat, 21 Mar 2015 12:42:10 +0100 Subject: [PATCH] Update version 0.0.8 Update version 0.0.8 --- composer.json | 2 +- core/render_helper.php | 16 ++++++++++++++++ migrations/mchat_schema.php | 2 +- .../event/overall_header_navigation_append.html | 2 +- styles/prosilver/template/mchat_stats.html | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 6c3d160..62a5b74 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.0.7", + "version": "0.0.8", "time": "2015-03-10", "keywords": ["phpbb", "extension", "mchat"], "license": "GPL-2.0", diff --git a/core/render_helper.php b/core/render_helper.php index 613dc1f..7f3ba00 100644 --- a/core/render_helper.php +++ b/core/render_helper.php @@ -1059,6 +1059,21 @@ class render_helper } break; } + + // show index stats + if (!empty($this->config['mchat_stats_index']) && !empty($this->user->data['user_mchat_stats_index'])) + { + // stats display + $mchat_session_time = !empty($this->config_mchat['timeout']) ? $this->config_mchat['timeout'] : $this->config['session_length']; + $mchat_stats = $this->functions_mchat->mchat_users($mchat_session_time); + $this->template->assign_vars(array( + 'MCHAT_INDEX_STATS' => true, + 'MCHAT_INDEX_USERS_COUNT' => $mchat_stats['mchat_users_count'], + 'MCHAT_INDEX_USERS_LIST' => !empty($mchat_stats['online_userlist']) ? $mchat_stats['online_userlist'] : '', + 'L_MCHAT_ONLINE_EXPLAIN' => $mchat_stats['refresh_message'], + )); + } + $copyright = base64_decode('PGEgaHJlZj0iaHR0cDovL3JtY2dpcnI4My5vcmciPlJNY0dpcnI4MzwvYT4gJmNvcHk7IDxhIGhyZWY9Imh0dHA6Ly93d3cuZG16eC13ZWIubmV0IiB0aXRsZT0id3d3LmRtengtd2ViLm5ldCI+ZG16eDwvYT4='); add_form_key('mchat_posting'); // Template function... @@ -1100,6 +1115,7 @@ class render_helper 'S_MCHAT_INDEX_STATS' => $this->user->data['user_mchat_stats_index'], 'U_MORE_SMILIES' => append_sid("{$this->phpbb_root_path}posting.{$this->phpEx}", 'mode=smilies'), 'U_MCHAT_RULES' => $this->helper->route('dmzx_mchat_controller', array('mode' => 'rules')), + 'S_MCHAT_ON_INDEX' => ($this->config['mchat_on_index'] && !empty($this->user->data['user_mchat_index'])) ? true : false, )); // Return for: \$this->helper->render(filename, lang_title); diff --git a/migrations/mchat_schema.php b/migrations/mchat_schema.php index de3e0a6..49a8219 100644 --- a/migrations/mchat_schema.php +++ b/migrations/mchat_schema.php @@ -20,7 +20,7 @@ class mchat_schema extends \phpbb\db\migration\migration array('config.add', array('mchat_on_index', true)), array('config.add', array('mchat_new_posts', false)), array('config.add', array('mchat_stats_index', false)), - array('config.add', array('mchat_version','0.0.7')), + array('config.add', array('mchat_version','0.0.8')), array('permission.add', array('u_mchat_use')), array('permission.add', array('u_mchat_view')), diff --git a/styles/prosilver/template/event/overall_header_navigation_append.html b/styles/prosilver/template/event/overall_header_navigation_append.html index 0ff1638..62e808e 100644 --- a/styles/prosilver/template/event/overall_header_navigation_append.html +++ b/styles/prosilver/template/event/overall_header_navigation_append.html @@ -1 +1 @@ -
  • {L_MCHAT_TITLE}
  • +
  • {L_MCHAT_TITLE}
  • diff --git a/styles/prosilver/template/mchat_stats.html b/styles/prosilver/template/mchat_stats.html index 2e8610c..1e2c3b9 100644 --- a/styles/prosilver/template/mchat_stats.html +++ b/styles/prosilver/template/mchat_stats.html @@ -1,4 +1,4 @@ - +

    {L_WHO_IS_CHATTING}

    {MCHAT_INDEX_USERS_COUNT} {L_MCHAT_ONLINE_EXPLAIN}
    {MCHAT_INDEX_USERS_LIST}

    \ No newline at end of file