Compare commits
3 Commits
113499254b
...
d7d8fc4b5e
Author | SHA1 | Date | |
---|---|---|---|
d7d8fc4b5e | |||
b1b0da0c08 | |||
3eec88c228 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -54,7 +54,6 @@ Temporary Items
|
||||
|
||||
# TheTempusProject Specific
|
||||
.htaccess
|
||||
app/config/*
|
||||
!app/config/constants.php
|
||||
uploads/images/*
|
||||
logs/*
|
||||
|
447
README.md
447
README.md
@ -1,131 +1,380 @@
|
||||
# The Tempus Project
|
||||
|
||||
_Rapid Prototyping Framework built on PHP utilizing the MVC pattern with a Bootstrap front-end_
|
||||
|
||||
__Developer(s):__
|
||||
need to make a vs battle for dnd. someone makes a truly broken character, we take the base character and hand it to two people and give them some time to figure out how they would break it
|
||||
|
||||
- __Joey Kimsey__ - _Lead Developer_
|
||||
need to track points once a week
|
||||
|
||||
a huge table tracks points day to day then we add and erase the old data, or move it to historical...
|
||||
|
||||
## Rapid Prototyping Framework
|
||||
|
||||
### Developer(s): Joey Kimsey
|
||||
|
||||
The aim of this project is to provide a simple and stable platform from which to easily add functionality. The goal being the ability to quickly build and test new projects with a lightweight ecosystem to help.
|
||||
|
||||
**Notice: This code is in _still_ not production ready. This framework is provided as is, use at your own risk.**\
|
||||
**Notice: This code is in _still_ not production ready. This framework is provided as is, use at your own risk.**
|
||||
I am working very hard to ensure the system is safe and reliable enough for me to endorse its widespread use. Unfortunately, it still needs a lot of QA and improvements.
|
||||
|
||||
## Table of contents
|
||||
|
||||
[[_TOC_]]
|
||||
|
||||
## Find Us
|
||||
|
||||
* [DockerHub](https://hub.docker.com/repositories/thetempusproject)
|
||||
* [Packagist](https://packagist.org/users/joeyk4816/packages/)
|
||||
* [GitLab](https://git.thetempusproject.com/the-tempus-project/thetempusproject)
|
||||
|
||||
## Summary
|
||||
|
||||
The Tempus Project is a PHP application utilizing the MVC pattern to serve up simple pages and APIs with minimal effort. It requires a MySQL database to function and is designed to run equally well with nginx or apache powering the webserver. Most of the core functionality is developed in house and provided through dependencies. At this time, the frontend is driven on bootstrap 3 and FontAwesome for simplicity.
|
||||
Currently I am in the process of testing all the systems in preparation for the first production ready release. The beta is still on-going. If you would like to participate or stay up to date with the latest, you can find more information at: https://TheTempusProject.com/beta
|
||||
|
||||
## Features
|
||||
|
||||
- A Plugin system that allows plug-and-play functionality
|
||||
- A User management system
|
||||
- groups
|
||||
- permissions
|
||||
- preferences
|
||||
- registration and recovery
|
||||
(All Controlled dynamically via our plugin interface)
|
||||
- Compatibility with both Apache and NGINX
|
||||
- Built with Bootstrap with a focus on mobile compatibility
|
||||
- Incredibly easy to set-up, deploy, and develop
|
||||
A User management system with groups, permissions, preferences, registration, and recovery. (All Controlled dynamically via our plugin interface)
|
||||
A Plugin system that allows plug-and-play functionality for a huge number of features.
|
||||
Compatibility with both Apache and NGINX.
|
||||
Built with Bootstrap with a focus on mobile compatibility.
|
||||
Incredibly easy to set-up, deploy, and develop with.
|
||||
|
||||
## Installation
|
||||
|
||||
The preferred method for installation is [Composer](#composer) but special attention has been given to installation and usage [without Composer](#composer).
|
||||
|
||||
### Composer
|
||||
|
||||
The simplest method to start a new project is to use composer to create a new project and automatically clone all the necessary files:
|
||||
|
||||
#### via create-project
|
||||
|
||||
```
|
||||
composer create-project thetempusproject/thetempusproject test-app
|
||||
```
|
||||
|
||||
#### via clone & install
|
||||
|
||||
1. Clone the directory to wherever you want to install the framework.
|
||||
`git clone https://git.thetempusproject.com/the-tempus-project/thetempusproject.git <test-app>`
|
||||
1. Open your terminal to the directory you previously cloned the repository.
|
||||
`cd <test-app>`
|
||||
1. Install using composer:
|
||||
`php composer.phar install`
|
||||
Preferred method for installation is using composer.
|
||||
|
||||
### Manually
|
||||
|
||||
### Docker
|
||||
|
||||
### Composer
|
||||
|
||||
1. Clone the directory to wherever you want to install the framework.
|
||||
`git clone https://git.thetempusproject.com/the-tempus-project/thetempusproject.git <test-app>`
|
||||
1. Open your terminal to the directory you previously cloned the repository.
|
||||
`cd <test-app>/`
|
||||
1. Clone the dependency directories to the vendor/ folder.
|
||||
```
|
||||
cd vendor/
|
||||
git clone https://git.thetempusproject.com/the-tempus-project/bedrock.git bedrock
|
||||
git clone https://git.thetempusproject.com/the-tempus-project/canary.git canary
|
||||
git clone https://git.thetempusproject.com/the-tempus-project/hermes.git hermes
|
||||
git clone https://git.thetempusproject.com/the-tempus-project/houdini.git houdini
|
||||
```
|
||||
2. Open your terminal to the directory you previously cloned the repository.
|
||||
3. Install using composer:
|
||||
`php composer.phar install`
|
||||
4. Open your browser and navigate to install.php (it will be in the root directory of your installation)
|
||||
5. When prompted, complete the forms and complete the process.
|
||||
|
||||
__Note:__ The autoloader should automatically detect and use the dependencies, but they need to be sorted into the folders ans shown above.
|
||||
#### Apache
|
||||
|
||||
#### NGINX
|
||||
|
||||
## Docker
|
||||
#### Docker-Compose
|
||||
|
||||
To enable quick deployment and collaboration The Tempus Project is distributed with the files to build your own docker images or stack with apache or nginx The included `docker-compose.yml` will load up an entire stack including apache and nginx, as well as a MySQL server with phpmyadmin.
|
||||
If you have any trouble with the installation, you can check out our FAQ page on the wiki for answers to common issues.
|
||||
|
||||
You will need docker installed on your system then you can either download the latest images from DockerHud:
|
||||
If you would like a full copy of the project with all of its included dependencies you can find it at https://github.com/TheTempusProject/TempusProjectFull
|
||||
Please note this repository is only up to the latest _stable_ release. Please continue to use composer update to get the latest development releases.
|
||||
|
||||
```
|
||||
docker pull thetempusproject/ttp-apache
|
||||
docker pull thetempusproject/ttp-nginx
|
||||
```
|
||||
**Do not forget to remove install.php once you have finished installation!**
|
||||
|
||||
Or you can build your own images from this repository. More information can be found in the included README files:
|
||||
|
||||
* [Apache Image](docker/ttp-apache/README.md)
|
||||
* [Nginx Image](docker/ttp-nginx/README.md)
|
||||
|
||||
### Docker-Compose
|
||||
|
||||
The Docker stack included here will build new versions of the nginx and apache webserver and launch them in individual containers. It will also create 2 more containers; one for php, and one for phpmyadmin.
|
||||
|
||||
```
|
||||
docker-compose -f docker-compose.yml up --build -d --no-cache
|
||||
```
|
||||
|
||||
__Note:__ If you cloned the repository from git, you will need to copy the `docker/.env.example` to `.env` in the root directory and update the contents before proceeding with docker-compose.
|
||||
|
||||
## Contributing
|
||||
|
||||
TheTempusProject is an open source project and welcomes community contributions. Please refer to the [Contributing file](CONTRIBUTING.md) for more details.
|
||||
|
||||
## License
|
||||
|
||||
See the [LICENSE](LICENSE) file for licensing information as it pertains to files in this repository.
|
||||
|
||||
## Known Issues
|
||||
|
||||
- [ ] The blog plugin should add a welcome post during the installResources step of the installer. It doesn't work right now.
|
||||
|
||||
## Currently being developed
|
||||
#### Currently being developed
|
||||
|
||||
- [ ] Adding documentation
|
||||
- [ ] Unit testing
|
||||
- [ ] Unit tests
|
||||
|
||||
## Future updates
|
||||
#### Future updates
|
||||
|
||||
- [ ] Expansion of PDO to allow different database types
|
||||
- [ ] Update installer to account for database deltas, allowing easy updating.
|
||||
- [ ] Update installer to account for updates.
|
||||
- [ ] Implement uniformity in terms of error reporting, exceptions, logging.
|
||||
- [ ] I want to make an api that allows you to download and install new plugins from a centralized repository
|
||||
- [ ] i want plugin instalation to be compatible with composer for easier management of added plugins.
|
||||
- [ ] The templating system has gotten too large and needs to be split into its own repo
|
||||
|
||||
TTP ToDo:
|
||||
|
||||
need to integrate new plugins for some moved features
|
||||
canary
|
||||
comments
|
||||
members
|
||||
messages
|
||||
Split inbox and outbox apart
|
||||
split messages from usercp
|
||||
redirects
|
||||
|
||||
need to make sure all 'use ' statements are updated to new repo names
|
||||
|
||||
namespace TempusDebugger; => namespace TheTempusProject\Canary;
|
||||
namespace TheTempusProject\Houdini; => namespace TheTempusProject\houdini;
|
||||
namespace TheTempusProject/TempusTool; => namespace TheTempusProject\Overwatch;
|
||||
need a mechanism for handeling config/constants.php in each plugin
|
||||
migrate all 'secondary' constants (constants not used in the default execution of the application) to plugin folders
|
||||
|
||||
Perform final F & R for:
|
||||
"tpc"
|
||||
|
||||
|
||||
|
||||
need better handeling around blog filters like month and day
|
||||
|
||||
split profile from usercp
|
||||
|
||||
|
||||
need a way to secure the api
|
||||
need a standard way to do apis
|
||||
need a way to show parts conditionally like {@if}
|
||||
need
|
||||
if
|
||||
else
|
||||
elseif
|
||||
need a way to show something conditionally if a plugin is enabled
|
||||
like {@enabled:comments}
|
||||
{comments}
|
||||
{@enabled}
|
||||
|
||||
https://css-tricks.com/drag-and-drop-file-uploading/
|
||||
|
||||
https://www.smashingmagazine.com/2018/01/drag-drop-file-uploader-vanilla-js/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
need to merge both autoloaders into the same one under bin
|
||||
need to be able to install multiple database tables for the same plugin
|
||||
|
||||
|
||||
rename default.js and .css to main.js/css
|
||||
fix where i moved those to the app/css and app/js folders
|
||||
|
||||
|
||||
|
||||
make a new template repo/dependency
|
||||
make a new Debug repo/dependency
|
||||
Fix the plugin
|
||||
fix the console logger
|
||||
|
||||
add the ability to include js files
|
||||
add the ability to include css files as needed
|
||||
|
||||
chat should include a config for the refresh timer
|
||||
|
||||
|
||||
|
||||
|
||||
and better error handeling for models and plugins
|
||||
need to make a singular list function to remove or combine these:
|
||||
listGroupsSimple
|
||||
listPosts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
i need to move everything moderator relateed to comments
|
||||
i also need to make sure that moderators can actually moderate
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
the get form html thing should work perfectly with the database array to create hella simple to generate forms for anything
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
we are not doing anything with requiredPlugins
|
||||
|
||||
|
||||
comments and blog are being manually added in the admin dashboard, this could be a problem when they are disabled
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
removed from blog filter
|
||||
commentCount
|
||||
|
||||
|
||||
|
||||
need to address the error handler just failing to work
|
||||
|
||||
and the exception handler picking up random errors
|
||||
|
||||
|
||||
need to revisit all of the form checking and make sure it is apparent to the user when and how they mess something up.
|
||||
|
||||
|
||||
many pages are missing descriptions, need to add them
|
||||
|
||||
|
||||
https://jsonapi.org/format/
|
||||
|
||||
|
||||
need a way for the template system to:
|
||||
switch between the meta-header content types for the sharing info
|
||||
xlarge
|
||||
large
|
||||
etc
|
||||
need better checking around title, meta-image, and descriptions
|
||||
prevent accidently feeding bad images or text to these fields
|
||||
need to manages js and css includes better, and incorperate it into templating system
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
the get timezone getdate gettime format functions all need to be migrated to app, stored as static vars and refactored
|
||||
in core, am i using htaccess.html or nginx.html anywhere, if not, change them to .example
|
||||
Routes -> getHost is using a terrible conditional for docker hosts, need to improve
|
||||
Need to test all the filters for the editor stuff
|
||||
need the ability for the autoloader to accept specific file name associations
|
||||
needs a require_all
|
||||
need to re-namespace all classes and functions
|
||||
some classes need to be converted to non-static
|
||||
some functions need to be converted to more static
|
||||
run from the command line
|
||||
|
||||
initiated // is in so many controllers, i def want this removed initialized
|
||||
tempus_project.php
|
||||
test running commands from cli
|
||||
if we move install.php to the bin, it will be unaccessible to the web server??
|
||||
if its unaccessible except theough the index.php router, we don't need to delete it because its unaccessible again
|
||||
can i use submodules?
|
||||
errors should be able to be customized
|
||||
if its in the app
|
||||
should add more logging, esp for admin actions
|
||||
need to add self::$pageDescription to many pages
|
||||
man, messages is hot garbage, def needs a rework
|
||||
need a mechanism to add listeners and events
|
||||
ability to restore backups of perms prefs and configs
|
||||
if your controller has no index method, you're just SOL
|
||||
a blank page is called and no method is loaded
|
||||
Warns should be for failed checks
|
||||
add a check for having write access to the config folder and the uploads folder
|
||||
and whatever is going to be needed to the plugin downloading
|
||||
|
||||
some configs have been removed and need to be accounted for
|
||||
Unused:
|
||||
---------------------------
|
||||
Config::getValue('bugReports/sendEmail')
|
||||
Config::getValue('bugReports/emailTemplate')
|
||||
Config::getValue('feedback/sendEmail')
|
||||
Config::getValue('feedback/emailTemplate')
|
||||
Config::getValue('uploads/files')
|
||||
Config::getValue('uploads/images')
|
||||
Config::getValue('uploads/maxFileSize')
|
||||
|
||||
|
||||
after all changes are pushed up and available, docker needs to be tested and updated
|
||||
when using composer, the composer page is populated and correct
|
||||
|
||||
the config step of install should be checking the db creds
|
||||
|
||||
|
||||
|
||||
// need to make notes of other standards as i go to update the contributing document
|
||||
// need to cross refrence the configs from core and ttp
|
||||
// ensure the resources folder is current
|
||||
// document, fix, and remove @TODO's where possible
|
||||
Search for cuss words, they make you look stupid
|
||||
fuck
|
||||
shit
|
||||
dam
|
||||
damm
|
||||
damn
|
||||
god
|
||||
ass
|
||||
cunt
|
||||
bitch
|
||||
ffs
|
||||
wtf
|
||||
|
||||
|
||||
|
||||
|
||||
had to remove the tracking pixel that was to be used with the contacts form, this will need to be re- added in a future update
|
||||
had to remove the rest controller, its currently just unused
|
||||
|
||||
// this can be used for the tempus project
|
||||
composer create-project laravel/laravel example-app
|
||||
|
||||
# Release Checklist
|
||||
|
||||
=====================
|
||||
- [] Spell check every file.
|
||||
- [] All documentation must be reviewed for accuracy.
|
||||
- [] If a new year has passed, ensure the year has been updated where applicable.
|
||||
- [] If default permissions, preferences, configs, base classes or models have been updated, update resources accordingly.
|
||||
- []
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace TempusDebugger; => namespace TheTempusProject\Canary;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
need to make sure a template loader can be called and still use the default template file, IE always add these CSS or JS resources.
|
||||
|
||||
|
||||
|
||||
|
||||
discord bot that shares updates on your party from the site
|
||||
maybe a summary after each session
|
||||
warning that time is coming up
|
||||
changes made to anything
|
||||
D&D news
|
||||
|
||||
|
||||
|
||||
|
||||
is it possible to store a campaigns state on the blockchain?
|
||||
|
||||
|
||||
|
||||
|
||||
keeping this as a repository for podcasts would get more people to check it out
|
||||
same for youtube
|
||||
|
||||
people love sharing their resources, so make it EASY to find podcasts, and youtube channels, and etsy stores, and give people a place to share it with their groups
|
||||
|
||||
try and earn commisions from this and do featured XYZ every x days or weeks or whatever
|
||||
|
||||
have different "kinds" of dice to portray on the dice roll page
|
||||
|
||||
maybe spinners instead of conventional die
|
||||
|
||||
maybe weird health potions for D4's
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
What is my goal here?
|
||||
|
||||
I would like to play Dungeons and Dragons once a week with my friends. In an ideal world, I would DM this game and spend all week building tools for us to use that I then put on a website which sells memberships to other players so they can use the tools too.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
i need to be able to name models in camel case, this shit is getting crazy. Find whatever prevents this and fix it
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* app/classes/admin_controller.php
|
||||
* app/classes/api_controller.php
|
||||
*
|
||||
* This is the base admin controller. Every other admin controller should
|
||||
* This is the base api controller. Every other api controller should
|
||||
* extend this class.
|
||||
*
|
||||
* @version 3.0
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* classes/config.php
|
||||
* app/classes/config.php
|
||||
*
|
||||
* This class handles all the hard-coded configurations.
|
||||
*
|
||||
* @version 3.0
|
||||
* @author Joey Kimsey <Joey@thetempusproject.com>
|
||||
* @link https://TheTempusProject.com/Core
|
||||
* @link https://TheTempusProject.com
|
||||
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
|
||||
*/
|
||||
namespace TheTempusProject\Classes;
|
||||
|
312
app/config/config.json
Normal file
312
app/config/config.json
Normal file
@ -0,0 +1,312 @@
|
||||
{
|
||||
"main":
|
||||
{
|
||||
"logo":
|
||||
{
|
||||
"type": "file",
|
||||
"pretty": "Site Logo (Used mostly in emails)",
|
||||
"default": "images/logo.png",
|
||||
"value": "images/logo.png"
|
||||
},
|
||||
"name":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Site Name",
|
||||
"default": "TTP Example",
|
||||
"value": "TableTop Elite"
|
||||
},
|
||||
"template":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Default Site Template",
|
||||
"default": "default",
|
||||
"value": "default"
|
||||
},
|
||||
"tokenEnabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable CSRF Token for all forms.",
|
||||
"default": true,
|
||||
"value": true
|
||||
},
|
||||
"loginLimit":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Maximum Login Attempts per hour",
|
||||
"default": 5,
|
||||
"value": "5"
|
||||
}
|
||||
},
|
||||
"uploads":
|
||||
{
|
||||
"files":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable File Uploads",
|
||||
"default": true,
|
||||
"value": true
|
||||
},
|
||||
"images":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable Image Uploads",
|
||||
"default": true,
|
||||
"value": true
|
||||
},
|
||||
"maxFileSize":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Maximum File Size",
|
||||
"default": 5000000,
|
||||
"value": "5000000"
|
||||
},
|
||||
"maxImageSize":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Maximum Image Size",
|
||||
"default": 500000,
|
||||
"value": "500000"
|
||||
}
|
||||
},
|
||||
"database":
|
||||
{
|
||||
"dbMaxQuery":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Maximum results per query",
|
||||
"default": 100,
|
||||
"protected": true,
|
||||
"value": 100
|
||||
},
|
||||
"dbEnabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Database Enabled",
|
||||
"default": true,
|
||||
"protected": true,
|
||||
"value": true
|
||||
},
|
||||
"dbHost":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Database Host (IE: http://localhost:3306)",
|
||||
"default": "127.0.0.1",
|
||||
"protected": true,
|
||||
"value": "194.195.208.99"
|
||||
},
|
||||
"dbName":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Database Name",
|
||||
"default": "ttp-example",
|
||||
"protected": true,
|
||||
"value": "tte-com"
|
||||
},
|
||||
"dbPassword":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Database Password",
|
||||
"default": "",
|
||||
"protected": true,
|
||||
"value": "lsVb#$D74816"
|
||||
},
|
||||
"dbPrefix":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Database table Prefix",
|
||||
"default": "TTP_",
|
||||
"protected": true,
|
||||
"value": "TTP_"
|
||||
},
|
||||
"dbUsername":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Database Username",
|
||||
"default": "root",
|
||||
"protected": true,
|
||||
"value": "joeyk"
|
||||
}
|
||||
},
|
||||
"group":
|
||||
{
|
||||
"defaultGroup":
|
||||
{
|
||||
"type": "customSelect",
|
||||
"pretty": "The Default Group for new registrations.",
|
||||
"default": 5,
|
||||
"value": 5
|
||||
}
|
||||
},
|
||||
"logging":
|
||||
{
|
||||
"admin":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable Admin Action Logging.",
|
||||
"default": true,
|
||||
"value": true
|
||||
},
|
||||
"errors":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable Error Logging",
|
||||
"default": true,
|
||||
"value": true
|
||||
},
|
||||
"logins":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable Login Logging",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"bugreports":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable Bug reporting.",
|
||||
"default": true,
|
||||
"value": true
|
||||
},
|
||||
"sendEmail":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Email the user after submitting.",
|
||||
"default": true,
|
||||
"value": true
|
||||
},
|
||||
"emailTemplate":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Email Template",
|
||||
"default": "BugReportEmail",
|
||||
"value": "BugReportEmail"
|
||||
}
|
||||
},
|
||||
"bugtracker":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable Bug tracking.",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"calendar":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable Calendar.",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"chat":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable Chat.",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"dice":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable dice usage.",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"dnd":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable D&D plugin.",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"feedback":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable User Feedback.",
|
||||
"default": true,
|
||||
"value": true
|
||||
},
|
||||
"sendEmail":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Email the user after submitting.",
|
||||
"default": false,
|
||||
"value": false
|
||||
},
|
||||
"emailTemplate":
|
||||
{
|
||||
"type": "text",
|
||||
"pretty": "Email Template",
|
||||
"default": "feedbackEmail",
|
||||
"value": "feedbackEmail"
|
||||
}
|
||||
},
|
||||
"initiativeTracker":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable tracker usage.",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"npcGeneration":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable NPC-Generator usage.",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"rng":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable rng usage.",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"tablefinder":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable the table finder.",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"timers":
|
||||
{
|
||||
"enabled":
|
||||
{
|
||||
"type": "radio",
|
||||
"pretty": "Enable timer usage.",
|
||||
"default": true,
|
||||
"value": true
|
||||
}
|
||||
}
|
||||
}
|
1
app/config/config.json.bak
Normal file
1
app/config/config.json.bak
Normal file
@ -0,0 +1 @@
|
||||
{"main":{"logo":{"value":"images\/logo.png"},"name":{"value":"Table-Top Elite"},"loginLimit":{"type":"text","pretty":"Maximum Login Attempts per hour","default":5,"value":5}},"database":{"dbMaxQuery":{"value":100},"dbEnabled":{"value":true},"dbHost":{"value":"194.195.208.99"},"dbName":{"value":"tte-com"},"dbPassword":{"value":"lsVb#$D74816"},"dbPrefix":{"value":"TTP_"},"dbUsername":{"value":"joeyk"}}}
|
@ -133,5 +133,14 @@ if ( ! defined( 'CONFIG_DIRECTORY' ) ) {
|
||||
define( 'DEFAULT_SESSION_PREFIX', 'TP_' );
|
||||
// Token
|
||||
define( 'DEFAULT_TOKEN_NAME', 'TP_SESSION_TOKEN' );
|
||||
|
||||
# Bugsnag
|
||||
define( 'BUGSNAG_API_KEY', '88045bdc058de51139ac1a47dcd5694b' );
|
||||
// define( 'BUGSNAG_API_KEY', 'cb94acd2a46160589b37cbaad0c61047' );
|
||||
|
||||
# Recaptcha
|
||||
|
||||
# Google Analytics
|
||||
|
||||
# Tell the app; all constants have been loaded
|
||||
define( 'TEMPUS_PROJECT_CONSTANTS_LOADED', true );
|
||||
|
1
app/config/install.json
Normal file
1
app/config/install.json
Normal file
File diff suppressed because one or more lines are too long
1
app/config/permissions.json
Normal file
1
app/config/permissions.json
Normal file
@ -0,0 +1 @@
|
||||
{"adminAccess":{"pretty":"Access Administrator Areas","default":false},"addRoute":{"pretty":"Add Custom Routes","default":false},"uploadImages":{"pretty":"Upload images (such as avatars)","default":false},"bugReport":{"pretty":"Can Submit Bug Reports","default":false},"bugTrack":{"pretty":"Can Track Bugs","default":false},"useCalendar":{"pretty":"Can use the calendar feature","default":false},"createEvents":{"pretty":"Can add events to calendars","default":false},"chat":{"pretty":"Can use chat","default":false},"modAccess":{"pretty":"Access Moderator Areas","default":false},"dice":{"pretty":"Can use dice","default":true},"canCreateCharacters":{"pretty":"Can use the character creator","default":true},"canCreateClasses":{"pretty":"Can add Classes.","default":true},"canCreateItems":{"pretty":"Can add Items","default":true},"canCreateMonsters":{"pretty":"Can add Monsters","default":true},"canCreateRaces":{"pretty":"Can add Races","default":true},"canCreateSkills":{"pretty":"Can add Skills","default":true},"canCreateSourceBooks":{"pretty":"Can add SourceBooks","default":true},"canCreateSpells":{"pretty":"Can add Spells","default":true},"feedback":{"pretty":"Can Submit Feedback","default":false},"uploadFiles":{"pretty":"Can upload files","default":false},"useInitiativeTracker":{"pretty":"Can use the tracker","default":true},"memberAccess":{"pretty":"Access Member Areas","default":false},"controlMemberships":{"pretty":"User can Access and Control user memberships.","default":false},"sendMessages":{"pretty":"Can send Messages","default":false},"sendNotifications":{"pretty":"Can send notifications","default":false},"suggest":{"pretty":"Can create suggestions","default":false},"redirects":{"pretty":"Can modify redirects","default":false},"useTableFinder":{"pretty":"Can use the table finder","default":true},"timers":{"pretty":"Can use timers","default":true}}
|
1
app/config/permissions.json.bak
Normal file
1
app/config/permissions.json.bak
Normal file
@ -0,0 +1 @@
|
||||
{"adminAccess":{"pretty":"Access Administrator Areas","default":false},"addRoute":{"pretty":"Add Custom Routes","default":false},"uploadImages":{"pretty":"Upload images (such as avatars)","default":false},"bugReport":{"pretty":"Can Submit Bug Reports","default":false},"bugTrack":{"pretty":"Can Track Bugs","default":false},"useCalendar":{"pretty":"Can use the calendar feature","default":false},"createEvents":{"pretty":"Can add events to calendars","default":false},"chat":{"pretty":"Can use chat","default":false},"modAccess":{"pretty":"Access Moderator Areas","default":false},"dice":{"pretty":"Can use dice","default":true},"canCreateCharacters":{"pretty":"Can use the character creator","default":true},"canCreateClasses":{"pretty":"Can add Classes.","default":true},"canCreateItems":{"pretty":"Can add Items","default":true},"canCreateMonsters":{"pretty":"Can add Monsters","default":true},"canCreateRaces":{"pretty":"Can add Races","default":true},"canCreateSkills":{"pretty":"Can add Skills","default":true},"canCreateSourceBooks":{"pretty":"Can add SourceBooks","default":true},"canCreateSpells":{"pretty":"Can add Spells","default":true},"feedback":{"pretty":"Can Submit Feedback","default":false},"uploadFiles":{"pretty":"Can upload files","default":false},"useInitiativeTracker":{"pretty":"Can use the tracker","default":true},"memberAccess":{"pretty":"Access Member Areas","default":false},"controlMemberships":{"pretty":"User can Access and Control user memberships.","default":false},"sendMessages":{"pretty":"Can send Messages","default":false},"sendNotifications":{"pretty":"Can send notifications","default":false},"suggest":{"pretty":"Can create suggestions","default":false},"redirects":{"pretty":"Can modify redirects","default":false},"useTableFinder":{"pretty":"Can use the table finder","default":true},"timers":{"pretty":"Can use timers","default":true}}
|
1
app/config/preferences.json
Normal file
1
app/config/preferences.json
Normal file
@ -0,0 +1 @@
|
||||
{"gender":{"pretty":"Gender","type":"select","default":"unspecified","options":["male","female","other","unspecified"],"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"newsletter":{"pretty":"Receive our Newsletter?","type":"checkbox","default":"true","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"avatar":{"pretty":"Avatar","type":"file","default":"images\/defaultAvatar.png","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"timezone":{"pretty":"Timezone","type":"timezone","default":"America\/New_York","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"dateFormat":{"pretty":"Date Format","type":"select","default":"F j, Y","options":{"1-8-1991":"n-j-Y","8-1-1991":"j-n-Y","01-08-1991":"m-d-Y","08-01-1991":"d-m-Y","January 8, 1991":"F-j-Y","8 January, 1991":"j-F-Y","January 08, 1991":"F-d-Y","08 January, 1991":"d-F-Y","Jan 8, 1991":"M-j-Y","8 Jan 1991":"j-M-Y","Jan 08, 1991":"M-d-Y","08 Jan 1991":"d-M-Y"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"timeFormat":{"pretty":"Time Format","type":"select","default":"g:i:s A","options":{"3:33:33 AM":"g:i:s A","03:33:33 AM":"h:i:s A","3:33:33 am":"g:i:s a","03:33:33 am":"h:i:s a","3:33:33 (military)":"G:i:s","03:33:33 (military)":"H:i:s"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"pageLimit":{"pretty":"Items Displayed Per Page","type":"select","default":"10","options":["10","15","20","25","50"],"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"calendarPreference":{"pretty":"Default Calendar View","type":"select","default":"byMonth","options":{"Daily":"byDay","Weekly":"byWeek","Monthly":"byMonth","Yearly":"byYear","All Events":"events"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"weekStart":{"pretty":"First day of the week for the Calendar","type":"select","default":"sunday","options":{"Sunday":"6","Monday":"7"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"}}
|
1
app/config/preferences.json.bak
Normal file
1
app/config/preferences.json.bak
Normal file
@ -0,0 +1 @@
|
||||
{"gender":{"pretty":"Gender","type":"select","default":"unspecified","options":["male","female","other","unspecified"],"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"newsletter":{"pretty":"Receive our Newsletter?","type":"checkbox","default":"true","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"avatar":{"pretty":"Avatar","type":"file","default":"images\/defaultAvatar.png","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"timezone":{"pretty":"Timezone","type":"timezone","default":"America\/New_York","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"dateFormat":{"pretty":"Date Format","type":"select","default":"F j, Y","options":{"1-8-1991":"n-j-Y","8-1-1991":"j-n-Y","01-08-1991":"m-d-Y","08-01-1991":"d-m-Y","January 8, 1991":"F-j-Y","8 January, 1991":"j-F-Y","January 08, 1991":"F-d-Y","08 January, 1991":"d-F-Y","Jan 8, 1991":"M-j-Y","8 Jan 1991":"j-M-Y","Jan 08, 1991":"M-d-Y","08 Jan 1991":"d-M-Y"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"timeFormat":{"pretty":"Time Format","type":"select","default":"g:i:s A","options":{"3:33:33 AM":"g:i:s A","03:33:33 AM":"h:i:s A","3:33:33 am":"g:i:s a","03:33:33 am":"h:i:s a","3:33:33 (military)":"G:i:s","03:33:33 (military)":"H:i:s"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"pageLimit":{"pretty":"Items Displayed Per Page","type":"select","default":"10","options":["10","15","20","25","50"],"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"calendarPreference":{"pretty":"Default Calendar View","type":"select","default":"byMonth","options":{"Daily":"byDay","Weekly":"byWeek","Monthly":"byMonth","Yearly":"byYear","All Events":"events"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"weekStart":{"pretty":"First day of the week for the Calendar","type":"select","default":"sunday","options":{"Sunday":"6","Monday":"7"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"}}
|
@ -30,7 +30,7 @@ class Users extends ApiController {
|
||||
$response = 'No user found.';
|
||||
} else {
|
||||
$responseType = 'data';
|
||||
$response = $user;
|
||||
$response = $user->ID;
|
||||
}
|
||||
Views::view( 'api.response', ['response' => json_encode( [ $responseType => $response ], true )]);
|
||||
}
|
||||
|
@ -29,6 +29,11 @@ class Home extends Controller {
|
||||
self::$title = '{SITENAME}';
|
||||
self::$pageDescription = 'This is the homepage of your new Tempus Project Installation. Thank you for installing. find more info at https://thetempusproject.com';
|
||||
Views::view( 'index' );
|
||||
|
||||
Template::addHeader( 'Access-Control-Allow-Origin: *');
|
||||
$bugsnag = \Bugsnag\Client::make( BUGSNAG_API_KEY );
|
||||
\Bugsnag\Handler::register($bugsnag);
|
||||
$bugsnag->notifyException(new \RuntimeException("Test error"));
|
||||
}
|
||||
|
||||
public function login() {
|
||||
|
@ -217,7 +217,7 @@ pre {
|
||||
color: #000;
|
||||
background-color: #FFF;
|
||||
}
|
||||
#carousel-example-generic {
|
||||
#carousel-home {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.col-centered {
|
||||
|
@ -11,101 +11,8 @@
|
||||
/**
|
||||
* Automatically selects/de-selects all check boxes associated with that field
|
||||
**/
|
||||
function checkAll(ele) {
|
||||
var checkboxes = document.getElementsByTagName( 'input' );
|
||||
if (ele.checked) {
|
||||
test = true;
|
||||
} else {
|
||||
test = false;
|
||||
}
|
||||
for ( var i = 0; i < checkboxes.length; i++ ) {
|
||||
if ( checkboxes[i].type == 'checkbox' ) {
|
||||
if ( checkboxes[i].name == ele.value ) {
|
||||
checkboxes[i].checked = test;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function copyAll( ele ) {
|
||||
var eleName = '#' + ele;
|
||||
var text = $( eleName ).text();
|
||||
text = text.replaceAll( "''", "\n" ).trim();
|
||||
text = text.substring( 1, text.length - 1 );
|
||||
navigator.clipboard.writeText( text );
|
||||
console.log( '#' + ele );
|
||||
}
|
||||
|
||||
function insertTag( box, tag ) {
|
||||
var Field = document.getElementById( box );
|
||||
var currentPos = cursorPos( Field );
|
||||
var val = Field.value;
|
||||
var before = val.substring( 0, currentPos );
|
||||
var after = val.substring( currentPos, val.length );
|
||||
Field.value = before + '(' + tag + ')' + after;
|
||||
}
|
||||
import BugsnagPerformance from '//d2wy8f7a9ursnm.cloudfront.net/v1/bugsnag-performance.min.js'
|
||||
|
||||
function cursorPos( el ) {
|
||||
if ( el.selectionStart ) {
|
||||
return el.selectionStart;
|
||||
} else if ( document.selection ) {
|
||||
el.focus();
|
||||
var r = document.selection.createRange();
|
||||
if ( r == null ) {
|
||||
return 0;
|
||||
}
|
||||
var re = el.createTextRange(),
|
||||
rc = re.duplicate();
|
||||
re.moveToBookmark( r.getBookmark() );
|
||||
rc.setEndPoint( 'EndToStart', re );
|
||||
return rc.text.length;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function getRandomInt(min, max) {
|
||||
const minCeiled = Math.ceil(min);
|
||||
const maxFloored = Math.floor(max);
|
||||
return Math.floor(Math.random() * (maxFloored - minCeiled) + minCeiled);
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('select').each(function() {
|
||||
var selectedValue = $(this).attr('value');
|
||||
if (selectedValue) {
|
||||
$(this).removeAttr('value');
|
||||
$(this).find('option').each(function() {
|
||||
if ($(this).attr('value') === selectedValue) {
|
||||
$(this).prop('selected', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// with the dynamic footer, you need to adjust the content padding to make sure the footer doesn't overlap the content
|
||||
window.onload = function () {
|
||||
function updateFooterPadding() {
|
||||
var footer = document.querySelector('footer');
|
||||
var container = document.querySelector('.container-fluid.top-pad');
|
||||
if ( ! container ) {
|
||||
return;
|
||||
}
|
||||
// footer has no height but its children do!
|
||||
var footerHeight = Array.from(footer.children).reduce((totalHeight, child) => {
|
||||
return totalHeight + child.offsetHeight;
|
||||
}, 0);
|
||||
|
||||
footerHeight += 20; // Add 20px for padding
|
||||
|
||||
// console.error(footerHeight);
|
||||
|
||||
container.style.setProperty('--footer-height', footerHeight + 'px');
|
||||
}
|
||||
|
||||
// Update padding on initial load
|
||||
updateFooterPadding();
|
||||
|
||||
// Update padding on window resize
|
||||
window.addEventListener('resize', updateFooterPadding);
|
||||
};
|
||||
BugsnagPerformance.start({ apiKey: '88045bdc058de51139ac1a47dcd5694b' });
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* app/plugins/notification/models/notification.php
|
||||
* app/plugins/notifications/models/notification.php
|
||||
*
|
||||
* This class is used for the manipulation of the notifications database table.
|
||||
*
|
||||
|
@ -34,6 +34,17 @@
|
||||
<link rel="stylesheet" href="{BOOTSTRAP_CDN}css/bootstrap.min.css" crossorigin="anonymous">
|
||||
<!-- Custom styles for this template -->
|
||||
{TEMPLATE_CSS_INCLUDES}
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ETGVZS7PZW"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-ETGVZS7PZW');
|
||||
</script>
|
||||
|
||||
<!-- Bugsnag -->
|
||||
<script language="JavaScript" crossorigin="anonymous" type="text/javascript" src="https://d2wy8f7a9ursnm.cloudfront.net/v1/bugsnag-performance.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
|
@ -1,11 +1,11 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
|
||||
<div id="carousel-home" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
|
||||
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
|
||||
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
|
||||
<li data-target="#carousel-home" data-slide-to="0" class="active"></li>
|
||||
<li data-target="#carousel-home" data-slide-to="1"></li>
|
||||
<li data-target="#carousel-home" data-slide-to="2"></li>
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="bg-primary slide-text-bg carousel-caption main-text">
|
||||
@ -36,10 +36,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#carousel-example-generic" class="left carousel-control" data-slide="prev">
|
||||
<a href="#carousel-home" class="left carousel-control" data-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>
|
||||
</a>
|
||||
<a href="#carousel-example-generic" class="right carousel-control" data-slide="next">
|
||||
<a href="#carousel-home" class="right carousel-control" data-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -45,18 +45,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 ">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Messages</a></li>
|
||||
</ul>
|
||||
here
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="{ROOT_URL}messages/create?prepopuser={USERNAME}" data-original-title="Broadcast Message" data-toggle="tooltip" type="button" class="btn btn-sm btn-primary"><i class="glyphicon glyphicon-envelope"></i></a>
|
||||
{ADMIN}
|
||||
|
@ -20,6 +20,7 @@
|
||||
],
|
||||
"require":
|
||||
{
|
||||
"bugsnag/bugsnag": "^3.0",
|
||||
"fortawesome/font-awesome": "4.7",
|
||||
"thetempusproject/bedrock": "1.0.10",
|
||||
"thetempusproject/canary": "1.0.5",
|
||||
|
12
index.html
Normal file
12
index.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body {background-color: #32363B;}
|
||||
h1 {color: #00B050;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Coming Soon - TTE</h1>
|
||||
</body>
|
||||
</html>
|
67
server/README.md
Normal file
67
server/README.md
Normal file
@ -0,0 +1,67 @@
|
||||
# fresh install
|
||||
|
||||
## Install required apps
|
||||
```
|
||||
apt install git composer php8.1-curl -y
|
||||
```
|
||||
|
||||
## Set-Up the SSL folder to keep things together
|
||||
|
||||
```
|
||||
mkdir /etc/nginx/ssl/
|
||||
```
|
||||
|
||||
- Now That you have the directory created, copy the `.key` and `.pem` files into the newly made ssl folder on the server.
|
||||
- You will then need to modify the filer ownership and permissions
|
||||
|
||||
```
|
||||
chmod -R 655 /etc/nginx/ssl
|
||||
chown -R www-data:www-data /etc/nginx/ssl
|
||||
```
|
||||
|
||||
## Add configs for the site
|
||||
|
||||
- First, copy `ttp.conf` into the `/etc/nginx/snippets/` folder.
|
||||
- Next, copy the `tabletopelite.com.conf` file into the `/etc/nginx/sites-available/` folder.
|
||||
- The next block will acomplish a few things: backup the old config, enable the new config, disable the old config, and restart the server.
|
||||
```
|
||||
mkdir /etc/nginx/sites-available/old/
|
||||
sudo mv /etc/nginx/sites-available/* /etc/nginx/sites-available/old/
|
||||
sudo ln -s /etc/nginx/sites-available/tabletopelite.com.conf /etc/nginx/sites-enabled/tabletopelite.com.conf
|
||||
sudo rm -rf /etc/nginx/sites-enabled/*
|
||||
sudo systemctl restart nginx.service
|
||||
```
|
||||
|
||||
## Set-Up the files
|
||||
|
||||
```
|
||||
cd /var/www/
|
||||
git config --global credential.helper store
|
||||
git clone https://git.thetempusproject.com/tabletopelite/tabletopelite.com.git tabletopelite.com
|
||||
git fetch
|
||||
git checkout production
|
||||
```
|
||||
|
||||
_You will be prompted for git creds, use the creds shared below_
|
||||
|
||||
```
|
||||
git config --global --add safe.directory /var/www/tabletopelite.com
|
||||
git config --global --add safe.directory /var/www/tabletopelite.com/vendor/tabletopelite/hermes
|
||||
git config --global user.name "Production Server"
|
||||
git config --global user.email webmaster@tabletopelite.com
|
||||
cd tabletopelite.com
|
||||
composer install
|
||||
chmod -R 777 .
|
||||
chown -R www-data:www-data .
|
||||
```
|
||||
|
||||
#### GitLab Credentials:
|
||||
|
||||
User: `root`\
|
||||
Password: `rdFtVPhzlu6u6orxN4NAsbgAE4AyqZPTXPXQTleyA5I=`
|
||||
|
||||
#### Logging
|
||||
|
||||
```
|
||||
tail -f /var/log/nginx/*.log
|
||||
```
|
36
server/tabletopelite.com.conf
Normal file
36
server/tabletopelite.com.conf
Normal file
@ -0,0 +1,36 @@
|
||||
# upstream to abstract backend connection(s) for php
|
||||
upstream php {
|
||||
server unix:/run/php/php8.1-fpm.sock;
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name tabletopelite.com;
|
||||
include snippets/well-known;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
server {
|
||||
listen 443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
server_name tabletopelite.com;
|
||||
include snippets/ssl-params.conf;
|
||||
root /var/www/tabletopelite.com;
|
||||
index index.php;
|
||||
|
||||
# max php upload size
|
||||
client_max_body_size 100M;
|
||||
|
||||
# disable direcory indexing
|
||||
autoindex off;
|
||||
|
||||
# custom TTP code
|
||||
include snippets/ttp.conf;
|
||||
|
||||
location ~* \.php$ {
|
||||
fastcgi_pass php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
fastcgi_intercept_errors on;
|
||||
}
|
||||
}
|
28
server/tabletopelite.com.key
Normal file
28
server/tabletopelite.com.key
Normal file
@ -0,0 +1,28 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDjrOt2qp1aP2ai
|
||||
X+eg+kw4viSrZGj6QdZQG8DEnr5ILF4JgngJOZeVeOSWI9zSQW/rkyv2lR1brNft
|
||||
3fpCdnJNLjLhGqpDqf8NAoADy9Qa8vXsPAR/8aQ5FmEVP5flGTmzY/9wPyZpPW0u
|
||||
pffwCdP7v7kxXxEwXDY6q4UzvyUpocdbrQqqX/YvuC+aKrPSk7TDg/WdSgpq2XQh
|
||||
5tRtbtbeXn8BYzgZeSEtw6wVVN3ZDWzizg0qB+Jn1P9GABqAY8aKFZmds1gNrfre
|
||||
sOqfe8Tjiak/HHPsJCQ6NLN0n0woZmM359DppnSRl9tX3xkHfBD7JOg44YJb0S3K
|
||||
cDcfad0DAgMBAAECggEAI3LdBpDyBwcwF8AO9IWEMKGKXBU6MxzlHXv0u6hrwBkI
|
||||
WzqxLd6Ft4QnMylKTIJbxrYXdkEpXQjAZgzV1ltS2KmEyn+4WuixCXmGLREjaT7D
|
||||
A5EksjcRdsIBQ6mvIMCYt1Guh++NL32c7lJxFDKzitMDJqjCqGDzIJdsGe58/soi
|
||||
aanRRZwg1THcMqEW9fVyqWgyt9eTPRsCysIVSElxfyoBBKZXgSHqOPGhpcO8Wn86
|
||||
KIKourtXQq90J2ATv9oB9fVMQVA/kg7YZfL0YHX8mnEacvnjbbYkB1c6EoqTBFOh
|
||||
Nh7bGiIXAJK8Hd6VU20aKygoHabj5eDzJGEHn4EBIQKBgQD2vrv4OHtx8Hcdz5n3
|
||||
atPekd/E5x34alC0V7djQBvAHYcvRf/soiHI12fb8NBaRt3KMOu61zKlYlfmhmzo
|
||||
6MeP9fmDFnCtxJLAwbJfp1Q7jz7dLYZXzyfGngjhCN58koBMGOjlMxo7GU276jhq
|
||||
9NJ68xFgk0rCgJvPUijZ/SredQKBgQDsNxPr0sxe4fV4CdsOt+vGkU5ir7EpRFD0
|
||||
oZ7u3BIdqZJdUDolchZVJ5kQSIJ0KTpBqQhS/btl0G8tP+ugYi2t5h3WvSMh2ScB
|
||||
y5/aD+D2M4jK9nuObNPHi6Gzd8d+1EB4N/tgsxsZMJgUX9XD/++XoXUXToHwAZ9Q
|
||||
4401lNVOlwKBgQDJhiJTqx33gyRmbqYbk16Ti6StVu39dCeSA4o+P5/qmrNMgulx
|
||||
RUI+nN+wnNAuy25dsvL02Mn+lYGhP+03lNdY1tcAn5VL9x682/ZpdWqwcmAvmPz+
|
||||
Pq0H5Q7vbKT6LVUn0bh1afVki1gXwEZv5KD71gY9UE9g6FVZUIsY71LR+QKBgQDI
|
||||
gPPy76q0O17ONqdvteR3V23OzM03dxq0m9+5Zqol7YMkm+3PTSjxvTvqm3HIQhqG
|
||||
E4HSWDfSc3t7UE+kgtG9U6AuX7tLhvTaTEpyoZnVweaySUiVm4CkV7y5BsoauPXE
|
||||
VdiVu1IcLqhYWwSrazqnXdBzKRuYavgdhBmfyqbJHwKBgQDjFuEBgPZhqYYX4oVN
|
||||
iWq0srFqFIjg2LILKh/RDs9qx6Nv7HNeDBtYa/kDcCoKDvsI4R0zDcX0OerYLHv+
|
||||
iGDkMIEJ4gm36iINryWpmHE4MXx5HhLsq9UqypMAEbPPvhbsrO2ZirFxklyhQ8Nw
|
||||
yclilDs5JOxNYgAysjoWR2YO4w==
|
||||
-----END PRIVATE KEY-----
|
28
server/tabletopelite.com.pem
Normal file
28
server/tabletopelite.com.pem
Normal file
@ -0,0 +1,28 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIErjCCA5agAwIBAgIUAYMRpN+9iKLSF6AfWFDLpb6BRawwDQYJKoZIhvcNAQEL
|
||||
BQAwgYsxCzAJBgNVBAYTAlVTMRkwFwYDVQQKExBDbG91ZEZsYXJlLCBJbmMuMTQw
|
||||
MgYDVQQLEytDbG91ZEZsYXJlIE9yaWdpbiBTU0wgQ2VydGlmaWNhdGUgQXV0aG9y
|
||||
aXR5MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRMwEQYDVQQIEwpDYWxpZm9ybmlh
|
||||
MB4XDTI0MDgxNjA5MzkwMFoXDTM5MDgxMzA5MzkwMFowYjEZMBcGA1UEChMQQ2xv
|
||||
dWRGbGFyZSwgSW5jLjEdMBsGA1UECxMUQ2xvdWRGbGFyZSBPcmlnaW4gQ0ExJjAk
|
||||
BgNVBAMTHUNsb3VkRmxhcmUgT3JpZ2luIENlcnRpZmljYXRlMIIBIjANBgkqhkiG
|
||||
9w0BAQEFAAOCAQ8AMIIBCgKCAQEA46zrdqqdWj9mol/noPpMOL4kq2Ro+kHWUBvA
|
||||
xJ6+SCxeCYJ4CTmXlXjkliPc0kFv65Mr9pUdW6zX7d36QnZyTS4y4RqqQ6n/DQKA
|
||||
A8vUGvL17DwEf/GkORZhFT+X5Rk5s2P/cD8maT1tLqX38AnT+7+5MV8RMFw2OquF
|
||||
M78lKaHHW60Kql/2L7gvmiqz0pO0w4P1nUoKatl0IebUbW7W3l5/AWM4GXkhLcOs
|
||||
FVTd2Q1s4s4NKgfiZ9T/RgAagGPGihWZnbNYDa363rDqn3vE44mpPxxz7CQkOjSz
|
||||
dJ9MKGZjN+fQ6aZ0kZfbV98ZB3wQ+yToOOGCW9EtynA3H2ndAwIDAQABo4IBMDCC
|
||||
ASwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcD
|
||||
ATAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBTW4vKXg4SbtGpF+7kcJ+UmpElZ5jAf
|
||||
BgNVHSMEGDAWgBQk6FNXXXw0QIep65TbuuEWePwppDBABggrBgEFBQcBAQQ0MDIw
|
||||
MAYIKwYBBQUHMAGGJGh0dHA6Ly9vY3NwLmNsb3VkZmxhcmUuY29tL29yaWdpbl9j
|
||||
YTAxBgNVHREEKjAoghMqLnRhYmxldG9wZWxpdGUuY29tghF0YWJsZXRvcGVsaXRl
|
||||
LmNvbTA4BgNVHR8EMTAvMC2gK6AphidodHRwOi8vY3JsLmNsb3VkZmxhcmUuY29t
|
||||
L29yaWdpbl9jYS5jcmwwDQYJKoZIhvcNAQELBQADggEBAIusxUSTtM8xuxUvmj0D
|
||||
dlRZah0mlAyOZIowHbOMbY+b0KlauXPG5da2dXyo4M6QBTRDZAYvGKnItAOM3jwT
|
||||
5tezpuDRnMDt/ANqJzVw85AjonSkS9jVm/EXOxWhBEdyDewTCAn+F7meFg34l5L9
|
||||
bGH11OiNEmRNYtNSrh/mKZ5YDKwzVP7DbzWrd6iEu4FmnSzX0DbMr5fDaiFlF8OJ
|
||||
J7ZMhsWD5pFAZqeqcAytcpPSLxkrDInv9xqzyB4YJ7MfGOddchsLMdGCRDpvHybg
|
||||
X3LP1B6SXDsqz4FDw9C49c8ay9cRwATgEwaynpv9fTqyyNV07b/ZQ8YOhlGEqVpt
|
||||
STQ=
|
||||
-----END CERTIFICATE-----
|
74
server/ttp.conf
Normal file
74
server/ttp.conf
Normal file
@ -0,0 +1,74 @@
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/tabletopelite.com.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/tabletopelite.com.key;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/(doc|sql|setup)/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~* \.(?:js|css|png|jpg|gif|ico|woff|ttf|woff2)$ {
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
location /js/ {
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
try_files $uri /index.php?error=js404&file=$uri;
|
||||
}
|
||||
|
||||
location /css/ {
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
try_files $uri /index.php?error=css404&file=$uri;
|
||||
}
|
||||
|
||||
location /images/ {
|
||||
try_files $uri /index.php?error=image404&url=$uri;
|
||||
}
|
||||
|
||||
location /uploads/ {
|
||||
try_files $uri /index.php?error=upload404&url=$uri;
|
||||
}
|
||||
|
||||
location /errors/ {
|
||||
try_files $uri /index.php?error=$uri;
|
||||
}
|
||||
|
||||
location / {
|
||||
rewrite ^/(.+)$ /index.php?url=$1&$args;
|
||||
}
|
Reference in New Issue
Block a user