78 Commits

Author SHA1 Message Date
SRNT-GG
76bfab1303 WIP - Removing unneccessary closing tags to prevent potential issues. (#223)
* Part 1

Removing closing tags when no HTML or other output comes after the last PHP codeblock.

* Further removals

* nothing

---------

Co-authored-by: slawkens <slawkens@gmail.com>
2023-06-15 21:06:22 +02:00
slawkens
7c2c88f780 Add Whoops exception handler (nicer debug info in dev mode)
On production = no errors
2023-05-29 08:55:26 +02:00
slawkens
f3745a2752
Feature/new router (#165)
* Remove unneeded escape

* Fix guild back buttons (change logo & motd)

* small adjustment in news.php

* Fix create character when admin (any case is allowed now)

* Fix forum table style (boards & thread view)

* Small improvement to plugins.enabled check

* [WIP] nikic/fast-route implementation

I will describe it more in Pull Request

* Optimisations & fixes.

* Fix path - should not be absolute

* Add PLUGINS to Twig path

* Don't hide "Install Plugin" Box by default

* Update package-lock.json

* nothing important, just early exit & fixes

Fix creature display

* fix premium_ends_at for tfs 1.3+

* Move pages

* Move pages tbc

* $db->select: make $where parameter optional, allows to get all records

* Add some error box to error

* fix parse error

* Rewriting the router v2

To be more flexible

* small fixes

* fix & add admin icons

* Move mass_* pages to correct folder

* fix logout hook 2

* Delete accountmanagement.php

* This code wasn't used

* Add missing var

* Add redirect_from && redirect_to to router options

+ Also add * for all methods shortcut

* Remove comments

Not allowed in normal json

* Allow admin pages included into plugins dir

* block access to some files

* Fix admin logout

* Fix #178

* feature: mail confirmed reward

Suggested by @EPuncker

# Conflicts:
#	system/hooks.php

* remove misleading comment

* adjust required version according to composer.json

* fix duplicated word

* Adjustments & fixed to mass actions

* Add password confirm, and change text type to password

* Add list of Open Source Software MyAAC is using

* Fix signature

* Show First, Second instead of numbers

* fix base dir detection

* fix double ACTION define + undefined URI in template

* new function> escapeHtml + fix css in admin menus

* fix changelog add

* fix news adding, rename const to NEWS_*

* Add verify to pages, add messages, limits, fix add

* fix "Please fill all input"

* add required input to admin pages

* shorten some expressions with ??

* shorten code + fix conversion (int)

* Move account_types to config, account.web_flags to common.php

* Update example.json

* feature: router aliases

* shorten some code + const convert

* remove wrong char

* fix signature on custom basedir

* fix: mass teleport position validation (#214)

* fix: mass teleport position validation

* fix: max position

* Fix execute in CLI

* fix warning in reload cache in dev mode

* Configurable admin panel folder

* feature: plugin require more options with comma

* $config_account_salt -> USE_ACCOUNT_SALT

* fix forum show_thread

* Update show_thread.php

---------

Co-authored-by: Gabriel Pedro <gpedro@users.noreply.github.com>
2023-02-07 11:41:05 +01:00
slawkens
9ad367370a Support for downgraded TFS 7.72 (with accounts.number)
Part 2
2021-06-09 01:54:22 +02:00
slawkens
b24370e7ed Fixed the check if vocations.xml were correctly loaded 2021-01-17 17:44:30 +01:00
slawkens
ab3912b378 Save towns as plain PHP File in cache folder
+ Also load them on install + on reload items
= better performance when in dev mode
2020-10-09 22:27:48 +02:00
slawkens
a52396008d Automatically load towns from .OTBM file
Takes up to 10 seconds for otservbr on my PC
Taken from old Smart AAC - class SpawnsReader.php
2020-10-09 00:12:07 +02:00
slawkens
fe571cbef3 Fix account create when account_mail_verify is enabled 2020-07-03 22:43:53 +02:00
slawkens
9ce7162a04 Remove duplicated code 2020-05-25 09:03:40 +02:00
slawkens
cd58008a0f Rewrite towns support for TFS 1.3
Won't show warning anymore
2020-05-25 00:09:06 +02:00
slawkens
51b848c43e Add RuntimeException if xml, pdo or zip PHP extension is missing
For a better User Experience ;)
2020-02-15 17:17:28 +01:00
slawkens
13d0718780 RuntimeException instead of die() 2020-02-12 23:20:16 +01:00
tobi132
668387e372 Database towns table support for TFS 1.3 2019-12-03 01:11:52 +01:00
Evil Puncker
af1a6cf5ff Updated copyright year and SSL link
Updated year to 2019 and made all my-aac.org links go to SSL by default
2019-07-17 20:22:07 -03:00
slawkens
fb1b9fea09 * stop using global $cache variable, use Singleton pattern instead 2018-06-03 17:09:21 +02:00
slawkens
42d23e9b37 * remove unnecessary parentheses in include/require 2018-05-29 21:00:56 +02:00
slawkens
f34f2da9b9 * refactor data directory detection 2018-05-29 20:40:40 +02:00
slawkens
6158d81b5e * move Twig functions to separate file 2018-05-29 18:14:21 +02:00
slawkens
eab416c0b4 * some optimizations & fixes according to awesome PHPStorm Php Inspections plugin! 2018-03-21 13:52:41 +01:00
slawkens1
1025fad0e6 * cache $db->hasTable and $db->hasColumn functions
* changed tableExist and fieldExist to $db->hasTable(table) +
$db->hasColumn(table, column)
* new configurable: database_log - can log database queries and show in
website source when logged as super admin
* removed debug_level configurable, enabled by default when logged on
super admin
* added OTS_Account:getCountry()
* added posibility to load OTS_Player partially, and without skills
* (internal) changed depracated $ots->createObject() functions with
their OTS_ equivalents
* (internal) removed unused code
2018-01-06 05:44:33 +01:00
slawkens1
31537687c1 * immediately reload config.lua when there's change in config.server_path detected 2018-01-06 03:07:17 +01:00
slawkens1
854560b2f5 * added news preview function (news, ticker, article)
* update TODO
2018-01-03 23:49:46 +01:00
slawkens1
6528a4a60c * ask user for timezone on install
* remember status of the installation
* moved clients list to the new file
* verify if client and timezone is correct on install
2017-12-25 12:40:41 +01:00
slawkens1
b83fb05b82 * update to 0.7.4 2017-12-24 09:50:53 +01:00
slawkens1
e4110a6981 * automatically update highscores_ids_hidden for users who installed myaac before
* update TODO
2017-12-21 22:08:47 +01:00
slawkens1
412908026d * inform user about Twig cache failure on installation, instead of http 500 error
* when dir system/cache is not writable by the webserver, then show some
nice notice to the user about it instead of http 500 error
* remember client version and usage stats checkbox in session on install
* fixed some small warning introducted yesterday about
highscores_ids_hidden
* updated TODO
2017-12-19 23:32:30 +01:00
slawkens1
779dd003dd * update to 0.7.3
* better solution for hidding samples (configurable)
* removed players.is_sample field
2017-12-19 00:01:59 +01:00
slawkens1
05f8756a12 * fixed viewing pages with capital letters (like serverInfo) on case sensitive systems
* fixed changing comment of characters with space and other special
characters in name (#29)
* fixed viewing guilds with space and other special characters in name
(#29)
* (kathrine template) fixed displaying menu when no URI is set (URI =
'/')
* added some additional checks for Validator guildName and rankName if
name is empty
* (internal) new twig filter: urlencode, which is using urlencode php
function
2017-11-14 19:58:44 +01:00
slawkens1
56a01e1e64 * fixed account email confirm function
* log some error info when mail cannot be send on account create
* fixed some weird include possibilities with forum and account actions
(verify action name)
* twig getLink function will now return with full url (BASE_URL
included)
* fixed some changelog PHP Notice warning
* (internal) shortened message functions
2017-11-12 21:55:12 +01:00
slawkens
7b84614a79 * removed @version header from files, as it was hard to maintain 2017-11-09 10:02:15 +01:00
slawkens1
1610a4ab91 * update to 0.6.6 2017-10-22 23:38:51 +02:00
slawkens1
2b6d65e955 * update to 0.6.5 2017-10-21 04:32:20 +02:00
slawkens1
9f946d4bc4 * update to 0.6.4 2017-10-20 22:17:54 +02:00
slawkens1
85c9a1e84d * update to 0.6.3 2017-10-20 21:18:50 +02:00
slawkens1
8ab7be9fb8 * update to 0.6.2 2017-10-20 18:16:52 +02:00
slawkens1
0b693a02bd * update to 0.6.1 2017-10-17 23:18:20 +02:00
slawkens1
66a3c46aaf * better error handling for monsters and spells loader
* check if file exist before loading
* save errors to system/logs/error.log
2017-10-16 23:31:28 +02:00
slawkens
c914a73352 * update to 0.6.0 2017-10-16 17:18:37 +02:00
slawkens
4daaa67710 * new account.login view for tibiacom template
* added new indicator icons for create account, create character and change character name
* attempt to fix incorrect views counter behavior (its resetting to 0 in some cases)
* moved check_* functions to class Validator
* from now all validators ajax requests will fire onblur instead of onkeyup
* ajax requests returns now json instead of xml
* added 404 response when file is not found
* fixed gallery
2017-10-16 16:49:35 +02:00
slawkens
f84ae88aa4 * added faq management - add/edit/move/hide/delete from website
* moved install pages to twig
* load monsters and spells on installation of the AAC
2017-10-12 17:40:02 +02:00
slawkens
e92e5d1040 * update to 0.5.1 2017-10-11 17:01:14 +02:00
slawkens
739782109e * update to 0.5.0 2017-10-10 15:50:46 +02:00
slawkens
04d9ec9c94 * updated tinymce to the latest (4.7.0) version
* added option to uninstall plugin
* added option to require specified myaac or php version for plugins
* added links loaded from database to admin panel - for future plugins
* added few characters hooks
* fixed some kathrine template js bug when shop is disabled
2017-10-09 16:47:34 +02:00
slawkens
7b234ad41f * moved .htaccess rules to plain php (index.php)
Its a salut to nginx and other web server nutzer (not apache), as they can now simply redirect all requests with simple rule to index.php, and php will take care of all redirects. .htaccess just now redirects everything to index.php with simple 3 lines.
* change accountmanagement links to use friendly_urls
* fixed creating new forum thread
* some fixes in account changecomment action
* show info when account name/number or password is empty on login
* fixed showing account login errors
* added new twig function getLink that convert link taking into account config.friendly_urls
* internalLayoutLink -> getLink
2017-10-06 17:11:06 +02:00
slawkens
35b0795b51 * update to 0.4.3 2017-10-05 17:19:49 +02:00
slawkens1
755deae717 * enable auto_reload option for twig 2017-10-05 00:48:34 +02:00
slawkens
b6ccde075d * moved some more pages to twig
* moved online, movies, google_analytics code, faq, experience_table, downloads to twig
* added new global variabl to twig (status)
* removed some unused page (custom.php)
* automatically append trailing slash at config.item_images_url
* moved downloads from clients.halfaway.net to tibia-clients.com
* show some more info on monster loot (currently only on TFS 0.3 and those that use item.id in monster files instead of item name)
* some more unimportant fixes
2017-10-04 17:49:54 +02:00
slawkens
6527d21794 * updated version number
* updated to 0.4.2
2017-09-14 08:37:53 +02:00
slawkens
7fad722927 * update to 0.4.1 2017-09-13 16:39:09 +02:00
slawkens
ac3691dc08 * update to 0.4.0
* fixed some bugs in bugtracker
* updated database to version 9
2017-09-13 15:30:18 +02:00