From f3e50eb2fff765c73acd7afc40740f3833eba82b Mon Sep 17 00:00:00 2001 From: DZywolf <34007722+DZywolf@users.noreply.github.com> Date: Wed, 20 Sep 2023 13:42:01 -0300 Subject: [PATCH 01/13] chore: update README --- .github/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/README.md b/.github/README.md index d8c0233a..3eb330c8 100644 --- a/.github/README.md +++ b/.github/README.md @@ -14,10 +14,12 @@ BlizzCMS is a free, easy-to-use, open-source CMS developed for private World of ## Requirements -1. **PHP version** >= 7.4 with the following extensions installed: - - bcmath - curl - gd - gmp - mbstring - mysqli - openssl - soap - zip -2. **DB Server** MySQL 5.7+ or MariaDB 10.6+ -3. **Composer** +1. **Web Server** + - Enable modules: mod_headers - mod_rewrite +2. **PHP** 7.4 or newer recommended + - Enable extensions: bcmath - curl - gd - gmp - mbstring - mysqli - openssl - soap - zip +3. **DB Server** MySQL 5.7+ or MariaDB 10.6+ +4. **Composer** ## Links From 8189245286b9cac6a7ff33f055199f73a0616050 Mon Sep 17 00:00:00 2001 From: DZywolf <34007722+DZywolf@users.noreply.github.com> Date: Wed, 20 Sep 2023 13:44:09 -0300 Subject: [PATCH 02/13] chore: change update directory path --- application/libraries/Updater.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/libraries/Updater.php b/application/libraries/Updater.php index 1a50cc84..b7865ce3 100644 --- a/application/libraries/Updater.php +++ b/application/libraries/Updater.php @@ -125,7 +125,7 @@ public function update() */ private function init_autoupdate() { - $update = new AutoUpdate(FCPATH . 'temp', FCPATH . '', 60); + $update = new AutoUpdate(FCPATH . 'uploads/temp', FCPATH . '', 60); $update->setCurrentVersion($this->version); $update->setUpdateUrl($this->updateUrl); From d787e9cdc15cc88451c34147fa7887ae3b796a45 Mon Sep 17 00:00:00 2001 From: DZywolf <34007722+DZywolf@users.noreply.github.com> Date: Wed, 20 Sep 2023 13:45:17 -0300 Subject: [PATCH 03/13] chore: update languages --- application/language/english/wow_lang.php | 7 ++++++- application/language/spanish/general_lang.php | 8 ++++---- application/language/spanish/wow_lang.php | 7 ++++++- application/modules/admin/language/spanish/admin_lang.php | 8 ++++---- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/application/language/english/wow_lang.php b/application/language/english/wow_lang.php index 34e2b16f..b60853f8 100644 --- a/application/language/english/wow_lang.php +++ b/application/language/english/wow_lang.php @@ -8721,5 +8721,10 @@ 14899 => 'The Flowing Forest', 14900 => 'Shifting Sands', 14934 => "The Chronosmith's Forge", - 14935 => "Ironormu's Vault" + 14935 => "Ironormu's Vault", + 14963 => 'Dev Map - Quest Training', + 14966 => "Dev Map - Exile's Reach", + 14967 => 'Dev Map - Zereth Mortis', + 14968 => 'Dev Map - Mechagon', + 14970 => 'The Black Empire' ]; diff --git a/application/language/spanish/general_lang.php b/application/language/spanish/general_lang.php index 0620adaf..774eccce 100644 --- a/application/language/spanish/general_lang.php +++ b/application/language/spanish/general_lang.php @@ -92,7 +92,7 @@ $lang['item'] = 'Artículo'; $lang['items'] = 'Artículos'; $lang['reason'] = 'Razón'; -$lang['gm_level'] = 'Nivel de GM'; +$lang['gm_level'] = 'Nivel de MJ'; $lang['parent'] = 'Parent'; $lang['target'] = 'Objetivo'; $lang['url_type'] = 'Tipo de URL'; @@ -201,7 +201,7 @@ $lang['both'] = 'Ambos'; $lang['currency'] = 'Moneda'; $lang['object'] = 'Objeto'; -$lang['key'] = 'Llave'; +$lang['key'] = 'Clave'; $lang['none'] = 'Ninguno'; $lang['period'] = 'Período'; $lang['permanent'] = 'Permanente'; @@ -214,8 +214,8 @@ $lang['theme'] = 'Tema'; $lang['themes'] = 'Temas'; -$lang['offline'] = 'Offline'; -$lang['online'] = 'Online'; +$lang['offline'] = 'Desconectado'; +$lang['online'] = 'Conectado'; $lang['unknown'] = 'Desconocido'; $lang['completed'] = 'Terminado'; $lang['canceled'] = 'Cancelado'; diff --git a/application/language/spanish/wow_lang.php b/application/language/spanish/wow_lang.php index fb984056..c5f03e84 100644 --- a/application/language/spanish/wow_lang.php +++ b/application/language/spanish/wow_lang.php @@ -8721,5 +8721,10 @@ 14899 => 'Bosque Fluyente', 14900 => 'Arenas cambiantes', 14934 => 'Forja del Cronoherrero', - 14935 => 'Cámara de Ferrodormu' + 14935 => 'Cámara de Ferrodormu', + 14963 => 'Mapa de desarrollo - Entrenamiento de Misión', + 14966 => 'Mapa de desarrollo - Confín del Exilio', + 14967 => 'Mapa de desarrollo - Zereth Mortis', + 14968 => 'Mapa de desarrollo - Mecandria', + 14970 => 'El Imperio Negro' ]; diff --git a/application/modules/admin/language/spanish/admin_lang.php b/application/modules/admin/language/spanish/admin_lang.php index 50beda17..891b117b 100644 --- a/application/modules/admin/language/spanish/admin_lang.php +++ b/application/modules/admin/language/spanish/admin_lang.php @@ -56,8 +56,8 @@ $lang['secret_password'] = 'Contraseña secreta'; $lang['sender'] = 'Remitente'; -$lang['site_key'] = 'Llave del sitio'; -$lang['secret_key'] = 'Llave secreta'; +$lang['site_key'] = 'Clave de sitio'; +$lang['secret_key'] = 'Clave secreta'; $lang['clear'] = 'Vaciar'; $lang['check_soap'] = 'Comprobar SOAP'; $lang['log'] = 'Registro'; @@ -196,8 +196,8 @@ $lang['enter_type'] = 'Ingrese un tipo.'; $lang['enter_size'] = 'Ingrese un tamaño.'; $lang['enter_theme'] = 'Ingrese un tema.'; -$lang['enter_site_key'] = 'Ingrese una llave del sitio.'; -$lang['enter_secret_key'] = 'Ingrese una llave secreta.'; +$lang['enter_site_key'] = 'Ingrese una clave de sitio.'; +$lang['enter_secret_key'] = 'Ingrese una clave secreta.'; $lang['current_account_username'] = 'Nombre de usuario de la cuenta actual.'; $lang['current_account_nickname'] = 'Apodo de la cuenta actual.'; From 10decf9264ff2d1090e31a4340603e5ad8be206c Mon Sep 17 00:00:00 2001 From: DZywolf <34007722+DZywolf@users.noreply.github.com> Date: Sat, 7 Oct 2023 15:54:48 -0300 Subject: [PATCH 04/13] refactor: rename function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `format_date` → `locate_date` --- application/helpers/extra_helper.php | 24 ++++++++++++------- .../modules/admin/views/bans/emails.php | 4 +++- .../modules/admin/views/bans/index.php | 8 ++++++- application/modules/admin/views/bans/ips.php | 4 +++- .../modules/admin/views/bans/view_email.php | 8 +++++-- .../modules/admin/views/bans/view_ip.php | 8 +++++-- .../modules/admin/views/bans/view_user.php | 8 +++++-- application/modules/admin/views/index.php | 2 +- .../modules/admin/views/logs/index.php | 4 +++- .../modules/admin/views/news/index.php | 4 +++- .../modules/admin/views/pages/index.php | 4 +++- .../modules/admin/views/update/index.php | 2 +- .../modules/admin/views/users/view.php | 2 +- .../admin/views/users/view_characters.php | 2 +- .../modules/admin/views/users/view_logs.php | 6 +++-- application/modules/user/views/index.php | 22 +++++++++-------- .../modules/user/views/security/index.php | 4 +++- application/views/article.php | 6 ++--- application/views/articles.php | 2 +- application/views/home.php | 2 +- application/views/page.php | 2 +- 21 files changed, 85 insertions(+), 43 deletions(-) diff --git a/application/helpers/extra_helper.php b/application/helpers/extra_helper.php index 56862f6e..6eb8a274 100644 --- a/application/helpers/extra_helper.php +++ b/application/helpers/extra_helper.php @@ -35,28 +35,36 @@ function current_date($format = null, $timezone = null) } } -if (! function_exists('format_date')) +if (! function_exists('locate_date')) { /** - * Change datetime format + * Change a specific datetime in a localized pattern * - * @see https://www.php.net/manual/en/datetime.format.php + * @see https://unicode-org.github.io/icu/userguide/format_parse/datetime * * @param string $date - * @param string|null $format + * @param string|null $pattern + * @param string|null $timezone * @return string */ - function format_date($date, $format = null) + function locate_date($date, $pattern = null, $timezone = null) { - $format ??= 'Y-m-d H:i:s'; + $pattern ??= lang('datetime_pattern'); + $timezone ??= config_item('time_reference'); if (empty($date) || $date === '0000-00-00' || $date === '0000-00-00 00:00:00') { return ''; } - $dateTime = new \DateTime($date); + $CI =& get_instance(); + $CI->load->library('multilanguage'); - return $dateTime->format($format); + $dateTime = new \DateTime($date); + $formatter = new \IntlDateFormatter($CI->multilanguage->current_language('locale'), \IntlDateFormatter::MEDIUM, \IntlDateFormatter::SHORT, $timezone, \IntlDateFormatter::GREGORIAN); + + $formatter->setPattern($pattern); + + return $formatter->format($dateTime); } } diff --git a/application/modules/admin/views/bans/emails.php b/application/modules/admin/views/bans/emails.php index 8960408f..aa977744 100644 --- a/application/modules/admin/views/bans/emails.php +++ b/application/modules/admin/views/bans/emails.php @@ -66,7 +66,9 @@
= format_date($ban->start_at, 'M j, Y, h:i A') ?>
+= locate_date($ban->start_at) ?>
- = $ban->end_at === '0000-00-00 00:00:00' ? lang('endless') : format_date($ban->end_at, 'M j, Y, h:i A') ?> + end_at === '0000-00-00 00:00:00'): ?> + = lang('endless') ?> + + +
= format_date($ban->start_at, 'M j, Y, h:i A') ?>
+= locate_date($ban->start_at) ?>
- = $ban->end_at === '0000-00-00 00:00:00' ? lang('endless') : format_date($ban->end_at, 'M j, Y, h:i A') ?> + end_at === '0000-00-00 00:00:00'): ?> + = lang('endless') ?> + + +
= format_date($ban->start_at, 'M j, Y, h:i A') ?>
+= locate_date($ban->start_at) ?>
- = $ban->end_at === '0000-00-00 00:00:00' ? lang('endless') : format_date($ban->end_at, 'M j, Y, h:i A') ?> + end_at === '0000-00-00 00:00:00'): ?> + = lang('endless') ?> + + +
+
+
= lang('registered_in') ?> = format_date($user->created_at, 'M j, Y') ?>
+= lang('registered_in') ?>
= lang('registered_in') ?> = format_date($user->created_at, 'M j, Y') ?>
+= lang('registered_in') ?>
= lang('registered_in') ?> = format_date($user->created_at, 'M j, Y') ?>
+= lang('registered_in') ?>
= format_date(current_date(), 'M j, Y') ?>
+= locate_date('now') ?>
= lang('welcome_back_note') ?> = lang('my_profile') ?>.
= lang('registered_in') ?>: | -= format_date($user->created_at, 'M j, Y') ?> | += lang('registered_in') ?>: | ++ + |
= lang('role') ?>: | -= $this->role_model->get_name($user->role) ?> | += lang('role') ?>: | += $this->role_model->get_name($user->role) ?> |
= lang('voting_points') ?>: | -= $user->vp ?> | += lang('voting_points') ?>: | += $user->vp ?> |
= lang('donation_points') ?>: | -= $user->dp ?> | += lang('donation_points') ?>: | += $user->dp ?> |
+
@@ -46,7 +46,7 @@
= lang('commented_on') ?>
+= lang('commented_on') ?>
+
- +
= html_escape($item->summary) ?>
- +
= html_escape($article->summary) ?>
+
= lang('registered_in') ?>
+= lang('registered_on') ?>
= lang('registered_in') ?>
+= lang('registered_on') ?>
= lang('registered_in') ?>
+= lang('registered_on') ?>