Compatibility
Here's a list of biggest changes in structure and functions of MyAAC that may require you to define in your plugin manifest json file different minimal MyAAC version to be supported.
You can define the minimum version on which MyAAC plugin can be installed like this: (in your .json file)
Versions:
v0.3.0
added Twig template engine
v0.4.0
Automatically detect json file in .zip instead of basing on filename (admin panel - plugins installer)
in this update your plugin json file doesn't need to have anymore the same name as .zipped file. Like my-plugin.zip, then plugin.json location should be plugins/my-plugin.json. From now you can use custom names like my-plugin.zip and plugins/another-name-for-this.json. We still however, advice you to use same name of plugin like the name of .zip file to support older MyAAC versions.
v0.5.0
moved .htaccess rules to plain php (index.php)
This adds new addresses like /account/manage or /account/create
added option to uninstall plugin
added option to require specified myaac, php or database version for plugins, without that plugin won't be installed
added admin panel custom links support - for future plugins. You can hook you menus on plugin install into
myaac_admin_menu
table
v0.6.1
new configurable: session_prefix, to allow more websites on one machine (must be unique for every website on your dedicated server!
You should be using now functions: getSession(key) and setSession(key, value) for dealing with user session data. This way session_prefix will be automatically appended to the session name.
v0.6.2
added forums for guilds and groups
added items.xml loader class and weapons.xml loader class, they're now saved in database, and you can use them in your plugin
v0.7.0
moved template menus to database, they're now dynamically loaded
v0.8.0
Admin Panel - Modules showed on Dashboard - for example can be statistics
colorful Menus:
possibility to define colors and "Open in New Tab" on Template Menus (needs to be supported by Template)
new configurable: "env" (Environment)
comments are now allowed inside plugin json file (php style)
new require options for plugins: (look into example.json)
require database version, table or column of the MyAAC schema
require php-extension
new hooks: LOGIN, LOGIN_ATTEMPT, LOGOUT, HOOK_ACCOUNT_CREATE_*
$cache variable was removed, use
$cache = Cache::getInstance()
insteadnew functions:
config($key), configLua($key)
clearCache()
OTS_Account:
getCountry()
setLastLogin($lastlogin) (@Leesneaks)
setWebFlags(webflags) (@Leesneaks)
OTS_Player:
getAccountId()
countBlessings() (@Leesneaks)
checkBlessings($count) (@Leesneaks)
is_sub_dir (in system/libs/plugins.php)
Twig:
getPlayerLink($name, $generate = true)
removed SQLquote and SQLquery from OTS_Base_DB
Add optional $params param into log_append (will log arrays)
v0.8.8
Change PHP Required: 7.2.5
updated Twig from version 1.x to 2.x (v2.15.4)
New hook:
HOOK_EMAIL_CONFIRMED
v0.8.9
add PLUGINS dir to twig paths
you can now include twig template inside your plugins folder
$twig->display('your-plugin/example.html.twig');
plugins folder is now accessible from public, you can place assets there
added tables.headline.html.twig
v0.8.10
allow pages to be placed in templates folder
v0.8.11
New functions:
Cache::remember($key, $ttl, $callback)
New characters page hooks
HOOK_CHARACTERS_BEFORE_SKILLS
HOOK_CHARACTERS_AFTER_SKILLS
HOOK_CHARACTERS_AFTER_QUESTS
HOOK_CHARACTERS_AFTER_EQUIPMENT
HOOK_CHARACTERS_BEFORE_DEATHS
v0.8.13
Twig context for hooks - this way you can get variables from parent template in hooks
v0.8.17
TwigTypeCastingExtension (https://github.com/slawkens/myaac/commit/7181b988e9518320d57486670ca4e2d3b2fe1cfa)
can be used to cast variables in Twig
v0.8.18
Added hook: HOOK_GUILDS_AFTER_INVITED_CHARACTERS for Guild Wars
v0.8.19
better tables.headline.html.twig (patched from 1.0)
new functions: getGuildNameById($id) + getGuildLogoById($id) + Plugins::installMenus($templateName, $menus, $clearOld = false)
new hooks: HOOK_ACCOUNT_CREATE_AFTER_SAVED, HOOK_ACCOUNT_MANAGE_BEFORE_GENERAL_INFORMATION, HOOK_ACCOUNT_MANAGE_BEFORE_PUBLIC_INFORMATION, HOOK_ACCOUNT_MANAGE_BEFORE_ACCOUNT_LOGS, HOOK_ACCOUNT_MANAGE_BEFORE_CHARACTERS, HOOK_INSTALL_FINISH, HOOK_ACCOUNT_CREATE_CHARACTER_*
syntactic sugar for db structure changes (https://github.com/slawkens/myaac/commit/e0036a3e32e8c37c28665dd7ae18ac9b8fc167d9)
support for button_color (red, green, blue) in buttons.base.html.twig (https://github.com/slawkens/myaac/commit/b2c9eb474513650a014352d820602b8007eb3bf3)
v1.0 (current stable, master branch)
new pages, Commands and themes can be placed directly in plugins folder. The respective folder are following:
You need just to place them in correct folder and they will be loaded automatically - this allows better customization, without interfering with core AAC folders. This will allow in the future automatic updates for plugins as well the AAC as whole.
pages/
Commands/
themes/
autoload of pages, commands and themes is configurable (https://github.com/slawkens/myaac/commit/c1d4b4f80cd6bb85507ee9471e47013955a26a91)
composer is now used for external libraries
new console script: aac - using symfony/console
usage:
php aac
(will list all commands by default)example:
php aac cache:clear
example:
php aac plugin:install theme-example.zip
Plugin cronjobs: central control of the cronjobs
New exception handler: Whoops
replace POT Query Builder to Eloquent ORM
config.php moved to Admin Panel -> Settings page
schema: Change character set to utf8mb4 (support for Emojis in Menus/Pages/News/Forum etc.)
allow OTS_Player to be passed as object to getPlayerLink
refactor getTopPlayers function (support for balance)
Bugtracker has been moved to Plugins
new routing engine. Routes can be added to plugins. Thus removing the need of inserting the page into system/pages.
option to disable/enable plugin from admin panel
templates: new config option - menu_default_color
add $whoopsHandler as variable
new hooks for news management (https://github.com/slawkens/myaac/commit/011a85d8ae34283ded6999882833f9d4797028ec, https://github.com/slawkens/myaac/commit/36bd3eb846e829b45313e10f7568dc4e95841143)
new functions
getBanReason($reasonId), getBanType($typeId)
getChangelogType($v), getChangelogWhere($v)
getPlayerNameByAccount($id)
Outfits_loadfromXML(), Mounts_loadfromXML()
left($str, $length), right($str, $length), between($x, $lim1, $lim2), truncate($string, $length)
getCreatureImgPath($creature), getItemRarity($chance)
getAccountLoginByLabel()
getGuildNameById($id), getGuildLogoById($id)
camelCaseToUnderscore($input), removeIfFirstSlash(&$text)
v1.0.1
Updated libs:
twig from ^2.0 to ^3.11
The "if" statements in "for" loops are not allowed anymore, this will cause an exception
tinymce from ^6.8.3 to ^7.2.0
cypress from ^12.12.0 to ^13.17.0
nesbot/carbon from 2.72.5 to 2.72.6
v2.0-dev (development version)
Last updated