The PHP files for my Websites
The HTML files are generated using the /generate
route on the Index.php file.
They stay here on the Websites Repository
Made by me, Stake2
Using MIT License
Read Code of Conduct
The websites files, configuration, and style, are loaded from the files inside the Websites folder.
- Change the
Document Root
folder of your server to the folder where you cloned the repository - Start your server
- You can open the
/select
route likehttp://localhost/select
to select a website using the HTML form
Or type the localhost URL with the website and language you want to use
URL parameters:
http://localhost/select?website=[Website title here]&language=English
website: website name
language: language of the website
- A list of website names in English and Portuguese can be found in Websites.json
- Currently supported languages:
English
Portuguese
- The Index.php file gets the website variables like the title and language from the GET or POST, and stores them in the
$_SESSION
and$website["method"]
variables - It then defines the website files, configuration, style, and other variables for the website
- Then loads the website dependencies, PHP files, and tab templates if they exist
- The Index.php file gets the website variables like the title and language from the GET or POST, and stores them in the
$_SESSION
and$website["method"]
variables - It then defines the website files, configuration, style, and other variables for the website
- Then loads the website dependencies, PHP files, and tab templates if they exist
- Then the
/generate
route exports the website content into a HTML file inside the specific website folder which exists inside the Websites folder, exporting the file to the correct language folder (en/
for English andpt/
for Portuguese)
Connection of PHP files to Python modules
The "Watched.php" HTML tab generator reads the JSON database files generated by the "Watch_History.py" Python module.
In order to generate the "Watched things" and "Past registries" tabs on the Watch History website.
And also generate the "Watched things" tabs on all year websites.
The "Played.php" HTML tab generator reads the JSON database files generated by the "GamePlayer.py" Python module.
In order to generate the "Game sessions played" and "Past registries" tabs on the Play History website.
And also generate the "Game sessions played" tabs on all year websites.
The "Tasks.php" HTML tab generator reads the JSON database files generated by the "Tasks.py" Python module.
In order to generate the "Tasks" tab on the Tasks website.
And also generate the "Completed tasks" tabs on all year websites.
The "Summary.php" HTML tab generator reads the summary text files generated by the "Years.py" Python module.
In order to generate "Summary" tabs on all year websites website.