This is a list of changes made in versions 4.Y.Z
See CHANGELOG.txt for see changes made for Oliver Brendel +nb Edition
Visit the Wiki for more details.
Visit the Documentation for more details.
Visit the README.
Visit DEV Changelog
Visit V2 Changelog
Visit V3 Changelog
Visit V5 Changelog
Visit V6 Changelog
Visit V7 Changelog
- Migrated Lotgd\Core\Template\Theme factory to LoTGD Kernel service
LotgdTheme::
static class get the new Kernel service
- Nothing
- Nothing
- Nothing
- Remove factory of
Lotgd\Core\Template\Theme
useLotgdKernel::get('twig')
instead.- Remove related files:
src/core/Factory/Template/EntrypointLookupCollection.php
src/core/Factory/Template/Packages.php
src/core/Factory/Template/TagRender.php
src/core/Factory/Template/Theme.php
- Remove related files:
- Remove file
src/core/Template/Base.php
not in use and is deprecated. - Remove deprecated file
src/core/Template/Theme.php
.
- IMPORTANT This is the latest version of the 4.x series. The next version will be 5.0.0 which will remove many obsolete parts.
- Upgrade/Install for version 4.9.0 and up
- First, upload files to your server (production compilation):
- Second, empty cache:
var/
delete this folder (or use command in consolephp bin/console cache:clear
).- From version 4.9.0 use Symfony Kernel, so work like Symfony Framework.
storage/cache/*
can empty with console comandphp bin/lotgd storage:cache_clear
- Not delete
.gitkeep
files. Remember to keep the main structure of the folderstorage/cache/
- It is highly recommended to use the command
php bin/lotgd storage:cache_clear
instead delete folder. - Note: if fail when run console command, manual delete:
storage/cache/service-manager.config.php
- Not delete
- Third, read info in
storage/log/tracy/*
files, and see the problem. - If you can't solve the problem go to: Repository issues
- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
- Migrated Lotgd\Core\Navigation\Navigation factory to LoTGD Kernel service
LotgdNavigation::
static class get the new Kernel service
- Migrated Lotgd\Core\Http\Request and Lotgd\Core\Http\Response factory to LoTGD Kernel service
LotgdRequest::
andLotgdResponse
static class get the new Kernel service
- Migrated Lotgd\Core\EventManager\Hook LoTGD Kernel service
LotgdHook::
static class get the new Kernel service
- Migrated Lotgd\Core\Template\Params factory to LoTGD Kernel service
- Translation system
- Laminas Translator
- Remove default scope
page
from text domain. - Now can add translator files to
translations/[locale]
folder, and no need move totranslations/[locale]/page
folder
- Remove default scope
- Twig translation filter
- Filter
trans
now use Symfony Translator
- Filter
- Translation files in
translations/en
- Rename all files prefixed with name of folder and moved to root folder
translations/en
- Example:
translations/en/page/about.yaml
totranslations/en/page_about.yaml
- Example:
- This is for compatibility with Laminas Translator
- Rename all files prefixed with name of folder and moved to root folder
- Laminas Translator
- LoTGD pages
- Templates of pages now use
trans
filter.- Adapted all text domains to use with Symfony Translator.
- Work with Laminas Translator too.
- Templates of pages now use
- src/core/Pattern/Cache.php
- Added new function for get LoTGD Cache App Tagged. Service
core.lotgd.cache
- Added new function for get LoTGD Cache App Tagged. Service
- src/core/Paginator/Adapter/Doctrine.php
- Added option to get results as objects.
- Const
HYDRATE_OBJECT
- Const
- Added option to get results as objects.
- src/core/Pattern/Translator.php new function
messageFormatter($message, $parameters, $locale)
Only format a message withMessageFormatter::class
.- This function NO translate the message
- LoTGD Core Advertising Bundle
- Create new bundle for advertising providers like Google Adsense
- Providers available:
- Google Adsense
- Providers available:
- Can create your on providers.
- In this version LoTGD Core 4.11.0 need add your Twig Extension as a factory of Laminas Service Manager like other Twig Extensions.
- Create new bundle for advertising providers like Google Adsense
- Lotgd\Core\ServiceManager are deprecated and deleted in version 5.0.0
- Use LoTGD Kernel service for create service.
- Lotgd\Core\Hook are deprecated and deleted in version 7.0.0 (or before)
- In version 7.0.0 LoTGD Core is a Symfony App
- LoTGD Core use Symfony Event system in this version, that is more powerfull.
- For now use old hook system.
- Form Configuration Events use correct label for Events chances.
- Remove factory of
Lotgd\Core\EventManager\Event
not in use. - Remove factory of
Lotgd\Core\Navigation\Navigation
useLotgdKernel::get('Lotgd\Core\Navigation\Navigation')
instead. - Remove factory of
Lotgd\Core\Http\Request
useLotgdKernel::get('Lotgd\Core\Http\Request')
instead. - Remove factory of
Lotgd\Core\Http\Response
useLotgdKernel::get('Lotgd\Core\Http\Response')
instead. - Remove factory of
Lotgd\Core\EventManager\Hook
useLotgdKernel::get('Lotgd\Core\EventManager\Hook')
instead. - Remove factory of
Lotgd\Core\Template\Params
useLotgdKernel::get('Lotgd\Core\Template\Params')
instead. - Remove file
src/core/Factory/Doctrine/Extension/TablePrefix.php
not in use. - Remove file
src/core/Pattern/EventManager.php
not in use. - BC Remove factory
Lotgd\Core\SymfonyForm
use\LotgdKernel::get('form.factory');
instead.- For work with LoTGD Kernel need make this changes:
- Delete
Doctrine::detach($entity);
no is needed. - Replace
$form->handleRequest();
for$form->handleRequest(\LotgdRequest::_i());
- Replace
$method = $entity->getId() ? 'merge' : 'persist';
and\Doctrine::{$method}($entity);
for\Doctrine::persist($entity);
- No need check if is a new or update.
- Add
\Doctrine::clear();
after blockif ($form->isSubmitted() && $form->isValid()) { /* ... */ }
- This is important for avoid Doctrine save a invalid form.
- Delete
- For work with LoTGD Kernel need make this changes:
- Potential BC Remove composer package
laminas/laminas-mail
useLotgdKernel::get('lotgd.core.mailer')
(Symfony Mailer) - config/autoload/global/advertising-lotgd-core.php delete, use
config/packages/lotgd_core_advertising.yaml
for config Adsense
- Upgrade/Install for version 4.9.0 and up
- First, upload files to your server (production compilation):
- Second, empty cache:
var/
delete this folder (or use command in consolephp bin/console cache:clear
).- From version 4.9.0 use Symfony Kernel, so work like Symfony Framework.
storage/cache/*
can empty with console comandphp bin/lotgd storage:cache_clear
- Not delete
.gitkeep
files. Remember to keep the main structure of the folderstorage/cache/
- It is highly recommended to use the command
php bin/lotgd storage:cache_clear
instead delete folder. - Note: if fail when run console command, manual delete:
storage/cache/service-manager.config.php
- Not delete
- Third, read info in
storage/log/tracy/*
files, and see the problem. - If you can't solve the problem go to: Repository issues
- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
- Migrated Laminas Cache to Symfony Cache.
- Deleted usage of
LotgdCache::
that not have used.
- Deleted usage of
- Migrated Jaxon Factory to Jaxon LoTGD Kernel
- Now can get a instance of Jaxon with
LotgdKernel::get('lotgd.core.jaxon')
- Now can get a instance of Jaxon with
- Migrated Factories to LoTGD Kernel Services
- Note: For get use
LotgdKernel::get('Laminas\View\Helper\HeadLink')
for example Laminas\View\Helper\HeadLink
Laminas\View\Helper\HeadMeta
Laminas\View\Helper\HeadScript
Laminas\View\Helper\HeadStyle
Laminas\View\Helper\HeadTitle
Laminas\View\Helper\InlineScript
- Note: For get use
- Migrated LoTGD Install factory to LoTGD Install Kernel service
- Migrated Lotgd\Core\Lib\Settings factory to LoTGD Kernel service
- Migrated Lotgd\Core\Output\Format factory to LoTGD Kernel service
- Migrated Lotgd\Core\Output\Censor factory to LoTGD Kernel service
- Migrated Lotgd\Core\Pvp\Listing factory to LoTGD Kernel service
- Migrated Lotgd\Core\Output\Commentary factory to LoTGD Kernel service
- Migrated Lotgd\Core\Navigation\AccessKeys factory to LoTGD Kernel service
- Migrated Lotgd\Core\Character\Stats factory to LoTGD Kernel service
- Traits:
src/core/Pattern/Container.php
new functions:getKernel()
get the new LoTGD KernelgetService(string $name)
get a service from LoTGD Kernel
- src/functions.php
- This file contain functions that are in
lib/
dir - This file is autoload by
composer
- Functions migrated:
e_rand
r_rand
is_email
createstring
bell_rand
list_files
_curl
_sock
pullurl
safeescape
nltoappon
- This file contain functions that are in
- src/core/Pattern/Container.php marked deprecated functions
setContainer(ContainerInterface $container)
getContainer($name = null)
Laminas Service Manager
is marked as deprecated, all factories are moved to LoTGD Kernel- Avoid use
Laminas Service Manager
and use LoTGD Kernel
- public/create.php Fixed error in creation of forgot password url
- themes/layout.html.twig and themes/layout/header.html.twig use
uncolorize
filter to sanitize title. (This avoid show color codes as plain text)
- Potential BC: Remove component
Lotgd\Core\Component\Filesystem.php
useSymfony Filesystem
direct - Potential BC: Remove factory of
Lotgd\Core\Jaxon
useLotgdKernel::get('lotgd.core.jaxon')
- Potential BC: Remove factory of
Lotgd\Core\Character\Stats
useLotgdKernel::get('Lotgd\Core\Character\Stats')
- Remove factory
Laminas\View\Helper\BasePath
no need. - Remove factory
Lotgd\Core\Lib\Settings
use service instead. Example:LotgdKernel::get('Lotgd\Core\Lib\Settings')
- Remove factory
Lotgd\Core\Output\Format
use service instead. Example:LotgdKernel::get('Lotgd\Core\Output\Format')
- Remove factory
Lotgd\Core\Output\Censor
use service instead. Example:LotgdKernel::get('Lotgd\Core\Output\Censor')
- Remove factory
Lotgd\Core\Pvp\Listing
use service instead. Example:LotgdKernel::get('Lotgd\Core\Pvp\Listing')
- Remove factory
Lotgd\Core\Output\Commentary
use service instead. Example:LotgdKernel::get('Lotgd\Core\Output\Commentary')
- Remove factory
Lotgd\Core\Navigation\AccessKeys
use service instead. Example:LotgdKernel::get('Lotgd\Core\Navigation\AccessKeys')
- Remove factories for
Laminas View Helper
, use service instead. Example:LotgdKernel::get('Laminas\View\Helper\HeadLink')
Laminas\View\Helper\HeadLink
Laminas\View\Helper\HeadMeta
Laminas\View\Helper\HeadScript
Laminas\View\Helper\HeadStyle
Laminas\View\Helper\HeadTitle
Laminas\View\Helper\InlineScript
- src/core/Output/Collector.php Delete deprecated class (file) and all functions
set_block_new_output($block)
get_block_new_output()
get_colormap_escaped()
get_colormap_escaped_array()
get_colormap()
rawoutput($indata)
get_output()
get_rawoutput()
debug($text, $force)
appoencode(string $data)
- src/core/Pattern/Output.php delete deprecated function
getOutput()
- src/core/Http.php remove deprecated class file (and factory).
- Removed some config files
- Note: this files not are in use by LoTGD Core.
- BC only if you update this global files
config/autoload/global/delegators-lotgd-core.php
config/autoload/global/form-lotgd-core.php
config/autoload/global/hydrators-lotgd-core.php
config/autoload/global/initializers-lotgd-core.php
config/autoload/global/input-filter-lotgd-core.php
config/autoload/global/invokables-lotgd-core.php
config/autoload/global/jaxon-lotgd-core.php
Jaxon are migrated to Kernelconfig/autoload/global/services-lotgd-core.php
config/autoload/global/session-lotgd-core.php
Session are migrated to Kernelconfig/autoload/global/shared-lotgd-core.php
- lib/e_rand.php delete file.
- Deleted functions:
make_seed()
- Deleted functions:
- lib/is_email.php delete file.
- lib/arraytourl.php delete file.
- Deleted functions:
arraytourl()
urltoarray()
- Deleted functions:
- lib/arrayutil.php delete file.
- lib/bell_rand.php delete file.
- lib/listfiles.php delete file.
- lib/pullurl.php delete file.
- lib/safeescape.php delete file.
- lib/nltoappon.php delete file.
- lib/output.php delete file.
- Delete obsolete functions:
rawoutput($indata)
set_block_new_output($block)
debug()
appoencode()
- Delete obsolete functions:
- Upgrade/Install for version 4.9.0 and up
- First, upload files to your server (production compilation):
- Second, empty cache:
var/
delete this folder (or use comand in consolephp bin/console cache:clear
).- From version 4.9.0 use Symfony Kernel, so work like Symfony Framework.
storage/cache/*
can empty with console comandphp bin/lotgd storage:cache_clear
- Not delete
.gitkeep
files. Remember to keep the main structure of the folderstorage/cache/
- It is highly recommended to use the command
php bin/lotgd storage:cache_clear
instead delete folder.
- Not delete
- Third, read info in
storage/log/tracy/*
files, and see the problem. - If you can't solve the problem go to: Repository issues
- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
- Migrating Laminas Cache to Symfony Cache.
- Some parts of LoTGD Core use Symfony Cache instead of Laminas Cache.
lib/installer/installer_stage_default.php
lib/modules/settings.php
lib/newday/logoutaccts.php
lib/creaturefuntions.php
functionlotgd_generate_creature_levels()
lib/experience.php
functionexp_for_next_level()
lib/pageparts.php
functioncharstats()
public/moderate.php
src/core/Form/Type/LotgdThemeType.php
src/core/Lib/Settings.php
src/core/Output/Commentary.php
- Can create your pools or use default app cache.
LotgdKernel::get('cache.app')
for use default cache app
- Example for create new cache pools:
framework: cache: # Namespaced pools use the above "app" backend by default pools: core.settings.cache: adapter: cache.app # Use default configuration public: true # This is necesary for get your cache from service container. Example: LotgdKernel::get('core.settings.app')
- Some parts of LoTGD Core use Symfony Cache instead of Laminas Cache.
- Migrated Laminas Http to Symfony HttpFoundation
LotgdRequest::
andLotgdResponse::
static class now use Symfony HttpFoundation- May be cause BC if you use more options than LoTGD Core used.
- May be not need update nothing.
- Migrated Laminas Session to Symfony Session
LotgdSession::
static class now use Symfony Session- Can get a object session with
Lotgdkernel::get('session')
- Migrated Lotgd\Core\Component\FlashMessages to Symfony Session FlashBag
LotgdFlashMessages::
static class now useLotgdKernel::get('session')->getFlashBag()
- LotgdNavigation:: static class
- Added
pagination
function, to create a pagination navs.
- Added
- Laminas Cache is deprecated since 4.9.0
Cache\Core\Lotgd
use$cache = \LotgdKernel::get('cache.app');
instead, for default app cache.- For create your own cache, can add new pools in
config/packages/cache.yaml
. See in CHANGES section - Fixed class src/core/Fixed/Cache.php is deprecated since 4.9.0
- public/common_common.php No recreate ".env.local.php" file if exist
- public/globaluserfunctions.php Fixed error, now use
LotgdNavigation::
instead ofLotgdRequest::
- Remove dependency of Laminas Http from
composer.json
- Remove dependency of Laminas Session from
composer.json
- Remove dependency of DoctrineOrmModule from
composer.json
- lib/modules.php Remove function
module_delete_oldvalues
not in use - src/core/Component/FlashMessages.php and src/core/Factory/Component/FlashMessages.php
- Can use
LotgdKernel::get('session')->getFlashBag()
orLotgdFlashMessages::
static class (recomended static class).
- Can use
- BC src/core/Pattern/FlashMessenger.php if you use this file, remove it, and use
LotgdFlashMessages::
static class - src/core/Output/Collector.php deleted deprecated functions:
sustitute(string $out)
- Doctrine Factory Remove Doctrine Orm Module factory, use
$doctrine = LotgdKernel::get('doctrine.orm.entity_manager')
orDoctrine::
static class
- Upgrade/Install problems
- If you have some problems when install or upgrade this version:
- First try to empty cache:
var/
delete this folder.storage/cache/*
can empty with console comandphp bin/lotgd storage:cache_clear
- Second read info in
storage/log/tracy/*
files, and see the problem - If you can resolver problem go to: https://github.com/idmarinas/lotgd-game/issues
- First try to empty cache:
- If you have some problems when install or upgrade this version:
- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
- Forms Replace all Laminas Form for Symfony Form
- Example: Configuration, cronjob... (all forms in data/form/core)
- Translator system
- Migrated from Laminas i18n to Symfony Translation
- All Core translator files are renamed to
domain+intl-icu.locale.loader
- New format for translation files (name only)
domain.locale.loader
Normal translation file namedomain+intl-icu.locale.loader
Translation file name with icu support- Notes:
- domain: Domains are a way to organize messages into groups.
- locale: The locale that the translations are for.
- loader: How Symfony should load and parse the file.
- Is a Symfony Translator that support all options of Symfony Framework.
- Can organize your translation files in folders:
- When Symfony Translation load all translations resource, merge all content in same domain for each locale like this:
new MessageCatalogue('en', [ 'domain' => [ 'key' => 'translation text' ] ])
- So if have multile files with same domain, for example:
translations/en/navigation/bank.en.yaml
translations/en/page/bank.en.yaml
- Symfony Translation merge all in same domain and if any key are repeat last key added replace first key.
- When Symfony Translation load all translations resource, merge all content in same domain for each locale like this:
- Doctrine ORM
- Doctrine are now configure with LoTGD Kernel, see notes in FEATURES -> LoTGD Kernel
- LoTGD Kernel Added a LoTGD Kernel (Based in Symfony Framework) to Core Game.
- This is the first iteration for migrate to Symfony Framwork app.
- For now is used for:
- Doctrine, if you need use Doctrine ORM use
LotgdKernel::get('doctrine.orm.entity_manager')
orLotgdKernel::getContainer()->get('doctrine.orm.entity_manager')
- Note: static class
Doctrine::
use new service of kernel, if you use this static class, not need change nothing. - Note 2: All core game use new kernel services for use Doctrine (or 99.99%)
- Note: static class
- Translation system Translation are moved to Symfony Translation, if you want use this new system use
LotgdKernel.get('translation')
- Note: static class
LotgdTranslator::
use old Laminas translation.
- Note: static class
- Doctrine, if you need use Doctrine ORM use
- For now is used for:
- Laminas Service Manager are deprecated, and all factories will be moved to LoTGD Kernel in future versions.
- This is the first iteration for migrate to Symfony Framwork app.
- Doctrine Entity Manager
- Added to EntityManager class this functions:
hydrateEntity(array $data, object $entity)
extractEntity(object|array $object)
- Can use with static class
Doctrine::hydrateEntity($data, $entity)
andDoctrine::extractEntity($entity)
- Added to EntityManager class this functions:
- Laminas Form is deprecated since 4.8.0
- Laminas translation is deprecated since 4.8.0
- src/core/Translator/Translator.php
- src/core/Fixed/Translator.php
- Usage of
LotgdTranslator::
is obsolete since 4.8.0- Use
$translator = LotgdKernel::getContainer()->get("translator")
- Use
- Doctrine factory of Laminas Usage of
LotgdLocator::get(\Lotgd\Core\Db\Doctrine::class)
is deprecated- Use
LotgdKernel::getContainer()->get('doctrine')
orLotgdKernel::getContainer()->get('doctrine.orm.entity_manager')
- Note:
Doctrine::
static class use newLotgdKernel::getContainer()->get('doctrine.orm.entity_manager')
. Have same configuration.
- Use
- Nothing
- lib/jaxon.php Removed this file, use factory to get a instance
\LotgdLocator::get(Lotgd\Core\Jaxon::class);
- Functions
- lib/pageparts.php This functions not are use for Core Game and Core Modules
page_header()
useLotgdResponse::pageStart()
page_footer()
useLotgdResponse::pageEnd()
popup_header
andpopup_footer()
Use Jaxon instead
- lib/pageparts.php This functions not are use for Core Game and Core Modules
- public/common_jaxon.php Removed some required files:
- lib/output.php Not need this in Jaxon petitions
- lib/redirect.php Not need this redirect, Jaxon have a redirect method.
- lib/translator.php Not need old translation system in Jaxon use new translation system.
- src/core/Pattern/Repository.php Remove obsolete trait/pattern, use
Lotgd\Core\Pattern\Doctrine
instead - src/core/Pattern/Theme.php Remove obsolete trait/pattern, use
Lotgd\Core\Pattern\Template
instead
- IMPORTANT when upgrade to this version
- Game try to create file
.env.local.php
if not find, you need create by yourself if game cant create file. - For this version to work properly you must upload the file
.env.local.php.dummy
in the same directory and rename it to.env.local.php
- You must also configure all the keys in the file with the information from the Database so that you can configure the Doctrine from the Kernel correctly (Use the
config/autoload/local/dbconnect.php
file to complete the data in.env.local.php
) - This is necessary for the kernel to load correctly.
- You must also configure all the keys in the file with the information from the Database so that you can configure the Doctrine from the Kernel correctly (Use the
- Game try to create file
- Added lazy services.
- These services are not always necessary (some are deprecated), so they are only created the first time they are needed.
DoctrineModule\Service\CliFactory
Lotgd\Core\EventManager\Event
Lotgd\Core\Doctrine\Extension\TablePrefix
Lotgd\Core\Db\Doctrine
Doctrine\ORM\EntityManager
- These services are not always necessary (some are deprecated), so they are only created the first time they are needed.
- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
- Console commands
- storage:cache_clear now not remove cache of Doctrine proxy in production environment.
- Nothing
- src/core/Output/Collector.php this Class are deprecated (and all functions)
- lib/output.php
appoencode
useLotgdFormat::colorize($string)
instead
- Nothing
- lib/class/static.phnp
- Remove static class
LotgdForm
use factory to get this$formFactory = \LotgdLocator::get('Lotgd\Core\SymfonyForm');
- Remove static class
LotgdHttp
useLotgdRequest
instead.
- Remove static class
- src/core/Template/Template.php Remove function
renderTheme()
- src/core/Fixed/SymfonyForm.php Removed file
- src/core/Fixed/Http.php Removed file
- lib/output.php
- Function
output
- Function
output_notl
- Function
- public/ajaxcommentary.php Removed file, not in use
- public/ajaxdatacache.php Removed file, now use Jaxon to proccess cache deletion.
- Added lazy services.
- These services are not always necessary (some are deprecated), so they are only created the first time they are needed.
Lotgd\Core\Http
Lotgd\Core\Output\Collector
- These services are not always necessary (some are deprecated), so they are only created the first time they are needed.
- Removed/Replace usage of some obsolete functions in files.
- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
- Templates
templates/lotgd/pages
pages of LoTGD use blocks/macros template to reduce number of templates and complexity.templates/lotgd/form
remove reference to Zend and use Laminas.
- Twig System
- Rename extension file
src/core/Twig/Extension/Head.php
tosrc/core/Twig/Extension/Helpers.php
- New Twig functions
base_path(string|null)
Returns site's base path, or file with base path prepended
- Rename extension file
- New LoTGD Console
- New feature, LoTGD console, work similar to Symfony Framework console, (use Symfony console component)
- Commands that have:
about
see a information of Lotgd applicationstorage:cache_stats
Show stats of storage cache folder.storage:cache_clear
Clear storage cache and keep the default cache structure.- Note: for custom cache folders, add file
.gitkeep
and this command not remove your folders for cache.
- Note: for custom cache folders, add file
- How use:
- In terminal/console use
php bin/console
and this see information and list of commands.
- In terminal/console use
- You can add your custom commands, only need add class name to
config/autoload/local/console-lotgd-core.php
- Can see example in
config/autoload/global/console-lotgd-core.php
- Can see example in
- Twig template system
- Global params, now can add global params to Twig templated, this params are available for all templates.
//-- config/autoload/local/twig-lotgd-local.php return [ 'twig_global_params' => [ 'your' => 'param value' ], ]
- Default globals:
enviroment
register when Template system is created (in factory). Values:dev
orprod
userPre
register when call\LotgdResponse::pageStart();
sessionPre
register when call\LotgdResponse::pageStart();
user
register when instantiate Template system (__construct()
) and call\LotgdTheme::render()
,LotgdTheme::renderBlock()
,\LotgdTheme::load()
and\LotgdResponse::pageEnd();
session
register when instantiate Template system (__construct()
) and call\LotgdTheme::render()
,LotgdTheme::renderBlock()
,\LotgdTheme::load()
and\LotgdResponse::pageEnd();
- Default globals:
- Global params, now can add global params to Twig templated, this params are available for all templates.
- Simple Advertising Google AdSense
- Now can show Ads of Google AdSense in LoTGD. Using Twig function
google_ad('ad_header')
- Can see configuration in
config/autoload/global/advertising-lotgd-core.php
- scr/core/Template/Template.php
renderTheme()
is obsolete.- Use
render()
with {theme} pattern to render a theme template.- Example:
\LotgdTheme::render("{theme}/path/to/template.html.twig");
- This search template
@themeJade/path/to/template.html.twig
- Where
@themeJade
is the actual theme actived.
- Where
- This search template
- Example:
- Use
renderLayout()
is obsolete- Use
render()
with@layout
namespace- Example:
\LotgdTheme::render("@layout/path/to/template.html.twig");
- Example:
- Use
- Twig functions
include_module
use new Template System with@module
namespaceinclude_theme
use new Template System for themes.include_layout
use pattern{theme}
. Example:{theme}/path/to/template.html.twig
- public/shades.php Fixed error with link to Faq.
- templates/lotgd/_blocks/_mail.html.twig Fixed error with To field select (Here add to inline script not is valid, this show in Jaxon script)
- templates/lotgd/pages/list.html.twig Fixed error, templates not get
userPost
value, only user, that is the actual value. - templates/lotgd/_blocks/_commentary.html.twig Fixed error, where it showed the mark that all comments were recent
- Doctrine Fixed occasional error with the datetime 0000-00-00 00:00:00, being an invalid date, when saving it in the database used -0001-11-30 00:00:00
- lib/spell.php This file is not in use, and not is used. Use new Censor system.
$censor = \LotgdLocator::get(\Lotgd\Core\Output\Censor::class); $censor->filter(string)
- Replace Jobby for Cron/Cron (as it seems that Jobby does not work in PHP 7.3)
⚠️ PHP LoTGD Core now need min PHP version 7.3- Added lazy services.
- These services are not always necessary, so they are only created the first time they are needed.
Laminas\View\Helper\BasePath
- These services are not always necessary, so they are only created the first time they are needed.
- Doctrine Extension Migrating
gedmo/doctrine-extensions
from 2.4.* to version 3.0.* - composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
- Templates system
templates/module/
are moved totemplates_modules/
folder- No BC, all work as before. But from now the templates of the modules will go in this new folder.
- Core templates are moved to
templates_core/
folder. These templates are not intended to be customizable - New config option
twig_templates_paths
- Now can add your templates to Twig, and use namespace.
- If not want use namespace use a empty value.
'twig_templates_paths' => [ 'path/to/templates' => 'namespace', //-- If not want namespace 'path/to/templates' => '', ],
- When you try to render a template can use this keys patterns:
{theme}
this key is replace with actual theme namespace. Example:{theme}/path/to/template.html.twig
to@themeJade/path/to/template.html.twig
- New Page generation
- New system to generate the page.
- Functions
page_header()
andpage_footer()
are obsoletes in 4.5.0. Deleted in version 5.0.0 - New system use:
LotgdResponse::pageStart(?string $title = null, ?array $parameters = [], string $textDomain = Translator::TEXT_DOMAIN_DEFAULT, ?string $locale = null)
do same aspage_header()
- If only want change title of page not call other time this function use
LotgdResponse::pageTitle(string $message, ?array $parameters = [], string $textDomain = Translator::TEXT_DOMAIN_DEFAULT, ?string $locale = null)
- If you call
LotgdResponse::pageStart
you activate other time the hooks and all code inLotgdResponse::pageStart
other time, this slower the performance of page.
- If only want change title of page not call other time this function use
LotgdResponse::pageEnd(boolean $saveuser)
do same aspage_footer()
LotgdResponse::pageAddContent($content)
this replacerawoutput()
, add more content to page.LotgdResponse::pageSetContent($content)
this replace all previous content with new content.
- Examples: can see
public/home.php
and other page to know how use this new system.
- Functions
- New system to generate the page.
-
Twig Template System
- Added new core Extension:
Head
- This extension added new funtions to Twig system:
- This new functions are based in helpers of Laminas View, can see documentation for now how work.
head_link()
<link>
element: stylesheets, feeds, favicons, trackbacks, and more.{% do head_script().appendStylesheet('/custom/module.css') %}
head_meta()
<meta>
element is used to provide meta information about your HTML document{% do head_meta().appendHttpEquiv('Cache-Control', 'no-cache') %}
head_script()
<script>
element is used to either provide inline client-side scripting elements or link to a remote resource.- It is a simple and less complex method of adding additional code, when it is needed in a particular template.
- Add files:
{% do head_script().appendFile('path/to/file.js') %}
- Capture script:
{% do head_script().captureStart() %} var action = '/'; $('foo_form').action = action; {% do head_script().captureEnd() %}
- It is a simple and less complex method of adding additional code, when it is needed in a particular template.
head_style()
<style>
element is used to include CSS stylesheets inline- Add content
{% set finalStyles = 'styles code' %} {% do head_style().appendStyle(finalStyles) %}
- Capture content
{% do head_style().captureStart() %} body { background-color: 'black'; } {% do head_style().captureEnd() %}
head_title()
<title>
element is used to provide a title for an HTML document{% do head_title('Change to new title', 'SET') %} {% do head_title('Append title', 'APPEND') %} {% do head_title('Prepend title', 'PREPEND') %}
- By default always append title.
inline_script()
work likehead_meta()
but add content before tag</body>
- Add files:
{% do inline_script().appendFile('path/to/file.js') %}
- Capture script:
{% do inline_script().captureStart() %} var action = '/'; $('foo_form').action = action; {% do inline_script().captureEnd() %}
- This extension added new funtions to Twig system:
- Allow to remove or override some extension of core.
- For this only need added a key for a extension.
- Extension with a key name, can override or remove.
'twig_extensions' => [//-- Custom extensions for Twig Lotgd\Core\Twig\Extension\GameCore::class, // ... //-- Added in version 4.1.0 // Allows to override/remove this extensions. Lotgd\Core\Twig\Extension\Form\Form::class=> Lotgd\Core\Twig\Extension\Form\Form::class, Lotgd\Core\Twig\Extension\Form\FormElement::class=> '', //-- Deleted extension Lotgd\Core\Twig\Extension\Form\FormElementError::class=> Lotgd\Local\Twig\Extension\Custom\FormElementError::class, //-- Override extension //-- ],
- Added new core Extension:
-
Webpack Encore
encore_entry_script_tags()
andencore_entry_link_tags()
now need pass second argument (package).-
encore_entry_script_tags(string $entryName, string $packageName = null, string $entrypointName = '_default')
-
encore_entry_link_tags(string $entryName, string $packageName = null, string $entrypointName = '_default')
-
Example:
encore_entry_script_tags('semantic_ui', 'lotgd', 'lotgd')
encore_entry_link_tags('semantic_ui', 'lotgd', 'lotgd')
-
- Twig extension:
- Functions:
page_title()
is obsolete, useheadTitle()
added in new extension.
- Functions:
- Class
Lotgd\Core\Template\Base
are deprecated useLotgd\Core\Template\Template
instead. - lib/pageparts.php the following funtions are marked as obsoleted.
page_header()
use\LotgdResponse::pageStart(?string $title = null, ?array $parameters = [], string $textDomain = Translator::TEXT_DOMAIN_DEFAULT, ?string $locale = null)
insteadpage_footer()
use\LotgdResponse::pageEnd()
instead
- Class
Lotgd\Core\Db\Dbwrapper
are deprecated use Doctrine to create queries to Data Base
- Webpack Encore
encore_entry_script_tags()
andencore_entry_link_tags()
now do not print duplicate files.
- public/source.php This section now render with Jaxon, so, no needed this page.
- Added lazy services.
- These services are not always necessary, so they are only created the first time they are needed.
Lotgd\Core\Output\Censor
Lotgd\Core\Output\Commentary
Lotgd\Core\Pvp\Listing
- These services are not always necessary, so they are only created the first time they are needed.
- Jaxon-PHP Migrating Jaxon-Core from 2.2.* to version 3.2.*
- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
- public/forest.php deleted obsolete function, and use new translator system to translate prefix of creature.
- Moved template and translation folders to new location
data/template/
totemplates/
data/translation/
totranslations/
- Note: Both are in root directory, and are in "PLURAL"
- Webpack Encore Now Core use Symfony Webpack-Encore to build JS and CSS of game.
- In this interaction can have many namespaces to build. Encore always build "lotgd" namespace.
- Note: Can use
webpack.config.custom-example.js
to create your own namespaces for your project (if you need).
- Note: Can use
- Is a preview of new system of templates and themes of Game Core.
- Note: the intention is to make the core more flexible when creating new themes for the game and to be able to create several themes at once.
- Note: in the next version the templates and translations will be updated.
- In this interaction can have many namespaces to build. Encore always build "lotgd" namespace.
- Configuration cache Now can clear Twig template cache.
- Note: all buttons have the same effect, emptying the template cache directory.
- New Hook system
- Now use Laminas EventManager to trigger hooks. No more
modulehook
.- This method does not use the database to trigger the hooks, so the database load is lightened.
- Hook system use Laminas EventManager.
- To know all the hooks that are implemented in the game see the file src/core/Hook.php, this file contains all the hooks that are available in the game core.
- This is a first preview of new Hook System. Not all old hooks have a new version. Because in future change how create pages of game.
- Now use Laminas EventManager to trigger hooks. No more
- lib/datetime.php
reltime
useLotgdFormat::relativedate($indate, $default = 'never')
instead.
- lib/pageparts.php
popup_header
popup_footer
- Note: Use Jaxon-PHP to load modals, alerts... and a little parts of game.
- For example, if you need this functions I think is better use Jaxon-PHP for better performance.
- Class Lotgd\Core\Http are deprecated use
Lotgd\Core\Http\Request
instead. - Static class Lotgd\Core\Fixed\Http aka
LotgdHttp
are deprecated.- Use Lotgd\Core\Fixed\Request aka
LotgdRequest
instead.
- Use Lotgd\Core\Fixed\Request aka
- Static class Lotgd\Core\Fixed\SymfonyForm aka
LotgdForm
are deprecated.- Get the factory to create a Symfony Form.
LotgdLocator::get('Lotgd\Core\SymfonyForm')
- Get the factory to create a Symfony Form.
- Class Lotgd\Core\SymfonyForm are deprecated use
Lotgd\Core\Http\Request
instead. - Old Hooks system
- The old hook system for trigger hooks in game are deprecated.
- This is a
modulehook
function and associated.
- This is a
- Note: use New Hook system.
- Functions deprecated:
- lib/modules/hook.php
modulehook
module_wipehooks
module_drophook
module_addhook
module_addhook_priority
- Note: Core trigger new Hook system and them old system.
- lib/modules/hook.php
- The old hook system for trigger hooks in game are deprecated.
- src/ajax/core/Petition.php Fixed error with undefined vars.
- public/mercenarycamp.php Fixed error with: Call to a member function on array
- Forms
- data/form/core/petition/input.php Fixed error with text domain
- data/form/core/grotto/configuration/. Fixed error with range input with float values and diferent locale.
- The solution for this is added filter to input,
Laminas\Filter\ToFloat
see indata/form/core/grotto/configuration/filter/pvp.php
- The solution for this is added filter to input,
- Translations
- translations/en/grotto/configuration.yaml Fixed error, now use new folded Yaml format
- translations/en/form/grotto/configuration.yaml Fixed error, now use correct index name
- lib/forms.php Removed unused file.
- lib/sanitize.php Removed file.
- Removed functions
sanitize
use newLotgdSanitize::fullSanitize($string)
insteadnewline_sanitize
use newLotgdSanitize::newLineSanitize($string)
insteadcolor_sanitize
use newLotgdSanitize::fullSanitize($string)
insteadcomment_sanitize
has no replacement, new commentary system, sanitize comments by defaultlogdnet_sanitize
use newLotgdSanitize::logdnetSanitize($string)
insteadfull_sanitize
use newLotgdSanitize::fullSanitize($string)
insteadcmd_sanitize
use newLotgdSanitize::cmdSanitize($string)
insteadprevent_colors
use newLotgdSanitize::preventLotgdCodes($string)
insteadmodulename_sanitize
use newLotgdSanitize::moduleNameSanitize($string
) insteadstripslashes_array
has no replacementsanitize_name
use newLotgdSanitize::nameSanitize($spaceallowed, $inname)
instead.sanitize_colorname
use newLotgdSanitize::colorNameSanitize($spaceallowed, $inname, $admin)
insteadsanitize_html
use newLotgdSanitize::htmlSanitize($string)
insteadsanitize_mb
use newLotgdSanitize::mbSanitize($string)
instead
- Moved temporary this function to
lib/translator.php
, only used by this file.translator_uri
translator_page
comscroll_sanitize
- Removed functions
- Added file to check requeriments
lotgd-check-requeriments-4.2.php
- Added lazy services.
- These services are not always necessary, so they are only created the first time they are needed.
Lotgd\Core\Db\Dbwrapper
Lotgd\Core\Installer\Install
Lotgd\Core\SymfonyForm
doctrine.cli
DoctrineORMModule\CliConfigurator
InputFilterManager
FormAnnotationBuilder
FormElementManager
- These services are not always necessary, so they are only created the first time they are needed.
- Jaxon-PHP Migrating Jaxon-Core from 2.2.* to version 3.2.*
- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
-
Transfer to new Laminas/Symfony Form
- public/configuration.php Cronjob
- Toggle to use cronjob for new day.
- Create/Update a cronjob.
- public/home.php Select skin.
- public/user.php The form is separated into two: accounts and characters.
- Use Symfony Form to edit this entities.
- public/about.php The form use the new element ViewOnly to show info.
- public/configuration.php Cronjob
-
⚠️ ModulesMODULE_NAME_getmoduleinfo
- Changed the way to add the settings/prefs of a module.
- Now can use a Laminas Form.
[ 'settings' => 'Lotgd\Local\Form\ModuleName\ModuleNameSettings', 'prefs-companions' => 'Lotgd\Local\Form\ModuleName\ModuleNamePrefsCompanions', 'prefs-mounts' => 'Lotgd\Local\Form\ModuleName\ModuleNamePrefsMounts', 'prefs-creatures' => 'Lotgd\Local\Form\ModuleName\ModuleNamePrefsCreatures', 'prefs-items' => 'Lotgd\Local\Form\ModuleName\ModuleNamePrefsItems', 'prefs-city' => 'Lotgd\Local\Form\ModuleName\ModuleNamePrefsCity', 'prefs-drinks' => 'Lotgd\Local\Form\ModuleName\ModuleNamePrefsDrinks', ]
- With Laminas Form can validate/filter all inputs in form.
- Note: in a future version of LoTGD Core, the function
lotgd_showform
will be deleted (now is deprecated function).- When this function is removed all the above options will no longer work with the old method. And need use Laminas Form or Symfony Form.
- Now can use a Laminas Form.
- Changed the way to add the settings/prefs of a module.
-
⚠️ functionmodule_objpref_edit
changes its behavior:- Now return a string or Laminas Form instance.
- Now check if prefs have a Laminas Form format or array format (old).
- With the old format it issues a deprecated warning.
- Se necesita cambiar en consecuencia el código que hace uso de este resultado. Example moduless
cities
,drinks
andinventory
. Can see other examples in core gamecompanions
,creatures
Example for process from:
$form = module_objpref_edit('PREF_NAME', $module, $objectId); $params['isLaminas'] = $form instanceof Laminas\Form\Form; $params['module'] = $module; //-- And other params need if ($params['isLaminas']) { $form->setAttribute('action', 'URL_FOR_PROCESS_DATA'); $params['formTypeTab'] = $form->getOption('form_type_tab'); } if (\LotgdHttp::isPost()) { $post = \LotgdHttp::getPostAll(); if ($params['isLaminas']) { $form->setData($post); if ($form->isValid()) //-- Check if data is valid { $data = $form->getData(); process_post_save_data($data, $objectId, $module); } } else { reset($post); process_post_save_data($post, $objectId, $module); } } $params['form'] = $form; rawoutput(\LotgdTheme::renderModuleTemplate('path/to/template.twig', $params)); //-- Function to save data function process_post_save_data($data, $id, $module) { foreach ($data as $key => $val) { if (is_array($val)) //-- Check for not save an array in pref { process_post_save_data($val, $id, $module); continue; } set_module_objpref('PREF_NAME', $id, $key, $val, $module); } }
Example of template
{% translate_default_domain textDomain %} {% if isLaminas %} {% if formTypeTab %} {{ laminas_form_tab(form) }} {% else %} {{ laminas_form(form) }} {% endif %} {% else %} <form action="{{ 'runmodule.php?module=cityprefs&op=editmodulesave&cityid=' ~ cityId ~ '&mdule=' ~ module }}" method="POST" autocomplete="off"> {{ form }} </form> {% endif %}
- Twig Template
- New filters:
affirmation_negation
oryes_no
- Default function parameters:
affirmationNegation($value, $yes = 'adverb.yes', $no = 'adverb.no', $textDomain = 'app-common')
Can use a custom text, only need overwrite$yes
,$no
and$textDomain
parameters
- Default function parameters:
- New feature on functions:
navigation_pagination
- Now compatible with Jaxon-PHP
- Change link url for Jaxon function. Example:
navigation_pagination(paginator, 'JaxonLotgd.Ajax.Core.Motd.list' )
- Change link url for Jaxon function. Example:
- Now compatible with Jaxon-PHP
- New filters:
- Form system
- Laminas Form:
- New Elements:
- ViewOnly
- PetitionType
- New Elements:
- Symfony Form:
- New Types:
- BitFieldType
- ClanRankType
- CronjobListType
- DateTimeType
- Note: Only for add a transformer to avoid errors with invalid date
0000-00-00 00:00:00
- Note: Only for add a transformer to avoid errors with invalid date
- RaceType
- SpecialtyType
- New Types:
- Laminas Form:
- MOTD now use Jaxon to load data. It is not embedded in the modal.
- Petition for Help now use Jaxon to load data. It is not embedded in the modal.
- Game Mail Ye Olde Mail now use Jaxon to load data. It is not embedded in the modal.
- Nothing
- public/donators.php Now show corrects text and not key translator.
- lib/clan/applicant.php Added missing translation for navs.
- public/create.php Added missing translation for navs.
- lib/modules/objpref.php
increment_module_objpref
Fixed error that change previous value.
- File lib/data/configuration_cronjob.php Not is necesary.
- File lib/data/user_account.php Not is necesary.
- File public/motd.php Now use Jaxon to load MOTD.
- File public/petition.php Now use Jaxon to load petition for help.
- File lib/petition/petition_default.php No need now.
- File public/mail.php Now use Jaxon to load Ye Olde Mail.
- Translations yaml files, removed used arrays as multiline text. Use folded style with
>
or|
- Can find examples in files translations
- More info of YAML format in https://symfony.com/doc/4.4/components/yaml/yaml_format.html#strings
- Remove obsolete functions
- lib/modules.php
module_sem_acquire
module_sem_release
- lib/datacache.php delete file and all deprecated function.
datacache
updatedatacache
invalidatedatacache
massinvalidate
datacache_empty
datacache_clearExpired
datacache_optimize
- lib/modules.php
- Migration: Zend to Laminas migration all packages of Zend Framework to Laminas
- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
⚠️ Doctrine Now used DoctrineModule and DoctrineORMModule to configure Doctrine- Check
config/autoload/global/doctrine-lotgd-core.php
to see possible configuration - Need create configuration in
config/autoload/local/dbconnect.php
like this:
- Check
//-- DB conection
//...
return [
'lotgd_core' => [
//-- Zend DB Config
],
'doctrine' => [
'connection' => [
'orm_default' => [
'params' => [
'driver' => 'pdo_mysql', //-- In lowercase
'user' => 'user name',
'password' => ' password',
'host' => '127.0.0.1', //-- localhost
'dbname' => 'data base name',
'charset' => 'utf8',
'collate' => 'utf8_unicode_ci'
]
]
]
]
];
-
lib/saveuser.php Added option to avoid save laston when save user (used in jaxon request)
-
⚠️ Translation in entities Some database tables that have fields that are susceptible to translation can now be translated using Symfony form.- src/core/Entity/Creatures.php
- The following fields can now be translated
creaturecategory
creaturename
creaturedescription
creatureweapon
creaturelose
creaturewin
- The following fields can now be translated
- src/core/Entity/Masters.php
- The following fields can now be translated
creaturename
creatureweapon
creaturelose
creaturewin
- The following fields can now be translated
- src/core/Entity/Companions.php
- The following fields can now be translated
name
category
description
jointext
dyingtext
- The following fields can now be translated
- src/core/Entity/Armors.php
- The following fields can now be translated
name
- The following fields can now be translated
- src/core/Entity/Weapons.php
- The following fields can now be translated
name
- The following fields can now be translated
- src/core/Entity/Mounts.php
- The following fields can now be translated
mountname
mountdesc
mountcategory
newday
reacharge
partrecharge
- The following fields can now be translated
- src/core/Entity/Titles.php
- The following fields can now be translated
male
female
- The following fields can now be translated
- src/core/Entity/Creatures.php
-
THEME
- Updated Fomantic UI version: 2.8.3 => 2.8.6
- Jaxon-PHP are now in a factory, so you can customize with a config file in
config/autoload/local/*
- Can get it's factory with
\LotgdLocator::get(Lotgd\Core\Jaxon::class);
- Can get it's factory with
- Form System improved:
- Now can use Symfony Form and Zend Form (Laminas Form in 4.3.0 IDMarinas Edition)
- Lotgd Core use Symfony Forms only for Update/Created entities
- Zend Form use for configuration of game, and for free forms.
- Note: Zend forms may be removed in the future and only Symfony Forms used, but it is not planned for now.
- Translations yaml files Deprecated used arrays as multiline text. Can use folded style with
>
or|
- Can find examples in file translation
- In next version
4.3.0
all arrays are formated with this formatkey1.key1.0
,key1.key1.1
,key1.key1.2
- More info in https://symfony.com/doc/4.4/components/yaml/yaml_format.html#strings
- lib/modules/modules/modulestatus.php Fixed error, now when file exist continue with script.
- public/motd.php Fixed error when there is no motd in the database
- public/graveyard.php Fixed errors
- Now show navs when finish battle
- Hide menu of search when not have soulpoints/hitpoints
- src/core/EntityRepository/ArmorRepository.php and src/core/EntityRepository/WeaponsRepository.php
- Fixed error with get max level of armor/weapon to show (Always get it max level) according to DragonKills of character.
- This is in shop of armor and weapons
- Fixed error with get max level of armor/weapon to show (Always get it max level) according to DragonKills of character.
- Fixed error in new installation
- Now save correct data when data is an array.
- src/core/Installer/data/install/companions.json
- src/core/Installer/data/install/mounts.json
- Now show all modules that are uninstalled in clean install.
- Now save correct data when data is an array.
- Fixed error when need set race and not are races installed.
- src/core/Entity/Characters.php Fixed error, with data returned
- public/forest.php Fixed: use correct text domain for navigation
- lib/newday/dragonpointspend.php, lib/newday/setrace.php
- Fixed correct templates and now show correct info.
- public/dragon.php Fixed error, now can progress when kill the Dragon.
- Nothing
⚠️ PHP LoTGD Core now need min PHP version 7.2- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
- Replace plugin
uglifyjs-webpack-plugin
forterser-webpack-plugin
- Replace plugin
- Moved some folders of
data/
tostorage/
data/cache/*
=>storage/cache/*
data/log/*
=>storage/log/*
data/logd_snapshots/*
=>storage/logd_snapshots/*
- Commentary table new field:
comment_raw
Save raw comment without filters
- Translation domain for some pages:
- Armor editor:
page-armoreditor
togrotto-armoreditor
- Character backup:
page-characterbackup
togrotto-characterbackup
- Companions:
page-companions
togrotto-companions
- Configuration:
page-configuration
togrotto-configuration
- Creatures:
page-creatures
togrotto-creatures
- Debug:
page-debug
togrotto-debug
- Game log:
page-gamelog
togrotto-gamelog
- Global user functions:
globaluserfunctions
togrotto-globaluserfunctions
- Masters:
page-masters
togrotto-masters
- Moderate:
page-moderate
togrotto-moderate
- Modules:
page-modules
togrotto-modules
- Mounts:
page-mounts
togrotto-mounts
- Paylog:
page-paylog
togrotto-paylog
- Rawsql:
page-rawsql
togrotto-rawsql
- Referers:
page-referers
togrotto-referers
- Stats:
page-stats
togrotto-stats
- Superuser:
page-superuser
togrotto-superuser
- Title edit:
page-titleedit
togrotto-titleedit
- User:
page-user
togrotto-user
- View petition:
page-viewpetition
togrotto-viewpetition
- Weapon editor:
page-weaponeditor
togrotto-weaponeditor
- Note: all this pages is a Grotto section.
- Armor editor:
- Change in core cache system:
- Now use Cache Abstract Factory (Zend-Cache) to load all caches (you can create your own caches)
- Delete Lotgd Cache class
Lotgd\Core\Lib\Cache
andLotgd\Core\Factory\Lib\Cache
- Cache not is optional, always use when invoke functions of cache.
- Added a static class for cache
LotgdCache
- public/bank.php Use
{ownerName}
for name of Banker name ⚠️ Changed Form system- This new version brings a new way of displaying forms.
- The Zend\Form and Twig templates components are now used to display the forms.
- The old system will continue to work for the time being. Until the migration of all forms to the new system is completed.
- The new system uses the arrays to generate the forms, similar to the old form but using the Zend\Form structure.
- An example can be found in the basic game configuration form. It has the file with all the elements of the form and another one with the filters.
- The filters for all the inputs is a new feature. To know more you can see the Zend\Form documentation.
- Game use a zend (form/input-filter) abstract factory to load all forms and input-filters.
- You just need to follow the example in the following files. But remember to create a different file to add your forms and input-filter in the folder
config/autoload/local
config/autoload/global/form-lotgd-core.php
This file contains the formsconfig/autoload/global/input-filter-lotgd-core.php
In this file are saved the input-filters
- THEME
- Updated Fomantic UI version: 2.7.8 => 2.8.3
- Updated SweetAlert 2 version: ^8.18.0 => ^9.*
- lib/configuration/cache.php Added compatibility with multi-cache. Can optimize multiple caches.
- lib/datacache.php deprecated all functions. Use
LotgdCache
static class for cache functions - lib/showform.php deprecated all functions. Use new form system Zend Form or Symfony Form
lib/checkban.php
Fixed "error" now use Doctrine to access DBpublic/rawsql.php
Fixed error, now show results of SQL query.- Global user functions, fixed error with domain for translation
globaluserfunctions
=>grotto-globaluserfunctions
data/translation/en/partial/taunt.yaml
Fixed error with name of var in taunt number 25 and fixed error in count.data/translation/en/app/mail.yaml
Fixed error with name of var.
- Removed obsoleted functions from files that used it, including the datacache functions.
- Removed files:
lib/censor.php
use new censor system$censor = \LotgdLocator::get(\Lotgd\Core\Output\Censor::class); $censor->filter(string)
lib/commentary.php
use new commentary systemlib/http.php
lib/nav.php
lib/superusernav.php
lib/tabledescriptor.php
lib/villagenav.php
lib/errorhandler.php
Now LoTGD have a new way to register errors and exceptions with Tracy Debuggerlib/show_backtrace.php
lib/output_array.php
This file was not being usedlib/stripslashes_deep.php
This file was not being used
- Removed vars from common.php:
$logd_version
,$copyright
and$license
use:- Public display version:
Lotgd\Core\Application::VERSION
- Identify numeric version:
Lotgd\Core\Application::VERSION_NUMBER
- Copyright text:
Lotgd\Core\Application::COPYRIGHT
- License text:
Lotgd\Core\Application::LICENSE
- Public display version:
- Removed functions from:
- File:
lib/playerfunctions.php
is_player_online()
mass_is_player_online()
get_player_dragonkillmod()
get_player_info()
- File:
- Removed obsoleted functions from
src/core/Output/Collector.php
:output()
output_notl()
- Note: Use new translations system and template system.
- Removed Settings extended from core:
- Files/Classes
Lotgd\Entity\SettingsExtended
andLotgd\Core\Factory\Lib\SettingsExtended
- Note: This configuration was not being used
- Files/Classes
- Removed obsolete function
each()
PHP 7.2.0 from some files.lib/translator.php
andlib/showform.php
For now these files retain the function as they will be deleted in a future version
- Twig template:
- Removed obsolete filter
sustitute
- Removed obsolete filter
nltoappon
use Twig filternl2br
- Removed obsolete filter
- Optimization Many files
.php
have had a slight optimization of code using CS Fixer. - composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies
⚠️ Changed Structure of files for web- Most of the Web files have been reorganized.
- Some files/folders are moved to
public/
folder- Primary files like:
about.php
,accounts.php
,armor.php
,create.php
... (all .php files in root). - Folder
images/
- Folder
resources/
is renamed tojs/
andccs/
- Folder
themes/
- Primary files like:
- Moved folder
cache
todata/cache
- Moved folder
templates
todata/template
- Moved folder
crawl
todata/cache/crawl
This folder is where the advertising system keeps a cached copy. - Moved folder
logd_snapshots
todata/logd_snapshots
This folder is where the copies of the deleted files are stored, so that they can be restored.
- Some files/folders are moved to
- Most of the Web files have been reorganized.
⚠️ Changed Translation system- Remplaced old system of translation for new system. About this new system:
- Used a custom Translator based in
Zend\I18n\Translator\Translator
- This new system not used Data Base to store translations.
- Used
.yaml
files to store translations.- Files are in
data/translation/[LOCALE]/[SCOPE]/[DOMAIN].yaml
This is de main structure.- By default have six scopes:
app
This is where the translation files from main of game.module
This is where the translation files are stored in the modules.navigation
This is where the translation files from the navigation menu are stored.page
This is where the translation files from the main pages are stored.partial
This is where the translation files from partials (other text).popup
This is where the translation files from popup text.
- By default have six scopes:
- The translations are automatically loaded by the translation factory.
- It is possible to have more scopes besides
page
,module
... but remember the structure of the foldertranslation
.
- It is possible to have more scopes besides
- In addition, scopes can be nested to better organize translation files. Example:
- You can use this text domain in your module:
module-village-navigation
, which would be equivalent to the filedata/translation/[LOCALE]/module/village/navigation.yaml
[LOCALE]
is the code of the language to be translated, according to the default language and the language chosen by the user.
- You can use this text domain in your module:
- Files are in
- Used a custom Translator based in
- Remplaced old system of translation for new system. About this new system:
⚠️ Changed navigation menu system- The old
addnav
and other similar functions are remplaced with new Navigation menu system.- You can add/block new navs with this functions:
LotgdNavigation::addHeader(string $header, array $options = [])
LotgdNavigation::addHeaderNotl(string $header, array $options = [])
LotgdNavigation::addNav(?string $label, ?string $link = null, array $options = [])
LotgdNavigation::addNavNotl(?string $label, ?string $link = null, array $options = [])
LotgdNavigation::addNavAllow(string $link)
This not add new nav, only allow link.LotgdNavigation::blockLink(string $link)
- With this function you can change the translation domain for the affected menus (Like
tlschema($schema = false)
)LotgdNavigation::setTextDomain(?string $domain = null)
- If you use
LotgdNavigation::setTextDomain(null)
orLotgdNavigation::setTextDomain()
reset the translation domain to the previous value.
- You can add/block new navs with this functions:
- Note: New system not allow html tags in navs name. All labels of navs are filtered to strip this.
- The old
⚠️ Changed commentary system- The old comment system has been replaced by a new one.
- The new system have new structure of table in data base.
- All old comments with are imported to new system. (May be failed)
- Before upgrade to 4.0.0 version, make a optimimization and clean your data base. Deleting very old comments.
- For show and add comments, you need this Twig functions: (Example in village.twig)
{{ commentary_block(commentary, textDomain) }}
Show comment blockcommentary
Is an array with options for commentary:- Array example of village:
[ 'section' => 'village', //-- This is name of section for comentaries 'textDomainStatus' => 'app-commentary' //-- This is optional, and only is necesary if you want change de domain for translate text of player status. Default is texDomain defined in _commentary_block_ ]
textDomain
Is the text domain for translator. In case of village ispage-village
.
- This are optional, use if need change default values:
{% commentary_limit_comments 10 %}
, Set a limits of comments per page. Default is 25{% commentary_show_pagination false %}
, Set if show pagination of comments. Default is true{% commentary_pagination_link_url 'village.php' %}
, Set the url for links of pagination. Default is$_SERVER['REQUEST_URI']
{% commentary_can_add_comments false %}
, Set if can add new comments. Default is true
⚠️ Changed death message and taunts- Removed
public/deathmessages.php
andpublic/taunts.php
. Can't edit this in data base. Now use translation system. - Can found all death and taunts messages in
translation/en/partial/deathmessage.yaml
andtranslation/en/partial/taunt.yaml
- DeathMessages
- Can separate messages by zones and can add more messages for each zone.
- All zones (except default) have a key
count
with count of messages for zone. - All languages must have the same number of messages in each zone.
- This is because when the game selects a random message, it may not exist in another language, and the translation fails.
- All zones (except default) have a key
- Default zone have only 1 message.
- Can separate messages by zones and can add more messages for each zone.
- Taunts
- Have a
count
key with a count of all taunts messages. - All languages must have the same number of taunts messages
- This is because when the game selects a random message, it may not exist in another language, and the translation fails.
- Have a
- Removed
- lib/jaxon.php Now use Semantic Modal instead of the default modal.
- public/source.php Source page not show source of file. No need when all code are public in repository in Github.
- lib/pageparts.php Alter
page_header
andpopup_header
function. New format to add title to page.page_header(?string $title = null, array $params = [], ?string $textDomain = null)
popup_header(?string $title = null, array $params = [], ?string $textDomain = null)
- Notes: You need to change all
page_header
andpopup_header
functions that content an array as the first argument. The first argument must be only a string or null.
- common.php Updated script of log http referers.
- Changes the way that static classes are used:
- lib/class/dbwrapper.php now are in src/core/Fixed/Dbwrapper.php
- lib/class/doctrine.php now are in src/core/Fixed/Doctrine.php
- lib/class/lotgdFormat.php now are in src/core/Fixed/Format.php
- lib/class/servicemanager.php now are in src/core/Fixed/Locator.php
- lib/class/template.php now are in src/core/Fixed/Theme.php
- Changes the way that static classes are used:
- src/core/Lib/Settings.php It improves the management of the settings cache.
- src/core/Factory/Lib/Doctrine.php Proxy and cache of Doctrine are located in cache dir of game
- src/core/Output/Collector.php Method
appopencode
changed and improved.- Some files have been modified to fit this
- Updated For keywords of
sustitute()
function:- Note: This function is not recommended. Because you can use the translator to do the same.
{playername}
Replaced by player's name (Without the title included){charactername}
Replaced by player's name (With the title included){playerweapon}
Replaced by the name of the player's weapon{playerarmor}
Replaced by the name of the player's armor
- Now for close color/code code you can use:
- Use it's own code with ´ before. Examples:
`4This text is dark red´4
`@This text is green´@
`cThis is a center text´c
`iThis is cursive text´i
`bThis is strong text´b
This text have a line break`n
This code not have a close format
- Use
`0
this method work with all colors (only)`4This text is dark red`0
`@This text is green`0
- The system does not autoclose the codes, so you need to close all the codes (when necessary), otherwise the result may vary.
- Use it's own code with ´ before. Examples:
- src/core/Http.php The original function is altered to change the value of some keys.
- DataBase Table
accounts
are divided, now information of character are in tablecharacters
- New namespaces for this
Lotgd\Core\Lib\Dbwrapper
changed toLotgd\Core\Db\Dbwrapper
Lotgd\Core\Lib\Doctrine
changed toLotgd\Core\Db\Doctrine
- Twig template
- The translation filter is added as an extension
- The new translation filter allows you to set a target language per template
- Syntax:
{% translate_default_domain 'scope-domain' %}
scope
is "page" or "module". You can add more. Is a folder where is domain file.domain
is a name of.yaml
file. (Avoid extension)
- Syntax:
- The new translation filter allows you to set a target language per template
- The translation filter is added as an extension
- THEME
- Semantic UI
2.4.2
is remplace with Fomantic UI2.7.4
- Fomantic UI is a fork of Semantic UI.
- Why? Because Semantic UI have a low activity, community forked the project with intention in merge with Semantic UI when project back to active again.
- Nothing changed with this.
⚠️ New structure for theme templates and changed how created new themes- All theme templates are moved to
data/template/
folder - File
jade.html
moved too. - To create new themes now you can extend original theme, and them customize templates.
- All theme templates are moved to
- Semantic UI
- New Installer system This version have a new installer of game.
⚠️ The new installation system only allows upgrading from the previous version.- You can no longer choose whether to use the cache and the cache directory during installation.
- To change this you need to do it from a local configuration file in the directory "config/autoload/local/cache.php"
An example of how to configure the cache can be found in the file "config/lotgd.config.php".
- To change this you need to do it from a local configuration file in the directory "config/autoload/local/cache.php"
- Now check if you can write to the cache directory.
- New maintenance mode
- Core game now have a way to active a maintenance mode.
- It has two modes:
- One is a warning to users that they have to disconnect
- Other mode forces the disconnection of anyone who does not have developer permission.
- In both modes it only allows those with developer permission to connect to the game.
- No problem if both modes are active.
- Are in standar configuration.
- New Component for Game
Lotgd\Core\Component\Filesystem
- This component extend component of
Symfony\Component\Filesystem\Filesystem
and add a new method:$filesystem->listDir(string $dir)
List files in directory (not recursive)
- This component extend component of
- New profanity filtering for comments and other
- Now you avoid saving the data in the database and use PHP files, in the folder
data/dictionary/{LANGUAGE_CODE}.php
.
- Now you avoid saving the data in the database and use PHP files, in the folder
- New Account Backup When delete an account now game generate a backup for this account.
- Data are saved in
data/logd_snapshots/account-[account_id]/
- Data saved by default are:
- All information of account
- Information of character
- All mails to account
- All news of account
- All comments of account
- All module_userprefs of account
- Can see Backups in Grotto -> Mechanics -> Character Backup
- Here can:
- View the list of backups
- View backup detail
- Restore a backup
- Delete a backup
- Here can:
- In order to create a backup and delete the data, is necesary that the EntityRepository of each table needs to have the following two methods:
public function backupDeleteDataFromAccount(int $accountId): array {}
public function backupGetDataFromAccount(int $accountId): int {}
- Can use hook
character-cleanup
to add new content to backupmodulehook('character-cleanup', [ 'entities' => [ //-- Delete data from DataBase of all entities here // 'Entity:Name' => Backup: true|false, 'LotgdCore:Mail' => true, 'LotgdCore:News' => true, 'LotgdCore:AccountsOutput' => false, //-- The data is not backed up, but it is deleted. 'LotgdCore:Commentary' => true, 'LotgdCore:ModuleUserprefs' => true ], 'acctid' => $accountId, 'deltype' => $type ])
Can use short name of Entity
LotgdCore:Mail
or full nameLotgd\Core\Entity\Mail
- Can use hook
character-restore
to customize how restore data of entitymodulehook('character-restore', [ 'entity' => $file['shortNameEntity'], 'proccessed' => false, ])
$file['shortNameEntity']
is the name you use in hookcharacter-cleanup
- Data are saved in
⚠️ LotGD use Twig template system- It's a system similar to MVC.
- This means that all LotGD pages use the Twig template system to show all the text, no more
output()
oroutput_notl()
functions are used to show text. - All pages have a hook called
page-[NAMEPAGE]-tpl-params
with this hook you can change/add new parameters for the templates you can use in your theme.- Example:
modulehook('page-home-tpl-params', [array $params])
- Note: This modulehook is executed just before displaying the template.
- Some pages can have this structure for hook
page-[NAMEPAGE]-[SUBNAME]-tpl-params
are pages that have a params in route. Like page "about".- Example:
modulehook('page-about-license-tpl-params', [array $params])
- Example:
- Example:
- 🌆 New ambience system This version have a new way for create ambience in villages and other zones.
- Before, the best way to create an ambience (I take the village as an example) was with a hook that received all the texts and could be customized.
- Now you can, with the new translation system, it is simpler, since you only have to change the
textDomain
and/ortextDomainNavigation
for the page.- New hook that allows to change the domain of the text in certain zones to create ambience.
- This is the hook of village
modulehook('village-text-domain', ['textDomain' => 'page-village', 'textDomainNavigation' => 'navigation-village'])
- With this you can change text in all village and navigation, for create ambience.
- You just need to copy the corresponding files and do the translation/adaptation you need.
- This files are in
data/translation/en/page/village.yaml
anddata/translation/en/navigation/village.yaml
- Example of custom translation files for the village:
data/translation/en/page/village_elf.yaml
anddata/translation/en/navigation/village_elf.yaml
- Hook return:
['textDomain' => 'page-village_elf', 'textDomainNavigation' => 'navigation-village_elf']
- Hook return:
- This is the hook of village
- New hook that allows to change the domain of the text in certain zones to create ambience.
- Zones that have this new hook are:
public/armor.php
hook ismodulehook('armor-text-domain', ['textDomain' => 'page-armor', 'textDomainNavigation' => 'navigation-armor'])
public/bank.php
hook ismodulehook('bank-text-domain', ['textDomain' => 'page-bank', 'textDomainNavigation' => 'navigation-bank'])
public/dragon.php
hook ismodulehook('dragon-text-domain', ['textDomain' => 'page-dragon', 'textDomainNavigation' => 'navigation-app'])
public/forest.php
hook ismodulehook('forest-text-domain', ['textDomain' => 'page-forest', 'textDomainNavigation' => 'navigation-forest'])
public/gardens.php
hook ismodulehook('gardens-text-domain', ['textDomain' => 'page-gardens', 'textDomainNavigation' => 'navigation-gardens'])
public/graveyard.php
hook ismodulehook('graveyard-text-domain', ['textDomain' => 'page-graveyard', 'textDomainNavigation' => 'navigation-graveyard'])
public/gypsy.php
hook ismodulehook('gypsy-text-domain', ['textDomain' => 'page-gypsy', 'textDomainNavigation' => 'navigation-gypsy'])
public/healer.php
hook ismodulehook('healer-text-domain', ['textDomain' => 'page-healer', 'textDomainNavigation' => 'navigation-healer'])
public/hof.php
hook ismodulehook('hof-text-domain', ['textDomain' => 'page-hof', 'textDomainNavigation' => 'navigation-hof'])
public/inn.php
hook ismodulehook('inn-text-domain', ['textDomain' => 'page-inn', 'textDomainNavigation' => 'navigation-inn'])
public/lodge.php
hook ismodulehook('lodge-text-domain', ['textDomain' => 'page-lodge', 'textDomainNavigation' => 'navigation-lodge'])
public/mercenarycamp.php
hook ismodulehook('mercenarycamp-text-domain', ['textDomain' => 'page-mercenarycamp', 'textDomainNavigation' => 'navigation-mercenarycamp'])
public/newday.php
hook ismodulehook('newday-text-domain', ['textDomain' => 'page-newday', 'textDomainNavigation' => 'navigation-newday'])
public/rock.php
hook ismodulehook('rock-text-domain', ['textDomain' => 'page-rock', 'textDomainNavigation' => 'navigation-rock'])
public/shades.php
hook ismodulehook('shades-text-domain', ['textDomain' => 'page-shades', 'textDomainNavigation' => 'navigation-shades'])
public/stables.php
hook ismodulehook('stables-text-domain', ['textDomain' => 'page-stables', 'textDomainNavigation' => 'navigation-stables'])
public/train.php
hook ismodulehook('train-text-domain', ['textDomain' => 'page-train', 'textDomainNavigation' => 'navigation-train'])
public/village.php
hook ismodulehook('village-text-domain', ['textDomain' => 'page-village', 'textDomainNavigation' => 'navigation-village'])
public/weapon.php
hook ismodulehook('weapon-text-domain', ['textDomain' => 'page-weapon', 'textDomainNavigation' => 'navigation-weapon'])
- New CronJob This CronJob searches all long inactive accounts and logout them.
- src/core/Template/Theme.php and src/core/Fixed/Theme.php
- Added new function
renderModuleTemplate(string $template, array $params)
With this function you can render a template of a module that does not depend on the current theme.
- Added new function
- lib/class/lotgdFormat.php Added new function:
LotgdFormat::pluralize(int $number, string $singular, string $plural)
select the plural or singular form according to the past number
- Migrating to Doctrine
- In this version game are migrating to Doctrine ORM for access to data base.
- You can still use Zend DB and its classes to access it, but it is recommended to use Doctrine, as this maintains the integrity of the database.
- As an example, some fields in the tables are of type serialized array, Doctrine serializes and deserializes these fields automatically.
- There are no plans to remove Zend DB at this time.
- Debugger Added a debugger (Tracy library) to LotGD
- Can use
Debbugger::log($string)
to log a string.- Can use to log a
Throwable
instance too.
- Can use to log a
- You can dump a var with this options:
Debugger::barDump($var, string $title)
orbarDump($var, string $title)
dump var to Debugger bar. To this option you can add a title to the dumpDebugger::dump($var)
ordump($var)
dump var in output.
- With can dump a var, and in production Debugger ignore this.
- Doctrine: can see the number and SQL queries in Tracy debugger bar.
- Can use
- Since 4.0.0 IDMarinas Edition When a module is installed, the game checks if the module requires a specific version of LoTGD.
- common.php Var:
$logd_version
,$copyright
and$license
are now DEPRECATED:- Public display version:
Lotgd\Core\Application::VERSION
- Identify numeric version:
Lotgd\Core\Application::VERSION_NUMBER
- Copyright text:
Lotgd\Core\Application::COPYRIGHT
- License text:
Lotgd\Core\Application::LICENSE
- Functions:
output()
output_notl()
- Public display version:
- lib/nav.php All functions:
blocknav()
unblocknav()
appendcount()
appendlink()
set_block_new_navs()
addnavheader()
addnav_notl()
addnav()
is_blocked()
count_viable_navs()
checknavs()
buildnavs()
private_addnav()
navcount()
clearnav()
clearoutput()
add_accesskey()
- Note: This file will be deleted in version 4.1.0
- settings_extension Some of these settings (soon all) have been transferred to the translation file
data/translations/en/app/mail.yaml
They don't need to be in the database. - lib/villagenav.php
villagenav()
useLotgdNavigation::villageNav()
- Note: This file will be deleted in version 4.1.0
- lib/superusernav.php
superusernav()
useLotgdNavigation::superuserGrottoNav()
- Note: This file will be deleted in version 4.1.0
- lib/http.php:
httpget()
useLotgdHttp::getQuery()
httpallget()
useLotgdHttp::getAllQuery()
httpset()
useLotgdHttp::setQuery()
httppost()
useLotgdHttp::getPost()
httppostisset()
useLotgdHttp::existInPost()
httppostset()
useLotgdHttp::setPost()
httpallpost()
useLotgdHttp::getPostAll()
postparse()
- lib/censor.php:
soap()
good_word_list()
nasty_word_list()
- lib/commentary: All functions, use new commentary system.
commentarylocs()
removecommentary()
restorecommentary()
commentcleanup()
addcommentary()
injectcommentary()
injectsystemcomment()
injectrawcomment()
commentdisplay()
viewcommentary()
preparecommentaryblock()
getcommentary()
preparecommentaryline()
commentaryfooter()
buildcommentarylink()
talkform()
- lib/playerfunctions.php
is_player_online()
mass_is_player_online()
get_player_dragonkillmod()
get_player_info()
- lib/tabledescriptor.php: All functions, use Doctrine Entities to sync table schema.
synctable()
table_create_from_descriptor()
table_create_descriptor()
descriptor_createsql()
descriptor_sanitize_type()
- lib/translator.php: All functions, use new translation system.
translator_setup()
translate()
sprintf_translate()
translate_inline()
translate_mail()
tl()
translate_loadnamespace()
tlbutton_push()
tlbutton_pop()
tlbutton_clear()
enable_translation()
tlschema()
translator_check_collect_texts()
- lib/sanitize.php: All functions.
sanitize($in)
useLotgdSanitize::fullSanitize($string)
newline_sanitize($in)
useLotgdSanitize::newLineSanitize($string)
color_sanitize($in)
useLotgdSanitize::fullSanitize($string)
comment_sanitize($in)
New commentary system sanitize comments by defaultlogdnet_sanitize($in)
useLotgdSanitize::logdnetSanitize($string)
full_sanitize($in)
useLotgdSanitize::fullSanitize($string)
cmd_sanitize($in)
useLotgdSanitize::cmdSanitize($string)
comscroll_sanitize($in)
prevent_colors($in)
useLotgdSanitize::preventLotgdCodes($string)
translator_uri($in)
translator_page($in)
modulename_sanitize($in)
useLotgdSanitize::moduleNameSanitize($string)
stripslashes_array($in)
sanitize_name($spaceallowed, $inname)
useLotgdSanitize::nameSanitize($spaceallowed, $inname)
sanitize_colorname($spaceallowed, $inname, $admin = false)
useLotgdSanitize::colorNameSanitize($spaceallowed, $inname, $admin = false)
sanitize_html($in)
useLotgdSanitize::htmlSanitize($string)
sanitize_mb($in)
useLotgdSanitize::mbSanitize($string)
- src/core/Output/Collector.php: Use new translations system and template system.
output()
output_notl()
- Twig Template System
- Filters
sustitute
use new template system to simulate this.nltoappon
use Twig filternl2br
- Filters
- Folder name
Lotgd\Core\Patern\Container
toLotgd\Core\Pattern\Container
I found a error in name of folder 😆 - lib/class/dbwrapper.php
- Fixed error, not passed param $prefixed
- Only one instance of
Zend\Paginator\Paginator
can be passed
- lib/configuration/configuration_data.php Fixed error with data
- lib/data/configuration_data.php Deleted unused data
- lib/nav.php Fixed error with new color/code syntax
- Check if have connect before execute function
- src/core/Lib/Dbwrapper.php
- src/core/Lib/Settings.php
- src/core/Lib/Pattern/Zend.php
- common.php Fixed error with clean installation
- src/core/Factory/Character/Stats.php Deleted var not defined (and unused)
- installer.php Upgrade min version of PHP, since 2.7.0 IDMarinas Edition, min PHP version is 7.0, but installer check that min PHP version is 5.6
- common.php Code removed for upgrade from version 2.7.0 to 3.0.0 IDMarinas edition
- public/badword.php Remplaced for new censor BanBuilder
- lib/dbwrapper.php Removed deprecated method
query_cached
- Delete method
get_server_version
this is a special info, can use factoryLotgd\Core\Lib\Dbwrapper
to get this info
- Delete method
- lib/pageparts.php Removed deprecated function
popup
- lib/php_generic_environment.php and lib/register_global.php Removed from core.
- Not is necesary register as global all data in
$_SERVER
. Can useLotgdHttp::getServer(string $name = null , string $default = null)
- Not is necesary register as global all data in
- lib/clan/func.php Deleted from the core, it wasn't being used.
- newday.php Deleted support for Dragon Points for legacy options::
- Max Hitpoints + 5
- Attack + 1
- Defense + 1
⚠️ Important This is a very large update, which is going to require a lot of changes.- All the old translation functions are present, but they may not work as expected. These functions issue an obsolete function warning message.
- All pages are changed to use new Translation and Template system.
- TIP: Before upgrading to version 4.0.0, deactivate all modules, then on the installation screen mark modules to install modules that are upgraded for this version.
- DB:: Now Lotgd Core use Doctrine to access DB. 98% (or so) of code that use this class, now use Doctrine.
- Optimization Some files are optimized for maintainability using sugestions of Code Climate
- Gulp GulpJs is updated from version
3.9.1
to4.0.0
- All related gulp tasks are updated to this new version
- Removed
gulp-help
dependency (usegulp --tasks
to list tasks)
- composer.json Updated/Added/Deleted dependencies
- package.json Updated/Added/Deleted dependencies