diff --git a/Makefile b/Makefile index b6853e235..d1ef3e064 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,17 @@ -# Makefile for copying files downloaded using composer into the proper location -# for use with WebCalendar. +# Makefile for copying files downloaded using composer +# into the proper location for use with WebCalendar. # We only copy the min number of files required from the vendor directory. # Also, compute the SHA hash to use with the integrity tag. -# We don't want WebCalendar releases to bundle every single file in the vendor directory. +# We don't want WebCalendar releases to bundle +# every single file in the vendor directory. +# # Also, composer dependency management sucks at asset management. # -# NOTE: This Makefile does not work on macos, just linux. This is because there is -# no sha384sum command on macos. If you're on a Mac, you can use docker to setup -# a linux container where (after installing xdd), you can run make to generate the -# sha files. +# NOTE: This Makefile does not work on macos, just linux. +# This is because there is no sha384sum command on macos. +# If you're on a Mac, you can use docker to setup +# a linux container where (after installing xdd), +# you can run make to generate the sha files. PHPMAILER_DIR = includes/classes/phpmailer PHPMAILER_VENDOR_DIR = vendor/phpmailer/phpmailer/src @@ -130,7 +133,7 @@ includes/load_assets.php: \ pub/jquery.min.js \ pub/jquery.min.js.sha echo ' $@ - echo '// Auto-generated by make. Do not hand-edit.' >> $@ + echo '// Auto-generated by make. Do not hand-edit.' >> $@ echo '// See Makefile in source for details..' >> $@ echo '// Last updated: ' | tr -d '\012' >> $@ date >> $@ @@ -169,20 +172,24 @@ pub/jquery.min.js.sha: pub/jquery.min.js $(SHA384SUM) # To get the list of files we need for the "basic" install of ckeditor, # I downloaded the "basic package" from the website: # https://ckeditor.com/ckeditor-4/download -# Then I looked at what was included to make the list of files we need -# to copy over from the vendor/ckeditor directory (which includes -# enough for the "full package" of 72 plugins and adds about 15Mb instead -# of the 2Mb for basic. -# To create this list from the unzipped ckeditor download, cd into the unzipped -# 'ckeditor' dir and use this command: +# Then I looked at what was included to make the list of files +# we need to copy over from the 'vendor/ckeditor' directory +# (which includes enough for the "full package" of 72 plugins +# and adds about 15Mb instead of the 2Mb for basic). +# To create this list from the unzipped ckeditor download, +# cd into the unzipped 'ckeditor' dir and use this command: +# # find * -type f | grep -v samples | grep -v config.js | grep -v 'adapters/' | sed 's/^/\t/' | sed 's/$/ \\/' | sed 's/promise.js ./promise.js/' -# NOTE: We do not include the config.js provides by composer because it defaults to -# the full ckeditor distribution with all plugins (15+ Mb). Instead, I've downloaed -# the config.js from the 4.18 basic build and copied it manually into pub/ckeditor. -# It's possible we may need to update the pub/ckeditor/config.js file manually if -# a new 4.X release requires updates to this file. -# NOTE #2: This Makefile is assuming that the README.md file gets updated with -# each CKEditor update (seems like a safe assumption.) +# +# NOTE: We do not include the 'config.js' provided by composer +# because it defaults to the full ckeditor distribution +# with all plugins (15+ Mb). +# Instead, I've downloaded the 'config.js' from the 4.18 basic build +# and copied it manually into pub/ckeditor. +# It's possible we may need to update the 'pub/ckeditor/config.js' file +# manually if a new 4.X release requires updates to this file. +# NOTE #2: This Makefile is assuming that the 'README.md' file gets +# updated with each CKEditor update (seems like a safe assumption) CKEDITOR_FILES = \ pub/ckeditor/CHANGES.md \ pub/ckeditor/LICENSE.md \ @@ -305,4 +312,3 @@ pub/ckeditor/CHANGES.md: $(CKEDITOR_VENDOR_DIR)/ckeditor/CHANGES.md echo "Copying file: $${f}"; \ cp $${a} $${f}; \ done - diff --git a/README.md b/README.md index d8f1ab45b..1c371579e 100644 --- a/README.md +++ b/README.md @@ -56,12 +56,12 @@ install script that the web service process has write permissions to. ### Option 2: Environment Variables Instead of using the `includes/settings.php` file for your settings, you can use environment -variables instead. +variables instead. This is primarily targeted towards those running WebCalendar in containers (docker, AWS Fargate, etc) -where it's easier to pass in environment settings than to write to a config file on a container. +where it's easier to pass in environment settings than to write to a config file on a container. You can do this with the docker-compose file if you are using docker. If you want to do this with a standard Web Server, -you can set the evironment variables within your web server's configuration. +you can set the evironment variables within your web server's configuration. Depending on your web server, there may be more than one way to do this. You could do this in your `php.ini` file, but those env vars would be available to all PHP apps on the server. A better solution would be to setup a `.htaccess` file in your @@ -93,19 +93,6 @@ and MariaDb running that is setup with the `docker-compose` command. - Start the containers: `docker-compose -f docker/docker-compose-php8.yml up` -- In order to grant the proper permissions inside of MariaDb, you - will need to run a few MySQL commands. First shell into the mariadb - container: `docker-compose -f docker/docker-compose-php8.yml exec db /bin/sh` -- Start up the db client: `/bin/mariadb -p` (the password will be - "Webcalendar.1" as specified in the `docker-compose-php8.yml' file. You - can change it to make your dev environment more secure (before you - build the containers in step above). -- Run the following db commands: - ``` - GRANT ALL PRIVILEGES ON *.* TO webcalendar_php8@localhost IDENTIFIED BY 'Webcalendar.1' WITH GRANT OPTION; - FLUSH PRIVILEGES; - QUIT - ``` - Start up your web browser and go to: [http://localhost:8080/](http://localhost:8080/). - Follow the guided web-based setup and choose "mysqli" as the database @@ -125,19 +112,6 @@ files in the container. `docker-compose -f docker/docker-compose-php8-dev.yml build` - Start the containers with `docker-compose -f docker/docker-compose-php8-dev.yml up` -- In order to grant the proper permissions inside of MariaDb, you - will need to run a few MySQL commands. First shell into the mariadb - container: `docker-compose -f docker/docker-compose-php8-dev.yml exec db /bin/sh` -- Start up the db client: `/bin/mariadb -p` (the password will be - "Webcalendar.1" as specified in the `docker-compose-php8-dev.yml' file. You - can change it to make your dev environment more secure (before you - build the containers in step above). -- Run the following db commands: - ``` - GRANT ALL PRIVILEGES ON *.* TO webcalendar_php8@localhost IDENTIFIED BY 'Webcalendar.1' WITH GRANT OPTION; - FLUSH PRIVILEGES; - QUIT - ``` - Start up your web browser and go to: [http://localhost:8080/](http://localhost:8080/). - Follow the guided web-based setup and choose "mysqli" as the database diff --git a/about.php b/about.php index 5ef0be1fd..3dd83eeaa 100644 --- a/about.php +++ b/about.php @@ -27,9 +27,9 @@ $replacements[] = ''; $data = preg_replace ( $patterns, $replacements, $data ); } -print_header ( [], '', - '', true, false, true ); -echo '