From ccad15c0b86844f913b294ac475e8d1c9035b157 Mon Sep 17 00:00:00 2001
From: Joey Kimsey
Date: Thu, 12 Dec 2024 17:14:55 -0500
Subject: [PATCH] remove unused code
---
.gitlab-ci.yml | 74 ------
.php-cs-fixer.php | 127 ----------
CODE_OF_CONDUCT.md | 47 ----
CONTRIBUTING.md | 135 ----------
LICENSE | 25 --
app/css/wysiwyg.css | 218 ----------------
app/js/wysiwyg.js | 233 ------------------
app/resources/config/config.example.json | 179 --------------
app/resources/config/install.example.json | 162 ------------
app/resources/config/permissions.example.json | 34 ---
app/resources/config/prefrences.example.json | 78 ------
app/resources/controllers/example.php | 54 ----
app/resources/nginx-main.conf | 44 ----
app/resources/nodels/example.php | 20 --
app/resources/plugin.php | 99 --------
app/resources/templates/example.tpl | 80 ------
app/resources/templates/exanple.inc.php | 34 ---
app/resources/views/complex.html | 3 -
app/resources/views/example.html | 141 -----------
app/resources/views/simple.html | 1 -
docker-compose.yml | 57 -----
docker/.env.example | 5 -
docker/ttp-apache/Dockerfile | 13 -
docker/ttp-apache/README.md | 19 --
docker/ttp-nginx/Dockerfile | 29 ---
docker/ttp-nginx/README.md | 19 --
docker/ttp-nginx/cors.conf | 27 --
docker/ttp-nginx/nginx.conf | 90 -------
docker/ttp-nginx/supervisord.conf | 8 -
gitlab/auto_merge_mr.sh | 76 ------
gitlab/update_PHP_deps.yml | 46 ----
31 files changed, 2177 deletions(-)
delete mode 100644 .gitlab-ci.yml
delete mode 100644 .php-cs-fixer.php
delete mode 100644 CODE_OF_CONDUCT.md
delete mode 100644 CONTRIBUTING.md
delete mode 100644 LICENSE
delete mode 100644 app/css/wysiwyg.css
delete mode 100644 app/js/wysiwyg.js
delete mode 100644 app/resources/config/config.example.json
delete mode 100644 app/resources/config/install.example.json
delete mode 100644 app/resources/config/permissions.example.json
delete mode 100644 app/resources/config/prefrences.example.json
delete mode 100644 app/resources/controllers/example.php
delete mode 100644 app/resources/nginx-main.conf
delete mode 100644 app/resources/nodels/example.php
delete mode 100644 app/resources/plugin.php
delete mode 100644 app/resources/templates/example.tpl
delete mode 100644 app/resources/templates/exanple.inc.php
delete mode 100644 app/resources/views/complex.html
delete mode 100644 app/resources/views/example.html
delete mode 100644 app/resources/views/simple.html
delete mode 100644 docker-compose.yml
delete mode 100644 docker/.env.example
delete mode 100644 docker/ttp-apache/Dockerfile
delete mode 100644 docker/ttp-apache/README.md
delete mode 100644 docker/ttp-nginx/Dockerfile
delete mode 100644 docker/ttp-nginx/README.md
delete mode 100644 docker/ttp-nginx/cors.conf
delete mode 100644 docker/ttp-nginx/nginx.conf
delete mode 100644 docker/ttp-nginx/supervisord.conf
delete mode 100644 gitlab/auto_merge_mr.sh
delete mode 100644 gitlab/update_PHP_deps.yml
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/css/wysiwyg.css b/app/css/wysiwyg.css
deleted file mode 100644
index eeb25b2..0000000
--- a/app/css/wysiwyg.css
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * app/css/wysiwyg.css
- *
- * This file is for the wysiwyg editor's css.
- *
- * @version 3.0
- * @author Joey Kimsey
- * @link https://TheTempusProject.com
- * @license https://opensource.org/licenses/MIT [MIT LICENSE]
- */
-body {
- margin: 0;
- height: 100vh;
- display: flex;
- justify-content: center;
- align-items: center;
- font-family: 'Helvetica Neue', 'Helvetica', arial, sans-serif;
-}
-
-/* WYSIWYG Editor */
-.wp-webdeasy-comment-editor {
- width: 40rem;
- min-height: 18rem;
- box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.3);
- border-top: 6px solid #4a4a4a;
- border-radius: 3px;
- margin: 2rem 0;
-
- .toolbar {
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
-
- .line {
- display: flex;
- border-bottom: 1px solid #e2e2e2;
-
- &:last-child {
- border-bottom: none;
- }
-
- .box {
- display: flex;
- border-left: 1px solid #e2e2e2;
-
- .editor-btn {
- display: block;
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- transition: .2s ease all;
-
- &:hover, &.active {
- background-color: #e1e1e1;
- cursor: pointer;
- }
-
- &.icon img {
- width: 15px;
- padding: 9px;
- box-sizing: content-box;
- }
-
- &.icon.smaller img {
- width: 16px;
- }
-
- &.has-submenu {
- width: 20px;
- padding: 0 10px;
-
- &::after {
- content: '';
- width: 6px;
- height: 6px;
- position: absolute;
- background-image: url(https://img.icons8.com/ios-glyphs/30/000000/chevron-down.png);
- background-repeat: no-repeat;
- background-size: cover;
- background-position: center;
- right: 4px;
- }
-
- .submenu {
- display: none;
- position: absolute;
- top: 34px;
- left: -1px;
- z-index: 10;
- background-color: #FFF;
- border: 1px solid #b5b5b5;
- border-top: none;
-
- .btn {
- width: 39px;
- }
-
- &:hover {
- display: block;
- }
- }
-
- &:hover .submenu {
- display: block;
- }
- }
- }
- }
- }
- }
-
- .content-area {
- padding: 15px 12px;
- line-height: 1.5;
-
- .visuell-view {
- outline: none;
- min-height: 12rem;
-
- p {
- margin: 12px 0;
- }
- }
-
- .html-view {
- outline: none;
- display: none;
- width: 100%;
- height: 200px;
- border: none;
- resize: none;
- }
- }
-}
-
-
-/* Modal */
-.modal {
- z-index: 40;
- display: none;
-
- .modal-wrapper {
- background-color: #FFF;
- padding: 1rem;
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 20rem;
- min-height: 10rem;
- z-index: 41;
-
- .close {
- position: absolute;
- top: 1rem;
- right: 1rem;
- cursor: pointer;
- }
-
- .modal-content {
- flex-direction: column;
-
- h3 {
- margin-top: 0;
- }
-
- input {
- margin: 1rem 0;
- padding: .5rem;
- }
-
- input[type="text"] {
- width: calc(100% - 1rem);
- }
-
- .row {
-
- label {
- margin-left: .5rem;
- }
- }
-
- button {
- background-color: #D2434F;
- border: 0;
- color: #FFF;
- padding: .5rem 1.2rem;
- cursor: pointer;
- }
- }
- }
-
- .modal-bg {
- position: fixed;
- background-color: rgba(0, 0, 0, .3);
- width: 100vw;
- height: 100vh;
- top: 0;
- left: 0;
- }
-}
-
-/* Codepen Footer */
-footer {
- position: fixed;
- bottom: 0;
- display: flex;
-
- p {
- margin: 0.5rem 1rem;
- font-size: 12px;
- }
-
- a {
- text-decoration: none;
- font-weight: bold;
- color: #000;
- }
-}
\ No newline at end of file
diff --git a/app/js/wysiwyg.js b/app/js/wysiwyg.js
deleted file mode 100644
index 2d29989..0000000
--- a/app/js/wysiwyg.js
+++ /dev/null
@@ -1,233 +0,0 @@
-/**
- * app/js/wysiwyg.js
- *
- * This is css used in the debuging console.
- *
- * @version 3.0
- * @author Joey Kimsey
- * @link https://TheTempusProject.com
- * @license https://opensource.org/licenses/MIT [MIT LICENSE]
- */
-// define vars
-const editor = document.getElementsByClassName('wp-webdeasy-comment-editor')[0];
-const toolbar = editor.getElementsByClassName('toolbar')[0];
-const buttons = toolbar.querySelectorAll('.editor-btn:not(.has-submenu)');
-const contentArea = editor.getElementsByClassName('content-area')[0];
-const visuellView = contentArea.getElementsByClassName('visuell-view')[0];
-const htmlView = contentArea.getElementsByClassName('html-view')[0];
-const modal = document.getElementsByClassName('modal')[0];
-
-// add active tag event
-document.addEventListener('selectionchange', selectionChange);
-
-// add paste event
-visuellView.addEventListener('paste', pasteEvent);
-
-// add paragraph tag on new line
-contentArea.addEventListener('keypress', addParagraphTag);
-
-// add toolbar button actions
-for(let i = 0; i < buttons.length; i++) {
- let button = buttons[i];
-
- button.addEventListener('click', function(e) {
- let action = this.dataset.action;
-
- switch(action) {
- case 'toggle-view':
- execCodeAction(this, editor);
- break;
- case 'createLink':
- execLinkAction();
- break;
- default:
- execDefaultAction(action);
- }
-
- });
-}
-
-/**
- * This function toggles between visual and html view
- */
-function execCodeAction(button, editor) {
-
- if(button.classList.contains('active')) { // show visuell view
- visuellView.innerHTML = htmlView.value;
- htmlView.style.display = 'none';
- visuellView.style.display = 'block';
-
- button.classList.remove('active');
- } else { // show html view
- htmlView.innerText = visuellView.innerHTML;
- visuellView.style.display = 'none';
- htmlView.style.display = 'block';
-
- button.classList.add('active');
- }
-}
-
-/**
- * This function adds a link to the current selection
- */
-function execLinkAction() {
- modal.style.display = 'block';
- let selection = saveSelection();
-
- let submit = modal.querySelectorAll('button.done')[0];
- let close = modal.querySelectorAll('.close')[0];
-
- // done button active => add link
- submit.addEventListener('click', function(e) {
- e.preventDefault();
- let newTabCheckbox = modal.querySelectorAll('#new-tab')[0];
- let linkInput = modal.querySelectorAll('#linkValue')[0];
- let linkValue = linkInput.value;
- let newTab = newTabCheckbox.checked;
-
- restoreSelection(selection);
-
- if(window.getSelection().toString()) {
- let a = document.createElement('a');
- a.href = linkValue;
- if(newTab) a.target = '_blank';
- window.getSelection().getRangeAt(0).surroundContents(a);
- }
-
- modal.style.display = 'none';
- linkInput.value = '';
-
- // deregister modal events
- submit.removeEventListener('click', arguments.callee);
- close.removeEventListener('click', arguments.callee);
- });
-
- // close modal on X click
- close.addEventListener('click', function(e) {
- e.preventDefault();
- let linkInput = modal.querySelectorAll('#linkValue')[0];
-
- modal.style.display = 'none';
- linkInput.value = '';
-
- // deregister modal events
- submit.removeEventListener('click', arguments.callee);
- close.removeEventListener('click', arguments.callee);
- });
-}
-
-/**
- * This function executes all 'normal' actions
- */
-function execDefaultAction(action) {
- document.execCommand(action, false);
-}
-
-/**
- * Saves the current selection
- */
-function saveSelection() {
- if(window.getSelection) {
- sel = window.getSelection();
- if(sel.getRangeAt && sel.rangeCount) {
- let ranges = [];
- for(var i = 0, len = sel.rangeCount; i < len; ++i) {
- ranges.push(sel.getRangeAt(i));
- }
- return ranges;
- }
- } else if (document.selection && document.selection.createRange) {
- return document.selection.createRange();
- }
- return null;
-}
-
-/**
- * Loads a saved selection
- */
-function restoreSelection(savedSel) {
- if(savedSel) {
- if(window.getSelection) {
- sel = window.getSelection();
- sel.removeAllRanges();
- for(var i = 0, len = savedSel.length; i < len; ++i) {
- sel.addRange(savedSel[i]);
- }
- } else if(document.selection && savedSel.select) {
- savedSel.select();
- }
- }
-}
-
-/**
- * Sets the current selected format buttons active/inactive
- */
-function selectionChange(e) {
-
- for(let i = 0; i < buttons.length; i++) {
- let button = buttons[i];
-
- // don't remove active class on code toggle button
- if(button.dataset.action === 'toggle-view') continue;
-
- button.classList.remove('active');
- }
-
- if(!childOf(window.getSelection().anchorNode.parentNode, editor)) return false;
-
- parentTagActive(window.getSelection().anchorNode.parentNode);
-}
-
-/**
- * Checks if the passed child has the passed parent
- */
-function childOf(child, parent) {
- return parent.contains(child);
-}
-
-/**
- * Sets the tag active that is responsible for the current element
- */
-function parentTagActive(elem) {
- if(!elem ||!elem.classList || elem.classList.contains('visuell-view')) return false;
-
- let toolbarButton;
-
- // active by tag names
- let tagName = elem.tagName.toLowerCase();
- toolbarButton = document.querySelectorAll(`.toolbar .editor-btn[data-tag-name="${tagName}"]`)[0];
- if(toolbarButton) {
- toolbarButton.classList.add('active');
- }
-
- // active by text-align
- let textAlign = elem.style.textAlign;
- toolbarButton = document.querySelectorAll(`.toolbar .editor-btn[data-style="textAlign:${textAlign}"]`)[0];
- if(toolbarButton) {
- toolbarButton.classList.add('active');
- }
-
- return parentTagActive(elem.parentNode);
-}
-
-/**
- * Handles the paste event and removes all HTML tags
- */
-function pasteEvent(e) {
- e.preventDefault();
-
- let text = (e.originalEvent || e).clipboardData.getData('text/plain');
- document.execCommand('insertHTML', false, text);
-}
-
-/**
- * This functions adds a paragraph tag when the enter key is pressed
- */
-function addParagraphTag(evt) {
- if (evt.keyCode == '13') {
-
- // don't add a p tag on list item
- if(window.getSelection().anchorNode.parentNode.tagName === 'LI') return;
- document.execCommand('formatBlock', false, 'p');
- }
-}
\ 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.
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:
-
-
-
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:
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 );
-