Download the PHP package codelinered/file-sharing without Composer
On this page you can find all versions of the php package codelinered/file-sharing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codelinered/file-sharing
More information about codelinered/file-sharing
Files in codelinered/file-sharing
Package file-sharing
Short Description File Sharing - CodelineRed
License MIT
Homepage http://fs.codelinered.net
Informations about the package file-sharing
File Sharing - CodelineRed
This git is for fs.codelinered.net. Take a look at screenshots.
This application based on Slim Skeleton and Gulp Skeleton.
Table of contents
- Included Third Party Code
- Install Guides
- Install Production Build (Recommended)
- Install Main/ Develop Build
- Install with Docker (optional)
- Project Commands
gulpfile.json
- Path generation with Locale code and Generic locale code
- How to create further localisations
- How to switch between different url modes
- Mode 1
- Mode 2
- Mode 3
- ACL settings
- Troubleshooting
- Links
Included
- Slim 3
- Slim Twig View 2
- Slim CSRF 0.8
- Slim Flash 0.4
- Monolog 1
- Doctrine ORM 2
- Geggleto ACL 1
- Google Authenticator
- Google reCAPTCHA 1
- HTML Compress Twig Extension
Install Production Build (Recommended)
Required
- PHP 8.0
- MySQL 5.7 (pdo_mysql)
Download zip if you don't have git or composer on your OS. Open console on your OS and navigate to your project folder.
Login | Website |
---|---|
Username | user |
Password | password |
If you want to use Docker: click here
Install Main/ Develop Build
Required
Download zip if you don't have git on your OS. Open console on your OS and navigate to your project folder.
Login | Website |
---|---|
Username | user |
Password | password |
Install with Docker (optional)
Required
Open console on your OS and navigate to the place where you want to install the project.
Login | Website | Adminer |
---|---|---|
Server | - | database |
Username | user | root |
Password | password | rootdockerpw |
Database | - | - |
Project Commands
Description | |
---|---|
gulp | watch files and start BrowserSync |
gulp build | executes following tasks: cleanUp, favicon, font, img, js, jsLint, json, scss, scssLint, svg |
gulp lintAll | executes following tasks: jsLint, scssLint |
gulp cleanUp | clean up public folder |
gulp favicon | generate favicons |
gulp font | copy font files |
gulp img | copy and compress images |
gulp js | uglify, minify and concat js files |
gulp jsLint | checks js follows lint rules |
gulp json | copy and minify json files |
gulp scss | compile, minify and concat scss files |
gulp scssLint | checks scss follows lint rules |
gulp svg | copy and compress svg files |
gulp watch | watch scss, js, json, img, font and svg files |
gulpfile.json
Description | |
---|---|
browserSyncConfig | Required - Defines which config is used for BrowserSync (default: browserSyncDocker) |
sourcePath | Required - Path to raw files (default: gulpfiles/) |
publicPath | Required - Path to transpiled files (default: public/) |
env | Required - Environment dev, test or prod (default: prod) |
Path generation with Locale code and Generic locale code
- Mode 1 - example.com/de/ =
'process' => \App\Utility\LanguageUtility::LOCALE_URL | \App\Utility\LanguageUtility::DOMAIN_DISABLED,
- Mode 2 - example.de =
'process' => \App\Utility\LanguageUtility::LOCALE_URL | \App\Utility\LanguageUtility::DOMAIN_ENABLED,
- Mode 3 - example.com (de-DE session) =
'process' => \App\Utility\LanguageUtility::LOCALE_SESSION | \App\Utility\LanguageUtility::DOMAIN_DISABLED,
(default)
It depends on your configuration what will be returned.
Mode 1 | Mode 2 | Mode 3 | |
---|---|---|---|
locale code | de-DE | de-DE | xx-XX |
generic locale code | de-DE | xx-XX | xx-XX |
Twig | PHP | Twig Example | PHP Example | |
---|---|---|---|---|
locale code | {{ lc }} |
LanguageUtility::getLocale() |
{{ path_for('user-register-' ~ lc) }} |
$this->router->pathFor('user-register-' . LanguageUtility::getLocale()) |
generic locale code | {{ glc }} |
LanguageUtility::getGenericLocale() |
{{ path_for('user-login-' ~ glc) }} |
$this->router->pathFor('user-login-' . LanguageUtility::getGenericLocale()) |
How to create further localisations
- Duplicate one existing file in folder
locale/
(e.g. copyde-DE.php
tofr-FR.php
) - (if you use Mode 1 or 2) Duplicate one existing file in folder
config/routes/
(e.g. copyde-DE.php
tofr-FR.php
) - (if you use Mode 1 or 2) Change route prefix from
/de/
to/fr/
inconfig/routes/fr-FR.php
- You can also define paths like
/fr-be/
(locale/fr-BE.php
/config/routes/fr-BE.php
) for example - If you want to show language in langswitch, add
fr-FR
and domain inlocale => active
(config/additional-settings.php
) - (if you use Mode 1 or 2) Add case for
fr/
insrc/localisation.php
How to switch between different url modes
Mode 1
Example: example.com/de/
- EN is default language and DE is alternative language for this steps
- Got to
locale
inconfig/additional-settings.php
- Set
'process' => \App\Utility\LanguageUtility::LOCALE_URL | \App\Utility\LanguageUtility::DOMAIN_DISABLED,
- Set up english routes with or without
/en
prefix inconfig/routes/en-US.php
- Set up german routes with
/de
prefix inconfig/routes/de-DE.php
config/routes/xx-XX.php
can be leave untouched
Mode 2
Example: de.example.com or example.de
- EN is default language and DE is alternative language for this steps
- Got to
locale
inconfig/additional-settings.php
- Set
'process' => \App\Utility\LanguageUtility::LOCALE_URL | \App\Utility\LanguageUtility::DOMAIN_ENABLED,
- Enter your domains in
active
- Go to
config/routes/de-DE.php
- Remove
/de
prefix from everyroute
- Go to
config/routes/xx-XX.php
- Insert all routes where the config is equal between
config/routes/en-US.php
andconfig/routes/de-DE.php
- Remove these equal routes in
config/routes/en-US.php
andconfig/routes/de-DE.php
Mode 3 (default)
Example: example.com
- EN is default language and DE is alternative language for this steps
- Got to
locale
inconfig/additional-settings.php
- Set
'process' => \App\Utility\LanguageUtility::LOCALE_SESSION | \App\Utility\LanguageUtility::DOMAIN_DISABLED,
- Set up all routes in
config/routes/xx-XX.php
config/routes/en-US.php
can be leave untouchedconfig/routes/de-DE.php
can be leave untouched
ACL settings
With Geggleto ACL, routes are protected by role the current user has. By default every new route is not accessable until you give the route roles.
Routes are defined in the route files (e.g. config/routes/de-DE.php
).
Any other resource is defined in config/settings.php
.
Inside the Twig templates you can use ACL functions has_role
and is_allowed.
Inside controllers you can also use this ACL functions and many more (e.g. isAllowed()
).
Troubleshooting
In some cases you'll get the error message "Internal Server Error".
If this happened, go to public/.htaccess
and enable RewriteBase /
.
If project is in sub directory then RewriteBase /project/public/
.
Links
All versions of file-sharing with dependencies
doctrine/annotations Version ^1.13
doctrine/orm Version ^2.13
geggleto/psr7-acl Version ^1.3
google/recaptcha Version ^1.2
monolog/monolog Version ^1.27
nochso/html-compress-twig Version ^2.0
paragonie/random_compat Version >=1 <9.99
phpgangsta/googleauthenticator Version dev-master
ramsey/uuid-doctrine Version ^1.8
slim/csrf Version ^0.8.3
slim/flash Version ^0.4.0
slim/slim Version ^3.12
slim/twig-view Version ^2.5
symfony/cache Version ^6.0
symfony/console Version ^6.0