diff --git a/.gitignore b/.gitignore index 433fc3b..a32fd2a 100644 --- a/.gitignore +++ b/.gitignore @@ -54,7 +54,6 @@ Temporary Items # TheTempusProject Specific .htaccess -app/config/* !app/config/constants.php uploads/images/* logs/* diff --git a/README.md b/README.md index 1beb543..beb66ad 100644 --- a/README.md +++ b/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 ` -1. Open your terminal to the directory you previously cloned the repository. -`cd ` -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 ` -1. Open your terminal to the directory you previously cloned the repository. -`cd /` -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 \ No newline at end of file diff --git a/app/config/config.json b/app/config/config.json new file mode 100644 index 0000000..6b4d687 --- /dev/null +++ b/app/config/config.json @@ -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 + } + } +} \ No newline at end of file diff --git a/app/config/config.json.bak b/app/config/config.json.bak new file mode 100644 index 0000000..9cb51ff --- /dev/null +++ b/app/config/config.json.bak @@ -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"}}} \ No newline at end of file diff --git a/app/config/constants.php b/app/config/constants.php index 32e8dda..d6a0ded 100644 --- a/app/config/constants.php +++ b/app/config/constants.php @@ -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 ); diff --git a/app/config/install.json b/app/config/install.json new file mode 100644 index 0000000..b5dcc5f --- /dev/null +++ b/app/config/install.json @@ -0,0 +1 @@ +{"installHash":"5175769b5a874f160b50c035ce21891f","installStep":"complete","modules":{"Group":{"name":"Group","class":"TheTempusProject\\Models\\Group","version":"1.0","installedVersion":"1.0","folder":"\/var\/www\/tabletopelite.com\/app\/models\/","type":"model","installDate":1723876391,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":false,"enabled_txt":"No<\/span>","installPreferences":"Skipped","installTable":"Skipped","installPermissions":"Skipped","installConfigs":"Skipped","installResources":"Success","installedResources":["1","2","3","4"]},"Log":{"name":"Log","class":"TheTempusProject\\Models\\Log","version":"1.0","installedVersion":"1.0","folder":"\/var\/www\/tabletopelite.com\/app\/models\/","type":"model","installDate":1723876391,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":false,"enabled_txt":"No<\/span>","installPermissions":"Skipped","installPreferences":"Skipped","installTable":"Skipped","installConfigs":"Skipped","installResources":"Success","installedResources":true},"Routes":{"name":"Routes","class":"TheTempusProject\\Models\\Routes","version":"1.0","installedVersion":"1.0","folder":"\/var\/www\/tabletopelite.com\/app\/models\/","type":"model","installDate":1723876391,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":false,"enabled_txt":"No<\/span>","installConfigs":"Skipped","installPreferences":"Skipped","installTable":"Skipped","installPermissions":"Skipped","installResources":"Success","installedResources":["1","2","3","4","5"]},"Sessions":{"name":"Sessions","class":"TheTempusProject\\Models\\Sessions","version":"1.0","installedVersion":"1.0","folder":"\/var\/www\/tabletopelite.com\/app\/models\/","type":"model","installDate":1723876391,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":false,"enabled_txt":"No<\/span>","installPermissions":"Skipped","installConfigs":"Skipped","installPreferences":"Skipped","installTable":"Skipped","installResources":"Success","installedResources":true},"User":{"name":"User","class":"TheTempusProject\\Models\\User","version":"1.0","installedVersion":"1.0","folder":"\/var\/www\/tabletopelite.com\/app\/models\/","type":"model","installDate":1723876391,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":false,"enabled_txt":"No<\/span>","installConfigs":"Skipped","installTable":"Skipped","installPermissions":"Skipped","installResources":"Success","installPreferences":"Skipped","installedResources":true},"Blog":{"name":"Blog","class":"TheTempusProject\\Plugins\\Blog","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/blog\/","type":"plugin","installDate":1723876392,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Bugreport":{"name":"Bugreport","class":"TheTempusProject\\Plugins\\Bugreport","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/bugreport\/","type":"plugin","installDate":1723876392,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Bugtracker":{"name":"Bugtracker","class":"TheTempusProject\\Plugins\\Bugtracker","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/bugtracker\/","type":"plugin","installDate":1723876392,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Calendar":{"name":"Calendar","class":"TheTempusProject\\Plugins\\Calendar","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/calendar\/","type":"plugin","installDate":1723876392,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Chat":{"name":"Chat","class":"TheTempusProject\\Plugins\\Chat","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/chat\/","type":"plugin","installDate":1723876392,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Comments":{"name":"Comments","class":"TheTempusProject\\Plugins\\Comments","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/comments\/","type":"plugin","installDate":1723876392,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":["5"]},"Dashboards":{"name":"Dashboards","class":"TheTempusProject\\Plugins\\Dashboards","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/dashboards\/","type":"plugin","installDate":1723876392,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Dice":{"name":"Dice","class":"TheTempusProject\\Plugins\\Dice","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/dice\/","type":"plugin","installDate":1723876392,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Dnd":{"name":"Dnd","class":"TheTempusProject\\Plugins\\Dnd","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/dnd\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Feedback":{"name":"Feedback","class":"TheTempusProject\\Plugins\\Feedback","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/feedback\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Fileshare":{"name":"Fileshare","class":"TheTempusProject\\Plugins\\Fileshare","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/fileshare\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Initiativetracker":{"name":"Initiativetracker","class":"TheTempusProject\\Plugins\\Initiativetracker","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/initiativetracker\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Members":{"name":"Members","class":"TheTempusProject\\Plugins\\Members","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/members\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":["5"]},"Messages":{"name":"Messages","class":"TheTempusProject\\Plugins\\Messages","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/messages\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Notifications":{"name":"Notifications","class":"TheTempusProject\\Plugins\\Notifications","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/notifications\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"NpcGenerator":{"name":"NpcGenerator","class":"TheTempusProject\\Plugins\\NpcGenerator","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/npcGenerator\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Polls":{"name":"Polls","class":"TheTempusProject\\Plugins\\Polls","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/polls\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Redirects":{"name":"Redirects","class":"TheTempusProject\\Plugins\\Redirects","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/redirects\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Rng":{"name":"Rng","class":"TheTempusProject\\Plugins\\Rng","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/rng\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Subscribe":{"name":"Subscribe","class":"TheTempusProject\\Plugins\\Subscribe","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/subscribe\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Suggestions":{"name":"Suggestions","class":"TheTempusProject\\Plugins\\Suggestions","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/suggestions\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Tablefinder":{"name":"Tablefinder","class":"TheTempusProject\\Plugins\\Tablefinder","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/tablefinder\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Timers":{"name":"Timers","class":"TheTempusProject\\Plugins\\Timers","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/tabletopelite.com\/app\/plugins\/timers\/","type":"plugin","installDate":1723876393,"lastUpdate":1723876396,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true}}} \ No newline at end of file diff --git a/app/config/permissions.json b/app/config/permissions.json new file mode 100644 index 0000000..7491dfd --- /dev/null +++ b/app/config/permissions.json @@ -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}} \ No newline at end of file diff --git a/app/config/permissions.json.bak b/app/config/permissions.json.bak new file mode 100644 index 0000000..7491dfd --- /dev/null +++ b/app/config/permissions.json.bak @@ -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}} \ No newline at end of file diff --git a/app/config/preferences.json b/app/config/preferences.json new file mode 100644 index 0000000..7998743 --- /dev/null +++ b/app/config/preferences.json @@ -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"}} \ No newline at end of file diff --git a/app/config/preferences.json.bak b/app/config/preferences.json.bak new file mode 100644 index 0000000..7998743 --- /dev/null +++ b/app/config/preferences.json.bak @@ -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"}} \ No newline at end of file diff --git a/app/controllers/home.php b/app/controllers/home.php index 3090638..9b221e4 100644 --- a/app/controllers/home.php +++ b/app/controllers/home.php @@ -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() { diff --git a/app/js/main.js b/app/js/main.js index 86fe116..bf85cfc 100644 --- a/app/js/main.js +++ b/app/js/main.js @@ -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); -}; \ No newline at end of file +BugsnagPerformance.start({ apiKey: '88045bdc058de51139ac1a47dcd5694b' }); diff --git a/app/templates/default/default.tpl b/app/templates/default/default.tpl index 0804a2d..9261e3c 100644 --- a/app/templates/default/default.tpl +++ b/app/templates/default/default.tpl @@ -34,6 +34,17 @@ {TEMPLATE_CSS_INCLUDES} + + + + + +