some small improvements here and there, added descriptions of all variables
parent
74e9709283
commit
436e265736
20
README.md
20
README.md
|
@ -95,13 +95,25 @@ logout
|
||||||
this file
|
this file
|
||||||
### run-once-script.sh
|
### run-once-script.sh
|
||||||
This script will be executed each time it is altered and pushed. Make sure to remove everything the previous user added before using it to not run these commands again.
|
This script will be executed each time it is altered and pushed. Make sure to remove everything the previous user added before using it to not run these commands again.
|
||||||
Leave the bang (#! comment) and the bottom part that is commented to instruct you to leave it there.
|
Leave the bang (#! comment) and the bottom part that has been commented to instruct you to leave it there.
|
||||||
### variable_grabbler.py
|
### variable_grabbler.py
|
||||||
This is the code variable replacer. It takes two arguments: The configuration file to be used and the file to be worked on.
|
This is the code variable replacer. It takes two arguments: The configuration file to be used and the file to be worked on.
|
||||||
The configuration file contains a json which defines replacement string for each code variable. Code variables are preceeded and followed by a % sign in code but this is not the case in the configuration.
|
The configuration file contains a json which defines replacement string for each code variable in the format `"<VARNAME>":"<String>"`. Code variables are preceeded and followed by a % sign in code but this is not the case in the configuration.
|
||||||
Alternative options to providing a string in the config are to add arrays defining files or commands (Commands are not implemented yet.). Read the source code for further information.
|
Also, they must be capitalized in code.
|
||||||
|
An alternative option to providing a string in the config is to add arrays defining files or commands (Commands are not implemented yet.). Format: `"<VARNAME>":["<file|exec>","<filepath|command>"]
|
||||||
|
Read the source code for further information.
|
||||||
### variable_grabbler.pass*.json
|
### variable_grabbler.pass*.json
|
||||||
the config files for variable_grabbler.py
|
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
|
||||||
### navbar.template, banner_cookies.template
|
### navbar.template, banner_cookies.template
|
||||||
file templates for variables from the code variable replacement system
|
file templates for variables from the code variable replacement system
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue