updated documentation
parent
726a2675ae
commit
7e62d6f11e
|
@ -1,16 +1,16 @@
|
|||
# Files
|
||||
### [about.template](./about.template)
|
||||
The customizable part of the content page, will eventually be replaced with a markdown file
|
||||
### [names.conf](./names.conf)
|
||||
Information about the installation location of ThreadR
|
||||
- domain name
|
||||
- ThreadR directory on that domain
|
||||
The customizable part of the content page, HTML code for now, will eventually be replaced with a markdown file
|
||||
### [instance.conf](./instance.conf)
|
||||
configuration for a specific instance
|
||||
- domain_name=<public facing domain name of the instance>
|
||||
- threadr_dir=<directory on the webhost>
|
||||
- db_username=<mysql user>
|
||||
- db_password=<mysql password>
|
||||
|
||||
Format: <config option>=<value>
|
||||
The format is strictly `<option>=<value>` because the mechanism used to load the config values is very simple. Don’t add additional whitespace for fancy formatting. Things *will* break. You have been warned.
|
||||
|
||||
This format is strictly enforced because the mechanism to load the config is very primitive. Don’t add additional whitespace for fancy formatting. Things *will* break. You have been warned.
|
||||
|
||||
How it is integrated: exec section of variable grabbler `/<config option>=/s/.*=//p" config/names.conf`
|
||||
The config is loaded once on deployment by the "variable grabbler" macro processor with `["exec","echo -n \"$(sed --quiet \"/<option>=/s/.*=//p\" config/instance.conf)\""]`.
|
||||
|
||||
### [README.md](./README.md)
|
||||
this file
|
||||
|
|
|
@ -1,15 +1,27 @@
|
|||
# Files
|
||||
### [variable_grabbler.pass0.json](./variable_grabbler.pass0.json), [variable_grabbler.pass1.json](./variable_grabbler.pass1.json), [variable_grabbler.pass2.json](./variable_grabbler.pass2.json)
|
||||
These are the the config files for ../variable_grabbler.py.
|
||||
A short description of what the variables do and where they should go:
|
||||
* `%NAVBAR%` (in HTML part of PHP file) → the Navbar, also includes an automatic logout-function if the user is in a place where they should never be logged in (triggered by absence of the $login variable)
|
||||
* `%SET_LOGIN_VARIABLE%` (in PHP code) → sets the $login variable in PHP by detecting if the user has a valid logged in session
|
||||
* `%NO_CHEAP_LOGIN_STEALING%` (in PHP code, before any non-header data is sent to client) → prevents the most primitive cookie stealing attempts, nothing advanced though
|
||||
* `%BANNER_COOKIES%` (in HTML part of PHP file) → the cookie banner that every web page has
|
||||
* `%PLEAZE_NO_CACHE%` (in PHP code, before any non-header data is sent to client) → requests the browser to not cache this page
|
||||
* `%FORCE_LOGOUT%` (in PHP code) → logout immediately (obviously less common than the other variables...)
|
||||
* `%CONTENT_DIR%` (anywhere in code) → the path to the ThreadR directory (without domain name)
|
||||
* `%STYLESHEET%` (in HTML) → adds the tag linking the stylesheet
|
||||
* `%REQUIRE_LOGIN%` (in PHP code, before any non-header data is sent to client) → sends users to the login page if they are not logged in
|
||||
### [[DIR] templates](./templates)
|
||||
contains the templates used by the macro processor
|
||||
### [pass0_templates.json](./pass0_templates.json)
|
||||
Macros that insert templates
|
||||
- `%NAVBAR%` the navigation bar at the top of the website (requires PHP)
|
||||
- `%BANNER_COOKIES%` the cookie banner (requires PHP)
|
||||
### [pass1_misc.json](./pass1_misc.json)
|
||||
Miscellaneous macros
|
||||
- `%STYLESHEET%` links stylesheet (HTML <head> section)
|
||||
- `%PLEAZE_NO_CACHE%` tell the browser not to cache this page (PHP, before any data is sent to the client)
|
||||
- `%COLOR_BEIGE%`, `%COLOR_ORANGE%`, `%COLOR_BLUE%`, `%COLOR_PINK%`, `%COLOR_CYAN%` color codes, format: #XXXXXX
|
||||
### [pass2_session.json](./pass2_session.json)
|
||||
Session handling macros
|
||||
- `%REQUIRE_LOGIN%` go to login page if not logged in
|
||||
- `%NO_CHEAP_SESSION_STEALING%` make sure that IP and user agent stay the same, otherwise end session
|
||||
- `%SET_LOGIN_VARIABLE%` sets the variable $login based on whether the user is logged in
|
||||
- `%FORCE_LOGOUT%` end session right here and now
|
||||
### [pass3_install-config.json](./pass3_install-config.json)
|
||||
Macros that grab the configuration values and inject them into the instance
|
||||
- `%DOMAIN_NAME%` the domain name of the instance
|
||||
- `%CONTENT_DIR%` the directory of the ThreadR home page on the webhost
|
||||
- `%DB_PASSWORD%` password for the MySQL server
|
||||
- `%DB_USERNAME%` username for the MySQL server
|
||||
- `%ABOUT_PAGE%` the template for the about page
|
||||
### [README.md](./README.md)
|
||||
this file
|
||||
|
|
|
@ -3,3 +3,5 @@
|
|||
contains the navbar, depends on a variable in PHP to determine which field on the navbar should be highlighted
|
||||
### [banner_cookies.template](./banner_cookies.template)
|
||||
contains the cookie banner
|
||||
### [README.md](./README.md)
|
||||
this file
|
||||
|
|
Loading…
Reference in New Issue