diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 2952fb1..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,74 +0,0 @@ -stages: - - prepare - - build - - test - - update - - deploy - -variables: - TIMEZONE: "America/New_York" # For the system in general - DATE_TIMEZONE: ${TIMEZONE} # For PHP - - GIT_DEPTH: 1 - GITLAB_API_URL: ${CI_API_V4_URL} - TARGET_BRANCH: ${CI_COMMIT_REF_NAME} # This is the branch chosen in the `Pipeline Schedule` - TARGET_REMOTE: "https://${GITLAB_USERNAME}:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git" - - # These could/should be overridden in an extending job: - UPDATE_BRANCH_PREFIX: "update_PHP_deps_" # Used for the update branch name, it will be followed by the datetime - GIT_USER: "DependBot" # Used for the update commit - GIT_EMAIL: "webmaster@thetempusproject.com" # Used for the update commit - GITLAB_USERNAME: "root" # Used for pushing the new branch and opening the MR - GITLAB_ACCESS_TOKEN: "glpat-PKEmivGtBfbz4DVPdhzk" # Used for pushing the new branch and opening the MR - MERGE_IF_SUCCESSFUL: "true" # Set to true, to merge automatically if the pipeline succeeds - SECONDS_BETWEEN_POOLING: 10 # Nbr of seconds between checking if the MR pipeline is successful, so then it will merge - JOB_GIT_FLAGS: "" - JOB_CURL_FLAGS: "" - JOB_COMPOSER_FLAGS: "" - -composer_update: - stage: update - rules: - - if: '$CI_COMMIT_BRANCH == "main"' - image: composer:latest - interruptible: true # allows to stop the job if a newer pipeline starts, saving resources and allowing new jobs to start because job concurrency is limited - script: - - git ${JOB_GIT_FLAGS} fetch origin ${TARGET_BRANCH} - - git ${JOB_GIT_FLAGS} checkout ${TARGET_BRANCH} - - git reset --hard origin/main - - git pull --allow-unrelated-histories - - export DATE_TIME="$(date '+%Y%m%d%H%M%S')" - - export MR_BRANCH="${UPDATE_BRANCH_PREFIX}${DATE_TIME}" - - git ${JOB_GIT_FLAGS} checkout -b "${MR_BRANCH}" - - composer update ${JOB_COMPOSER_FLAGS} - - if [ "$(git diff)" == "" ]; then echo "No updates needed!"; exit 0; fi - - export TITLE="Update PHP dependencies [${DATE_TIME}]" - - git ${JOB_GIT_FLAGS} commit -a -m "${TITLE}" - - git ${JOB_GIT_FLAGS} push "${TARGET_REMOTE}" "${MR_BRANCH}" - artifacts: - paths: - - vendor/ - cache: - key: ${CI_COMMIT_REF_SLUG} - paths: - - vendor/ - -prepare: - stage: prepare - script: - - echo "Preparing environment..." - -build: - stage: build - script: - - echo "Building the project..." - -test: - stage: test - script: - - echo "Running tests..." - -deploy: - stage: deploy - script: - - echo "Deploying the project..." \ No newline at end of file diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php deleted file mode 100644 index 4f6d829..0000000 --- a/.php-cs-fixer.php +++ /dev/null @@ -1,127 +0,0 @@ -exclude('somedir') - //->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php' - ->in(__DIR__) -; - -$config = new \PhpCsFixer\Config(); -return $config->setRules([ - '@PSR2' => true, - 'array_indentation' => true, - 'array_syntax' => ['syntax' => 'short'], - 'combine_consecutive_unsets' => true, - 'class_attributes_separation' => ['elements' => ['method' => 'one',]], - 'multiline_whitespace_before_semicolons' => false, - 'single_quote' => true, - 'strict_param' => false, - 'binary_operator_spaces' => [ - 'operators' => [ - // '=>' => 'align', - // '=' => 'align' - ] - ], - // 'blank_line_after_opening_tag' => true, - // 'blank_line_before_statement' => true, - 'braces' => [ - 'allow_single_line_closure' => true, - 'position_after_functions_and_oop_constructs' => 'same' - ], - // 'cast_spaces' => true, - // 'class_definition' => array('singleLine' => true), - 'concat_space' => ['spacing' => 'one'], - // 'declare_equal_normalize' => true, - // 'function_typehint_space' => true, - // 'single_line_comment_style' => ['comment_types' => ['hash']], - // 'include' => true, - // 'lowercase_cast' => true, - // 'native_function_casing' => true, - // 'new_with_braces' => true, - // 'no_blank_lines_after_class_opening' => true, - // 'no_blank_lines_after_phpdoc' => true, - // 'no_blank_lines_before_namespace' => true, - 'no_empty_comment' => true, - 'no_empty_phpdoc' => true, - // 'no_empty_statement' => true, - 'no_extra_blank_lines' => [ - 'tokens' => [ - // 'curly_brace_block', - // 'extra', - // 'parenthesis_brace_block', - // 'square_brace_block', - // 'throw', - // 'use', - ] - ], - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_mixed_echo_print' => ['use' => 'echo'], - 'no_multiline_whitespace_around_double_arrow' => true, - 'no_short_bool_cast' => true, - 'no_singleline_whitespace_before_semicolons' => true, - 'no_spaces_around_offset' => ['positions' => ['outside']], - 'no_trailing_comma_in_singleline' => ['elements' => ['arguments', 'array_destructuring', 'array', 'group_import']], - - 'spaces_inside_parentheses' => ['space' => 'single'], - // 'no_spaces_inside_parenthesis' => false, - 'control_structure_braces' => true, - - 'curly_braces_position' => [ - 'control_structures_opening_brace' => 'same_line', - 'functions_opening_brace' => 'same_line', - 'classes_opening_brace' => 'same_line', - ], - - - // need to add space after array declaration - // need to put each element on a line by itself when an array is multi line - - - - - - - - - - - 'no_unneeded_control_parentheses' => true, - 'no_unused_imports' => true, - 'no_whitespace_before_comma_in_array' => true, - 'no_whitespace_in_blank_line' => true, - 'normalize_index_brace' => true, - // 'object_operator_without_whitespace' => true, - // 'php_unit_fqcn_annotation' => true, - // 'phpdoc_align' => true, - // 'phpdoc_annotation_without_dot' => true, - // 'phpdoc_indent' => true, - // 'phpdoc_inline_tag' => true, - // 'phpdoc_no_access' => true, - // 'phpdoc_no_alias_tag' => true, - // 'phpdoc_no_empty_return' => true, - // 'phpdoc_no_package' => true, - // 'phpdoc_no_useless_inheritdoc' => true, - // 'phpdoc_return_self_reference' => true, - // 'phpdoc_scalar' => true, - // 'phpdoc_separation' => true, - // 'phpdoc_single_line_var_spacing' => true, - // 'phpdoc_summary' => true, - // 'phpdoc_to_comment' => true, - // 'phpdoc_trim' => true, - // 'phpdoc_types' => true, - 'phpdoc_var_without_name' => false, - 'increment_style' => ['style' => 'post'], - 'return_type_declaration' => true, - // 'self_accessor' => true, // risky - 'short_scalar_cast' => true, - 'single_class_element_per_statement' => true, - 'standardize_not_equals' => true, - 'ternary_operator_spaces' => true, - 'trailing_comma_in_multiline' => true, - 'trim_array_spaces' => false, - 'unary_operator_spaces' => true, - 'whitespace_after_comma_in_array' => true, - 'single_blank_line_at_eof' => true - ]) - ->setLineEnding("\n") -; \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 1227ff5..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at webmaster@thetempusproject.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 9ad8de4..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,135 +0,0 @@ -# Contribution Guidelines for TheTempusProject -Contributing to TheTempusProject is completely voluntary and should follow all of the guidelines listed here in order to ensure the highest probability of acceptance. It is highly recommended to use a php linter to automate more of this process. The project is maintained on github and all contributions need to be submitted via pull request to their specific repository under the `dev` branch. In order to contribute, simply follow the instructions for [creating a pull request](#creating-a-pull-request) below. - -## Pull Request Requirements -- All revisions must follow TTP naming conventions (see [Naming Conventions](#naming-conventions) Section) -- Include a clear and concise explanation of the features or changes included in your revision listed by file. -- All code must follow [PSR 2](http://www.php-fig.org/psr/psr-2/) standards -- prefer the use of [] for arrays over array() -- All functions must be documented with the exception of controller methods (see [Documentation](#documentation) Section) -- Controller methods may be doc-blocked when necessary for clarity (see [Documentation](#documentation) Section) -- All new Classes must include a class level doc-block (see [Documentation](#documentation) Section) -- Any new dependencies will have a longer validation process and should be accompanied by the required information (see [Dependencies](#dependencies) Section) - -## Naming Conventions -- File names are to be lower case -- All class names must be upper case -- Any data being stored as a file must be saved in the app directory (with the exception of config which should be stored under config/) -- Controllers must have a constructor and destructor using the constructor and destructor methods found in resources/ -- Views must be named using lowerCamelCase - -## Dependencies -Whenever a dependency is updated or added, pull requests must include a section that answers the following questions. -- Why is this dependency required -- Could this be reasonably accomplished within the app by implementing new features in a later version? explain. -- What is the latest stable version that can be used -- What features are absolutely necessary for your feature or modification to work - -## Documentation -### Classes - -New classes must be prefaced with a doc-block following this style: -``` -/** - * app/controllers/admin/admin.php - * - * This is the admin controller. - * - * @version 3.0 - * @author Joey Kimsey - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -``` - -From top to bottom: -- Filename on the second line -- A description for the file -- The TTP version this file was built for -`@version 1.0` -- The Authors name or alias and email -`@author first last ` -- A copy of the MIT license -`@license https://opensource.org/licenses/MIT [MIT LICENSE]` -- May include a link for more information -`@link http://link.com` - -### Functions -Functions must be prefaced with a doc-block following this style: -``` -/** - * Intended as a self-destruct session. If the specified session does not - * exist, it is created. If the specified session does exist, it will be - * destroyed and returned. - * - * @param string $name - Session name to be created or checked - * @param string $string - The string to be used if session needs to be - * created. (optional) - * - * @return bool|string - Returns bool if creating, and a string if the - * check is successful. - */ -``` - -From top to bottom: -- There must be a description of the functions intended usage on the second line -- All parameters should be documented like this -`@param [type] $name - description` -- Any function with a return statement must also be documented as such -`@return [type] - description` - -## Creating a Pull Request -This is a simple explanation of how to create a pull request for changes to TheTempusProject. You can find a detailed walk-through on how to [create a pull request](https://help.github.com/articles/creating-a-pull-request/) on github. - -1. First ensure you have followed all the contributing guidelines -2. Squash your merge into a single revision. This will make it easier to view the changes as a whole. -3. You can submit a pull request [here](https://github.com/TheTempusProject/TheTempusProject/compare) -4. Please submit all pull requests to the dev branch or they will be ignored. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -add spaces after everything - -avoid "return;" just make the previous line the return - -use [] - -do not use array() - -do not use (array) - -do not add useless variables - -if you are going to set something or check if its empty, just never set it to begin with, don't set it to null \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index bb6e417..0000000 --- a/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2024-present Joey Kimsey - -Portions of this software are licensed as follows: - -* All content residing under the "app/" directory of this repository, excluding "app/plugins/"; is licensed under "Creative Commons: CC BY-SA 4.0 license". -* All third party components incorporated into The Tempus Project Software including plugins are licensed under the original license provided by the owner of the applicable component. -* Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/app/config/config.json b/app/config/config.json deleted file mode 100644 index 34f27bd..0000000 --- a/app/config/config.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "main": { - "logo": { - "type": "file", - "pretty": "Site Logo (Used mostly in emails)", - "default": "images\/logo.png", - "value": "images\/logoScaled.png" - }, - "logoLarge": { - "type": "file", - "pretty": "Large Site Logo (Used mostly when sharing images on social media)", - "default": "images\/logoLarge.jpg", - "value": "images\/logoLarge.png" - }, - "name": { - "type": "text", - "pretty": "Site Name", - "default": "TTP Example", - "value": "JoeyKimsey" - }, - "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 - }, - "loginTimer": { - "type": "text", - "pretty": "Maximum Login session length. (in seconds)", - "default": 604800, - "value": 604800 - } - }, - "database": { - "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": "192.168.1.194" - }, - "dbMaxQuery": { - "type": "text", - "pretty": "Maximum results per query", - "default": 100, - "protected": true, - "value": 100 - }, - "dbName": { - "type": "text", - "pretty": "Database Name", - "default": "ttp-example", - "protected": true, - "value": "jk" - }, - "dbPassword": { - "type": "text", - "pretty": "Database Password", - "default": "", - "protected": true, - "value": "48164816" - }, - "dbPrefix": { - "type": "text", - "pretty": "Database table Prefix", - "default": "TTP_", - "protected": true, - "value": "TTP_" - }, - "dbUsername": { - "type": "text", - "pretty": "Database Username", - "default": "root", - "protected": true, - "value": "root" - } - }, - "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 - } - }, - "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" - } - }, - "resume": { - "enabled": { - "type": "radio", - "pretty": "Enable the resume Feature.", - "default": true, - "value": true - } - }, - "portfolio": { - "enabled": { - "type": "radio", - "pretty": "Enable the portfolio Feature.", - "default": true, - "value": true - } - }, - "wip": { - "enabled": { - "type": "radio", - "pretty": "Enable the wip Feature.", - "default": true, - "value": true - } - }, - "contact": { - "enabled": { - "type": "radio", - "pretty": "Enable User Contact.", - "default": true, - "value": true - }, - "sendEmail": { - "type": "radio", - "pretty": "Email the user after submitting.", - "default": false, - "value": false - }, - "emailTemplate": { - "type": "text", - "pretty": "Email Template", - "default": "contactEmail", - "value": "contactEmail" - } - } -} \ No newline at end of file diff --git a/app/config/config.json.bak b/app/config/config.json.bak deleted file mode 100644 index b5f2a72..0000000 --- a/app/config/config.json.bak +++ /dev/null @@ -1 +0,0 @@ -{"main":{"logo":{"type":"file","pretty":"Site Logo (Used mostly in emails)","default":"images\/logo.png","value":"images\/logo.png"},"logoLarge":{"type":"file","pretty":"Large Site Logo (Used mostly when sharing images on social media)","default":"images\/logoLarge.jpg","value":"images\/curseforge.png"},"name":{"type":"text","pretty":"Site Name","default":"TTP Example","value":"JoeyKimsey"},"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},"loginTimer":{"type":"text","pretty":"Maximum Login session length. (in seconds)","default":604800,"value":604800}},"database":{"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":"192.168.1.194"},"dbMaxQuery":{"type":"text","pretty":"Maximum results per query","default":100,"protected":true,"value":100},"dbName":{"type":"text","pretty":"Database Name","default":"ttp-example","protected":true,"value":"jk"},"dbPassword":{"type":"text","pretty":"Database Password","default":"","protected":true,"value":"48164816"},"dbPrefix":{"type":"text","pretty":"Database table Prefix","default":"TTP_","protected":true,"value":"TTP_"},"dbUsername":{"type":"text","pretty":"Database Username","default":"root","protected":true,"value":"root"}},"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}},"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"}},"resume":{"enabled":{"type":"radio","pretty":"Enable the resume Feature.","default":true,"value":true}},"portfolio":{"enabled":{"type":"radio","pretty":"Enable the portfolio Feature.","default":true,"value":true}},"wip":{"enabled":{"type":"radio","pretty":"Enable the wip Feature.","default":true,"value":true}}} \ No newline at end of file diff --git a/app/config/install.json b/app/config/install.json deleted file mode 100644 index 7c3f044..0000000 --- a/app/config/install.json +++ /dev/null @@ -1 +0,0 @@ -{"installHash":"bfe9ef2436ba888993d2d3c131f7be69","installStep":"complete","modules":{"Group":{"name":"Group","class":"TheTempusProject\\Models\\Group","version":"1.0","installedVersion":"1.0","folder":"\/var\/www\/nginx\/jk.local\/app\/models\/","type":"model","installDate":1732345070,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/models\/","type":"model","installDate":1732345072,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/models\/","type":"model","installDate":1732345072,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/models\/","type":"model","installDate":1732345072,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/models\/","type":"model","installDate":1732345073,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/plugins\/blog\/","type":"plugin","installDate":1732345076,"lastUpdate":1732345081,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":["1"]},"Bugreport":null,"Comments":null,"Feedback":{"name":"Feedback","class":"TheTempusProject\\Plugins\\Feedback","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/feedback\/","type":"plugin","installDate":1732345077,"lastUpdate":1732345081,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Messages":null,"Notifications":null,"Redirects":{"name":"Redirects","class":"TheTempusProject\\Plugins\\Redirects","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/redirects\/","type":"plugin","installDate":1732345078,"lastUpdate":1732345081,"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":null,"Resume":{"name":"Resume","class":"TheTempusProject\\Plugins\\Resume","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/resume\/","type":"plugin","installDate":1732362174,"lastUpdate":1732362174,"installStatus":"Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Success","permissions_installed":"Success","configs_installed":"Success","models_installed":"Success","resources_installed":true},"Portfolio":{"name":"Portfolio","class":"TheTempusProject\\Plugins\\Portfolio","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/portfolio\/","type":"plugin","installDate":1732366058,"lastUpdate":1732366058,"installStatus":"Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Success","permissions_installed":"Success","configs_installed":"Success","models_installed":"Success","resources_installed":true},"Wip":{"name":"Wip","class":"TheTempusProject\\Plugins\\Wip","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/wip\/","type":"plugin","installDate":1732436196,"lastUpdate":1732436196,"installStatus":"Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Success","permissions_installed":"Success","configs_installed":"Success","models_installed":"Success","resources_installed":true},"Members":{"name":"Members","class":"TheTempusProject\\Plugins\\Members","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/members\/","type":"plugin","installDate":1733125139,"lastUpdate":1733125139,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"No<\/span>","preferences_installed":"Success","permissions_installed":"Success","configs_installed":"Success","models_installed":"Success","resources_installed":["6"]},"Contact":{"name":"Contact","class":"TheTempusProject\\Plugins\\Contact","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/contact\/","type":"plugin","installDate":1736995698,"lastUpdate":1736995698,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Success","permissions_installed":"Success","configs_installed":"Success","models_installed":"Failed","resources_installed":true},"Updates":{"name":"Updates","class":"TheTempusProject\\Plugins\\Updates","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/updates\/","type":"plugin","installDate":1736995723,"lastUpdate":1736995723,"installStatus":"Installed","enabled":true,"enabled_txt":"No<\/span>","preferences_installed":"Success","permissions_installed":"Success","configs_installed":"Success","models_installed":"Success","resources_installed":true}}} \ No newline at end of file diff --git a/app/config/local/config.json b/app/config/local/config.json deleted file mode 100644 index e2f479e..0000000 --- a/app/config/local/config.json +++ /dev/null @@ -1 +0,0 @@ -{"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":"JoeyKimsey"},"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}},"database":{"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":"192.168.1.194"},"dbMaxQuery":{"type":"text","pretty":"Maximum results per query","default":100,"protected":true,"value":100},"dbName":{"type":"text","pretty":"Database Name","default":"ttp-example","protected":true,"value":"jk"},"dbPassword":{"type":"text","pretty":"Database Password","default":"","protected":true,"value":"48164816"},"dbPrefix":{"type":"text","pretty":"Database table Prefix","default":"TTP_","protected":true,"value":"TTP_"},"dbUsername":{"type":"text","pretty":"Database Username","default":"root","protected":true,"value":"root"}},"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"}},"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"}},"resume":{"enabled":{"type":"radio","pretty":"Enable the resume Feature.","default":true,"value":true}},"portfolio":{"enabled":{"type":"radio","pretty":"Enable the portfolio Feature.","default":true,"value":true}},"wip":{"enabled":{"type":"radio","pretty":"Enable the wip Feature.","default":true,"value":true}}} \ No newline at end of file diff --git a/app/config/local/config.json.bak b/app/config/local/config.json.bak deleted file mode 100644 index 1931f06..0000000 --- a/app/config/local/config.json.bak +++ /dev/null @@ -1 +0,0 @@ -{"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":"JoeyKimsey"},"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}},"database":{"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":"192.168.1.194"},"dbMaxQuery":{"type":"text","pretty":"Maximum results per query","default":100,"protected":true,"value":100},"dbName":{"type":"text","pretty":"Database Name","default":"ttp-example","protected":true,"value":"jk"},"dbPassword":{"type":"text","pretty":"Database Password","default":"","protected":true,"value":"48164816"},"dbPrefix":{"type":"text","pretty":"Database table Prefix","default":"TTP_","protected":true,"value":"TTP_"},"dbUsername":{"type":"text","pretty":"Database Username","default":"root","protected":true,"value":"root"}}} \ No newline at end of file diff --git a/app/config/local/constants.php b/app/config/local/constants.php deleted file mode 100644 index 32e8dda..0000000 --- a/app/config/local/constants.php +++ /dev/null @@ -1,137 +0,0 @@ -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\/nginx\/jk.local\/app\/models\/","type":"model","installDate":1732345072,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/models\/","type":"model","installDate":1732345072,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/models\/","type":"model","installDate":1732345072,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/models\/","type":"model","installDate":1732345073,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/plugins\/blog\/","type":"plugin","installDate":1732345076,"lastUpdate":1732345081,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":["1"]},"Bugreport":{"name":"Bugreport","class":"TheTempusProject\\Plugins\\Bugreport","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/bugreport\/","type":"plugin","installDate":1732345077,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/plugins\/comments\/","type":"plugin","installDate":1732345077,"lastUpdate":1732345081,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":["5"]},"Feedback":{"name":"Feedback","class":"TheTempusProject\\Plugins\\Feedback","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/feedback\/","type":"plugin","installDate":1732345077,"lastUpdate":1732345081,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Messages":{"name":"Messages","class":"TheTempusProject\\Plugins\\Messages","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/messages\/","type":"plugin","installDate":1732345078,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/plugins\/notifications\/","type":"plugin","installDate":1732345078,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/plugins\/redirects\/","type":"plugin","installDate":1732345078,"lastUpdate":1732345081,"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\/nginx\/jk.local\/app\/plugins\/subscribe\/","type":"plugin","installDate":1732345078,"lastUpdate":1732345081,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Resume":{"name":"Resume","class":"TheTempusProject\\Plugins\\Resume","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/resume\/","type":"plugin","installDate":1732362174,"lastUpdate":1732362174,"installStatus":"Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Success","permissions_installed":"Success","configs_installed":"Success","models_installed":"Success","resources_installed":true},"Portfolio":{"name":"Portfolio","class":"TheTempusProject\\Plugins\\Portfolio","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/portfolio\/","type":"plugin","installDate":1732366058,"lastUpdate":1732366058,"installStatus":"Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Success","permissions_installed":"Success","configs_installed":"Success","models_installed":"Success","resources_installed":true},"Wip":{"name":"Wip","class":"TheTempusProject\\Plugins\\Wip","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/wip\/","type":"plugin","installDate":1732436196,"lastUpdate":1732436196,"installStatus":"Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Success","permissions_installed":"Success","configs_installed":"Success","models_installed":"Success","resources_installed":true},"Members":{"name":"Members","class":"TheTempusProject\\Plugins\\Members","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/nginx\/jk.local\/app\/plugins\/members\/","type":"plugin","installDate":1733125139,"lastUpdate":1733125139,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"No<\/span>","preferences_installed":"Success","permissions_installed":"Success","configs_installed":"Success","models_installed":"Success","resources_installed":["6"]}}} \ No newline at end of file diff --git a/app/config/local/permissions.json b/app/config/local/permissions.json deleted file mode 100644 index 7e36be2..0000000 --- a/app/config/local/permissions.json +++ /dev/null @@ -1 +0,0 @@ -{"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},"modAccess":{"pretty":"Access Moderator Areas","default":false},"feedback":{"pretty":"Can Submit Feedback","default":false},"sendMessages":{"pretty":"Can send Messages","default":false},"sendNotifications":{"pretty":"Can send notifications","default":false},"redirects":{"pretty":"Can modify redirects","default":false},"memberAccess":{"pretty":"Access Member Areas","default":false},"controlMemberships":{"pretty":"User can Access and Control user memberships.","default":false}} \ No newline at end of file diff --git a/app/config/local/permissions.json.bak b/app/config/local/permissions.json.bak deleted file mode 100644 index 7e36be2..0000000 --- a/app/config/local/permissions.json.bak +++ /dev/null @@ -1 +0,0 @@ -{"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},"modAccess":{"pretty":"Access Moderator Areas","default":false},"feedback":{"pretty":"Can Submit Feedback","default":false},"sendMessages":{"pretty":"Can send Messages","default":false},"sendNotifications":{"pretty":"Can send notifications","default":false},"redirects":{"pretty":"Can modify redirects","default":false},"memberAccess":{"pretty":"Access Member Areas","default":false},"controlMemberships":{"pretty":"User can Access and Control user memberships.","default":false}} \ No newline at end of file diff --git a/app/config/local/preferences.json b/app/config/local/preferences.json deleted file mode 100644 index 7e1b6f0..0000000 --- a/app/config/local/preferences.json +++ /dev/null @@ -1 +0,0 @@ -{"gender":{"pretty":"Gender","type":"select","default":"unspecified","options":["male","female","other","unspecified"],"avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png"},"newsletter":{"pretty":"Receive our Newsletter?","type":"checkbox","default":"true","avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png","options":null},"avatar":{"pretty":"Avatar","type":"file","default":"images\/defaultAvatar.png","avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png","options":null},"timezone":{"pretty":"Timezone","type":"timezone","default":"America\/New_York","avatar":"\/var\/www\/nginx\/jk.local\/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\/nginx\/jk.local\/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\/nginx\/jk.local\/images\/defaultAvatar.png"},"pageLimit":{"pretty":"Items Displayed Per Page","type":"select","default":"10","options":["10","15","20","25","50"],"avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png"}} \ No newline at end of file diff --git a/app/config/local/preferences.json.bak b/app/config/local/preferences.json.bak deleted file mode 100644 index 7e1b6f0..0000000 --- a/app/config/local/preferences.json.bak +++ /dev/null @@ -1 +0,0 @@ -{"gender":{"pretty":"Gender","type":"select","default":"unspecified","options":["male","female","other","unspecified"],"avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png"},"newsletter":{"pretty":"Receive our Newsletter?","type":"checkbox","default":"true","avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png","options":null},"avatar":{"pretty":"Avatar","type":"file","default":"images\/defaultAvatar.png","avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png","options":null},"timezone":{"pretty":"Timezone","type":"timezone","default":"America\/New_York","avatar":"\/var\/www\/nginx\/jk.local\/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\/nginx\/jk.local\/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\/nginx\/jk.local\/images\/defaultAvatar.png"},"pageLimit":{"pretty":"Items Displayed Per Page","type":"select","default":"10","options":["10","15","20","25","50"],"avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png"}} \ No newline at end of file diff --git a/app/config/permissions.json b/app/config/permissions.json deleted file mode 100644 index 45359cd..0000000 --- a/app/config/permissions.json +++ /dev/null @@ -1 +0,0 @@ -{"adminAccess":{"pretty":"Access Administrator Areas","default":false},"addRoute":{"pretty":"Add Custom Routes","default":false},"uploadImages":{"pretty":"Upload images (such as avatars)","default":false},"feedback":{"pretty":"Can Submit Feedback","default":false},"redirects":{"pretty":"Can modify redirects","default":false},"memberAccess":{"pretty":"Access Member Areas","default":false},"controlMemberships":{"pretty":"User can Access and Control user memberships.","default":false},"contact":{"pretty":"Can Submit Contact","default":true},"updates":{"pretty":"Can create status updates","default":false}} \ No newline at end of file diff --git a/app/config/permissions.json.bak b/app/config/permissions.json.bak deleted file mode 100644 index 45359cd..0000000 --- a/app/config/permissions.json.bak +++ /dev/null @@ -1 +0,0 @@ -{"adminAccess":{"pretty":"Access Administrator Areas","default":false},"addRoute":{"pretty":"Add Custom Routes","default":false},"uploadImages":{"pretty":"Upload images (such as avatars)","default":false},"feedback":{"pretty":"Can Submit Feedback","default":false},"redirects":{"pretty":"Can modify redirects","default":false},"memberAccess":{"pretty":"Access Member Areas","default":false},"controlMemberships":{"pretty":"User can Access and Control user memberships.","default":false},"contact":{"pretty":"Can Submit Contact","default":true},"updates":{"pretty":"Can create status updates","default":false}} \ No newline at end of file diff --git a/app/config/preferences.json b/app/config/preferences.json deleted file mode 100644 index 7e1b6f0..0000000 --- a/app/config/preferences.json +++ /dev/null @@ -1 +0,0 @@ -{"gender":{"pretty":"Gender","type":"select","default":"unspecified","options":["male","female","other","unspecified"],"avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png"},"newsletter":{"pretty":"Receive our Newsletter?","type":"checkbox","default":"true","avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png","options":null},"avatar":{"pretty":"Avatar","type":"file","default":"images\/defaultAvatar.png","avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png","options":null},"timezone":{"pretty":"Timezone","type":"timezone","default":"America\/New_York","avatar":"\/var\/www\/nginx\/jk.local\/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\/nginx\/jk.local\/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\/nginx\/jk.local\/images\/defaultAvatar.png"},"pageLimit":{"pretty":"Items Displayed Per Page","type":"select","default":"10","options":["10","15","20","25","50"],"avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png"}} \ No newline at end of file diff --git a/app/config/preferences.json.bak b/app/config/preferences.json.bak deleted file mode 100644 index 7e1b6f0..0000000 --- a/app/config/preferences.json.bak +++ /dev/null @@ -1 +0,0 @@ -{"gender":{"pretty":"Gender","type":"select","default":"unspecified","options":["male","female","other","unspecified"],"avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png"},"newsletter":{"pretty":"Receive our Newsletter?","type":"checkbox","default":"true","avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png","options":null},"avatar":{"pretty":"Avatar","type":"file","default":"images\/defaultAvatar.png","avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png","options":null},"timezone":{"pretty":"Timezone","type":"timezone","default":"America\/New_York","avatar":"\/var\/www\/nginx\/jk.local\/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\/nginx\/jk.local\/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\/nginx\/jk.local\/images\/defaultAvatar.png"},"pageLimit":{"pretty":"Items Displayed Per Page","type":"select","default":"10","options":["10","15","20","25","50"],"avatar":"\/var\/www\/nginx\/jk.local\/images\/defaultAvatar.png"}} \ No newline at end of file diff --git a/app/config/prod/config.json b/app/config/prod/config.json deleted file mode 100644 index 0842c72..0000000 --- a/app/config/prod/config.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "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": "Joey Kimsey" - }, - "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": "jk-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 - } - }, - "bookmarks": - { - "enabled": - { - "type": "radio", - "pretty": "Enable Bookmarks.", - "default": true, - "value": true - } - }, - "calendar": - { - "enabled": - { - "type": "radio", - "pretty": "Enable Calendar.", - "default": true, - "value": true - } - }, - "contacts": - { - "enabled": - { - "type": "radio", - "pretty": "Enable Contacts.", - "default": true, - "value": true - } - }, - "notes": - { - "enabled": - { - "type": "radio", - "pretty": "Enable Notes.", - "default": true, - "value": true - } - } -} \ No newline at end of file diff --git a/app/config/prod/config.json.bak b/app/config/prod/config.json.bak deleted file mode 100644 index 26d1c45..0000000 --- a/app/config/prod/config.json.bak +++ /dev/null @@ -1 +0,0 @@ -{"main":{"logo":{"value":"images\/logo.png"},"name":{"value":"Joey Kimsey"},"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":"jk-com"},"dbPassword":{"value":"lsVb#$D74816"},"dbPrefix":{"value":"TTP_"},"dbUsername":{"value":"joeyk"}}} \ No newline at end of file diff --git a/app/config/prod/constants.php b/app/config/prod/constants.php deleted file mode 100644 index 2f1863c..0000000 --- a/app/config/prod/constants.php +++ /dev/null @@ -1,139 +0,0 @@ -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\/joeykimsey.com\/app\/models\/","type":"model","installDate":1723860520,"lastUpdate":1723861483,"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\/joeykimsey.com\/app\/models\/","type":"model","installDate":1723860520,"lastUpdate":1723861483,"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\/joeykimsey.com\/app\/models\/","type":"model","installDate":1723860520,"lastUpdate":1723861483,"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\/joeykimsey.com\/app\/models\/","type":"model","installDate":1723860520,"lastUpdate":1723861483,"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\/joeykimsey.com\/app\/plugins\/blog\/","type":"plugin","installDate":1723860535,"lastUpdate":1723861483,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Bookmarks":{"name":"Bookmarks","class":"TheTempusProject\\Plugins\\Bookmarks","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/joeykimsey.com\/app\/plugins\/bookmarks\/","type":"plugin","installDate":1723860535,"lastUpdate":1723861483,"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\/joeykimsey.com\/app\/plugins\/calendar\/","type":"plugin","installDate":1723860535,"lastUpdate":1723861483,"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\/joeykimsey.com\/app\/plugins\/comments\/","type":"plugin","installDate":1723860535,"lastUpdate":1723861483,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":["5"]},"Contacts":{"name":"Contacts","class":"TheTempusProject\\Plugins\\Contacts","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/joeykimsey.com\/app\/plugins\/contacts\/","type":"plugin","installDate":1723860535,"lastUpdate":1723861483,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Dashboards":{"name":"Dashboards","class":"TheTempusProject\\Plugins\\Dashboards","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/joeykimsey.com\/app\/plugins\/dashboards\/","type":"plugin","installDate":1723860535,"lastUpdate":1723861483,"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\/joeykimsey.com\/app\/plugins\/fileshare\/","type":"plugin","installDate":1723860535,"lastUpdate":1723861483,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Messages":{"name":"Messages","class":"TheTempusProject\\Plugins\\Messages","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/joeykimsey.com\/app\/plugins\/messages\/","type":"plugin","installDate":1723860535,"lastUpdate":1723861483,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Notes":{"name":"Notes","class":"TheTempusProject\\Plugins\\Notes","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/joeykimsey.com\/app\/plugins\/notes\/","type":"plugin","installDate":1723860535,"lastUpdate":1723861483,"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\/joeykimsey.com\/app\/plugins\/notifications\/","type":"plugin","installDate":1723861130,"lastUpdate":1723861483,"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\/joeykimsey.com\/app\/plugins\/redirects\/","type":"plugin","installDate":1723861130,"lastUpdate":1723861483,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Todo":{"name":"Todo","class":"TheTempusProject\\Plugins\\Todo","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/joeykimsey.com\/app\/plugins\/todo\/","type":"plugin","installDate":1723861294,"lastUpdate":1723861483,"installStatus":"Partially Installed","enabled":true,"enabled_txt":"Yes<\/span>","preferences_installed":"Skipped","permissions_installed":"Skipped","configs_installed":"Skipped","models_installed":"Skipped","resources_installed":true},"Updates":{"name":"Updates","class":"TheTempusProject\\Plugins\\Updates","version":"3.0","installedVersion":"3.0","folder":"\/var\/www\/joeykimsey.com\/app\/plugins\/updates\/","type":"plugin","installDate":1723861294,"lastUpdate":1723861483,"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/prod/permissions.json b/app/config/prod/permissions.json deleted file mode 100644 index 0552fb9..0000000 --- a/app/config/prod/permissions.json +++ /dev/null @@ -1 +0,0 @@ -{"adminAccess":{"pretty":"Access Administrator Areas","default":false},"addRoute":{"pretty":"Add Custom Routes","default":false},"uploadImages":{"pretty":"Upload images (such as avatars)","default":false},"useBookmarks":{"pretty":"Can use the bookmarks feature","default":false},"createEvents":{"pretty":"Can add events to bookmarks","default":false},"useCalendar":{"pretty":"Can use the calendar feature","default":false},"modAccess":{"pretty":"Access Moderator Areas","default":false},"useContacts":{"pretty":"Can use the contacts feature","default":false},"uploadFiles":{"pretty":"Can upload files","default":false},"sendMessages":{"pretty":"Can send Messages","default":false},"useNotes":{"pretty":"Can use the notes feature","default":false},"sendNotifications":{"pretty":"Can send notifications","default":false},"redirects":{"pretty":"Can modify redirects","default":false},"createTas":{"pretty":"Can create todo items","default":false},"createList":{"pretty":"Can create todo lists","default":false},"updates":{"pretty":"Can create status updates","default":false}} \ No newline at end of file diff --git a/app/config/prod/permissions.json.bak b/app/config/prod/permissions.json.bak deleted file mode 100644 index 0552fb9..0000000 --- a/app/config/prod/permissions.json.bak +++ /dev/null @@ -1 +0,0 @@ -{"adminAccess":{"pretty":"Access Administrator Areas","default":false},"addRoute":{"pretty":"Add Custom Routes","default":false},"uploadImages":{"pretty":"Upload images (such as avatars)","default":false},"useBookmarks":{"pretty":"Can use the bookmarks feature","default":false},"createEvents":{"pretty":"Can add events to bookmarks","default":false},"useCalendar":{"pretty":"Can use the calendar feature","default":false},"modAccess":{"pretty":"Access Moderator Areas","default":false},"useContacts":{"pretty":"Can use the contacts feature","default":false},"uploadFiles":{"pretty":"Can upload files","default":false},"sendMessages":{"pretty":"Can send Messages","default":false},"useNotes":{"pretty":"Can use the notes feature","default":false},"sendNotifications":{"pretty":"Can send notifications","default":false},"redirects":{"pretty":"Can modify redirects","default":false},"createTas":{"pretty":"Can create todo items","default":false},"createList":{"pretty":"Can create todo lists","default":false},"updates":{"pretty":"Can create status updates","default":false}} \ No newline at end of file diff --git a/app/config/prod/preferences.json b/app/config/prod/preferences.json deleted file mode 100644 index 6ecd39a..0000000 --- a/app/config/prod/preferences.json +++ /dev/null @@ -1 +0,0 @@ -{"gender":{"pretty":"Gender","type":"select","default":"unspecified","options":["male","female","other","unspecified"],"avatar":"\/var\/www\/joeykimsey.com\/images\/defaultAvatar.png"},"newsletter":{"pretty":"Receive our Newsletter?","type":"checkbox","default":"true","avatar":"\/var\/www\/joeykimsey.com\/images\/defaultAvatar.png","options":null},"avatar":{"pretty":"Avatar","type":"file","default":"images\/defaultAvatar.png","avatar":"\/var\/www\/joeykimsey.com\/images\/defaultAvatar.png","options":null},"timezone":{"pretty":"Timezone","type":"timezone","default":"America\/New_York","avatar":"\/var\/www\/joeykimsey.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\/joeykimsey.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\/joeykimsey.com\/images\/defaultAvatar.png"},"pageLimit":{"pretty":"Items Displayed Per Page","type":"select","default":"10","options":["10","15","20","25","50"],"avatar":"\/var\/www\/joeykimsey.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\/joeykimsey.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\/joeykimsey.com\/images\/defaultAvatar.png"}} \ No newline at end of file diff --git a/app/config/prod/preferences.json.bak b/app/config/prod/preferences.json.bak deleted file mode 100644 index 6ecd39a..0000000 --- a/app/config/prod/preferences.json.bak +++ /dev/null @@ -1 +0,0 @@ -{"gender":{"pretty":"Gender","type":"select","default":"unspecified","options":["male","female","other","unspecified"],"avatar":"\/var\/www\/joeykimsey.com\/images\/defaultAvatar.png"},"newsletter":{"pretty":"Receive our Newsletter?","type":"checkbox","default":"true","avatar":"\/var\/www\/joeykimsey.com\/images\/defaultAvatar.png","options":null},"avatar":{"pretty":"Avatar","type":"file","default":"images\/defaultAvatar.png","avatar":"\/var\/www\/joeykimsey.com\/images\/defaultAvatar.png","options":null},"timezone":{"pretty":"Timezone","type":"timezone","default":"America\/New_York","avatar":"\/var\/www\/joeykimsey.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\/joeykimsey.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\/joeykimsey.com\/images\/defaultAvatar.png"},"pageLimit":{"pretty":"Items Displayed Per Page","type":"select","default":"10","options":["10","15","20","25","50"],"avatar":"\/var\/www\/joeykimsey.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\/joeykimsey.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\/joeykimsey.com\/images\/defaultAvatar.png"}} \ No newline at end of file diff --git a/app/plugins/bugreport/controllers/admin/bugreport.php b/app/plugins/bugreport/controllers/admin/bugreport.php deleted file mode 100644 index 9433b70..0000000 --- a/app/plugins/bugreport/controllers/admin/bugreport.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Controllers\Admin; - -use TheTempusProject\Classes\AdminController; -use TheTempusProject\Bedrock\Functions\Input; -use TheTempusProject\Houdini\Classes\Issues; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Houdini\Classes\Navigation; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Models\Bugreport as BugreportModel; - -class Bugreport extends AdminController { - protected static $bugreport; - - public function __construct() { - parent::__construct(); - self::$bugreport = new BugreportModel; - self::$title = 'Admin - Bug Reports'; - $view = Navigation::activePageSelect( 'nav.admin', '/admin/bugreport' ); - Components::set( 'ADMINNAV', $view ); - } - - public function index( $data = null ) { - Views::view( 'bugreport.admin.list', self::$bugreport->listPaginated() ); - } - - public function view( $id = null ) { - $data = self::$bugreport->findById( $id ); - if ( $data !== false ) { - return Views::view( 'bugreport.admin.view', $data ); - } - Issues::add( 'error', 'Report not found.' ); - $this->index(); - } - - public function delete( $data = null ) { - if ( Input::exists( 'submit' ) ) { - $data = Input::post( 'BR_' ); - } - if ( self::$bugreport->delete( (array) $data ) ) { - Issues::add( 'success', 'Bug Report Deleted' ); - } else { - Issues::add( 'error', 'There was an error with your request.' ); - } - $this->index(); - } - - public function clear( $data = null ) { - self::$bugreport->empty(); - $this->index(); - } -} diff --git a/app/plugins/bugreport/controllers/bugreport.php b/app/plugins/bugreport/controllers/bugreport.php deleted file mode 100644 index 75c5ad5..0000000 --- a/app/plugins/bugreport/controllers/bugreport.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Controllers; - -use TheTempusProject\Hermes\Functions\Redirect; -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Bedrock\Functions\Input; -use TheTempusProject\Bedrock\Functions\Session; -use TheTempusProject\Houdini\Classes\Issues; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Classes\Controller; -use TheTempusProject\Classes\Forms; -use TheTempusProject\Models\Bugreport as BugreportModel; -use TheTempusProject\TheTempusProject as App; - -class Bugreport extends Controller { - protected static $bugreport; - - public function index() { - self::$bugreport = new BugreportModel; - self::$title = 'Bug Report - {SITENAME}'; - self::$pageDescription = 'On this page you can submit a bug report for the site.'; - if ( !App::$isLoggedIn ) { - return Issues::add( 'notice', 'You must be logged in to report bugs.' ); - } - if ( !Input::exists() ) { - return Views::view( 'bugreport.create' ); - } - if ( !Forms::check( 'bugreport' ) ) { - Issues::add( 'error', [ 'There was an error with your report.' => Check::userErrors() ] ); - return Views::view( 'bugreport.create' ); - } - $result = self::$bugreport->create( App::$activeUser->ID, Input::post( 'url' ), Input::post( 'ourl' ), Input::post( 'repeat' ), Input::post( 'entry' ) ); - if ( false != $result ) { - Session::flash( 'success', 'Your Bug Report has been received. We may contact you for more information at the email address you provided.' ); - Redirect::to( 'home/index' ); - } else { - Issues::add( 'error', 'There was an unresolved error while submitting your report.' ); - return Views::view( 'bugreport.create' ); - } - } -} diff --git a/app/plugins/bugreport/forms.php b/app/plugins/bugreport/forms.php deleted file mode 100644 index 70b05fb..0000000 --- a/app/plugins/bugreport/forms.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Plugins\Bugreport; - -use TheTempusProject\Bedrock\Functions\Input; -use TheTempusProject\Classes\Forms; - -class BugReportForms extends Forms { - /** - * Adds these functions to the form list. - */ - public function __construct() { - self::addHandler( 'bugreport', __CLASS__, 'bugreport' ); - } - - /** - * Validates the bug report form. - * - * @return {bool} - */ - public static function bugreport() { - if ( !self::url( Input::post( 'url' ) ) ) { - self::addUserError( 'Invalid url.' ); - return false; - } - if ( !self::url( Input::post( 'ourl' ) ) ) { - self::addUserError( 'Invalid original url.' ); - return false; - } - if ( !self::tf( Input::post( 'repeat' ) ) ) { - self::addUserError( 'Invalid repeat value.' ); - return false; - } - if ( !self::token() ) { - return false; - } - return true; - } -} - -new BugReportForms; diff --git a/app/plugins/bugreport/models/bugreport.php b/app/plugins/bugreport/models/bugreport.php deleted file mode 100644 index df23b78..0000000 --- a/app/plugins/bugreport/models/bugreport.php +++ /dev/null @@ -1,100 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Models; - -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Canary\Bin\Canary as Debug; -use TheTempusProject\Canary\Classes\CustomException; -use TheTempusProject\Classes\DatabaseModel; -use TheTempusProject\Plugins\Bugreport as Plugin; -use TheTempusProject\TheTempusProject as App; - -class Bugreport extends DatabaseModel { - public $tableName = 'bugreports'; - public $databaseMatrix = [ - [ 'userID', 'int', '11' ], - [ 'time', 'int', '10' ], - [ 'repeat', 'varchar', '5' ], - [ 'ourl', 'varchar', '256' ], - [ 'url', 'varchar', '256' ], - [ 'ip', 'varchar', '15' ], - [ 'description', 'text', '' ], - ]; - public $plugin; - - /** - * The model constructor. - */ - public function __construct() { - parent::__construct(); - $this->plugin = new Plugin; - } - - /** - * This function parses the bug reports description and - * separates it into separate keys in the array. - * - * @param array $data - The data being parsed. - * - * @return array - */ - public function filter( $data, $params = [] ) { - foreach ( $data as $instance ) { - if ( !is_object( $instance ) ) { - $instance = $data; - $end = true; - } - $instance->submittedBy = self::$user->getUsername( $instance->userID ); - $instance->repeatText = ( $instance->repeat ? 'yes' : 'no' ); - $out[] = $instance; - if ( !empty( $end ) ) { - $out = $out[0]; - break; - } - } - return $out; - } - - /** - * Logs a Bug Report form. - * - * @param int $ID the user ID submitting the form - * @param string $url the url - * @param string $o_url the original url - * @param int $repeat is repeatable? - * @param string $description_ description of the event. - * - * @return null - */ - public function create( $ID, $url, $oUrl, $repeat, $description ) { - if ( !$this->plugin->checkEnabled() ) { - Debug::info( 'Bug Reporting is disabled in the config.' ); - return false; - } - $fields = [ - 'userID' => App::$activeUser->ID, - 'time' => time(), - 'repeat' => $repeat, - 'ourl' => $oUrl, - 'url' => $url, - 'ip' => $_SERVER['REMOTE_ADDR'], - 'description' => $description, - ]; - if ( !self::$db->insert( $this->tableName, $fields ) ) { - new CustomException( 'bugreportsCreate' ); - - return false; - } - return self::$db->lastId(); - } -} diff --git a/app/plugins/bugreport/plugin.php b/app/plugins/bugreport/plugin.php deleted file mode 100644 index c509440..0000000 --- a/app/plugins/bugreport/plugin.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Plugins; - -use ReflectionClass; -use TheTempusProject\Classes\Installer; -use TheTempusProject\Houdini\Classes\Navigation; -use TheTempusProject\Classes\Plugin; -use TheTempusProject\TheTempusProject as App; - -class Bugreport extends Plugin { - public $pluginName = 'TP BugReports'; - public $pluginAuthor = 'JoeyK'; - public $pluginWebsite = 'https://TheTempusProject.com'; - public $modelVersion = '1.0'; - public $pluginVersion = '3.0'; - public $pluginDescription = ''; - public $configName = 'bugreports'; - public $configMatrix = [ - 'enabled' => [ - 'type' => 'radio', - 'pretty' => 'Enable Bug reporting.', - 'default' => true, - ], - 'sendEmail' => [ - 'type' => 'radio', - 'pretty' => 'Email the user after submitting.', - 'default' => true, - ], - 'emailTemplate' => [ - 'type' => 'text', - 'pretty' => 'Email Template', - 'default' => 'BugReportEmail', - ], - ]; - public $permissionMatrix = [ - 'bugReport' => [ - 'pretty' => 'Can Submit Bug Reports', - 'default' => false, - ], - ]; - public $contact_footer_links = [ - [ - 'text' => 'Bug Report', - 'url' => '{ROOT_URL}bugreport', - 'filter' => 'loggedin', - ], - ]; - public $admin_links = [ - [ - 'text' => ' Bug Reports', - 'url' => '{ROOT_URL}admin/bugreport', - ], - ]; -} diff --git a/app/plugins/bugreport/views/admin/list.html b/app/plugins/bugreport/views/admin/list.html deleted file mode 100644 index 87cccb9..0000000 --- a/app/plugins/bugreport/views/admin/list.html +++ /dev/null @@ -1,45 +0,0 @@ -
- Bug Reports -
- {ADMIN_BREADCRUMBS} -
- - - - - - - - - - - - - {LOOP} - - - - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
IDTimeDescription - -
{ID}{DTC}{time}{/DTC}{description} - -
- No results to show. -
- -
-
- clear all -
\ No newline at end of file diff --git a/app/plugins/bugreport/views/admin/view.html b/app/plugins/bugreport/views/admin/view.html deleted file mode 100644 index 9054ea7..0000000 --- a/app/plugins/bugreport/views/admin/view.html +++ /dev/null @@ -1,69 +0,0 @@ -
-
-
- {ADMIN_BREADCRUMBS} -
- -
-

Bug Report

-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID:{ID}
Time submitted{DTC}{time}{/DTC}
URL:{URL}
Original URL{OURL}
Multiple occurrences?{repeatText}
IP:{ip}
User:{submittedBy}
Description:
{description}
-
-
- - - -
-
-
-
\ No newline at end of file diff --git a/app/plugins/bugreport/views/create.html b/app/plugins/bugreport/views/create.html deleted file mode 100644 index 8230842..0000000 --- a/app/plugins/bugreport/views/create.html +++ /dev/null @@ -1,52 +0,0 @@ -
-

Bug Report

-
-

Thank you for visiting our bug reporting page. We value our users' input highly and in an effort to better serve your needs, please fill out the form below to help us address this issue.

-

We read each and every bug report submitted, and by submitting this form you allow us to send you a follow-up email.

-
- -
- - - - What is the URL of the page you actually received the error on? (The URL is the website address. Example: {ROOT_URL}home) - -
- - -
- - - - What is the URL of the page you were on before you received the error? (The URL is the website address. Example: {ROOT_URL}home/newhome) - -
- - -
- -
- - -
-
- - -
-
- - -
- - -
- - - - - -
- -
-
-
\ No newline at end of file diff --git a/app/plugins/comments/controllers/admin/comments.php b/app/plugins/comments/controllers/admin/comments.php deleted file mode 100644 index 4c9ead6..0000000 --- a/app/plugins/comments/controllers/admin/comments.php +++ /dev/null @@ -1,83 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Controllers\Admin; - -use TheTempusProject\Houdini\Classes\Navigation; -use TheTempusProject\Houdini\Classes\Issues; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Bedrock\Functions\Input; -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Classes\Forms; -use TheTempusProject\Classes\AdminController; -use TheTempusProject\Models\Comments as CommentsModel; - -class Comments extends AdminController { - protected static $comments; - - public function __construct() { - parent::__construct(); - self::$title = 'Admin - Comments'; - self::$comments = new CommentsModel; - $view = Navigation::activePageSelect( 'nav.admin', '/admin/comments' ); - Components::set( 'ADMINNAV', $view ); - } - - public function edit( $data = null ) { - if ( !Input::exists( 'submit' ) ) { - return Views::view( 'comments.admin.edit', self::$comments->findById( $data ) ); - } - if ( !Forms::check( 'editComment' ) ) { - Issues::add( 'error', [ 'There was an error with your request.' => Check::userErrors() ] ); - return Views::view( 'comments.admin.edit', self::$comments->findById( $data ) ); - } - if ( self::$comments->update( $data, Input::post( 'comment' ) ) ) { - Issues::add( 'success', 'Comment updated' ); - } else { - return Views::view( 'comments.admin.edit', self::$comments->findById( $data ) ); - } - $this->index(); - } - - public function viewComments( $contentID = null ) { - if ( empty( $contentID ) ) { - Issues::add( 'error', 'Content ID not found.' ); - return $this->index(); - } - $contentData = self::$comments->findById( $data ); - if ( empty( $contentID ) ) { - return Views::view( 'comments.list', $commentData ); - } - Issues::add( 'error', 'Comment not found.' ); - $this->index(); - } - - public function delete( $data = null ) { - if ( $data == null ) { - if ( !Input::exists( 'C_' ) ) { - return $this->index(); - } - $data = Input::post( 'C_' ); - } - if ( !self::$comments->delete( $data ) ) { - Issues::add( 'error', 'There was an error with your request.' ); - } else { - Issues::add( 'success', 'Comment has been deleted' ); - } - $this->index(); - } - - public function index() { - Views::view( 'comments.admin.list', self::$comments->recent() ); - } -} diff --git a/app/plugins/comments/controllers/moderator.php b/app/plugins/comments/controllers/moderator.php deleted file mode 100644 index 8d8f319..0000000 --- a/app/plugins/comments/controllers/moderator.php +++ /dev/null @@ -1,36 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Controllers; - -use TheTempusProject\Houdini\Classes\Template; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Houdini\Classes\Issues; -use TheTempusProject\Classes\Controller; -use TheTempusProject\TheTempusProject as App; -use TheTempusProject\Hermes\Functions\Redirect; -use TheTempusProject\Bedrock\Functions\Session; - -class Moderator extends Controller { - public function __construct() { - parent::__construct(); - Template::noIndex(); - if ( !App::$isMod ) { - Session::flash( 'error', 'You do not have permission to view this page.' ); - return Redirect::home(); - } - } - - public function index() { - self::$title = 'Moderator\'s Area'; - Views::view( 'comments.moderator' ); - } -} diff --git a/app/plugins/comments/css/comments.css b/app/plugins/comments/css/comments.css deleted file mode 100644 index ebe2208..0000000 --- a/app/plugins/comments/css/comments.css +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Comments - */ -.comments { - margin-top: 120px; -} \ No newline at end of file diff --git a/app/plugins/comments/forms.php b/app/plugins/comments/forms.php deleted file mode 100644 index f9369b1..0000000 --- a/app/plugins/comments/forms.php +++ /dev/null @@ -1,69 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Plugins\Comments; - -use TheTempusProject\Bedrock\Functions\Input; -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Classes\Forms; - -class CommentsForms extends Forms { - /** - * Adds these functions to the form list. - */ - public function __construct() { - self::addHandler( 'newComment', __CLASS__, 'newComment' ); - self::addHandler( 'editComment', __CLASS__, 'editComment' ); - } - - /** - * Validates the new comment form. - * - * @return {bool} - */ - public static function newComment() { - if ( !Input::exists( 'comment' ) ) { - Check::addUserError( 'You cannot post a blank comment.' ); - return false; - } - if ( !Input::exists( 'contentId' ) ) { - Check::addUserError( 'Content ID was missing.' ); - return false; - } - // these are disabled because i need to figure out a solution for pages where images are wrong - // a missing image loads a new token and messes this up - // if ( !Check::token() ) { - // return false; - // } - return true; - } - - /** - * Validates the edit comment form. - * - * @return {bool} - */ - public static function editComment() { - if ( !Input::exists( 'comment' ) ) { - Check::addUserError( 'You cannot post a blank comment.' ); - return false; - } - // these are disabled because i need to figure out a solution for pages where images are wrong - // a missing image loads a new token and messes this up - // if ( !Check::token() ) { - // return false; - // } - return true; - } -} - -new CommentsForms; diff --git a/app/plugins/comments/models/comments.php b/app/plugins/comments/models/comments.php deleted file mode 100644 index 662fc47..0000000 --- a/app/plugins/comments/models/comments.php +++ /dev/null @@ -1,184 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Models; - -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Canary\Bin\Canary as Debug; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Classes\DatabaseModel; -use TheTempusProject\TheTempusProject as App; -use TheTempusProject\Canary\Classes\CustomException; -use TheTempusProject\Houdini\Classes\Filters; - -class Comments extends DatabaseModel { - public $tableName = 'comments'; - public $databaseMatrix = [ - [ 'author', 'int', '11' ], - [ 'contentID', 'int', '11' ], - [ 'created', 'int', '10' ], - [ 'edited', 'int', '10' ], - [ 'approved', 'int', '1' ], - [ 'contentType', 'varchar', '32' ], - [ 'content', 'text', '' ], - ]; - - public function count( $contentType, $contentID ) { - if ( !Check::id( $contentID ) ) { - Debug::info( 'Comments: illegal ID.' ); - - return false; - } - if ( !Check::dataTitle( $contentType ) ) { - Debug::info( 'Comments: illegal Type.' ); - - return false; - } - $where = ['contentType', '=', $contentType, 'AND', 'contentID', '=', $contentID]; - $data = self::$db->get( $this->tableName, $where ); - if ( !$data->count() ) { - Debug::info( 'No comments found.' ); - - return 0; - } - return $data->count(); - } - - public function display( $displayCount, $contentType, $contentID ) { - if ( !Check::id( $contentID ) ) { - Debug::info( 'Comments: illegal ID.' ); - - return false; - } - if ( !Check::dataTitle( $contentType ) ) { - Debug::info( 'Comments: illegal Type.' ); - - return false; - } - $where = ['contentType', '=', $contentType, 'AND', 'contentID', '=', $contentID]; - $commentData = self::$db->get( $this->tableName, $where, 'created', 'DESC', [0, $displayCount] ); - if ( !$commentData->count() ) { - Debug::info( 'No comments found.' ); - - return false; - } - return $this->filter( $commentData->results() ); - } - - public function update( $id, $comment ) { - if ( empty( self::$log ) ) { - self::$log = new Log; - } - if ( !Check::id( $id ) ) { - Debug::info( 'Comments: illegal ID.' ); - - return false; - } - $fields = [ - 'edited' => time(), - 'content' => $comment, - 'approved' => 1, - ]; - if ( !self::$db->update( $this->tableName, $id, $fields ) ) { - new CustomException( 'commentUpdate' ); - Debug::error( "Post: $id not updated: $fields" ); - - return false; - } - self::$log->admin( "Updated Comment: $id" ); - return true; - } - - public function create( $contentType, $contentID, $comment ) { - if ( !Check::id( $contentID ) ) { - Debug::info( 'Comments: illegal ID.' ); - - return false; - } - if ( !Check::dataTitle( $contentType ) ) { - Debug::info( 'Comments: illegal Type.' ); - - return false; - } - $fields = [ - 'author' => App::$activeUser->ID, - 'edited' => time(), - 'created' => time(), - 'content' => $comment, - 'contentType' => $contentType, - 'contentID' => $contentID, - 'approved' => 0, - ]; - if ( !self::$db->insert( $this->tableName, $fields ) ) { - new CustomException( 'commentCreate' ); - Debug::error( "Comments: $data not created: $fields" ); - - return false; - } - return self::$db->lastId(); - } - - public function filter( $data, $params = [] ) { - foreach ( $data as $instance ) { - if ( !is_object( $instance ) ) { - $instance = $data; - $end = true; - } - if ( App::$isAdmin || ( App::$isLoggedIn && $instance->author == App::$activeUser->ID ) ) { - $instance->commentControl = Views::simpleView( 'comments.control', ['ID' => $instance->ID] ); - } else { - $instance->commentControl = ''; - } - $data = self::$db->get( $instance->contentType, ['ID', '=', $instance->contentID] )->results(); - if ( empty( $data ) ) { - $title = 'Unknown'; - } elseif ( empty( $data[0]->title ) ) { - $title = 'Unknown'; - } else { - $title = $data[0]->title; - } - $authorName = self::$user->getUsername( $instance->author ); - $authorAvatar = self::$user->getAvatar( $instance->author ); - $instance->avatar = $authorAvatar; - $instance->authorName = $authorName; - $instance->contentTitle = $title; - $instance->content = Filters::applyOne( 'mentions.0', $instance->content, true ); - $instance->content = Filters::applyOne( 'hashtags.0', $instance->content, true ); - $out[] = $instance; - if ( !empty( $end ) ) { - $out = $out[0]; - break; - } - } - return $out; - } - - public function recent( $contentType = 'all', $limit = null ) { - if ( $contentType === 'all' ) { - $where = ['ID', '>', '0']; - } else { - $where = ['contentType', '=', $contentType]; - } - if ( empty( $limit ) ) { - $commentData = self::$db->get( $this->tableName, $where, 'created', 'DESC' ); - } else { - $commentData = self::$db->get( $this->tableName, $where, 'created', 'DESC', [0, $limit] ); - } - if ( !$commentData->count() ) { - Debug::info( 'No comments found.' ); - - return false; - } - return $this->filter( $commentData->results() ); - } -} diff --git a/app/plugins/comments/plugin.php b/app/plugins/comments/plugin.php deleted file mode 100644 index 146da01..0000000 --- a/app/plugins/comments/plugin.php +++ /dev/null @@ -1,154 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Plugins; - -use ReflectionClass; -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Classes\Installer; -use TheTempusProject\Houdini\Classes\Navigation; -use TheTempusProject\Classes\Plugin; -use TheTempusProject\TheTempusProject as App; -use TheTempusProject\Bedrock\Functions\Input; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Houdini\Classes\Issues; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Classes\Forms; -use TheTempusProject\Hermes\Functions\Redirect; -use TheTempusProject\Bedrock\Functions\Session; -use TheTempusProject\Models\Comments as CommentsModel; - -class Comments extends Plugin { - protected static $comments; - public $pluginName = 'TP Comments'; - public $pluginAuthor = 'JoeyK'; - public $pluginWebsite = 'https://TheTempusProject.com'; - public $modelVersion = '1.0'; - public $pluginVersion = '3.0'; - public $pluginDescription = 'A simple plugin to add user comments for other plugins.'; - public $admin_links = [ - [ - 'text' => ' Comments', - 'url' => '{ROOT_URL}admin/comments', - ], - ]; - public $main_links = [ - [ - 'text' => 'Moderator', - 'url' => '{ROOT_URL}moderator/index', - 'filter' => 'mod', - ] - ]; - public $permissionMatrix = [ - 'modAccess' => [ - 'pretty' => 'Access Moderator Areas', - 'default' => false, - ], - ]; - public $resourceMatrix = [ - 'groups' => [ - [ - 'name' => 'Moderator', - 'permissions' => '{"adminAccess":false}', - ] - ], - ]; - - public function __construct( $load = false ) { - if ( !empty(App::$activePerms) ) { - App::$isMod = !empty(App::$activePerms['modAccess']); - } else { - App::$isMod = false; - } - $this->filters[] = [ - 'name' => 'mod', - 'find' => '#{MOD}(.*?){/MOD}#is', - 'replace' => ( App::$isMod ? '$1' : '' ), - 'enabled' => true, - ]; - self::$comments = new CommentsModel; - parent::__construct( $load ); - } - - public function formPost( $type, $content, $redirect ) { - if ( ! $this->checkEnabled() ) { - Debug::info( 'Comments Plugin is disabled in the control panel.' ); - Issues::add( 'error', 'Comments are disabled.' ); - return false; - } - if ( !App::$isLoggedIn ) { - Session::flash( 'notice', 'You must be logged in to post comments.' ); - return Redirect::to( $redirect . $content->ID ); - } - if ( !Forms::check( 'newComment' ) ) { - Session::flash( 'error', [ 'There was a problem with your comment form.' => Check::userErrors() ] ); - return Redirect::to( $redirect . $content->ID ); - } - if ( !self::$comments->create( $type, $content->ID, Input::post( 'comment' ) ) ) { - Session::flash( 'error', [ 'There was a problem posting your comment.' => Check::userErrors() ] ); - } else { - Session::flash( 'success', 'Comment posted' ); - } - return Redirect::to( $redirect . $content->ID ); - } - - public function formEdit( $type, $content, $redirect ) { - if ( ! $this->checkEnabled() ) { - Debug::info( 'Comments Plugin is disabled in the control panel.' ); - Issues::add( 'error', 'Comments are disabled.' ); - return false; - } - if ( !App::$isLoggedIn ) { - Session::flash( 'notice', 'You must be logged in to do that.' ); - return Redirect::to( $type ); - } - if ( !App::$isAdmin && $content->author != App::$activeUser->ID ) { - Session::flash( 'error', 'You do not have permission to edit this comment' ); - return Redirect::to( $type ); - } - if ( !Input::exists( 'submit' ) ) { - return Views::view( 'comments.admin.edit', $content ); - } - if ( !Forms::check( 'editComment' ) ) { - Issues::add( 'error', [ 'There was a problem editing your comment.' => Check::userErrors() ] ); - return Views::view( 'comments.admin.edit', $content ); - } - if ( !self::$comments->update( $content->ID, Input::post( 'comment' ) ) ) { - Issues::add( 'error', [ 'There was a problem editing your comment.' => Check::userErrors() ] ); - return Views::view( 'comments.admin.edit', $content ); - } - Session::flash( 'success', 'Comment updated' ); - return Redirect::to( $redirect . $content->contentID ); - } - - public function formDelete( $type, $content, $redirect ) { - if ( ! $this->checkEnabled() ) { - Debug::info( 'Comments Plugin is disabled in the control panel.' ); - Issues::add( 'error', 'Comments are disabled.' ); - return false; - } - if ( !App::$isLoggedIn ) { - Session::flash( 'notice', 'You must be logged in to do that.' ); - return Redirect::to( $type ); - } - if ( !App::$isAdmin && $content->author != App::$activeUser->ID ) { - Session::flash( 'error', 'You do not have permission to edit this comment' ); - return Redirect::to( $type ); - } - if ( !self::$comments->delete( (array) $content->ID ) ) { - Session::flash( 'error', 'There was an error with your request.' ); - } else { - Session::flash( 'success', 'Comment has been deleted' ); - } - return Redirect::to( $redirect . $content->contentID ); - } -} diff --git a/app/plugins/comments/views/admin/dashboard.html b/app/plugins/comments/views/admin/dashboard.html deleted file mode 100644 index 5034c50..0000000 --- a/app/plugins/comments/views/admin/dashboard.html +++ /dev/null @@ -1,28 +0,0 @@ -New Comments - - - - - - - - - - - {LOOP} - - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
{authorName}{content}
- No results to show. -
\ No newline at end of file diff --git a/app/plugins/comments/views/admin/edit.html b/app/plugins/comments/views/admin/edit.html deleted file mode 100644 index 47553e3..0000000 --- a/app/plugins/comments/views/admin/edit.html +++ /dev/null @@ -1,25 +0,0 @@ -
-
- Edit Comment -
- {ADMIN_BREADCRUMBS} -
-
-
- -
- -
-
- - - - - -
- -
-
-
-
-
\ No newline at end of file diff --git a/app/plugins/comments/views/admin/list.html b/app/plugins/comments/views/admin/list.html deleted file mode 100644 index 33b160e..0000000 --- a/app/plugins/comments/views/admin/list.html +++ /dev/null @@ -1,45 +0,0 @@ -
- Recent Comments -
- {ADMIN_BREADCRUMBS} -
- - - - - - - - - - - - - - {LOOP} - - - - - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
AuthorSubjectCommentTime - -
{authorName}{contentTitle}{content}{DTC}{created}{/DTC} - -
- No results to show. -
- -
-
\ No newline at end of file diff --git a/app/plugins/comments/views/control.html b/app/plugins/comments/views/control.html deleted file mode 100644 index 26661f4..0000000 --- a/app/plugins/comments/views/control.html +++ /dev/null @@ -1,8 +0,0 @@ - \ No newline at end of file diff --git a/app/plugins/comments/views/create.html b/app/plugins/comments/views/create.html deleted file mode 100644 index af241f5..0000000 --- a/app/plugins/comments/views/create.html +++ /dev/null @@ -1,14 +0,0 @@ -
-
- -
- - - -
diff --git a/app/plugins/comments/views/list.html b/app/plugins/comments/views/list.html deleted file mode 100644 index 1cdf0fc..0000000 --- a/app/plugins/comments/views/list.html +++ /dev/null @@ -1,39 +0,0 @@ -
-
-

- Comments -

- {count} -
-
-
    - {LOOP} -
  • -
    -
    - User Avatar -
    -
    -
    - - By: {authorName} on {DTC date}{created}{/DTC} - -
    -
    - {content} -
    - {commentControl} -
    -
    -
  • - {/LOOP} - {ALT} -
  • -
    -

    Be the first to comment.

    -
    -
  • - {/ALT} -
-
-
\ No newline at end of file diff --git a/app/plugins/comments/views/moderator.html b/app/plugins/comments/views/moderator.html deleted file mode 100644 index d98f81a..0000000 --- a/app/plugins/comments/views/moderator.html +++ /dev/null @@ -1,7 +0,0 @@ -

Moderator' Area

-
-

Welcome!

-

This is the moderator section. You can give some groups permission to access this area. The menu is hidden for normal users and if they get a link to a moderator's area, the authentication system will stop them from accessing any content protected this way.

-

You can even use this feature in-line with your views, hiding certain components from non-moderators

-

The idea behind this role is for them to help you in policing comments as needed.

-
\ No newline at end of file diff --git a/app/plugins/messages/controllers/messages.php b/app/plugins/messages/controllers/messages.php deleted file mode 100644 index c07e8cc..0000000 --- a/app/plugins/messages/controllers/messages.php +++ /dev/null @@ -1,121 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Controllers; - -use TheTempusProject\Classes\Controller; -use TheTempusProject\Classes\Forms as FormChecker; -use TheTempusProject\Models\Message; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Houdini\Classes\Issues; -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Bedrock\Functions\Input; -use TheTempusProject\TheTempusProject as App; -use TheTempusProject\Hermes\Functions\Redirect; -use TheTempusProject\Bedrock\Functions\Session; - -class Messages extends Controller { - private static $message; - - public function __construct() { - parent::__construct(); - self::$title = 'Messages'; - self::$message = new Message; - if ( ! App::$isLoggedIn ) { - Session::flash( 'error', 'You do not have permission to access this page.' ); - return Redirect::home(); - } - } - - public function create() { - self::$title .= ' - New Message'; - if ( Input::get( 'prepopuser' ) ) { - $data = Input::get( 'prepopuser' ); - } - if ( !empty( $data ) && self::$user->checkUsername( $data ) ) { - Components::set( 'prepopuser', $data ); - } else { - Components::set( 'prepopuser', '' ); - } - if ( !Input::exists( 'submit' ) ) { - return Views::view( 'messages.create' ); - } - if ( !FormChecker::check( 'newMessage' ) ) { - Issues::add( 'error', [ 'There was an problem sending your messages.' => Check::userErrors() ] ); - return Views::view( 'messages.create' ); - } - if ( self::$message->newThread( Input::post( 'toUser' ), Input::post( 'subject' ), Input::post( 'message' ) ) ) { - Issues::add( 'success', 'Message Sent.' ); - } else { - Issues::add( 'notice', 'There was an problem sending your messages.' ); - } - return $this->index(); - } - - public function delete( $id = '' ) { - if ( Input::exists( 'T_' ) ) { - self::$message->delete( Input::post( 'T_' ) ); - } - if ( Input::exists( 'F_' ) ) { - self::$message->delete( Input::post( 'F_' ) ); - } - if ( Input::exists( 'ID' ) ) { - self::$message->delete( Input::get( 'ID' ) ); - } - if ( !empty( $id ) ) { - self::$message->delete( $id ); - } - return $this->index(); - } - - public function index() { - Components::set( 'message_inbox', Views::simpleView( 'messages.inbox', self::$message->getInbox() ) ); - Components::set( 'message_outbox', Views::simpleView( 'messages.outbox', self::$message->getOutbox() ) ); - Views::view( 'messages.index' ); - } - - public function read( $id = '' ) { - self::$message->markRead( $id ); - return $this->index(); - } - - public function reply() { - if ( Input::exists( 'messageID' ) ) { - $data = Input::post( 'messageID' ); - } - if ( !Check::id( $data ) ) { - Issues::add( 'error', 'There was an error with your request.' ); - return $this->index(); - } - self::$title .= ' - Reply to: ' . self::$message->messageTitle( $data ); - if ( !Input::exists( 'message' ) ) { - Components::set( 'messageID', $data ); - return Views::view( 'messages.reply' ); - } - if ( !FormChecker::check( 'replyMessage' ) ) { - Issues::add( 'error', [ 'There was an problem sending your messages.' => Check::userErrors() ] ); - Components::set( 'messageID', $data ); - return Views::view( 'messages.reply' ); - } - if ( !self::$message->newMessageReply( $data, Input::post( 'message' ) ) ) { - Issues::add( 'error', 'There was an error with your request.' ); - return $this->index(); - } - Issues::add( 'success', 'Reply Sent.' ); - return $this->index(); - } - - public function view( $id = '' ) { - self::$title = self::$message->messageTitle( $id ); - return Views::view( 'messages.message', self::$message->getThread( $id, true ) ); - } -} diff --git a/app/plugins/messages/models/message.php b/app/plugins/messages/models/message.php deleted file mode 100644 index 6236fd2..0000000 --- a/app/plugins/messages/models/message.php +++ /dev/null @@ -1,452 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Models; - -use TheTempusProject\Classes\DatabaseModel; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Canary\Bin\Canary as Debug; -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Bedrock\Functions\Sanitize; -use TheTempusProject\TheTempusProject as App; -use TheTempusProject\Canary\Classes\CustomException; - -class Message extends DatabaseModel { - public $tableName = 'messages'; - public $databaseMatrix = [ - [ 'userTo', 'int', '11' ], - [ 'userFrom', 'int', '11' ], - [ 'parent', 'int', '11' ], - [ 'sent', 'int', '10' ], - [ 'lastReply', 'int', '10' ], - [ 'senderDeleted', 'int', '1' ], - [ 'recieverDeleted', 'int', '1' ], - [ 'isRead', 'int', '1' ], - [ 'message', 'text', '' ], - [ 'subject', 'text', '' ], - ]; - private $messages; - private $usernames; - - /** - * The model constructor. - */ - public function __construct() { - parent::__construct(); - self::$message = $this; - } - - /** - * Retrieves the most recent relative message in a thread - * - * @param int $parent - the id of the parent message - * @param string $user - the id of the relative user - * @return object - */ - public function getLatestMessage( $parent, $user, $type = null ) { - if ( !Check::id( $parent ) ) { - Debug::info( 'Invalid message ID' ); - return false; - } - if ( !Check::id( $user ) ) { - Debug::info( 'Invalid user ID' ); - return false; - } - $messageData = self::$db->get( $this->tableName, [ 'ID', '=', $parent ] ); - if ( $messageData->count() == 0 ) { - Debug::info( 'Message not found.' ); - return false; - } - $message = $messageData->first(); - $params = [ 'parent', '=', $parent ]; - if ( $type !== null ) { - $params = array_merge( $params, [ 'AND', $type, '=', $user ] ); - } - $messageData = self::$db->get( $this->tableName, $params, 'ID', 'DESC', [ 0, 1 ] ); - if ( $messageData->count() != 0 ) { - if ( $messageData->first()->recieverDeleted == 0 ) { - $message = $messageData->first(); - } else { - $message->recieverDeleted = 1; - } - } - return $message; - } - - /** - * This calls a view of the requested message. - * - * @param int $ID - The message ID you are looking for. - * @return null - */ - public function getThread( $id, $markRead = false ) { - if ( !Check::id( $id ) ) { - Debug::info( 'Invalid ID' ); - return false; - } - $messageData = self::$db->get( $this->tableName, [ 'ID', '=', $id ] ); - if ( $messageData->count() == 0 ) { - Debug::info( 'Message not found.' ); - return false; - } - $message = $messageData->first(); - if ( $message->userTo == App::$activeUser->ID ) { - $permissionCheck = 1; - if ( $message->recieverDeleted == 1 ) { - Debug::info( 'User has already deleted this message.' ); - return false; - } - } - if ( $message->userFrom == App::$activeUser->ID ) { - $permissionCheck = 1; - if ( $message->senderDeleted == 1 ) { - Debug::info( 'User has already deleted this message.' ); - return false; - } - } - if ( empty( $permissionCheck ) ) { - Debug::info( 'You do not have permission to view this message.' ); - return false; - } - if ( $message->parent != 0 ) { - $find = $message->parent; - } else { - $find = $message->ID; - } - $messageData = self::$db->get( $this->tableName, [ 'ID', '=', $find, 'OR', 'Parent', '=', $find ], 'ID', 'ASC' )->results(); - Components::set( 'PID', $find ); - - if ( $markRead == true ) { - foreach ( $messageData as $instance ) { - $this->markRead( $instance->ID ); - } - } - return $this->filter( $messageData ); - } - - public function getInbox( $limit = null ) { - if ( empty( $limit ) ) { - $limit = 10; - } - $limit = [ 0, $limit ]; - $messageData = self::$db->get( - $this->tableName, - [ - 'parent', '=', 0, - 'AND', - 'userFrom', '=', App::$activeUser->ID, - 'OR', - 'parent', '=', 0, - 'AND', - 'userTo', '=', App::$activeUser->ID, - ], - 'ID', - 'DESC', - $limit - ); - if ( $messageData->count() == 0 ) { - Debug::info( 'getInbox: No messages found' ); - return false; - } - $filters = [ - 'importantUser' => App::$activeUser->ID, - 'deleted' => false, - 'type' => 'userTo', - ]; - return $this->filter( $messageData->results(), $filters ); - } - - /** - * This function calls the view for the message outbox. - * - * @return null - */ - public function getOutbox( $limit = null ) { - if ( empty( $limit ) ) { - $limit = 10; - } - $limit = [ 0, $limit ]; - $messageData = self::$db->get( - $this->tableName, - [ - 'parent', '=', 0, - 'AND', - 'userFrom', '=', App::$activeUser->ID, - ], - 'ID', - 'DESC', - $limit - ); - if ( $messageData->count() == 0 ) { - Debug::info( 'getOutbox: No messages found' ); - return false; - } - $filters = [ - 'importantUser' => App::$activeUser->ID, - 'deleted' => false, - 'type' => 'userFrom', - ]; - return $this->filter( $messageData->results(), $filters ); - } - - /** - * This function is to prep our messages for display. An array of raw messages - * sent through this function will automatically have all the user ID's filter - * into actual usernames. - * - * @param $messageArray - This is an array of messages that need to be processed. - * @return array - It will return the same message array after being processed. - * @todo add filtering for BB-code. - */ - public function filter( $messageArray, $filters = [] ) { - $out = []; - foreach ( $messageArray as $message ) { - if ( !is_object( $message ) ) { - $message = $messageArray; - $end = true; - } - if ( isset( $filters['type'] ) && isset( $filters['importantUser'] ) ) { - $type = $filters['type']; - } else { - $type = null; - } - if ( isset( $filters['importantUser'] ) ) { - $user = $filters['importantUser']; - } else { - $user = App::$activeUser->ID; - } - if ( $message->parent == 0 ) { - $last = $this->getLatestMessage( $message->ID, $user, $type ); - } else { - $last = $message; - } - if ( $type != null && $message->$type != $user && $last->$type != $user ) { - continue; - } - if ( isset( $filters['deleted'] ) && $filters['deleted'] == false ) { - if ( $type == 'userFrom' ) { - if ( $last->senderDeleted == 1 ) { - continue; - } - } - if ( $type == 'userTo' ) { - if ( $last->recieverDeleted == 1 ) { - continue; - } - } - } - $messageOut = (array) $message; - $short = explode( ' ', Sanitize::contentShort( $message->message ) ); - $summary = implode( ' ', array_splice( $short, 0, 25 ) ); - if ( count( $short, 1 ) >= 25 ) { - $messageOut['summary'] = $summary . '...'; - } else { - $messageOut['summary'] = $summary; - } - if ( $last->isRead == 0 ) { - $messageOut['unreadBadge'] = Views::simpleView( 'messages.unreadBadge' ); - } else { - $messageOut['unreadBadge'] = ''; - } - $messageOut['fromAvatar'] = self::$user->getAvatar( $message->userFrom ); - $messageOut['userTo'] = self::$user->getUsername( $message->userTo ); - $messageOut['userFrom'] = self::$user->getUsername( $message->userFrom ); - $out[] = (object) $messageOut; - if ( !empty( $end ) ) { - $out = $out[0]; - break; - } - } - return $out; - } - - /** - * Function to check input and save messages to the DB. - * - * @param string $data - Username of the person receiving the sent message. - * @return function - */ - public function newThread( $to, $subject, $message ) { - if ( !self::$user->usernameExists( $to ) ) { - Debug::info( 'Message->sendMessage: User not found.' ); - return false; - } - $fields = [ - 'userTo' => self::$user->getID( $to ), - 'userFrom' => App::$activeUser->ID, - 'parent' => 0, - 'sent' => time(), - 'lastReply' => time(), - 'senderDeleted' => 0, - 'recieverDeleted' => 0, - 'isRead' => 0, - 'subject' => $subject, - 'message' => $message, - ]; - if ( !self::$db->insert( $this->tableName, $fields ) ) { - new CustomException( 'messageSend' ); - return false; - } - return true; - } - - public function getUnreadCount( $userId ) { - $result = self::$db->get( - $this->tableName, - [ - 'userTo', '=', $userId, - 'AND', - 'isRead', '=', 0, - 'AND', - 'parent', '=', 0, - 'AND', - 'recieverDeleted', '=', 0, - ] - ); - return $result->count(); - } - - public function unreadCount() { - if ( empty( App::$activeUser->ID ) ) { - return 0; - } - return $this->getUnreadCount( App::$activeUser->ID ); - } - - public function hasPermission( $id ) { - if ( !Check::id( $id ) ) { - Debug::info( 'Invalid ID' ); - return false; - } - $messageData = self::$db->get( 'messages', [ 'ID', '=', $id ] ); - if ( $messageData->count() == 0 ) { - Debug::info( 'Message not found.' ); - return false; - } - $message = $messageData->first(); - if ( $message->userTo != App::$activeUser->ID && $message->userFrom != App::$activeUser->ID ) { - return false; - } - return true; - } - - /** - * Marks a message as read. This is setup to only work - * if the message was sent to the active user. - * - * @param int - The message ID you are marking as read. - * @return bool - */ - public function markRead( $id ) { - if ( !Check::id( $id ) ) { - Debug::info( 'Invalid ID' ); - return false; - } - $result = self::$db->get( $this->tableName, [ 'ID', '=', $id, 'AND', 'userTo', '=', App::$activeUser->ID, 'AND', 'isRead', '=', '0' ] ); - if ( $result->count() == 0 ) { - Debug::info( 'Failed to mark message as read.' ); - return false; - } - if ( !self::$db->update( $this->tableName, $id, [ 'isRead' => 1 ] ) ) { - Debug::error( 'Failed to mark message as read.' ); - return false; - } - return true; - } - - public function newMessageReply( $id, $message ) { - if ( !$this->hasPermission( $id ) ) { - Debug::info( 'Permission Denied.' ); - return false; - } - $messageData = self::$db->get( $this->tableName, [ 'ID', '=', $id ] )->first(); - if ( $messageData->userTo == App::$activeUser->ID ) { - $recipient = $messageData->userFrom; - } else { - $recipient = $messageData->userTo; - } - if ( $recipient === App::$activeUser->ID ) { - Debug::info( 'Cannot send messages to yourself' ); - return false; - } - if ( !self::$db->update( $this->tableName, $messageData->ID, [ 'lastReply' => time() ] ) ) { - new CustomException( 'messagesReplyUpdate' ); - return false; - } - $fields = [ - 'senderDeleted' => 0, - 'recieverDeleted' => 0, - 'isRead' => 0, - 'userTo' => $recipient, - 'userFrom' => App::$activeUser->ID, - 'message' => $message, - 'subject' => 're: ' . $messageData->subject, - 'sent' => time(), - 'parent' => $messageData->ID, - 'lastReply' => time(), - ]; - if ( !self::$db->insert( $this->tableName, $fields ) ) { - new CustomException( 'messagesReplySend' ); - return false; - } - return true; - } - - public function messageTitle( $id ) { - if ( !$this->hasPermission( $id ) ) { - Debug::info( 'Permission Denied.' ); - return false; - } - $message = self::$db->get( $this->tableName, [ 'ID', '=', $id ] )->first(); - return $message->subject; - } - - /** - * Function to delete messages from the DB. - * - * @param int $data - The ID of the message you are trying to delete. - * @todo - done at 5 am after no sleep. This can be simplified a lot, i just wanted a working solution ASAP - * @return bool - */ - public function delete( $data ) { - if ( !is_array( $data ) ) { - $data = [ $data ]; - } - foreach ( $data as $instance ) { - if ( !Check::id( $instance ) ) { - $error = true; - } - if ( !$this->hasPermission( $instance ) ) { - Debug::info( 'Permission Denied.' ); - return false; - } - $message = self::$db->get( $this->tableName, [ 'ID', '=', $instance ] )->first(); - if ( $message->userTo == App::$activeUser->ID ) { - $fields = [ 'recieverDeleted' => '1' ]; - } else { - $fields = [ 'senderDeleted' => '1' ]; - } - if ( !self::$db->update( $this->tableName, $instance, $fields ) ) { - $error = true; - } - Debug::info( "message Deleted: $instance" ); - if ( !empty( $end ) ) { - break; - } - } - if ( !empty( $error ) ) { - Debug::info( 'There was an error deleting one or more messages.' ); - return false; - } - return true; - } -} diff --git a/app/plugins/messages/plugin.php b/app/plugins/messages/plugin.php deleted file mode 100644 index 13624ef..0000000 --- a/app/plugins/messages/plugin.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Plugins; - -use TheTempusProject\TheTempusProject as App; -use TheTempusProject\Classes\Plugin; -use TheTempusProject\Models\Message; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Houdini\Classes\Views; - -class Messages extends Plugin { - public $pluginName = 'TP Messages'; - public $pluginAuthor = 'JoeyK'; - public $pluginWebsite = 'https://TheTempusProject.com'; - public $modelVersion = '1.0'; - public $pluginVersion = '3.0'; - public $pluginDescription = 'A simple plugin which adds a site wide messaging system.'; - public $permissionMatrix = [ - 'sendMessages' => [ - 'pretty' => 'Can send Messages', - 'default' => false, - ], - ]; - private static $loaded = false; - - public function __construct() { - if ( ! self::$loaded ) { - $messages = new Message; - Components::set( 'MESSAGE_COUNT', $messages->unreadCount() ); - if ( $messages->unreadCount() > 0 ) { - $messageBadge = Views::simpleView( 'messages.badge' ); - } else { - $messageBadge = ''; - } - Components::set( 'MBADGE', $messageBadge ); - if ( App::$isLoggedIn ) { - Components::set( 'RECENT_MESSAGES', Views::simpleView( 'messages.nav.recentMessagesDropdown', $messages->getInbox( 5 ) ) ); - } else { - Components::set( 'RECENT_MESSAGES', '' ); - } - App::$topNavRight .= '{RECENT_MESSAGES}'; - App::$topNavRightDropdown .= '
  • Inbox {MBADGE}
  • '; - self::$loaded = true; - } - parent::__construct(); - } -} diff --git a/app/plugins/messages/views/badge.html b/app/plugins/messages/views/badge.html deleted file mode 100644 index 0a248f2..0000000 --- a/app/plugins/messages/views/badge.html +++ /dev/null @@ -1 +0,0 @@ -{MESSAGE_COUNT} \ No newline at end of file diff --git a/app/plugins/messages/views/create.html b/app/plugins/messages/views/create.html deleted file mode 100644 index d1cd308..0000000 --- a/app/plugins/messages/views/create.html +++ /dev/null @@ -1,57 +0,0 @@ -
    -
    -
    -
    - New Message -
    - -
    - -
    - -
    -
    - - -
    - -
    - -
    -
    - - -
    - - -
    -
    - - -
    -
    -
    -
    diff --git a/app/plugins/messages/views/inbox.html b/app/plugins/messages/views/inbox.html deleted file mode 100644 index 71b1c34..0000000 --- a/app/plugins/messages/views/inbox.html +++ /dev/null @@ -1,39 +0,0 @@ -

    Inbox

    -
    - - - - - - - - - - - - - {LOOP} - - - - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
    FromSubjectLast Reply - -
    {userFrom}{subject}{DTC}{lastReply}{/DTC}Mark as readDelete - -
    - No Messages. -
    - New message -
    diff --git a/app/plugins/messages/views/index.html b/app/plugins/messages/views/index.html deleted file mode 100644 index f35bcad..0000000 --- a/app/plugins/messages/views/index.html +++ /dev/null @@ -1,8 +0,0 @@ -
    -
    - {message_inbox} -
    -
    - {message_outbox} -
    -
    \ No newline at end of file diff --git a/app/plugins/messages/views/mesage.html b/app/plugins/messages/views/mesage.html deleted file mode 100644 index e076f5b..0000000 --- a/app/plugins/messages/views/mesage.html +++ /dev/null @@ -1,43 +0,0 @@ -
    -
    -
    -
    - {LOOP} - {SINGLE} -
    -

    {subject}

    -
    - {/SINGLE} -
    -
    -
    - {userFrom}
    - User Pic -
    -
    - - - - -
    {message}
    -
    -
    -
    - - {/LOOP} -
    -
    - - - -
    -
    -
    -
    \ No newline at end of file diff --git a/app/plugins/messages/views/message.html b/app/plugins/messages/views/message.html deleted file mode 100644 index 919a748..0000000 --- a/app/plugins/messages/views/message.html +++ /dev/null @@ -1,37 +0,0 @@ -
    -
    -
    - {LOOP} - {SINGLE} -
    -
    {subject}
    -
    - {/SINGLE} -
    -
    -
    - {userFrom}
    - User Pic -
    -
    - {message} -
    -
    -
    - - {/LOOP} -
    -
    - - - -
    -
    -
    \ No newline at end of file diff --git a/app/plugins/messages/views/nav/recentMessagesDropdown.html b/app/plugins/messages/views/nav/recentMessagesDropdown.html deleted file mode 100644 index c89a2e8..0000000 --- a/app/plugins/messages/views/nav/recentMessagesDropdown.html +++ /dev/null @@ -1,46 +0,0 @@ - \ No newline at end of file diff --git a/app/plugins/messages/views/outbox.html b/app/plugins/messages/views/outbox.html deleted file mode 100644 index 9ab1833..0000000 --- a/app/plugins/messages/views/outbox.html +++ /dev/null @@ -1,37 +0,0 @@ -

    Outbox

    -
    - - - - - - - - - - - - {LOOP} - - - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
    ToSubjectSent - -
    {userTo}{subject}{DTC date}{sent}{/DTC}Delete - -
    - No Messages -
    - -
    \ No newline at end of file diff --git a/app/plugins/messages/views/reply.html b/app/plugins/messages/views/reply.html deleted file mode 100644 index e3abe02..0000000 --- a/app/plugins/messages/views/reply.html +++ /dev/null @@ -1,18 +0,0 @@ -
    -
    - Reply -
    -
    -
    - - -
    -
    -
    - - -
    - -
    -
    -
    \ No newline at end of file diff --git a/app/plugins/messages/views/unreadBadge.html b/app/plugins/messages/views/unreadBadge.html deleted file mode 100644 index 344a6d8..0000000 --- a/app/plugins/messages/views/unreadBadge.html +++ /dev/null @@ -1 +0,0 @@ - class="bg-info" \ No newline at end of file diff --git a/app/plugins/notifications/controllers/admin/notifications.php b/app/plugins/notifications/controllers/admin/notifications.php deleted file mode 100644 index 1ff39cd..0000000 --- a/app/plugins/notifications/controllers/admin/notifications.php +++ /dev/null @@ -1,85 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Controllers\Admin; - -use TheTempusProject\Bedrock\Functions\Input; -use TheTempusProject\Houdini\Classes\Issues; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Houdini\Classes\Navigation; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Classes\AdminController; -use TheTempusProject\Models\Notification as NotificationsModel; -use TheTempusProject\Models\Group; -use TheTempusProject\Models\User; -use TheTempusProject\Houdini\Classes\Forms; -use TheTempusProject\Classes\Forms as FormChecker; - -class Notifications extends AdminController { - protected static $notifications; - public static $user; - public static $group; - - public function __construct() { - parent::__construct(); - self::$title = 'Admin - Notifications'; - self::$notifications = new NotificationsModel; - self::$user = new User; - self::$group = new Group; - $view = Navigation::activePageSelect( 'nav.admin', '/admin/Notifications' ); - Components::set( 'ADMINNAV', $view ); - } - - public function index( $data = null ) { - // this is just a simple form to allow admins to send notifications - return $this->create(); - } - - public function create() { - $select = Forms::getSelectHtml( - 'groupSelect', - self::$group->listGroupsSimple( true ) - ); - Components::set( 'groupSelect', $select ); - if ( ! Input::exists( 'submit' ) ) { - return Views::view( 'notifications.admin.send' ); - } - if ( ! FormChecker::check( 'createNotification' ) ) { - Issues::add( 'error', [ 'There was an error with your request.' => Check::userErrors() ] ); - return Views::view( 'notifications.admin.send' ); - } - if ( Input::exists( 'expires' ) ) { - $expiresAt = time() + intval( Input::post( 'expires' ) ); - } else { - $expiresAt = 0; - } - - if ( Input::exists( 'groupSelect' ) && Input::post( 'groupSelect' ) != 0 && Input::post( 'groupSelect' ) != 'all' ) { - $list = self::$group->listMembers( Input::post( 'groupSelect' ) ); - } else { - $list = self::$user->userList(); - } - - $results = []; - foreach ( $list as $recipient ) { - $results[] = self::$notifications->create( Input::post( 'notification' ), 'Admin Issued', $recipient->ID, $expiresAt ); - } - - // $result = self::$notifications->create( Input::post( 'notification' ), 'Admin Issued', XXXXXXX_user_idsXXXXXX, $expiresAt ); - if ( ! empty( $results ) ) { - Issues::add( 'success', 'Your notification has been sent.' ); - } else { - Issues::add( 'error', [ 'There was an unknown error submitting your data.' => Check::userErrors() ] ); - } - Views::view( 'notifications.admin.send' ); - } -} diff --git a/app/plugins/notifications/controllers/notifications.php b/app/plugins/notifications/controllers/notifications.php deleted file mode 100644 index 6dfc3e1..0000000 --- a/app/plugins/notifications/controllers/notifications.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Controllers; - -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Houdini\Classes\Issues; -use TheTempusProject\Classes\Controller; -use TheTempusProject\Models\Notification as NotificationsModel; -use TheTempusProject\TheTempusProject as App; -use TheTempusProject\Hermes\Functions\Redirect; -use TheTempusProject\Bedrock\Functions\Session; - -class Notifications extends Controller { - protected static $notifications; - - public function __construct() { - parent::__construct(); - self::$notifications = new NotificationsModel; - self::$title = 'Notifications - {SITENAME}'; - self::$pageDescription = 'Your recent notifications'; - if ( ! App::$isLoggedIn ) { - Session::flash( 'error', 'You do not have permission to access this page.' ); - return Redirect::home(); - } - } - - public function index() { - $notifications = self::$notifications->getByUser( 10 ); - Views::view( 'notifications.list', $notifications ); - } - - public function markRead( $id = null ) { - $notification = self::$notifications->findById( $id ); - if ( $notification == false ) { - Issues::add( 'error', 'Notification not found.' ); - return $this->index(); - } - if ( $notification->userID != App::$activeUser->ID ) { - Issues::add( 'error', 'You do not have permission to modify this notification.' ); - return $this->index(); - } - $result = self::$notifications->markSeen( $id ); - if ( $result == true ) { - Issues::add( 'success', 'Notification marked as read.' ); - } else { - Issues::add( 'notice', 'There was an problem updating your notification.' ); - } - return $this->index(); - } - - public function delete( $id = null ) { - $notification = self::$notifications->findById( $id ); - if ( $notification == false ) { - Issues::add( 'error', 'Notification not found.' ); - return $this->index(); - } - if ( $notification->userID != App::$activeUser->ID ) { - Issues::add( 'error', 'You do not have permission to modify this notification.' ); - return $this->index(); - } - $result = self::$notifications->delete( $id ); - if ( $result == true ) { - Issues::add( 'success', 'Notification deleted.' ); - } else { - Issues::add( 'notice', 'There was an problem deleting your notification.' ); - } - return $this->index(); - } -} diff --git a/app/plugins/notifications/forms.php b/app/plugins/notifications/forms.php deleted file mode 100644 index 7976796..0000000 --- a/app/plugins/notifications/forms.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Plugins\Notifications; - -use TheTempusProject\Bedrock\Functions\Input; -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Classes\Forms; - -class NotificationForms extends Forms { - /** - * Adds these functions to the form list. - */ - public function __construct() { - self::addHandler( 'createNotification', __CLASS__, 'createNotification' ); - } - - /** - * Validates the createNotification form. - * - * @return {bool} - */ - public static function createNotification() { - if ( ! Input::exists( 'notification' ) ) { - Check::addUserError( 'You must provide a notification.' ); - return false; - } - return true; - } -} - -new NotificationForms; diff --git a/app/plugins/notifications/models/notification.php b/app/plugins/notifications/models/notification.php deleted file mode 100644 index e83b6b2..0000000 --- a/app/plugins/notifications/models/notification.php +++ /dev/null @@ -1,146 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Models; - -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Canary\Bin\Canary as Debug; -use TheTempusProject\Classes\DatabaseModel; -use TheTempusProject\TheTempusProject as App; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Canary\Classes\CustomException; - -class Notification extends DatabaseModel { - public $tableName = 'notifications'; - public $databaseMatrix = [ - [ 'notification', 'text', '' ], - [ 'origin', 'varchar', '128' ], - [ 'userID', 'int', '11' ], - [ 'createdAt', 'int', '11' ], - [ 'expiresAt', 'int', '11' ], - [ 'deletedAt', 'int', '11' ], - [ 'seenAt', 'int', '11' ], - ]; - - public function getUnreadCount( $userID ) { - $result = self::$db->get( - $this->tableName, - [ - 'userID', '=', $userID, - 'AND', - 'deletedAt', '=', '0', - 'AND', - 'seenAt', '=', '0', - 'AND', - 'expiresAt', '<', time(), - ] - ); - return $result->count(); - } - - public function create( $notification, $origin, $userID, $expiresAt = '0', $deletedAt = '0', $seenAt = '0' ) { - $fields = [ - 'notification' => $notification, - 'origin' => $origin, - 'userID' => $userID, - 'createdAt' => time(), - 'expiresAt' => $expiresAt, - 'deletedAt' => $deletedAt, - 'seenAt' => $seenAt, - ]; - if ( !self::$db->insert( $this->tableName, $fields ) ) { - Debug::info( 'Events::create - failed to insert to db' ); - return false; - } - return self::$db->lastId(); - } - - public function getByUser( $limit = 0 ) { - $whereClause = [ - 'userID', '=', App::$activeUser->ID, - 'AND', - 'deletedAt', '=', '0', - 'AND', - 'expiresAt', '<', time(), - ]; - if ( empty( $limit ) ) { - $notifications = self::$db->get( $this->tableName, $whereClause ); - } else { - $notifications = self::$db->get( $this->tableName, $whereClause, 'ID', 'DESC', [0, $limit] ); - } - if ( !$notifications->count() ) { - Debug::info( 'Notification:getByUser No Notifications found' ); - return false; - } - return $this->filter( $notifications->results() ); - } - - public function markSeen( $id ) { - if ( !Check::id( $id ) ) { - Debug::info( 'Notifications: illegal ID.' ); - return false; - } - $fields = [ - 'seenAt' => time(), - ]; - $notification = self::findById( $id ); - if ( ! $notification ) { - Debug::error( "Notifications: $id not updated" ); - return false; - } - if ( !self::$db->update( $this->tableName, $id, $fields ) ) { - new CustomException( 'notificationUpdate' ); - Debug::error( "Notifications: $id not updated" ); - return false; - } - return true; - } - - public function delete( $id ) { - if ( !Check::id( $id ) ) { - Debug::info( 'Notifications: illegal ID.' ); - return false; - } - $fields = [ - 'deletedAt' => time(), - ]; - if ( !self::$db->update( $this->tableName, $id, $fields ) ) { - new CustomException( 'notificationDelete' ); - Debug::error( "Notifications: $id not updated" ); - return false; - } - return true; - } - - public function filter( $messageArray, $filters = [] ) { - $out = []; - foreach ( $messageArray as $message ) { - if ( !is_object( $message ) ) { - $message = $messageArray; - $end = true; - } - if ( $message->seenAt == 0 ) { - $message->unseenBadge = Views::simpleView( 'notifications.unseenBadge' ); - $message->markReadLink = ''; - } else { - $message->unseenBadge = ''; - $message->markReadLink = ''; - } - $out[] = (object) $message; - if ( !empty( $end ) ) { - $out = $out[0]; - break; - } - } - return $out; - } -} diff --git a/app/plugins/notifications/plugin.php b/app/plugins/notifications/plugin.php deleted file mode 100644 index c1833d2..0000000 --- a/app/plugins/notifications/plugin.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Plugins; - -use TheTempusProject\TheTempusProject as App; -use TheTempusProject\Classes\Plugin; -use TheTempusProject\Models\Notification; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Houdini\Classes\Views; - -class Notifications extends Plugin { - public $pluginName = 'TP Notifications'; - public $pluginAuthor = 'JoeyK'; - public $pluginWebsite = 'https://TheTempusProject.com'; - public $modelVersion = '1.0'; - public $pluginVersion = '3.0'; - public $pluginDescription = 'A simple plugin which adds a site wide notification system.'; - public $permissionMatrix = [ - 'sendNotifications' => [ - 'pretty' => 'Can send notifications', - 'default' => false, - ], - ]; - public $admin_links = [ - [ - 'text' => ' Notify', - 'url' => '{ROOT_URL}admin/notifications', - ], - ]; - private static $loaded = false; - public function __construct( $load = false ) { - parent::__construct( $load ); - if ( $this->checkEnabled() && App::$isLoggedIn ) { - $notifications = new Notification; - Components::set( 'notificationCount', $notifications->getUnreadCount( App::$activeUser->ID ) ); - if ( $notifications->getUnreadCount( App::$activeUser->ID ) > 0 ) { - $messageBadge = Views::simpleView( 'notifications.badge' ); - } else { - $messageBadge = ''; - } - Components::set( 'NBADGE', $messageBadge ); - if ( ! self::$loaded ) { - if ( App::$isLoggedIn ) { - Components::set( 'recentNotifications', Views::simpleView( 'notifications.nav.recentNotificationsDropdown', $notifications->getByUser( 10 ) ) ); - } else { - Components::set( 'recentNotifications', '' ); - } - App::$topNavRight .= '{recentNotifications}'; - App::$topNavRightDropdown .= '
  • Notifications {NBADGE}
  • '; - self::$loaded = true; - } - } - } -} diff --git a/app/plugins/notifications/views/admin/send.html b/app/plugins/notifications/views/admin/send.html deleted file mode 100644 index 57fbda4..0000000 --- a/app/plugins/notifications/views/admin/send.html +++ /dev/null @@ -1,62 +0,0 @@ -
    - Send Notification -
    - {ADMIN_BREADCRUMBS} - -
    -
    - -
    - -
    - {groupSelect} -
    -
    - - -
    - -
    - -
    -
    - - -
    - -
    - - Max: 2000 characters -
    -
    - - - -
    - - -
    - -
    -
    -
    \ No newline at end of file diff --git a/app/plugins/notifications/views/badge.html b/app/plugins/notifications/views/badge.html deleted file mode 100644 index a32498d..0000000 --- a/app/plugins/notifications/views/badge.html +++ /dev/null @@ -1 +0,0 @@ -{notificationCount} \ No newline at end of file diff --git a/app/plugins/notifications/views/list.html b/app/plugins/notifications/views/list.html deleted file mode 100644 index 631c3c0..0000000 --- a/app/plugins/notifications/views/list.html +++ /dev/null @@ -1,38 +0,0 @@ -
    -
    -
    - Notifications - - - - - - - - - - {LOOP} - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
    {notification} - {markReadLink} - - - - -
    - No Notifications -
    -
    -
    -
    \ No newline at end of file diff --git a/app/plugins/notifications/views/nav/recentNotificationsDropdown.html b/app/plugins/notifications/views/nav/recentNotificationsDropdown.html deleted file mode 100644 index f3f0648..0000000 --- a/app/plugins/notifications/views/nav/recentNotificationsDropdown.html +++ /dev/null @@ -1,41 +0,0 @@ - - diff --git a/app/plugins/notifications/views/unseenBadge.html b/app/plugins/notifications/views/unseenBadge.html deleted file mode 100644 index 344a6d8..0000000 --- a/app/plugins/notifications/views/unseenBadge.html +++ /dev/null @@ -1 +0,0 @@ - class="bg-info" \ No newline at end of file diff --git a/app/plugins/subscribe/plugin.php b/app/plugins/subscribe/plugin.php deleted file mode 100644 index 972cb33..0000000 --- a/app/plugins/subscribe/plugin.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Plugins; - -use ReflectionClass; -use TheTempusProject\Classes\Installer; -use TheTempusProject\Houdini\Classes\Navigation; -use TheTempusProject\Classes\Plugin; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\TheTempusProject as App; - -class Subscribe extends Plugin { - private static $loaded = false; - public $pluginName = 'TP Subscribe'; - public $pluginAuthor = 'JoeyK'; - public $pluginWebsite = 'https://TheTempusProject.com'; - public $modelVersion = '1.0'; - public $pluginVersion = '3.0'; - public $pluginDescription = 'A simple plugin to add a method for users to share their email.'; - public $admin_links = [ - [ - 'text' => ' Subscriptions', - 'url' => '{ROOT_URL}admin/subscriptions', - ], - ]; - - public function __construct( $load = false ) { - parent::__construct( $load ); - if ( ! self::$loaded ) { - if ( $this->checkEnabled() ) { - Components::append( 'FOOTER_RIGHT', Views::simpleView( 'subscribe.footer.right') ); - } - self::$loaded = true; - } - } -} diff --git a/app/plugins/subscribe/views/admin/add.html b/app/plugins/subscribe/views/admin/add.html deleted file mode 100644 index 119b070..0000000 --- a/app/plugins/subscribe/views/admin/add.html +++ /dev/null @@ -1,24 +0,0 @@ -
    - Add Subscriber -
    - {ADMIN_BREADCRUMBS} -
    -
    - -
    - -
    - -
    -
    - - - -
    - - -
    - -
    -
    -
    \ No newline at end of file diff --git a/app/plugins/subscribe/views/admin/list.html b/app/plugins/subscribe/views/admin/list.html deleted file mode 100644 index c775594..0000000 --- a/app/plugins/subscribe/views/admin/list.html +++ /dev/null @@ -1,40 +0,0 @@ -
    - Subscribers -
    - {ADMIN_BREADCRUMBS} -
    - - - - - - - - - - - {LOOP} - - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
    IDemail - -
    {ID}{EMAIL} - -
    - No results to show. -
    - Add - -
    -
    \ No newline at end of file diff --git a/app/plugins/subscribe/views/footer/right.html b/app/plugins/subscribe/views/footer/right.html deleted file mode 100644 index 3644978..0000000 --- a/app/plugins/subscribe/views/footer/right.html +++ /dev/null @@ -1,11 +0,0 @@ -
    -
    Subscribe
    -
    -
    - - - - -
    -
    -
    \ No newline at end of file diff --git a/app/resources/config/config.example.json b/app/resources/config/config.example.json deleted file mode 100644 index f8dcbc2..0000000 --- a/app/resources/config/config.example.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "main": { - "name": { - "type": "text", - "pretty": "Site Name", - "default": "TTP Example", - "value": "TTP Example" - }, - "loginLimit": { - "type": "text", - "pretty": "Maximum Login Attempts per hour", - "default": 5, - "value": 5 - }, - "logo": { - "type": "file", - "pretty": "Site Logo (Used mostly in emails)", - "default": "images/logo.png", - "value": "images/logo.png" - }, - "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 - } - }, - "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": { - "dbHost": { - "type": "text", - "pretty": "Database Host (IE: http://localhost:3306)", - "default": "127.0.0.1", - "protected": true, - "value": "127.0.0.1" - }, - "dbUsername": { - "type": "text", - "pretty": "Database Username", - "default": "root", - "protected": true, - "value": "root" - }, - "dbPrefix": { - "type": "text", - "pretty": "Database table Prefix", - "default": "TTP_", - "protected": true, - "value": "TTP_" - }, - "dbPassword": { - "type": "text", - "pretty": "Database Password", - "default": "", - "protected": true, - "value": "" - }, - "dbName": { - "type": "text", - "pretty": "Database Name", - "default": "ttp-example", - "protected": true, - "value": "ttp-example" - }, - "dbEnabled": { - "type": "radio", - "pretty": "Database Enabled", - "default": true, - "protected": true, - "value": true - }, - "dbMaxQuery": { - "type": "text", - "pretty": "Maximum results per query", - "default": 100, - "protected": true, - "value": 100 - } - }, - "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 submiting.", - "default": true, - "value": true - }, - "emailTemplate": { - "type": "text", - "pretty": "Email Template", - "default": "BugReportEmail", - "value": "BugReportEmail" - } - }, - "feedback": { - "enabled": { - "type": "radio", - "pretty": "Enable User Feedback.", - "default": true, - "value": true - }, - "sendEmail": { - "type": "radio", - "pretty": "Email the user after submiting.", - "default": false, - "value": false - }, - "emailTemplate": { - "type": "text", - "pretty": "Email Template", - "default": "feedbackEmail", - "value": "feedbackEmail" - } - } -} \ No newline at end of file diff --git a/app/resources/config/install.example.json b/app/resources/config/install.example.json deleted file mode 100644 index 8f1b143..0000000 --- a/app/resources/config/install.example.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "installHash": "014c857a650bcb0e4b08b14e1924287c", - "installStep": "complete", - "modules": { - "Group": { - "name": "Group", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/models/", - "installTable": "Success", - "installPermissions": "Success", - "installConfigs": "Success", - "installResources": "Success", - "installPreferences": "Not Required", - "installedResources": ["1", "2", "3", "4", "5", "6"] - }, - "Log": { - "name": "Log", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/models/", - "installTable": "Success", - "installPermissions": "Not Required", - "installConfigs": "Success", - "installResources": "Not Required", - "installPreferences": "Not Required" - }, - "Message": { - "name": "Message", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/models/", - "installTable": "Success", - "installPermissions": "Success", - "installConfigs": "Not Required", - "installResources": "Not Required", - "installPreferences": "Not Required" - }, - "Routes": { - "name": "Routes", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/models/", - "installTable": "Success", - "installPermissions": "Success", - "installConfigs": "Not Required", - "installResources": "Success", - "installPreferences": "Not Required", - "installedResources": ["1", "2", "3", "4", "5"] - }, - "Sessions": { - "name": "Sessions", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/models/", - "installTable": "Success", - "installPermissions": "Not Required", - "installConfigs": "Not Required", - "installResources": "Not Required", - "installPreferences": "Not Required" - }, - "User": { - "name": "User", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/models/", - "installTable": "Success", - "installPermissions": "Success", - "installConfigs": "Not Required", - "installResources": "Not Required", - "installPreferences": "Success" - }, - "Blog": { - "name": "Blog", - "enabled": true, - "enabled_txt": "yes", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/plugins/", - "installTable": "Success", - "installPermissions": "Not Required", - "installConfigs": "Not Required", - "installResources": "Success", - "installPreferences": "Not Required", - "installedResources": ["1"] - }, - "Bugreport": { - "name": "Bugreport", - "enabled": true, - "enabled_txt": "yes", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/plugins/", - "installTable": "Success", - "installPermissions": "Success", - "installConfigs": "Success", - "installResources": "Not Required", - "installPreferences": "Not Required" - }, - "Comments": { - "name": "Comments", - "enabled": true, - "enabled_txt": "yes", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/plugins/", - "installTable": "Success", - "installPermissions": "Not Required", - "installConfigs": "Not Required", - "installResources": "Not Required", - "installPreferences": "Not Required" - }, - "Feedback": { - "name": "Feedback", - "enabled": true, - "enabled_txt": "yes", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/plugins/", - "installTable": "Success", - "installPermissions": "Success", - "installConfigs": "Success", - "installResources": "Not Required", - "installPreferences": "Not Required" - }, - "Subscribe": { - "name": "Subscribe", - "enabled": true, - "enabled_txt": "yes", - "installDate": 1670000000, - "lastUpdate": 1670000000, - "installStatus": "Installed", - "installedVersion": "3.0", - "folder": "/var/www/app/plugins/", - "installTable": "Success", - "installPermissions": "Not Required", - "installConfigs": "Not Required", - "installResources": "Not Required", - "installPreferences": "Not Required" - } - } -} diff --git a/app/resources/config/permissions.example.json b/app/resources/config/permissions.example.json deleted file mode 100644 index 319f727..0000000 --- a/app/resources/config/permissions.example.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "adminAccess": { - "pretty": "Access Administrator Areas", - "default": false - }, - "modAccess": { - "pretty": "Access Moderator Areas", - "default": false - }, - "memberAccess": { - "pretty": "Access Member Areas", - "default": false - }, - "sendMessages": { - "pretty": "Send messages to other users", - "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 - }, - "feedback": { - "pretty": "Can Submit Feedback", - "default": false - } -} \ No newline at end of file diff --git a/app/resources/config/prefrences.example.json b/app/resources/config/prefrences.example.json deleted file mode 100644 index 2b10ade..0000000 --- a/app/resources/config/prefrences.example.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "gender": { - "pretty": "Gender", - "type": "select", - "default": "unspecified", - "options": ["male", "female", "other", "unspecified"], - "avatar": "/var/www/apache/images/defaultAvatar.png" - }, - "email": { - "pretty": "IDK what this is for", - "type": "checkbox", - "default": "true", - "avatar": "/var/www/apache/images/defaultAvatar.png", - "options": null - }, - "newsletter": { - "pretty": "Receive our Newsletter?", - "type": "checkbox", - "default": "true", - "avatar": "/var/www/apache/images/defaultAvatar.png", - "options": null - }, - "avatar": { - "pretty": "Avatar", - "type": "file", - "default": "images/defaultAvatar.png", - "avatar": "/var/www/apache/images/defaultAvatar.png", - "options": null - }, - "timezone": { - "pretty": "Timezone", - "type": "timezone", - "default": "America/New_York", - "avatar": "/var/www/apache/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/apache/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/apache/images/defaultAvatar.png" - }, - "pageLimit": { - "pretty": "Items Displayed Per Page", - "type": "select", - "default": "10", - "options": ["10", "15", "20", "25", "50"], - "avatar": "/var/www/apache/images/defaultAvatar.png" - } -} diff --git a/app/resources/controllers/example.php b/app/resources/controllers/example.php deleted file mode 100644 index a990612..0000000 --- a/app/resources/controllers/example.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Controllers; - -use TheTempusProject\Classes\Controller; -use TheTempusProject\Houdini\Classes\Template; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Canary\Bin\Canary as Debug; - -// The new controller must extend the default controller class or some functionality will be lost. -class Example extends Controller { - /** - * A constructor does not have to be defined. - * If a constructor is used, it must call the parent constructor first. - */ - public function __construct() { - parent::__construct(); - Template::noFollow(); - Template::noIndex(); - Template::setTemplate( 'example' ); - } - - /** - * A destructor does not have to be defined. - * If a destructor is used, it must call the parent destructor last. - */ - public function __destruct() { - Debug::log( 'Something to log before the app ends execution.' ); - parent::__destruct(); - } - - public function index() { - self::$title = 'Example Controller'; - Issues::add( 'error', [ 'This is an error with multiple parts.' => [ 'Error 1', 'Error 2' ] ] ); - Issues::add( 'error', 'This is a single error.' ); - Issues::add( 'success', [ 'This is a success with multiple parts.' => [ 'Success 1', 'Success 2' ] ] ); - Issues::add( 'success', 'This is a single success.' ); - Issues::add( 'notice', 'This is a single notice.' ); - Issues::add( 'info', 'This is a single info.' ); - Components::set( 'simple', Views::simpleView( 'simple' ) ); - Components::set( 'complex', Views::simpleView( 'complex' ) ); - Views::view( 'example' ); - $example = Views::simpleView( 'example' ); - } -} diff --git a/app/resources/nginx-main.conf b/app/resources/nginx-main.conf deleted file mode 100644 index db9385d..0000000 --- a/app/resources/nginx-main.conf +++ /dev/null @@ -1,44 +0,0 @@ -server { - listen 8080 default_server; - listen [::]:8080 default_server; - listen 8081 ssl default_server; - listen [::]:8081 ssl default_server; - - ssl_prefer_server_ciphers on; - - include snippets/common.conf; - - access_log /var/log/nginx/access.log; - error_log /var/log/nginx/error.log; - - location ~* \.(?:js|css|png|jpg|gif|ico)$ { - 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 / { - if (!-e $request_filename){ - rewrite ^/images/(.*)$ /index.php?error=image404&url=$1 break; - rewrite ^/uploads/(.*)$ /index.php?error=upload404&url=$1 break; - } - rewrite ^/errors/(.*)$ /index.php?error=$1 break; - rewrite ^/(.+)$ /index.php?url=$1&$args; - } - - location ~ \.php$ { - fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; - include snippets/fastcgi-php.conf; - } -} \ No newline at end of file diff --git a/app/resources/nodels/example.php b/app/resources/nodels/example.php deleted file mode 100644 index eaf01a3..0000000 --- a/app/resources/nodels/example.php +++ /dev/null @@ -1,20 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Models; - -use TheTempusProject\Bedrock\Classes\Model; - -class Example extends Model { - public function __construct() { - parent::__construct(); - } -} diff --git a/app/resources/plugin.php b/app/resources/plugin.php deleted file mode 100644 index 72bd393..0000000 --- a/app/resources/plugin.php +++ /dev/null @@ -1,99 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Plugins; - -use ReflectionClass; -use TheTempusProject\Classes\Installer; -use TheTempusProject\Houdini\Navigation; -use TheTempusProject\Models\forealthough as forealthoughModel; -use TheTempusProject\TheTempusProject as App; - -class notrealplugin extends forealthoughModel { - public static $initialized; - public $pluginName = 'TP XXXXXXXXXX'; - public $pluginAuthor = 'JoeyK'; - public $pluginWebsite = 'https://TheTempusProject.com'; - public $modelVersion = '1.0'; - public $pluginVersion = '1.0'; - public $pluginDescription = 'A simple plugin which adds a site wide XXXXXXXXXX system.'; - public $configName = 'XXXXXXXXXX'; - public $databaseMatrix = [ - [ 'title', 'varchar', '86' ], - [ 'suggestion', 'text', '' ], - [ 'suggestedOn', 'int', '10' ], - [ 'approved', 'varchar', '5' ], - [ 'approvedOn', 'int', '10' ], - [ 'approvedBy', 'int', '11' ], - [ 'author', 'int', '11' ], - ]; - public $configMatrix = [ - 'enabled' => [ - 'type' => 'radio', - 'pretty' => 'Enable XXXXXXXXXX.', - 'default' => true, - ], - ]; - public $permissionMatrix = [ - 'XXXXXXXXXX' => [ - 'pretty' => 'Can create XXXXXXXXXX', - 'default' => false, - ], - ]; - public $admin_links = [ - [ - 'text' => ' Suggestions', - 'url' => '{ROOT_URL}admin/suggestions', - ], - ]; - public $main_links = [ - [ - 'text' => 'Suggestions', - 'url' => '{ROOT_URL}suggestions/index', - ], - ]; - public $resourceMatrix = [ - [ - 'title' => 'Welcome', - 'content' => '

    This is just a simple message to say thank you for installing The Tempus Project. If you have any questions you can find everything through our website here.

    ', - 'author' => 1, - 'created{time}' => 0, - 'edited{time}' => 0, - 'draft' => 0, - ], - ]; - public $contact_footer_links = [ - [ - 'text' => 'Bug Report', - 'url' => '{ROOT_URL}bugreport', - ], - ]; - public function __construct() { - $reflect = new ReflectionClass( $this ); - if ( true === self::$initialized || !Installer::pluginEnabled( $reflect->getShortName() ) ) { - return; - } - foreach ( $this->contact_footer_links as $key => $link ) { - Navigation::addLink( App::CONTACT_FOOTER_MENU_NAME, $link ); - } - foreach ( $this->info_footer_links as $key => $link ) { - Navigation::addLink( App::INFO_MENU_NAME, $link ); - } - foreach ( $this->main_links as $key => $link ) { - Navigation::addLink( App::MAIN_MENU_NAME, $link ); - } - foreach ( $this->admin_links as $key => $link ) { - Navigation::addLink( App::ADMIN_MENU_NAME, $link ); - } - self::$initialized = true; - } -} diff --git a/app/resources/templates/example.tpl b/app/resources/templates/example.tpl deleted file mode 100644 index 6cbab20..0000000 --- a/app/resources/templates/example.tpl +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - {TITLE} - - - - {ROBOT} - - - - - - - - - - -
    -
    - {ISSUES} -
    -
    - {ERROR} - {NOTICE} - {SUCCESS} - {INFO} -
    -
    - {/ISSUES} -
    -
    - {CONTENT} -
    -
    -
    -
    -
    - {FOOT} - {COPY} -
    -
    -
    - - - - - \ No newline at end of file diff --git a/app/resources/templates/exanple.inc.php b/app/resources/templates/exanple.inc.php deleted file mode 100644 index db30e92..0000000 --- a/app/resources/templates/exanple.inc.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Templates; - -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Houdini\Classes\Navigation; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Bedrock\Classes\Config; -use TheTempusProject\TheTempusProject as App; - -class ExampleLoader { - public function __construct() { - Components::set( 'TEMPLATE_URL', Template::parse( '{ROOT_URL}app/templates/default/' ) ); - Components::set( 'LOGO', Config::get( 'main/logo' ) ); - Components::set( 'FOOT', Views::simpleView( 'foot' ) ); - Components::set( 'COPY', Views::simpleView( 'copy' ) ); - if ( App::$isLoggedIn ) { - Components::set( 'STATUS', Views::simpleView( 'nav.statusLoggedIn' ) ); - Components::set( 'USERNAME', App::$activeUser->username ); - } else { - Components::set( 'STATUS', Views::simpleView( 'nav.statusLoggedOut' ) ); - } - Components::set( 'topNavLeft', Navigation::activePageSelect( 'nav.main' ) ); - } -} diff --git a/app/resources/views/complex.html b/app/resources/views/complex.html deleted file mode 100644 index f20720e..0000000 --- a/app/resources/views/complex.html +++ /dev/null @@ -1,3 +0,0 @@ -

    This is a more complex component that includes another component...

    -{simple} -

    ...right in the middle!

    \ No newline at end of file diff --git a/app/resources/views/example.html b/app/resources/views/example.html deleted file mode 100644 index e546b1e..0000000 --- a/app/resources/views/example.html +++ /dev/null @@ -1,141 +0,0 @@ - -

    It is comprised entirely of free form HTML

    -

    If you are feeling extra bold you can use the templating engine to set variables to be replaced at runtime such as {variable} or even {variable2}, or maybe even just look through some data:

    -{loop} -{value1} is the first value.
    -{value2} is the second value.
    -{value3} is the third value.
    -{/loop} -{ALT}No Loop{/ALT} -{footer} - - - - - - - - -

    This is a default view

    - -

    The Tempus-Project template-processor works with the backend to render html for the end user. This process has several steps and components that can get pretty complex. For the moment let's just review a few that can be used to generate web pages.

    - -

    Views

    -

    Views are the most basic interaction between the front-end and back-end. Inside of a controler, you can call a view in two ways:

    -

    1. Normal - Views::view

    -
    
    -

    2. Inline - Views::simpleView

    -
    
    -
    -
    -

    Components

    -

    You can think of components as a sort of front-end variable that can be filled in by the back-end before being send to the end-user. You can include components in all template parsing with a simple command:

    -
    
    -Adding this to a controler will give access to that component's value in the rendering engine. For example:
    -
    
    -
    -

    Pagination

    -PAGINATION - if (Pagination::totalPages() <= 1) { - Components::set('PAGINATION', ''); - } else { - Components::set('PAGINATION', Views::simpleView('nav.pagination', $pageData)); - } - - - -

    Navigation

    - -

    Filters

    -

    In some cases, you may want to hide or show text on a page conditionally. For example, you may have administrator controls on a commonly used page. Obviously you would like to hide those controls from regular users; even if you have safeguards to prevent them from performing any restricted actions.

    -

    This is where filters come in. They do exactly that, conditionally hide or show part of a page based on back-end logic. The admin example is so common, its already built in. If a user has the isAdmin permission on thier group, they will be able to see anything within the "ADMIN" tag:

    -
    -    Filters::add('member', '#{MEMBER}(.*?){/MEMBER}#is', (self::$isMember ? '$1' : ''), true);
    -    Filters::add('mod', '#{MOD}(.*?){/MOD}#is', (self::$isMod ? '$1' : ''), true);
    -    Filters::add('admin', '#{ADMIN}(.*?){/ADMIN}#is', (self::$isAdmin ? '$1' : ''), true);
    -
    - - - - - - - - '#\[b\](.*?)\[/b\]#is' => '$1', - '#\[p\](.*?)\[/p\]#is' => '

    $1

    ', - '#\[i\](.*?)\[/i\]#is' => '$1', - '#\[u\](.*?)\[/u\]#is' => '$1', - '#\[s\](.*?)\[/s\]#is' => '$1', - '#\[code\](.*?)\[/code\]#is' => '$1', - '#\[color=(.*?)\](.*?)\[/color\]#is' => "$2", - '#\[img\](.*?)\[/img\]#is' => "", - '#\[url=(.*?)\](.*?)\[/url\]#is' => "$2", - '#\[quote=(.*?)\](.*?)\[/quote\]#is' => "
    $2
    ", - '#\(c\)#is' => '✔', - '#\(x\)#is' => '✖', - '#\(!\)#is' => '❕', - '#\(\?\)#is' => '❔', - '#\[list\](.*?)\[/list\]#is' => '
      $1
    ', - '#\(\.\)(.*)$#m' => '
  • $1
  • ', - '/(^|\s)@(\w*[a-zA-Z_]+\w*)/' => ' @\2', - '/(^|\s)#(\w*[a-zA-Z_]+\w*)/' => ' #\2', - '#/\*.*?\*/#s' => null, - '#(? null, - "#{CHECKED:(.*?)=(.*?)}#s" => null, - - - - - - - - - - - - - - - - - - - -

    Issues

    -

    One of the pre-existing filters happens to be Issues. In the controller for this file, you should see a block that includes several examples of Issues. These issues are automatically added as individual components and hidden with the issues filter.

    -

    -    Issues::add( 'error', [ 'This is an error with multiple parts.' => [ 'Error 1', 'Error 2' ] ] );
    -    Issues::add( 'error', 'This is a single error.' );
    -    Issues::add( 'success', [ 'This is a success with multiple parts.' => [ 'Success 1', 'Success 2' ] ] );
    -    Issues::add( 'success', 'This is a single success.' );
    -    Issues::add( 'notice', 'This is a single notice.' );
    -    Issues::add( 'info', 'This is a single info.' );
    -    Filters::add('issues', '#{ISSUES}(.*?){/ISSUES}#is', (Issues::hasIssues() ? '$1' : ''), true);
    -    Components::set( 'NOTICE', $test );
    -    Components::set( 'SUCCESS', $test );
    -    Components::set( 'ERROR', $test );
    -    Components::set( 'INFO', $test );
    -
    - - - - - - - - - - - - - - - -

    Forms

    -select Radio - $selected = 'CHECKED:' . $fieldName . '=' . $value; - Components::set($selected, 'checked="checked"'); -select Option - $find = "#\