Commit graph

41 commits

Author SHA1 Message Date
Sam
6f15e14392
chore: fix styleci (#3588)
Co-authored-by: Sam <samerton@users.noreply.github.com>
2025-03-29 10:50:03 +00:00
tadhgboyle
0c80570609
Enable StyleCI (#3475)
* Create StyleCI config file

* Disable `phpdoc_separation`

* Apply fixes from StyleCI (#3476)

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

* style: styleci fixes

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Sam <samerton@users.noreply.github.com>
2024-03-09 11:19:55 +00:00
Robin
e1fd0e855a
Prevent directory traversal using language parameter (#3470) 2023-12-15 16:19:37 -08:00
tadhgboyle
45cdcad40e
Move core language files into modules/Core (#3469) 2023-12-15 08:20:59 -08:00
PadowYT2
9545cafaec
Make sure if installation is not finished (#3297)
* Make sure if installation is not finished

* Fix conversation
2023-03-29 12:24:21 +02:00
Tadhg Boyle
3df85ce05a Swap Config class to prefer paths seperated by . 2022-06-12 20:35:45 -06:00
Tadhg Boyle
7af74c1c88 Fix legacy install check 2022-06-12 20:22:53 -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
Tadhg Boyle
fed41416ef Fix install autoloader 2022-06-08 23:15:12 -06:00
Tadhg Boyle
db77317b96 Fix already installed check (actually) 2022-06-05 23:26:10 -06:00
Tadhg Boyle
76ad8e83fd Fix already installed check 2022-06-05 23:18:49 -06:00
Tadhg Boyle
5683436a5e Fix already installed check 2022-06-05 23:17:54 -06:00
PadowYT2
f01f8b3dbe Resolve conversation & from #2757 2022-05-27 11:54:24 +03: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
a4bb001e82 Move installation files up 1 directory 2022-02-27 22:20:01 -08:00
Tadhg Boyle
ad17142a16
Misc cleanup (#2566) 2022-01-15 15:18:05 -08:00
Derkades
6d22c03863 Style fixes 2020-11-03 20:27:17 +01: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
Tadhg
7d0b81eabc Revert Remove Nameless Installer file on install 2020-06-25 13:12:29 -07:00
Tadhg
f8db9a04f7 Remove Nameless Installer file on install 2020-05-29 22:13:14 -07:00
TortleWortle
71cda37c84 Massive search&replace fest.
Moved alot of requires from require('path/ to require(ROOT_OATH . '/path
2017-12-15 18:04:58 +01:00
Birkhoff Lee
313b7e5d27 DRY 2017-07-21 15:40:09 +08:00
Sam
449de84ce6 Update installer
Update config creation within installer to work on all systems
2017-06-27 20:06:21 +01:00
Sam
b65f6d63c6 Allow installer translations
Allow languages to translate the installer
2017-03-22 16:07:31 +00:00
Rody Molenaar
ee7c6ad936 New configuration method 2017-02-21 14:58:28 +01:00
Remy Di Mauro
de38ac7168 The proper word is Discord server not channel (#525)
Just a slight change.
2017-01-09 17:04:52 -05:00
samerton
719ce5bed7 Fix recaptcha issue in upgrade script
Fix recaptcha conversion issue in upgrade script
2016-12-31 21:38:37 +00:00
samerton
c3732cd0ba Fix installer upgrade issues
Fix errors within installer upgrade script
2016-12-30 19:42:00 +00:00
samerton
5ca3db9d57 Add option to change database charset
Add option to change database charset during installation
2016-12-30 17:30:32 +00:00
samerton
6cf3dec4d4 Add upgrade script to installer
Add 1.x -> 2.0 upgrade script to installer
2016-12-30 17:06:55 +00:00
samerton
b603c05307 Set timezone on page initialisation
Set timezone within page initialisation stage
2016-12-29 21:12:05 +00:00
samerton
2b0d3af75e Update language files and installer
Update language files and installer for new timezone feature
2016-12-29 20:37:25 +00:00
BukkitTNT
598686b0b2 translations stuff (#497)
* Translations GERMAN & EnglishUS for Forum module

* Update forum.php

* Update forum.php

* Update forum.php

* Auto Install Languages on Installation
2016-12-19 16:29:52 -05:00
BukkitTNT
cd9caf3f45 Translations GERMAN & EnglishUS
Credit Page
2016-12-18 23:27:53 +01:00
Tom McClellan
b12de5e0c7 little bug in admin index and make redirects uniform (#492)
admin index would throw an error if the first thing you did after getting to admin cp from the installer was switch to dark mode.

Also changed the redirects in the installer to all be the same (removed the installer.php from the half that had it)
2016-12-12 10:15:29 -05:00
samerton
82e1ff2ab8 Automatically display installer
Automatically display installer if site not yet installed
2016-12-10 00:13:04 +00:00
Sam
0a1fff8c56 Update subdirectory config value
Update subdirectory config value to not include trailing /, also updates
URL class to reflect this
2016-12-08 16:53:23 +00:00
Sam
1886a864c6 Update installer
Update installer to add user account step along with a fix for the
module cache
2016-12-08 14:14:53 +00:00
Sam
6821396469 Fix a couple of installer issues
Fix a couple of issues with installer, including path configuration not
being set properly, and also set admin group ID back to 2
2016-12-08 13:11:44 +00:00
Tom McClellan
af56339ddf Fixed some things
Things fixed
some installer bugs - installer.php
* db password variable was incorrect 
* default language database setting
* default theme cache variable (dont know if having it set to 1 was intended, had to set it to default to get the site to work)

Changed some variables in /admin/users.php to 3 from 4 to match the error strings in the language file, could have changed the language variables and stuff, but im lazy (and I use Tom as my username lol)
username_minimum_3
mcname_minimum_3

Also changed $group to 3 when editing user #1 to match the new settings of admins being 3 instead of 2

if the user tries to set email to something strange like 1@1 it will get an error for being to short but not show an error, I could not figure out how to get it to trigger, but I added ```'invalid_email' => 'Your email is invalid.',``` to the EnglishUK/user.php and a validate email type in core/classes/Validate.php. Did not want to break to much so I left email defaulting to min 4 instead of t
2016-12-07 21:26:05 -08:00
Sam
2d3df55a72 Start installer
Start work on installer, not yet complete
2016-12-08 01:08:06 +00:00