Commit graph

36 commits

Author SHA1 Message Date
tadhgboyle
07d1e05229
Create and implement Cache#fetch (#3662)
* Create and implement `Cache#fetch`

* convert more

* fix

* wip

* wip

* Apply fixes from StyleCI (#3663)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* wip, more conversions

* clear widget cache on setting update

* fix

* convert

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2025-05-20 18:37:24 -07:00
tadhgboyle
578c5f3575
Hide profile if blocked, update mentions list, update messaging list (#3659)
* Hide profile if blocked, update mentions list, update messaging list

* lint
2025-05-15 19:24:55 +01:00
Partydragen
61e25ed419
Render profile widget (#3658) 2025-05-14 16:12:52 -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
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
Sam
125965d374
Various performance improvements (#3119)
* Various performance improvements

* Remove debug

* Remove more debug

* Improve StaffCP total users widget
2022-11-18 19:16:24 +00:00
Tadhg Boyle
5e07ac2d70 Create and utilize Text class, add deprecation warnings 2022-06-13 22:44:01 -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
Robin
6936126fc1 Rename getGroupClass to getGroupStyle
without breaking backwards compatibility
2022-04-21 22:35:56 +02: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
Robin
52cbf54abd don't decode before encoding 2022-04-02 18:36:47 +02:00
Tadhg Boyle
d99168ae82
Add support for custom universal DATE_FORMAT constant (#2656) 2022-04-01 12:49:21 -07:00
Tadhg Boyle
ad17142a16
Misc cleanup (#2566) 2022-01-15 15:18:05 -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
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
ByteException_
34b76798ca
Fix latest profile posts link (#2409)
The link for the last profile post was generated incorrectly because the author of the post was used in generating the profile post link.
2021-09-22 08:34:54 -07:00
samerton
1c3d8f1fdf Latest profile post widget fixes
Fixes #2000
2020-12-27 18:17:25 +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
Partydragen
442501132d Update Widgets to new system 2020-11-03 21:30:55 +01:00
Tadhg
f62b0b0216 Add Widget setting for being on Left or Right 2020-09-11 22:45:46 -07:00
Tadhg
1424ebde1d Fix guests "view other topics" & rename LPP Widget array 2020-08-04 19:30:48 -07:00
Tadhg
be5668d4df Fix Profile Posts Widget link & clear cache on post 2020-08-04 11:52:05 -07:00
Tadhg
f698c5e575 Add Latest Profile Posts widget 2020-08-03 23:43:19 -07:00