From 9937380e8ce661024e869ac0c8edaa4015346cb6 Mon Sep 17 00:00:00 2001 From: LukeWCS Date: Fri, 29 Mar 2024 20:40:37 +0100 Subject: [PATCH] 1.2.0 --- docs/version_check.json | 2 +- .../acp/acp_stats_permissions_info.php | 3 + .../acp/acp_stats_permissions_module.php | 3 + .../style/acp_stats_permissions_settings.css | 4 + .../style/acp_stats_permissions_settings.html | 13 +- .../style/acp_stats_permissions_settings.js | 50 ++----- lukewcs/statspermissions/composer.json | 6 +- lukewcs/statspermissions/config/services.yml | 14 +- .../acp_stats_permissions_controller.php | 33 ++--- .../core/stats_permissions.php | 131 ------------------ lukewcs/statspermissions/event/listener.php | 89 +++++++++++- lukewcs/statspermissions/ext.php | 3 + .../language/de/acp_stats_permissions.php | 7 +- .../de/acp_stats_permissions_lang_author.php | 5 +- .../de/info_acp_stats_permissions.php | 5 +- .../de/permissions_stats_permissions.php | 5 +- .../de_x_sie/acp_stats_permissions.php | 7 +- .../acp_stats_permissions_lang_author.php | 5 +- .../de_x_sie/info_acp_stats_permissions.php | 5 +- .../permissions_stats_permissions.php | 5 +- .../language/en/acp_stats_permissions.php | 7 +- .../en/acp_stats_permissions_lang_author.php | 5 +- .../en/info_acp_stats_permissions.php | 5 +- .../en/permissions_stats_permissions.php | 5 +- .../statspermissions/migrations/v_1_0_0.php | 3 + .../statspermissions/migrations/v_1_0_2.php | 3 + .../statspermissions/migrations/v_1_2_0.php | 9 +- .../event/index_body_stat_blocks_after.html | 12 ++ stats-permissions_build_changelog.md | 9 ++ stats-permissions_changelog_de.md | 3 +- 30 files changed, 215 insertions(+), 241 deletions(-) delete mode 100644 lukewcs/statspermissions/core/stats_permissions.php diff --git a/docs/version_check.json b/docs/version_check.json index d2ed948..542a203 100644 --- a/docs/version_check.json +++ b/docs/version_check.json @@ -1,7 +1,7 @@ { "stable": { "3.3": { - "current": "1.1.0", + "current": "1.2.0", "announcement": "https://github.com/LukeWCS/stats-permissions/releases", "eol": null, "security": false diff --git a/lukewcs/statspermissions/acp/acp_stats_permissions_info.php b/lukewcs/statspermissions/acp/acp_stats_permissions_info.php index 5fb6b78..f1f2eaa 100644 --- a/lukewcs/statspermissions/acp/acp_stats_permissions_info.php +++ b/lukewcs/statspermissions/acp/acp_stats_permissions_info.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ namespace lukewcs\statspermissions\acp; diff --git a/lukewcs/statspermissions/acp/acp_stats_permissions_module.php b/lukewcs/statspermissions/acp/acp_stats_permissions_module.php index 06affc5..be98e5d 100644 --- a/lukewcs/statspermissions/acp/acp_stats_permissions_module.php +++ b/lukewcs/statspermissions/acp/acp_stats_permissions_module.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ namespace lukewcs\statspermissions\acp; diff --git a/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.css b/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.css index b468af4..481a3c6 100644 --- a/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.css +++ b/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.css @@ -43,6 +43,10 @@ fieldset dt label { cursor: inherit; } +.simple_permissions dd { + line-height: 2em; +} + /* * phpBB ACP Toggles - A CSS class that makes it easy to display checkboxes as toggles. * Source : https://danklammer.com/articles/simple-css-toggle-switch/ diff --git a/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.html b/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.html index 838af91..ab87adb 100644 --- a/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.html +++ b/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.html @@ -5,6 +5,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* #} {% INCLUDE 'overall_header.html' %} @@ -46,7 +49,6 @@

{{ lang('STATS_PERMISSIONS_CONFIG_TITLE') }}


{{ lang('STATS_PERMISSIONS_PERM_FOR_GUESTS_EXP') }}
- {{ _self.switch('stats_permissions_perm_for_guests_stats' , STATS_PERMISSIONS_PERM_FOR_GUESTS b-and 1, switch_type) }} {{ lang('STATS_PERMISSIONS_PERM_STATS') }}
{{ _self.switch('stats_permissions_perm_for_guests_newest' , STATS_PERMISSIONS_PERM_FOR_GUESTS b-and 2, switch_type) }} {{ lang('STATS_PERMISSIONS_PERM_NEWEST') }}
@@ -55,7 +57,6 @@

{{ lang('STATS_PERMISSIONS_CONFIG_TITLE') }}


{{ lang('STATS_PERMISSIONS_PERM_FOR_BOTS_EXP') }}
- {{ _self.switch('stats_permissions_perm_for_bots_stats' , STATS_PERMISSIONS_PERM_FOR_BOTS b-and 1, switch_type) }} {{ lang('STATS_PERMISSIONS_PERM_STATS') }}
{{ _self.switch('stats_permissions_perm_for_bots_newest' , STATS_PERMISSIONS_PERM_FOR_BOTS b-and 2, switch_type) }} {{ lang('STATS_PERMISSIONS_PERM_NEWEST') }}
@@ -102,14 +103,6 @@

{{ lang('STATS_PERMISSIONS_CONFIG_TITLE') }}

{%- endif %} {%- endmacro %} -{% macro select(name, value, options) -%} - -{%- endmacro %} - {% macro js_button(name, lang_var) -%} {%- endmacro %} diff --git a/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.js b/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.js index a832bad..81f9210 100644 --- a/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.js +++ b/lukewcs/statspermissions/adm/style/acp_stats_permissions_settings.js @@ -5,6 +5,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ (function ($) { // IIFE start @@ -12,17 +15,12 @@ 'use strict'; var constants = Object.freeze({ - // PermNothing : 0, - // PermStats : 1, - // PermUsers : 2, - // PermStatsUsers : 3, - OpacityEnabled : '1.0', OpacityDisabled : '0.35', }); function setState() { - var c = constants; + const c = constants; dimOptionGroup('stats_permissions_use_permissions', $('[name="stats_permissions_admin_mode"]').prop('checked') @@ -33,51 +31,25 @@ function setState() { || $('[name="stats_permissions_use_permissions"]').prop('checked') ? c.OpacityDisabled : c.OpacityEnabled ); - - // dimOptionGroup('stats_permissions_disp_for_guests', - // dimOptionGroup('stats_permissions_perm_for_guests_stats', - // $('[name="stats_permissions_admin_mode"]').prop('checked') - // || $('[name="stats_permissions_use_permissions"]').prop('checked') - // ); - // dimOptionGroup('stats_permissions_disp_for_bots', - // dimOptionGroup('stats_permissions_perm_for_bots_stats', - // $('[name="stats_permissions_admin_mode"]').prop('checked') - // || $('[name="stats_permissions_use_permissions"]').prop('checked') - // ); }; function dimOptionGroup(elememtName, dimCondition) { - var c = constants; + const c = constants; $('[name="' + elememtName + '"]').parents('dl').css('opacity', dimCondition ? c.OpacityDisabled : c.OpacityEnabled); } function setDefaults() { - var c = constants; - - setSwitch( '[name="stats_permissions_admin_mode"]', false); - setSwitch( '[name="stats_permissions_use_permissions"]', false); - - // $( '[name="stats_permissions_disp_for_guests"]') .prop('value', c.PermStats); - // $( '[name="stats_permissions_disp_for_bots"]') .prop('value', c.PermNothing); - setSwitch( '[name="stats_permissions_perm_for_guests_stats"]', true); - setSwitch( '[name="stats_permissions_perm_for_guests_newest"]', false); - setSwitch( '[name="stats_permissions_perm_for_bots_stats"]', false); - setSwitch( '[name="stats_permissions_perm_for_bots_newest"]', false); + setSwitch('[name="stats_permissions_admin_mode"]', false); + setSwitch('[name="stats_permissions_use_permissions"]', false); + setSwitch('[name="stats_permissions_perm_for_guests_stats"]', true); + setSwitch('[name="stats_permissions_perm_for_guests_newest"]', false); + setSwitch('[name="stats_permissions_perm_for_bots_stats"]', false); + setSwitch('[name="stats_permissions_perm_for_bots_newest"]', false); setState(); }; -// function setSwitch(selector, checked) { - // var $elementObject = $(selector); - - // if ($elementObject.get(0).type == 'checkbox') { - // $elementObject.prop('checked', checked); - // } else if ($elementObject.get(0).type == 'radio') { - // $('[name="' + $elementObject[0].name + '"][value="' + (checked ? 1 : 0) + '"]').prop('checked', true); - // } -// }; - function setSwitch(selector, checked) { const $elementObject = $(selector); const elementType = $elementObject.attr('type'); diff --git a/lukewcs/statspermissions/composer.json b/lukewcs/statspermissions/composer.json index 50c610b..9bf27fd 100644 --- a/lukewcs/statspermissions/composer.json +++ b/lukewcs/statspermissions/composer.json @@ -3,8 +3,8 @@ "type": "phpbb-extension", "description": "Allows to define independent permissions for viewing statistics and newest member.", "homepage": "https://github.com/LukeWCS/stats-permissions", - "version": "1.2.0-b1", - "time": "2024-03-27", + "version": "1.2.0", + "time": "2024-03-29", "license": "GPL-2.0-only", "authors": [ { @@ -19,7 +19,7 @@ }, "extra": { "display-name": "Stats Permissions", - "lang-min-ver": "1.1.0", + "lang-min-ver": "1.2.0", "soft-require": { "phpbb/phpbb": ">=3.3.0,<3.4.0@dev" }, diff --git a/lukewcs/statspermissions/config/services.yml b/lukewcs/statspermissions/config/services.yml index 2491911..56d7cc1 100644 --- a/lukewcs/statspermissions/config/services.yml +++ b/lukewcs/statspermissions/config/services.yml @@ -1,24 +1,20 @@ services: lukewcs.statspermissions.listener: class: lukewcs\statspermissions\event\listener - arguments: - - '@lukewcs.statspermissions.core' - tags: - - { name: event.listener } - lukewcs.statspermissions.core: - class: lukewcs\statspermissions\core\stats_permissions arguments: - '@config' - '@template' + - '@language' - '@auth' - '@user' - '@dispatcher' - - '@language' + tags: + - { name: event.listener } lukewcs.statspermissions.controller.acp: class: lukewcs\statspermissions\controller\acp_stats_permissions_controller arguments: - - '@language' + - '@config' - '@template' + - '@language' - '@request' - - '@config' - '@ext.manager' diff --git a/lukewcs/statspermissions/controller/acp_stats_permissions_controller.php b/lukewcs/statspermissions/controller/acp_stats_permissions_controller.php index fbda91b..3287df2 100644 --- a/lukewcs/statspermissions/controller/acp_stats_permissions_controller.php +++ b/lukewcs/statspermissions/controller/acp_stats_permissions_controller.php @@ -6,33 +6,37 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ namespace lukewcs\statspermissions\controller; class acp_stats_permissions_controller { - protected $language; + protected $config; protected $template; + protected $language; protected $request; - protected $config; protected $ext_manager; + protected $metadata; public $u_action; public function __construct( - \phpbb\language\language $language, + \phpbb\config\config $config, \phpbb\template\template $template, + \phpbb\language\language $language, \phpbb\request\request $request, - \phpbb\config\config $config, \phpbb\extension\manager $ext_manager ) { - $this->language = $language; + $this->config = $config; $this->template = $template; + $this->language = $language; $this->request = $request; - $this->config = $config; $this->ext_manager = $ext_manager; $this->metadata = $this->ext_manager->create_extension_metadata_manager('lukewcs/statspermissions')->get_metadata('all'); @@ -54,13 +58,9 @@ public function module_settings(): void // config section 1 $this->config->set('stats_permissions_admin_mode' , $this->request->variable('stats_permissions_admin_mode', 0)); $this->config->set('stats_permissions_use_permissions' , $this->request->variable('stats_permissions_use_permissions', 0)); - - // $this->config->set('stats_permissions_disp_for_guests' , $this->request->variable('stats_permissions_disp_for_guests', 0)); $perm_for_guests = $this->request->variable('stats_permissions_perm_for_guests_stats', 0) ? 1 : 0; $perm_for_guests += $this->request->variable('stats_permissions_perm_for_guests_newest', 0) ? 2 : 0; $this->config->set('stats_permissions_perm_for_guests' , $perm_for_guests); - - // $this->config->set('stats_permissions_disp_for_bots' , $this->request->variable('stats_permissions_disp_for_bots', 0)); $perm_for_bots = $this->request->variable('stats_permissions_perm_for_bots_stats', 0) ? 1 : 0; $perm_for_bots += $this->request->variable('stats_permissions_perm_for_bots_newest', 0) ? 2 : 0; $this->config->set('stats_permissions_perm_for_bots' , $perm_for_bots); @@ -76,22 +76,13 @@ public function module_settings(): void } $this->template->assign_vars([ - // heading 'STATS_PERMISSIONS_NOTES' => $notes, - // config section 1 + 'STATS_PERMISSIONS_ADMIN_MODE' => $this->config['stats_permissions_admin_mode'], 'STATS_PERMISSIONS_USE_PERMISSIONS' => $this->config['stats_permissions_use_permissions'], - // 'STATS_PERMISSIONS_DISP_FOR_GUESTS' => $this->config['stats_permissions_perm_for_guests'], - // 'STATS_PERMISSIONS_DISP_FOR_BOTS' => $this->config['stats_permissions_perm_for_bots'], 'STATS_PERMISSIONS_PERM_FOR_GUESTS' => $this->config['stats_permissions_perm_for_guests'], 'STATS_PERMISSIONS_PERM_FOR_BOTS' => $this->config['stats_permissions_perm_for_bots'], - // 'STATS_PERMISSIONS_OPTIONS' => [ - // 'STATS_PERMISSIONS_PERM_STATS_NEWEST' => '3', - // 'STATS_PERMISSIONS_PERM_NEWEST' => '2', - // 'STATS_PERMISSIONS_PERM_STATS' => '1', - // 'STATS_PERMISSIONS_PERM_NOTHING' => '0', - // ], - // form elements + 'U_ACTION' => $this->u_action, ]); diff --git a/lukewcs/statspermissions/core/stats_permissions.php b/lukewcs/statspermissions/core/stats_permissions.php deleted file mode 100644 index 142694a..0000000 --- a/lukewcs/statspermissions/core/stats_permissions.php +++ /dev/null @@ -1,131 +0,0 @@ -config = $config; - $this->template = $template; - $this->auth = $auth; - $this->user = $user; - $this->phpbb_dispatcher = $dispatcher; - $this->language = $language; - } - - public function set_template_vars(): void - { - $force_api_mode = false; - - /** - * Overriding the variables that regulate the conditions for the Stats Permissions display. - * - * @event lukewcs.statspermissions.display_condition - * @var bool force_api_mode Forces the API mode so that Stats Permissions is not displayed, but only the template variables are generated. - * @since 1.0.0 - */ - $vars = ['force_api_mode']; - extract($this->phpbb_dispatcher->trigger_event('lukewcs.statspermissions.display_condition', compact($vars))); - - $force_api_mode = ($force_api_mode === true); - - // Set display permission variables - if ($this->config['stats_permissions_admin_mode']) - { - $permission_stats = $this->auth->acl_get('a_'); - $permission_newest = $this->auth->acl_get('a_'); - } - else - { - if ($this->config['stats_permissions_use_permissions']) // use phpBB permissions - { - $permission_stats = $this->auth->acl_gets('u_stats_permissions_show_stats'); - $permission_newest = $this->auth->acl_gets('u_stats_permissions_show_newest'); - } - else - { - if ($this->user->data['user_id'] != ANONYMOUS && empty($this->user->data['is_bot'])) // user - { - $permission_stats = true; - $permission_newest = true; - } - else if (!empty($this->user->data['is_bot'])) // bot - { - // $permission_stats = ( - // $this->config['stats_permissions_disp_for_bots'] == self::PERM_STATS - // || $this->config['stats_permissions_disp_for_bots'] == self::PERM_STATS_NEWEST - // ); - // $permission_newest = ( - // $this->config['stats_permissions_disp_for_bots'] == self::PERM_NEWEST - // || $this->config['stats_permissions_disp_for_bots'] == self::PERM_STATS_NEWEST - // ); - $permission_stats = $this->config['stats_permissions_perm_for_bots'] & self::PERM_STATS; - $permission_newest = $this->config['stats_permissions_perm_for_bots'] & self::PERM_NEWEST; - } - else // guest - { - // $permission_stats = ( - // $this->config['stats_permissions_disp_for_guests'] == self::PERM_STATS - // || $this->config['stats_permissions_disp_for_guests'] == self::PERM_STATS_NEWEST - // ); - // $permission_newest = ( - // $this->config['stats_permissions_disp_for_guests'] == self::PERM_NEWEST - // || $this->config['stats_permissions_disp_for_guests'] == self::PERM_STATS_NEWEST - // ); - $permission_stats = $this->config['stats_permissions_perm_for_guests'] & self::PERM_STATS; - $permission_newest = $this->config['stats_permissions_perm_for_guests'] & self::PERM_NEWEST; - } - } - } - - $this->template->assign_vars([ - 'NEWEST_USER_STATSPERM' => $this->template->retrieve_var('NEWEST_USER'), - 'NEWEST_USER' => false, - 'STATSPERM_STATS' => $permission_stats, - 'STATSPERM_NEWEST' => $permission_newest, - 'STATSPERM_API_MODE' => $force_api_mode, - ]); - } - - public function add_permissions($event): void - { - $permissions = $event['permissions']; - $lang_show_stats = $this->language->lang('ACL_U_STATS_PERMISSIONS_SHOW_STATS'); - $lang_show_newest = $this->language->lang('ACL_U_STATS_PERMISSIONS_SHOW_NEWEST'); - if (!$this->config['stats_permissions_use_permissions'] || $this->config['stats_permissions_admin_mode']) - { - $lang_show_stats = '' . $lang_show_stats . ''; - $lang_show_newest = '' . $lang_show_newest . ''; - } - $permissions['u_stats_permissions_show_stats'] = ['lang' => $lang_show_stats, 'cat' => 'misc']; - $permissions['u_stats_permissions_show_newest'] = ['lang' => $lang_show_newest, 'cat' => 'misc']; - $event['permissions'] = $permissions; - } -} diff --git a/lukewcs/statspermissions/event/listener.php b/lukewcs/statspermissions/event/listener.php index a074f9c..111ad0e 100644 --- a/lukewcs/statspermissions/event/listener.php +++ b/lukewcs/statspermissions/event/listener.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ namespace lukewcs\statspermissions\event; @@ -14,13 +17,26 @@ class listener implements EventSubscriberInterface { + const PERM_STATS = 1; + const PERM_NEWEST = 2; + protected $stats_permissions_core; public function __construct( - $stats_permissions_core + \phpbb\config\config $config, + \phpbb\template\template $template, + \phpbb\language\language $language, + \phpbb\auth\auth $auth, + \phpbb\user $user, + \phpbb\event\dispatcher_interface $dispatcher ) { - $this->statsperm = $stats_permissions_core; + $this->config = $config; + $this->template = $template; + $this->language = $language; + $this->auth = $auth; + $this->user = $user; + $this->phpbb_dispatcher = $dispatcher; } public static function getSubscribedEvents() @@ -33,11 +49,76 @@ public static function getSubscribedEvents() public function set_template_vars() { - $this->statsperm->set_template_vars(); + $force_api_mode = false; + + /** + * Overriding the variables that regulate the conditions for the Stats Permissions display. + * + * @event lukewcs.statspermissions.display_condition + * @var bool force_api_mode Forces the API mode so that Stats Permissions is not displayed, but only the template variables are generated. + * @since 1.0.0 + */ + $vars = ['force_api_mode']; + extract($this->phpbb_dispatcher->trigger_event('lukewcs.statspermissions.display_condition', compact($vars))); + + $force_api_mode = ($force_api_mode === true); + + // Set display permission variables + if ($this->config['stats_permissions_admin_mode']) + { + $permission_stats = $this->auth->acl_get('a_'); + $permission_newest = $this->auth->acl_get('a_'); + } + else + { + if ($this->config['stats_permissions_use_permissions']) // use phpBB permissions + { + $permission_stats = $this->auth->acl_gets('u_stats_permissions_show_stats'); + $permission_newest = $this->auth->acl_gets('u_stats_permissions_show_newest'); + } + else + { + if ($this->user->data['user_id'] != ANONYMOUS && empty($this->user->data['is_bot'])) // user + { + $permission_stats = true; + $permission_newest = true; + } + else if (!empty($this->user->data['is_bot'])) // bot + { + $permission_stats = $this->config['stats_permissions_perm_for_bots'] & self::PERM_STATS; + $permission_newest = $this->config['stats_permissions_perm_for_bots'] & self::PERM_NEWEST; + } + else // guest + { + $permission_stats = $this->config['stats_permissions_perm_for_guests'] & self::PERM_STATS; + $permission_newest = $this->config['stats_permissions_perm_for_guests'] & self::PERM_NEWEST; + } + } + } + + $this->template->assign_vars([ + 'NEWEST_USER_STATSPERM' => $this->template->retrieve_var('NEWEST_USER'), + 'NEWEST_USER' => false, + 'STATSPERM_STATS' => $permission_stats, + 'STATSPERM_NEWEST' => $permission_newest, + 'STATSPERM_API_MODE' => $force_api_mode, + ]); } public function add_permissions($event) { - $this->statsperm->add_permissions($event); + $permissions = $event['permissions']; + $lang_show_stats = $this->language->lang('ACL_U_STATS_PERMISSIONS_SHOW_STATS'); + $lang_show_newest = $this->language->lang('ACL_U_STATS_PERMISSIONS_SHOW_NEWEST'); + + if (!$this->config['stats_permissions_use_permissions'] || $this->config['stats_permissions_admin_mode']) + { + $lang_show_stats = '' . $lang_show_stats . ''; + $lang_show_newest = '' . $lang_show_newest . ''; + } + + $permissions['u_stats_permissions_show_stats'] = ['lang' => $lang_show_stats, 'cat' => 'misc']; + $permissions['u_stats_permissions_show_newest'] = ['lang' => $lang_show_newest, 'cat' => 'misc']; + $event['permissions'] = $permissions; } } diff --git a/lukewcs/statspermissions/ext.php b/lukewcs/statspermissions/ext.php index d3a2e54..e720bdf 100644 --- a/lukewcs/statspermissions/ext.php +++ b/lukewcs/statspermissions/ext.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ namespace lukewcs\statspermissions; diff --git a/lukewcs/statspermissions/language/de/acp_stats_permissions.php b/lukewcs/statspermissions/language/de/acp_stats_permissions.php index 0931587..2dd82c1 100644 --- a/lukewcs/statspermissions/language/de/acp_stats_permissions.php +++ b/lukewcs/statspermissions/language/de/acp_stats_permissions.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -35,7 +38,7 @@ // // Some characters you may want to copy&paste: // ’ « » “ ” … „ “ -// + $lang = array_merge($lang, [ // config head 'STATS_PERMISSIONS_CONFIG_TITLE' => 'Statistik-Berechtigungen', @@ -53,10 +56,8 @@ 'STATS_PERMISSIONS_PERM_FOR_GUESTS_EXP' => 'Legt fest, was Gäste sehen können. Wenn alle Schalter deaktiviert sind, wird die Statistik-Anzeige für Gäste komplett ausgeschaltet.', 'STATS_PERMISSIONS_PERM_FOR_BOTS' => 'Anzeige für Bots', 'STATS_PERMISSIONS_PERM_FOR_BOTS_EXP' => 'Legt fest, was Bots sehen können. Wenn alle Schalter deaktiviert sind, wird die Statistik-Anzeige für Bots komplett ausgeschaltet.', - // 'STATS_PERMISSIONS_PERM_STATS_NEWEST' => 'Statistik und neuestes Mitglied', 'STATS_PERMISSIONS_PERM_NEWEST' => 'Neuestes Mitglied', 'STATS_PERMISSIONS_PERM_STATS' => 'Statistik', - // 'STATS_PERMISSIONS_PERM_NOTHING' => 'Nichts', // config section 2 'STATS_PERMISSIONS_SECTION_RESET' => 'Zurücksetzen', diff --git a/lukewcs/statspermissions/language/de/acp_stats_permissions_lang_author.php b/lukewcs/statspermissions/language/de/acp_stats_permissions_lang_author.php index 333e91b..4c0e63f 100644 --- a/lukewcs/statspermissions/language/de/acp_stats_permissions_lang_author.php +++ b/lukewcs/statspermissions/language/de/acp_stats_permissions_lang_author.php @@ -6,6 +6,9 @@ * @copyright (c) 2023, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -39,7 +42,7 @@ $lang = array_merge($lang, [ // language pack author 'STATS_PERMISSIONS_LANG_DESC' => 'Deutsch (Du)', - 'STATS_PERMISSIONS_LANG_VER' => '1.1.0', + 'STATS_PERMISSIONS_LANG_VER' => '1.2.0', 'STATS_PERMISSIONS_LANG_AUTHOR' => 'LukeWCS', // messages diff --git a/lukewcs/statspermissions/language/de/info_acp_stats_permissions.php b/lukewcs/statspermissions/language/de/info_acp_stats_permissions.php index ad7b094..3501b66 100644 --- a/lukewcs/statspermissions/language/de/info_acp_stats_permissions.php +++ b/lukewcs/statspermissions/language/de/info_acp_stats_permissions.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -35,7 +38,7 @@ // // Some characters you may want to copy&paste: // ’ « » “ ” … „ “ -// + $lang = array_merge($lang, [ // navigation 'STATS_PERMISSIONS_NAV_TITLE' => 'Statistik-Berechtigungen', diff --git a/lukewcs/statspermissions/language/de/permissions_stats_permissions.php b/lukewcs/statspermissions/language/de/permissions_stats_permissions.php index 70ca751..0fa27b5 100644 --- a/lukewcs/statspermissions/language/de/permissions_stats_permissions.php +++ b/lukewcs/statspermissions/language/de/permissions_stats_permissions.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -35,7 +38,7 @@ // // Some characters you may want to copy&paste: // ’ « » “ ” … „ “ -// + $lang = array_merge($lang, [ 'ACL_U_STATS_PERMISSIONS_SHOW_STATS' => 'Statistik-Berechtigungen: Kann Statistik sehen', 'ACL_U_STATS_PERMISSIONS_SHOW_NEWEST' => 'Statistik-Berechtigungen: Kann neuestes Mitglied sehen', diff --git a/lukewcs/statspermissions/language/de_x_sie/acp_stats_permissions.php b/lukewcs/statspermissions/language/de_x_sie/acp_stats_permissions.php index fe6dbbb..040b01d 100644 --- a/lukewcs/statspermissions/language/de_x_sie/acp_stats_permissions.php +++ b/lukewcs/statspermissions/language/de_x_sie/acp_stats_permissions.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -35,7 +38,7 @@ // // Some characters you may want to copy&paste: // ’ « » “ ” … „ “ -// + $lang = array_merge($lang, [ // config head 'STATS_PERMISSIONS_CONFIG_TITLE' => 'Statistik-Berechtigungen', @@ -53,10 +56,8 @@ 'STATS_PERMISSIONS_PERM_FOR_GUESTS_EXP' => 'Legt fest, was Gäste sehen können. Wenn alle Schalter deaktiviert sind, wird die Statistik-Anzeige für Gäste komplett ausgeschaltet.', 'STATS_PERMISSIONS_PERM_FOR_BOTS' => 'Anzeige für Bots', 'STATS_PERMISSIONS_PERM_FOR_BOTS_EXP' => 'Legt fest, was Bots sehen können. Wenn alle Schalter deaktiviert sind, wird die Statistik-Anzeige für Bots komplett ausgeschaltet.', - // 'STATS_PERMISSIONS_PERM_STATS_NEWEST' => 'Statistik und neuestes Mitglied', 'STATS_PERMISSIONS_PERM_NEWEST' => 'Neuestes Mitglied', 'STATS_PERMISSIONS_PERM_STATS' => 'Statistik', - // 'STATS_PERMISSIONS_PERM_NOTHING' => 'Nichts', // config section 2 'STATS_PERMISSIONS_SECTION_RESET' => 'Zurücksetzen', diff --git a/lukewcs/statspermissions/language/de_x_sie/acp_stats_permissions_lang_author.php b/lukewcs/statspermissions/language/de_x_sie/acp_stats_permissions_lang_author.php index 5bfac32..e330447 100644 --- a/lukewcs/statspermissions/language/de_x_sie/acp_stats_permissions_lang_author.php +++ b/lukewcs/statspermissions/language/de_x_sie/acp_stats_permissions_lang_author.php @@ -6,6 +6,9 @@ * @copyright (c) 2023, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -39,7 +42,7 @@ $lang = array_merge($lang, [ // language pack author 'STATS_PERMISSIONS_LANG_DESC' => 'Deutsch (Sie)', - 'STATS_PERMISSIONS_LANG_VER' => '1.1.0', + 'STATS_PERMISSIONS_LANG_VER' => '1.2.0', 'STATS_PERMISSIONS_LANG_AUTHOR' => 'LukeWCS', // messages diff --git a/lukewcs/statspermissions/language/de_x_sie/info_acp_stats_permissions.php b/lukewcs/statspermissions/language/de_x_sie/info_acp_stats_permissions.php index ad7b094..3501b66 100644 --- a/lukewcs/statspermissions/language/de_x_sie/info_acp_stats_permissions.php +++ b/lukewcs/statspermissions/language/de_x_sie/info_acp_stats_permissions.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -35,7 +38,7 @@ // // Some characters you may want to copy&paste: // ’ « » “ ” … „ “ -// + $lang = array_merge($lang, [ // navigation 'STATS_PERMISSIONS_NAV_TITLE' => 'Statistik-Berechtigungen', diff --git a/lukewcs/statspermissions/language/de_x_sie/permissions_stats_permissions.php b/lukewcs/statspermissions/language/de_x_sie/permissions_stats_permissions.php index 70ca751..0fa27b5 100644 --- a/lukewcs/statspermissions/language/de_x_sie/permissions_stats_permissions.php +++ b/lukewcs/statspermissions/language/de_x_sie/permissions_stats_permissions.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -35,7 +38,7 @@ // // Some characters you may want to copy&paste: // ’ « » “ ” … „ “ -// + $lang = array_merge($lang, [ 'ACL_U_STATS_PERMISSIONS_SHOW_STATS' => 'Statistik-Berechtigungen: Kann Statistik sehen', 'ACL_U_STATS_PERMISSIONS_SHOW_NEWEST' => 'Statistik-Berechtigungen: Kann neuestes Mitglied sehen', diff --git a/lukewcs/statspermissions/language/en/acp_stats_permissions.php b/lukewcs/statspermissions/language/en/acp_stats_permissions.php index 2eef3ca..fdafc8a 100644 --- a/lukewcs/statspermissions/language/en/acp_stats_permissions.php +++ b/lukewcs/statspermissions/language/en/acp_stats_permissions.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -35,7 +38,7 @@ // // Some characters you may want to copy&paste: // ’ « » “ ” … „ “ -// + $lang = array_merge($lang, [ // config head 'STATS_PERMISSIONS_CONFIG_TITLE' => 'Stats Permissions', @@ -53,10 +56,8 @@ 'STATS_PERMISSIONS_PERM_FOR_GUESTS_EXP' => 'Determines what guests can see. If all switches are disabled, the statistics display for guests will be completely turned off.', 'STATS_PERMISSIONS_PERM_FOR_BOTS' => 'Display for bots', 'STATS_PERMISSIONS_PERM_FOR_BOTS_EXP' => 'Determines what bots can see. If all switches are disabled, the statistics display for bots will be completely turned off.', - // 'STATS_PERMISSIONS_PERM_STATS_NEWEST' => 'Statistics and newest member', 'STATS_PERMISSIONS_PERM_NEWEST' => 'Newest member', 'STATS_PERMISSIONS_PERM_STATS' => 'Statistics', - // 'STATS_PERMISSIONS_PERM_NOTHING' => 'Nothing', // config section 2 'STATS_PERMISSIONS_SECTION_RESET' => 'Reset', diff --git a/lukewcs/statspermissions/language/en/acp_stats_permissions_lang_author.php b/lukewcs/statspermissions/language/en/acp_stats_permissions_lang_author.php index 7ddb0d7..94b120e 100644 --- a/lukewcs/statspermissions/language/en/acp_stats_permissions_lang_author.php +++ b/lukewcs/statspermissions/language/en/acp_stats_permissions_lang_author.php @@ -6,6 +6,9 @@ * @copyright (c) 2023, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -39,7 +42,7 @@ $lang = array_merge($lang, [ // language pack author 'STATS_PERMISSIONS_LANG_DESC' => 'English', - 'STATS_PERMISSIONS_LANG_VER' => '1.1.0', + 'STATS_PERMISSIONS_LANG_VER' => '1.2.0', 'STATS_PERMISSIONS_LANG_AUTHOR' => 'LukeWCS', // messages diff --git a/lukewcs/statspermissions/language/en/info_acp_stats_permissions.php b/lukewcs/statspermissions/language/en/info_acp_stats_permissions.php index 0ddc241..ba8de08 100644 --- a/lukewcs/statspermissions/language/en/info_acp_stats_permissions.php +++ b/lukewcs/statspermissions/language/en/info_acp_stats_permissions.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -35,7 +38,7 @@ // // Some characters you may want to copy&paste: // ’ « » “ ” … „ “ -// + $lang = array_merge($lang, [ // navigation 'STATS_PERMISSIONS_NAV_TITLE' => 'Stats Permissions', diff --git a/lukewcs/statspermissions/language/en/permissions_stats_permissions.php b/lukewcs/statspermissions/language/en/permissions_stats_permissions.php index c3256ec..a47bc92 100644 --- a/lukewcs/statspermissions/language/en/permissions_stats_permissions.php +++ b/lukewcs/statspermissions/language/en/permissions_stats_permissions.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ /** @@ -35,7 +38,7 @@ // // Some characters you may want to copy&paste: // ’ « » “ ” … „ “ -// + $lang = array_merge($lang, [ 'ACL_U_STATS_PERMISSIONS_SHOW_STATS' => 'Stats Permissions: Can view statistics', 'ACL_U_STATS_PERMISSIONS_SHOW_NEWEST' => 'Stats Permissions: Can view newest member', diff --git a/lukewcs/statspermissions/migrations/v_1_0_0.php b/lukewcs/statspermissions/migrations/v_1_0_0.php index a7931fc..8e79f89 100644 --- a/lukewcs/statspermissions/migrations/v_1_0_0.php +++ b/lukewcs/statspermissions/migrations/v_1_0_0.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ namespace lukewcs\statspermissions\migrations; diff --git a/lukewcs/statspermissions/migrations/v_1_0_2.php b/lukewcs/statspermissions/migrations/v_1_0_2.php index c2edb21..1c72029 100644 --- a/lukewcs/statspermissions/migrations/v_1_0_2.php +++ b/lukewcs/statspermissions/migrations/v_1_0_2.php @@ -6,6 +6,9 @@ * @copyright (c) 2019, LukeWCS, https://www.wcsaga.org/ * @license GNU General Public License, version 2 (GPL-2.0) * +* Note: This extension is 100% genuine handcraft and consists of selected +* natural raw materials. There was no AI involved in making it. +* */ namespace lukewcs\statspermissions\migrations; diff --git a/lukewcs/statspermissions/migrations/v_1_2_0.php b/lukewcs/statspermissions/migrations/v_1_2_0.php index 2b4a71e..35481e0 100644 --- a/lukewcs/statspermissions/migrations/v_1_2_0.php +++ b/lukewcs/statspermissions/migrations/v_1_2_0.php @@ -1,13 +1,14 @@

{{ lang('STATISTICS') }}

diff --git a/stats-permissions_build_changelog.md b/stats-permissions_build_changelog.md index a53334c..6077609 100644 --- a/stats-permissions_build_changelog.md +++ b/stats-permissions_build_changelog.md @@ -1,3 +1,12 @@ +### 1.2.0 +* Release (2024-03-29) +* Core Code in den Listener integriert und Core Ordner gelöscht. +* ACP-Template: + * `select()` Makro entfernt, da nicht mehr benötigt. +* Code bereinigt bei PHP, HTML und JS. +* Sprachdateien: + * Mindestversion auf 1.2.0 erhöht. + #### 1.2.0-b1 * phpBB Voraussetzung: * Min. 3.2.11 -> 3.3.0. diff --git a/stats-permissions_changelog_de.md b/stats-permissions_changelog_de.md index 8716e8c..5b6b9b6 100644 --- a/stats-permissions_changelog_de.md +++ b/stats-permissions_changelog_de.md @@ -1,10 +1,11 @@ ### 1.2.0 -(2024--) +(2024-03-29) * Die Unterstützung für phpBB 3.2 wurde aufgegeben, Minimum ist jetzt phpBB 3.3.0. * Rechtesystem: Von LFWWH 2.2.0 die Änderungen am vereinfachten Berechtigungssystem übernommen. * Das vereinfachte Berechtigungssystem in einen eigenen Abschnitt gesetzt und eine kleine Erklärung hinzugefügt. * Statt einem Dropdown-Menü mit 4 Optionen, dienen jetzt 2 separate Schalter pro Gruppe für die Wahl der Berechtigungen. +* Code Optimierung. ### 1.1.0 (2023-12-09)