Commit graph

24 commits

Author SHA1 Message Date
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
Robin
edd873e182 Remove sitename cache, fix XSS 2022-06-01 10:48:17 +02: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
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
e0133a5cd5 Get PHP-CS to pass! 2021-12-07 22:14:12 -08:00
samerton
c770257e75 Add padding to Facebook widget 2021-11-08 19:17:12 +00: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
a9c678e4d4 convert all array(...) syntax to [...] 2021-10-29 22:00:05 -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
Derkades
2405ba039b Style fixes 2020-12-19 19:25:59 +01:00
Tadhg
bb9057b184 staffcp is the new admincp 2020-12-14 20:44:25 -08: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 Boyle
0560fd907b
Discord Integration! Sync your roles between your NamelessMC site and your Discord Guild. (#1764)
* Initial commit, big additions. Linking/verifying discord id is complete

* Update admin.php

* Better validation errors + language updating

* Apply role change on user edit page - still some things to flush out though

* flush out some edge cases

* Add role in discord upon account validation & more

* Add api endpoint (need to test) & a lot of TODOs

* fix announcements a bit on Default template

* define bot url for easier move to self-hosting

* Add discord->website (adding) sync & lots of the TODOs

* Add discord role removal api endpoint

* Add logging od discord role add/remove & fix log table

* Add api_url to discord request for extra security & add todo's for error handling

* More API error handling for discord bot

* Add boilerplate error handling if bot throws error

* Add error messages for all discord linking

* If they have a role on the site, give it to them when they verify their id

* Resolve Sam's review

* Add info msgs so people know where to get discord IDs

* Add all language translations and update NMC version strings
2020-07-25 21:00:41 -07:00
samerton
cd02999dfc Update module, template + widget systems 2018-09-10 01:14:58 +01:00
samerton
a19d4ab162 Allow ordering widgets 2018-08-28 16:15:25 +01:00
Eftimie Andrei
d7f99aa436 Update FacebookWidget.php 2018-06-20 21:57:47 +03:00
Sam
e8d2c231c5 Add module name to widget list 2017-10-06 20:22:17 +01:00
Sam
245d93f98e Add widget system, along with Twitter and Facebook widgets 2017-08-08 19:38:42 +01:00