Skip to content

Stake2/PHP

Repository files navigation

Stake2 PHP

PHP 7.4.26 Contributors

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

License

Using MIT License

COC

Read Code of Conduct

Contribute

How to Contribute

Websites

The websites files, configuration, and style, are loaded from the files inside the Websites folder.

Loading websites

  1. Change the Document Root folder of your server to the folder where you cloned the repository
  2. Start your server
  3. You can open the /select route like http://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

How websites are loaded

  1. 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
  2. It then defines the website files, configuration, style, and other variables for the website
  3. Then loads the website dependencies, PHP files, and tab templates if they exist

How websites are generated

  1. 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
  2. It then defines the website files, configuration, style, and other variables for the website
  3. Then loads the website dependencies, PHP files, and tab templates if they exist
  4. 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 and pt/ 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.

Python: Connection of Python files to PHP files