Commit graph

33 commits

Author SHA1 Message Date
tadhgboyle
44d03ab7df
Misc refactors + fixes (#3673)
* Misc refactors

* wip

* fix members page not being able to have announcements
2025-06-04 21:32:17 -07:00
Sam
db647d9b4e
Add Smarty and Twig template engines (#3452)
* Add Smarty and Twig template engines

* Update composer.json

* Convert Widgets class to template engine and PHPStan fixes

* Fix widget initialisation

* Fix panel widget initialisation

* chore: remove debug return

* feat: convert 403/404 pages to new template system and general tidy

* chore: style fixes

* feat: update latest pages to new template engine

* feat: template base should not be nullable in onPageLoad

* feat: set template base directory upon initialisation and allow custom smarty security directories

* chore: fix style
2025-02-24 18:44:29 +00:00
Sam
38caed0e9a
fix: misleading error in server status widget if server is offline (#3499) 2024-04-01 12:00:01 +01:00
Tadhg Boyle
b13c29e5e4
Reactions revamp & profile widgets (#3272)
* Initial work on reactions revamp and profile widgets

* Remove unneeded changes

* Remove unneeded change

* fix style

* Render emojis in reaction list StaffCP

* wip minecraft account profile widget, sticky widgets on profile page

* Add server name and IP to last seen

* remove

* rename to reaction score to match member list

* align reactions table contents center

* fix

* wip - nicer abstraction, widgets never query db, skin 3d viewer (undecided)

* wip - make reaction modals ajax, copy new reaction bar to profile posts

* wip reaction modals

* wip proper sorting

* wip modals

* wip get reaction submission working on profile wall posts

* add back helpful and creative default reactions

* reduce query amount on view topic

* remove debug statement

* wip

* wip

* simplify ProfileWidget pages

* Revert forum dropdown

* fix css syntax

* fix emoji title and alt being strange

* add back order input

* sort widgets by order in list

* fix settings link always showing

* phpdoc

* add widget name to exception

* insert default widget data if not found

* missing end if

* properly cache forum news per-group

* fix

* fix cache key, news permission check

* fix styling

* wip

* respect reaction ordering

* wip

* wip

* support custom reaction scores, update member list to properly calculate

* don't hardcode words

* wip

* allow multiple reactions

* redirect to post

* code style

* phpstan

* wip

* remove hardcoded terms + fix copy

* use npm for skinview3d

* create ReactionContext and refactor

* fix cache

* docblocks

* fix spelling

* pr amendments
2023-06-21 18:19:46 +01:00
Tadhg Boyle
5e07ac2d70 Create and utilize Text class, add deprecation warnings 2022-06-13 22:44:01 -06:00
Robin
4d16d3f555
Rewrite configuration file operations (#2850)
Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>
2022-06-12 20:21:21 -06:00
PadowYT2
f01f8b3dbe Resolve conversation & from #2757 2022-05-27 11:54:24 +03:00
Tadhg Boyle
3d635fd512 Fix various undefined issues which were bloating logs 2022-05-22 18:20:49 -06:00
Tadhg Boyle
40ef677c25 Init 2022-05-01 23:16:22 -07:00
Tadhg Boyle
2c21149a1e
Use i18n for translations (#2658)
* Dependency updates

* Start i18n conversion

* Switch to ellipsis character

* Add Dutch language json

* Remove Dutch PHP language files + fix variables

* Further variable fixes

* WIP i18n Language class conversion

* Convert Cookie Consent module to new language format

* Further progress including timeago translations

* Misc

* Replace {x}

* Replace more {x} usage

* {{time}}

this took way too long

* replace last {x}

* Remove comments

So searching for {x} produces relevant results

* forgot to save

* move to onPageLoad

* Accept both string and int

* types in doc

* Remove unused (broken?) function

* Don't convert to string first

* Last arg doesn't seem to be used anywhere

* Time `{x}` replacements

* Email `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* misc `{x}` replacements

* remove comments (makes searching for "{x}" nicer)

* misc `{x}` replacements

* JS `{x}` replacements

* Cleanup language initialization

* Change language constant + add pluralForm support

* Misc language update things

* Add script to find unused terms

* Check all quote types

* Remove most english translations from non-english languages

* Also match with more args

* Missed some apparently

* Missed some (more) apparently

* Misc work

* Add script to convert *all* language files to json

* Fix language codes

* Remove a lot of unused terms

* Remove a lot more unused terms

* Convert everything to JSON, delete old files, get installer working with new system

* Fix general configuration language dropdown + email messages

* Fix page load time, fix language term `set` method

* Fix discord integration command

* Misc

* Misc

* Uncomment RTL definition

* Misc

* Convert links

* Convert links

* Convert links

* Convert links

* Misc work (bolding, fixes, etc)

* Style fix

* Fix variable

* Fix #2668

* Fix old page load timers

* Fix installer group sync injector error

* Convert integration language terms

* Fix more integration language things

* Re-add upgrade script language things

* Resolve PR comments

* Remove unnecessary date()

* Resolve some PR issues

* Fix endpoint

* Style

* Fix Semantic -> Fomantic

* Fix Semantic -> Fomantic

* Return locale short code, not language id/name

Only the short code is interesting to the API, return short code in user info endpoint just like in the website info endpoint.

Also renamed to locale because it's language + region

* Revert "warn people to not translate old language files"

This reverts commit 690b77afff.

* Fix query when there are no filters

* Update 200-pr12.php

* Update footer.php

* insert time into string using placeholder

* Fix getDisplayname case

* Clean username

* PR suggestions

* Include newly created language in converted languages (migration)

* PR suggestions

* PR suggestions

* Update init.php

* Fix default language

Co-authored-by: samerton <samerton@users.noreply.github.com>
Co-authored-by: Robin <robinslot@hotmail.nl>
Co-authored-by: Robin <robin+git@rkslot.nl>
Co-authored-by: Partydragen <adrian_kili@outlook.com>
2022-04-23 14:27:10 +01:00
Tadhg Boyle
374cc22384 Remove redundant queries during widget init, fix Discord widget when no guild ID is set 2022-04-13 17:05:42 -07:00
Tadhg Boyle
1a5e98deb1 Use Guzzle as underlying HTTP client, add Guzzle to DebugBar (Closes #2580) 2022-01-30 19:37:28 -08:00
Tadhg
e0133a5cd5 Get PHP-CS to pass! 2021-12-07 22:14:12 -08:00
Tadhg
3d03636506 Revert "Add PHP-CS to GitHub actions + fix most errors"
This reverts commit b17b292eda.
2021-12-07 20:17:45 -08:00
Tadhg
b17b292eda Add PHP-CS to GitHub actions + fix most errors 2021-12-07 20:06:10 -08:00
Tadhg
42c4579b09 Change HttpClient to more advanced class, change all curl usages to HttpClient 2021-11-10 17:48:54 -08:00
Tadhg
4d148aa02d New HttpClient class for get/post requests 2021-11-09 16:51:06 -08:00
samerton
746c658988 Merge from v2 2021-10-31 15:41:14 +00:00
samerton
06b97b7b86 Move cookie notice to new module
Also default night_mode to null in user table
2021-10-31 15:11:50 +00:00
Tadhg
0070143417 Add types to Core module widgets 2021-10-30 16:44:05 -07:00
Tadhg
6e3fe3db8a misc code style fixes 2021-10-29 22:09:38 -07:00
Tadhg
a9c678e4d4 convert all array(...) syntax to [...] 2021-10-29 22:00:05 -07:00
Tadhg
bdf6af33ff use 7.4 null operator 2021-10-28 13:14:57 -07:00
Tadhg
b9b8b21309 rename DB::query() and DB_Custom::query() to selectQuery() [keeps + deprecates old query() method] 2021-10-25 15:42:39 -07:00
Tadhg
bf5443e423 php 8 fixes (closes #2115) 2021-04-13 14:51:39 -07:00
Tadhg
84b1725dae fix #2040 + dont display "Version:" if not set
fixed by escaping everything except the player lists. it cant be escaped or bad things happen.
2021-01-14 13:55:07 -08:00
samerton
4981f06c72 Trim trailing slash from getSelfUrl in server status widget 2020-12-30 21:04:10 +00:00
samerton
358fc75808 Add list of avatars to server status widget
Closes #2015
2020-12-29 12:47:10 +00:00
Derkades
2405ba039b Style fixes 2020-12-19 19:25:59 +01:00
Tadhg
32d2dca911 fix #1961 2020-12-14 14:20:28 -08:00
Partydragen
a82bbebb5e Eliminate 9 queries 2020-12-13 14:38:38 +01:00
Tadhg
f62b0b0216 Add Widget setting for being on Left or Right 2020-09-11 22:45:46 -07:00
Tadhg
1154464d0d Add Server Status widget & security page update 2020-09-11 12:44:49 -07:00