diff --git a/CHANGELOG-1.x.md b/CHANGELOG-1.x.md index e77c30f1..473bc51b 100644 --- a/CHANGELOG-1.x.md +++ b/CHANGELOG-1.x.md @@ -1,5 +1,16 @@ # Changelog +## [1.3.3 - 04.04.2025] + +### Fixed +* Fix uninstall plugin when plugin is disabled (https://github.com/slawkens/myaac/commit/6c568fd36a271270684fc412ccd556b230273a6d) + +### Changed +* Display more useful info when error parsing config.lua (https://github.com/slawkens/myaac/commit/fa6b6aa153ffc131e0d1631a4dcd9012a5850c2e) + +### Other +* Small adjustments (https://github.com/slawkens/myaac/commit/35e2483de86e295bdf089cceffa25842eeb2e34c, https://github.com/slawkens/myaac/commit/ae639d65b0bfa491e747e907e2ebc77f83f47981) + ## [1.3.2 - 01.04.2025] ### Fixed diff --git a/admin/index.php b/admin/index.php index 15ab133c..86ebf3dc 100644 --- a/admin/index.php +++ b/admin/index.php @@ -1,6 +1,8 @@ $name, 'file' => $file, 'priority' => $adminPagesDefaultPriority]; + } + + if (self::getAutoLoadOption($plugin, 'admin-pages-sub-folders', true)) { + // + // Get all plugins/*/admin-pages/subFolder/*.php pages + // + $pluginAdminPagesSubFolders = glob(PLUGINS . $plugin['filename'] . '/admin-pages/*', GLOB_ONLYDIR); + foreach ($pluginAdminPagesSubFolders as $folder) { + $folderName = pathinfo($folder, PATHINFO_FILENAME); + + $subFiles = glob(PLUGINS . $plugin['filename'] . '/admin-pages/' . $folderName . '/*.php'); + foreach ($subFiles as $file) { + $file = str_replace(PLUGINS, 'plugins/', $file); + $name = $folderName . '/' . pathinfo($file, PATHINFO_FILENAME); + + $adminPages[] = ['name' => $name, 'file' => $file, 'priority' => $adminPagesDefaultPriority]; + } + + $subFolders = glob(PLUGINS . $plugin['filename'] . '/admin-pages/' . $folderName . '/*', GLOB_ONLYDIR); + foreach ($subFolders as $subFolder) { + $subFolderName = pathinfo($subFolder, PATHINFO_FILENAME); + $subSubFiles = glob(PLUGINS . $plugin['filename'] . '/admin-pages/' . $folderName . '/' . $subFolderName . '/*.php'); + + foreach ($subSubFiles as $subSubFile) { + $subSubFile = str_replace(PLUGINS, 'plugins/', $subSubFile); + $name = $folderName . '/' . $subFolderName . '/' . pathinfo($subSubFile, PATHINFO_FILENAME); + + $adminPages[] = ['name' => $name, 'file' => $subSubFile, 'priority' => $adminPagesDefaultPriority];; + } + } + } + } + } + + usort($adminPages, function ($a, $b) + { + if ($a['priority'] == $b['priority']) { + return 0; + } + + return ($a['priority'] > $b['priority']) ? -1 : 1; + }); + + $ret = []; + foreach ($adminPages as $value) { + $ret[$value['name']] = $value['file']; + } + + return $ret; + }); + } + public static function getRoutes() { $cache = Cache::getInstance(); @@ -411,20 +486,13 @@ class Plugins { $continue = true; if(!isset($plugin_json['name']) || empty(trim($plugin_json['name']))) { - self::$warnings[] = 'Plugin "name" tag is not set.'; - } - if(!isset($plugin_json['description']) || empty(trim($plugin_json['description']))) { - self::$warnings[] = 'Plugin "description" tag is not set.'; + self::$error = 'Plugin "name" tag is not set.'; + return false; } + if(!isset($plugin_json['version']) || empty(trim($plugin_json['version']))) { self::$warnings[] = 'Plugin "version" tag is not set.'; } - if(!isset($plugin_json['author']) || empty(trim($plugin_json['author']))) { - self::$warnings[] = 'Plugin "author" tag is not set.'; - } - if(!isset($plugin_json['contact']) || empty(trim($plugin_json['contact']))) { - self::$warnings[] = 'Plugin "contact" tag is not set.'; - } if(isset($plugin_json['require'])) { $require = $plugin_json['require']; diff --git a/system/templates/buttons.base.html.twig b/system/templates/buttons.base.html.twig index d44bce10..075af1e1 100644 --- a/system/templates/buttons.base.html.twig +++ b/system/templates/buttons.base.html.twig @@ -1 +1 @@ - \ No newline at end of file + diff --git a/templates/tibiacom/account.login.html.twig b/templates/tibiacom/account.login.html.twig index 9e9b65c2..8aeba805 100644 --- a/templates/tibiacom/account.login.html.twig +++ b/templates/tibiacom/account.login.html.twig @@ -4,24 +4,25 @@ {% endif %}
- -
-
- - - - -
Account Login
- - - - -
+
+
+ + + + +
Account Login
+ + + +
+
+
+ +
@@ -30,20 +31,21 @@
+ + +
- +
{{ hook('HOOK_ACCOUNT_LOGIN_BEFORE_ACCOUNT') }} - + {{ hook('HOOK_ACCOUNT_LOGIN_AFTER_ACCOUNT') }} - + {{ hook('HOOK_ACCOUNT_LOGIN_AFTER_PASSWORD') }} @@ -53,17 +55,19 @@ {{ hook('HOOK_ACCOUNT_LOGIN_AFTER_REMEMBER_ME') }}
{{ account_login_by }}:
Password:
-
- +
+
{{ include('buttons.login.html.twig') }} -
-
- {{ include('buttons.account_lost.html.twig') }} -
-
+ + {% set noSubmit = true %} + {{ include('buttons.account_lost.html.twig') }} + +
@@ -75,35 +79,40 @@
+
+

New to {{ config.lua.serverName }}?

- -
-
- - - - -
New Player
- - - - -
+
+
+ + + + +
New Player
+ + + +
+
+
+ +
+ +
@@ -112,6 +121,7 @@
+ + +
@@ -129,9 +139,12 @@

... where hardcore gaming meets fantasy.

... where friendships last a lifetime.

-

... unites adventurers since 2017!

+

... unites adventurers since 1997!

+
@@ -143,10 +156,12 @@
{{ hook('HOOK_ACCOUNT_LOGIN_AFTER_PAGE') }} diff --git a/templates/tibiacom/basic.css b/templates/tibiacom/basic.css index 3d260a97..4633c5ed 100644 --- a/templates/tibiacom/basic.css +++ b/templates/tibiacom/basic.css @@ -36,6 +36,12 @@ img { width: expression(document.body.clientWidth > 1200? "1200px": "100%" ); } +#LoginFormButtonCell { + width: 145px; + vertical-align: top; + padding-right: 10px; +} + #ContentRow { position: relative; top: 155px; diff --git a/templates/tibiacom/buttons.base.html.twig b/templates/tibiacom/buttons.base.html.twig index a4ab47d5..713321aa 100644 --- a/templates/tibiacom/buttons.base.html.twig +++ b/templates/tibiacom/buttons.base.html.twig @@ -13,7 +13,7 @@
- +
{% endapply %} diff --git a/templates/tibiacom/buttons.logout.html.twig b/templates/tibiacom/buttons.logout.html.twig index fccaf69d..6926617c 100644 --- a/templates/tibiacom/buttons.logout.html.twig +++ b/templates/tibiacom/buttons.logout.html.twig @@ -1,3 +1,3 @@ {% set button_name = 'Logout' %} -{% set button_image = '_sbutton_logout' %} +{% set button_color = 'red' %} {% include('buttons.base.html.twig') %} \ No newline at end of file diff --git a/templates/tibiacom/config.php b/templates/tibiacom/config.php index 7ed168d9..a49f6f76 100644 --- a/templates/tibiacom/config.php +++ b/templates/tibiacom/config.php @@ -1,13 +1,13 @@ array('id' => 'news', 'name' => 'Latest News'), - MENU_CATEGORY_ACCOUNT => array('id' => 'account', 'name' => 'Account'), - MENU_CATEGORY_COMMUNITY => array('id' => 'community', 'name' => 'Community'), - MENU_CATEGORY_FORUM => array('id' => 'forum', 'name' => 'Forum'), - MENU_CATEGORY_LIBRARY => array('id' => 'library', 'name' => 'Library'), - MENU_CATEGORY_SHOP => array('id' => 'shops', 'name' => 'Shop') -); +$config['menu_categories'] = [ + MENU_CATEGORY_NEWS => ['id' => 'news', 'name' => 'Latest News'], + MENU_CATEGORY_ACCOUNT => ['id' => 'account', 'name' => 'Account'], + MENU_CATEGORY_COMMUNITY => ['id' => 'community', 'name' => 'Community'], + MENU_CATEGORY_FORUM => ['id' => 'forum', 'name' => 'Forum'], + MENU_CATEGORY_LIBRARY => ['id' => 'library', 'name' => 'Library'], + MENU_CATEGORY_SHOP => ['id' => 'shops', 'name' => 'Shop'], +]; $config['menus'] = require __DIR__ . '/menus.php';