96 Commits

Author SHA1 Message Date
Gabriel Pedro
a692607c5e
feat: replace POT Query Builder to Eloquent ORM (#230)
* wip

* wip

* wip

* wip

* wip

* fix: reusing pdo connection from pot

* wip

* wip

* wip

* wip

* move files

In future, all classes will be in src/ folder

* Replace namespace name, for future

* Remove duplicated exception

* Fix towns from db

* Fix spells page

* Add default FAQ question + FAQ model

* feat: reset colors in menus

* Add confirm + save button at the top (menus)

* Do not insert duplicated FAQ on install

* Refactor install menus

* Fix changelogs showing

* Fix menu update, only with specified template name

* Fix account create -> missing compat

* Fix bans_per_page

* banned_by is player_id. type = 2 is namelock in tfs 0.3

* Add getPlayerNameById, fix getPlayerNameByAccount

* Change link name

* Order by lastlogin

* fix: query optimize

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Refactor notepad.php, class was useless

* This is showing error, if the updated rows = 0

* Fix success & error class (bootstrap)

* Uncomment require migrate.php

* Some distro have owner_id

* Update Player.php

---------

Co-authored-by: slawkens <slawkens@gmail.com>
2023-08-21 10:16:58 +02:00
slawkens
b49c247162 Remove items generator, there are better ones made in JS
This one wasn't working with newer files anyways
2023-08-12 12:23:03 +02:00
Slawomir Boczek
a72d1a3c9f
Feature: settings (#216)
* New admin panel Pages: Options + Config [WIP]

* Forgot the plugin example of options

* Rename to settings.php

* Add Settings Class

* New myaac_settings table

* Add $limit parameter to $db->select method

* Add $member var annotation

* Remove useless title_separator from config

* Move $menus to menus.php

Also fix active link when menu item has subpage

* Settings [WIP]

New Settings class
New Plugins::load() method
Move config.php to settings.php
MyAAC Settings will have plugin_name = 'core'
Add compat_config.php

* Change options.php to settings.php

* Change name to settings

* Add Settings menu

* Add Sections + Add setting($key) function

Reorganisation

* Add email + password fields as type

* Update 33.php

* add settings migration

* php 8 compatibility

* add missing hook

* Add categories in tabs, move more settings, revert back getPluginSettings

Categories and sections are now not numbered
Remove example settings plugin

* fix typo

* Update .gitignore

* Add 36th migration for settings table

* Execute migrations just after db connect

* Update plugins.php

* [WIP] Some work on settings

Add hidden settings
New method: parse, to parse settings from array
Move base html to twig template
Remove vocation loading from .xml, instead use predefined voc names

* Rename

* Fix path

* [WIP] More work on settings

Move more config to settings (mainly mail_* + some other)
Remove mail_admin, wasnt used anywhere
Add return type to some functions
Add Twig settings(key) function
Possibility to save setting to db

* Add min, max, step to number field option

* Re-enable plugin if disabled and already installed

* Add Settings menu, including all plugins with settings

One change included in previous commit, due to missclick

* Nothing important

* Better boolean detection

* More detailed error message in settings

* Lets call it settings.name instead

* Add new function: only_if, to hide fields when they are not enabled [WIP]

Not fully finished yet

* guild_management: show_if

* Hide section title on show_if

* Fix: check on page load if radio button is checked

* Add: show_if - account_mail_verify

* nothing important

* Rename team_* variables + add to deprecated

* Change variable name

* Extract Settings:save function

* Add settings.callbacks.get

* Move forum config to settings

* Move status config to settings

* Remove whitespaces

* More config to settings: account_types, genders, highscores, admin

* Move signature config to settings

* Move news config to settings

* Rename variable

* Save config.php in Settings

Egg and hen problem solved :)
* Test database connection on save settings -> prevents from making website unusable if connection is wrong
* Test server_path -> same
There is no config.php anymore, just config.local.php, which can be edited manually and also from admin panel

* Remove configs from previous commit

* Fix create account, if account_create_character_create is enabled

* Add more deprecated configs

* Add more info into comment

* Update 5-database.php

* Fix menu highlighting & opening

* Update template.php

* Enable script option

* Reword email settings + move two new settings

* add last_kills_limit + move shop

* google_analytics_id

* add mail_lost_account_interval

* Create character blocked words (by @gpedro), just moved to settings

* Fix google_analytics

* create character name config moved to settings

* Fix for install warning - min/max length

* New create character checks configurable: block monsters & spells names

* fixes

* Improve character npc name check

* New setting: donate_column + move donate config to settings

* Add super fancy No Refresh saving with a toast

* Add new possibility: to deny saving setting if condition is not met

* Move database settings to separate category

* Fix default value displaying

* Add database_hash setting

* add last_kills_limit to compat config

* Move create character blocked names down

* Every setting needs to have default

* Move rest of config to settings

Remove config.php completely
Add new settings category: Game
Fix account_login_by_email
Min textarea size = 2 + adjusted automatically
2023-08-05 21:00:45 +02:00
SRNT-GG
9d664d3577 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:08:20 +02:00
slawkens
4d3ad4b6b9 Update jQuery to v3.6.4 and jQuery UI to v1.13.2 2023-04-19 23:15:28 +02:00
slawkens
8985917a96 Fixes to account number 2023-02-14 18:28:31 +01:00
slawkens
1fb1fb3ae9 Update tinyMCE to v6.3.1 2023-02-02 15:01:56 +01:00
slawkens
afea618867 Optimize code (account number generation)
Thanks kamil-karkus for suggestion
2022-05-31 15:13:59 +02:00
slawkens
2563583f84 Merge branch 'develop' into feature/login-by-email 2022-05-31 12:25:26 +02:00
slawkens
6acbbe3fa1 patch some changes from master (character name validate) 2022-05-31 12:22:55 +02:00
slawkens
b8843a29eb Revert "Include tinymce with NPM"
This reverts commit cedcd14550caa359af6b3246c6b416ee55e3e3e6.
2022-03-16 17:27:30 +01:00
slawkens
16aeb12111 Comment unused variable 2021-10-23 15:00:30 +02:00
slawkens
96a7c43cb5 Delete cookies.js
was unused
2021-10-23 14:32:42 +02:00
slawkens
cedcd14550 Include tinymce with NPM
One will need to run: "npm install" as from now
More info here: https://nodejs.dev/learn/an-introduction-to-the-npm-package-manager
2021-10-23 10:23:37 +02:00
slawkens
e47bb11883 Suggest account number option 2021-06-09 01:01:18 +02:00
Lee
31f0050f4e Admin - Dataloader updates
-Npc Lib added
-Admin Dataloader updated to load NPC names into a cached array.
-Spinner Updated to a loading button.
2021-03-09 23:38:23 +00:00
slawkens
81b293a5a6 Fixes to character name validation
Admin should be able to create any name
Also fixes to config.character_name_min_length being ignored
2021-01-20 18:02:07 +01:00
Lee
0f6612904e Updated Admin
Updated the frameworks to latest git versions
-AdminLTE v3.1.0-pre
-Bootstrap v4.5.2
No major changes just bug fixes
2020-11-07 14:13:20 +00:00
slawkens
6c9e6af154 Move installer.js to main tools 2020-10-09 23:18:22 +02:00
Lee
bd9d3154db Code cleanup
-Removed unneeded/duplicate dependency files.
2020-05-23 02:54:58 +01:00
Lee
1f0b4425a4 Code cleanup
- Relocated html5shiv.js (v3.7.3) and respond.js (v1.4.2)
- Removed unneeded/duplicate dependency files.
2020-05-23 02:47:12 +01:00
Lee
47bfea4c56 Dependency Update
Updated:
- AdminLTE (v3.0.4)
- Bootstrap (v4.4.1)
- DataTables (v1.10.21)
-- Split DataTables for admin pages and website to fix layout formatting issues.
2020-05-23 02:28:38 +01:00
Lee
3d3d141b25 bootstrap JS fix
-fixes the editor tabs etc not working
2020-05-10 18:11:38 +01:00
Lee
d281fc588b Fixes
-As requested the datatables and bootstrap files have been moved into the tools folder
-Fixed spells and creatures datatable.
-Double space in name fix.
2020-05-07 01:36:56 +01:00
Lee
cddd915adf Admin fixes
-login/logout error fix
-debugging code removed
2020-04-02 18:44:15 +01:00
Lee
9e0ad271f6 Update adminlte.min.css
case sensitive fix
2020-04-02 15:54:16 +01:00
Lee
eaa11c68f3 Admin Panel Updates
- Updated Admin Panel to Bootstrap 4.
- Code cleanup
- Rewrote menu generation code
- Added top 10 coins, top 10 premium points, last 10 logins to modules page.
- Added full account list to Account editor
- Added load outfits from XML to player editor and lists all enabled outfits in editor (will default to textbox if array of outfits do not exist)
- Added tabs to account editor - account, characters,store history, bans(this is based off the bans.php page so will not work on TFS 0.2/1.0)
- Updated datepickers to display the actual date rather than unix time.
- Added last 10 posts to player editor
2020-03-31 02:03:16 +01:00
slawkens
324ebcc997 Fix show character indicator in check_name.js 2020-03-14 22:36:19 +01:00
slawkens
04a88c9cbd Add plugins dir for images and tools 2020-02-15 17:02:29 +01:00
slawkens
d7e6916d8f Fix comment 2020-02-07 00:22:44 +01:00
slawkens
dd1e604155 Add <IfModule *.c> and <IfVersion> to all .htaccess 2020-01-15 20:58:49 +01:00
slawkens
2bd372dbaa Add index.html to prevent autoindex
This fixes #101
2020-01-15 20:55:57 +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
tobi132
3945c2ad52 New, beautiful exception handler 2019-07-16 20:07:32 +02:00
slawkens
6226203b0e
Merge pull request #74 from whiteblXK/master
Some small fixes
2019-04-19 22:30:58 +02:00
whiteblXK
5aaf15f81c Some small fixes 2019-04-16 13:37:10 +02:00
slawkens
3febb340d4 * removed duplicated jquery declarations
This fixes some stranges errors with javascript being triggered on website
for example: not working color changes on Menus page when clicking on Add New button
2019-04-13 04:04:25 +02:00
Lee
1b539f82ac Updates (#65)
* Updates

+Added missing images
+Added report viewer as requested by icekis
-Code cleanup

if strict db, need to set spell to null run

ALTER TABLE `myaac_spells` CHANGE `spell` `spell` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
2018-12-12 20:44:29 +01:00
Lee
876b1b988a Code clean up + datatables (#64)
* Reformat Code

Reformat Code
- spaces + tabs

* Code cleanup

removed duplicated datatables code

* Datatables

replace spells, monsters tables with JavaScript Sortable Tables (DataTables?)
2018-12-02 06:30:36 +01:00
Lee
d1e6061541 Admin panel fixes (#62)
* Admin Panel

* fixes

-Code Clean Up
-Remove dist folder and merged into tools.
2018-11-24 15:42:20 +01:00
slawkens
05e15ce9ad * replace deprecated HTML <font> tag with <span> 2018-06-01 13:35:27 +02:00
slawkens
bf361238cb * remove whitespaces 2018-05-29 21:06:15 +02:00
slawkens
42d23e9b37 * remove unnecessary parentheses in include/require 2018-05-29 21:00:56 +02:00
slawkens1
ab73c602c3 * colorful dynamic menus!
* and also: blank option for menus
* NOTICE: Not all templates support that options yet
2018-01-14 14:29:53 +01:00
slawkens1
283806369a * fixes to the latest commit (removed some files)
* otserv 0.6.3: fixed some warning (on the characters page) and fatal
mysql error (on the mango signature)
* update TODO
2018-01-13 19:34:53 +01:00
slawkens1
88cabf88b2 * removed 6mb of trash (some useless things)
* updated background-artwork to the latest version, removed other ones
* removed signature background.PSD (instead of an empty background.jpg
is provided - almost the same)
* removed arial.ttf font, instead arialbd.ttf is used for mango template
* added .gitignore file
2018-01-13 19:16:19 +01:00
slawkens
3703c2b431 * updated tinymce to the latest (4.7.4) version 2018-01-08 13:10:32 +01:00
slawkens1
792770e5e2 * fixed some typos
* changes account.management to use buttons defined in template
2018-01-06 23:43:59 +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
854560b2f5 * added news preview function (news, ticker, article)
* update TODO
2018-01-03 23:49:46 +01:00