Compare commits

...

37 Commits

Author SHA1 Message Date
7d2293208f Apple PWA fixes 2025-02-07 16:23:35 -05:00
db58927df1 wip 2025-02-07 16:13:32 -05:00
ed2651cfc8 share display fix 2025-02-06 04:52:11 -05:00
8af7b16694 Merge branch 'main' into thetempusproject-com 2025-02-06 02:53:25 -05:00
2ac64e5c49 image update 2025-02-05 22:46:24 -05:00
5590592ebe composer bump 2025-02-05 22:05:19 -05:00
b65dda1328 composer changes 2025-02-05 20:56:39 -05:00
f928e87141 bugfixes 2025-02-05 20:45:41 -05:00
1b2427352e bugfixes 2025-02-05 20:43:56 -05:00
7044a8d236 add sharing 2025-02-05 19:41:30 -05:00
a6b241c7f0 add qr-codes, share button, and pwa config toggle 2025-02-05 19:39:54 -05:00
3c5a914edc Merge branch 'main' into thetempusproject-com 2025-02-05 11:57:49 -05:00
a38d132e61 rename comments 2025-02-05 06:36:53 -05:00
d7e8b586d7 various updates
remove dependence on jQuery
add image delete
Admin ui fix for mobile
image updates to new style
update comments
2025-02-05 06:36:29 -05:00
96642ff189 Merge remote-tracking branch 'gitlab/main' into thetempusproject-com 2025-02-05 06:34:26 -05:00
3d0ae0c031 wip 2025-02-05 06:13:27 -05:00
ea120e09bc add missing webmanifest parts 2025-02-05 05:30:23 -05:00
221173053f composer bump 2025-02-04 05:39:46 -05:00
ea3b6ad716 Merge branch 'main' into thetempusproject-com 2025-02-03 11:03:28 -05:00
ca053216a1 Merge branch 'main' into thetempusproject-com 2025-02-02 05:48:10 -05:00
155c6a70f5 wip 2025-02-02 00:36:17 -05:00
77446dff94 wip 2025-01-30 14:10:20 -05:00
b1eef15ba9 Merge branch 'main' into thetempusproject-com 2025-01-30 13:25:16 -05:00
b8d2550901 WIP 2025-01-30 13:14:06 -05:00
02892dfe6d remove unused code 2025-01-30 12:56:14 -05:00
9fe4829b47 wip 2025-01-28 17:33:12 -05:00
2004837a8f remove unused code ee2cbb 2025-01-28 17:21:25 -05:00
f7371ae579 WIP 2025-01-28 17:04:05 -05:00
0067c49d4a add redirect link to admin 2025-01-23 22:26:11 -05:00
aca4b7a528 routes bugfix 2025-01-23 22:20:57 -05:00
c355b6e510 visual fixes 2025-01-23 22:20:04 -05:00
58b4ffe3af prod setup 2025-01-14 20:09:58 -05:00
9d53ddbd94 Merge branch 'main' into thetempusproject-com 2025-01-14 05:01:32 -05:00
1d311c5655 wip from ATB 2025-01-14 05:00:10 -05:00
891d6d229e config backups 2024-12-05 17:22:55 -05:00
baa8a86606 Merge branch 'main' into thetempusproject-com 2024-12-05 17:17:29 -05:00
6f0b75cfd0 wip 2024-12-02 19:05:04 -05:00
180 changed files with 2897 additions and 3162 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto eol=lf

1
.gitignore vendored
View File

@ -65,3 +65,4 @@ vendor/canary/logs/*
components/* components/*
mailhog.log mailhog.log
uploads/* uploads/*
images/qr-codes/*

View File

@ -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..."

View File

@ -1,127 +0,0 @@
<?php
$finder = PhpCsFixer\Finder::create()
//->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")
;

View File

@ -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/

View File

@ -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 <Joey@thetempusproject.com>
* @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 <email@link.com>`
- 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

25
LICENSE
View File

@ -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.

131
README.md
View File

@ -1,131 +0,0 @@
# The Tempus Project
_Rapid Prototyping Framework built on PHP utilizing the MVC pattern with a Bootstrap front-end_
__Developer(s):__
- __Joey Kimsey__ - _Lead Developer_
The aim of this project is to provide a simple and stable platform from which to easily add functionality. The goal being the ability to quickly build and test new projects with a lightweight ecosystem to help.
**Notice: This code is in _still_ not production ready. This framework is provided as is, use at your own risk.**\
I am working very hard to ensure the system is safe and reliable enough for me to endorse its widespread use. Unfortunately, it still needs a lot of QA and improvements.
## Table of contents
[[_TOC_]]
## Find Us
* [DockerHub](https://hub.docker.com/repositories/thetempusproject)
* [Packagist](https://packagist.org/packages/thetempusproject/)
* [GitLab](https://git.thetempusproject.com/the-tempus-project/thetempusproject)
## Summary
The Tempus Project is a PHP application utilizing the MVC pattern to serve up simple pages and APIs with minimal effort. It requires a MySQL database to function and is designed to run equally well with nginx or apache powering the webserver. Most of the core functionality is developed in house and provided through dependencies. At this time, the frontend is driven on bootstrap 3 and FontAwesome for simplicity.
## Features
- A Plugin system that allows plug-and-play functionality
- A User management system
- groups
- permissions
- preferences
- registration and recovery
(All Controlled dynamically via our plugin interface)
- Compatibility with both Apache and NGINX
- Built with Bootstrap with a focus on mobile compatibility
- Incredibly easy to set-up, deploy, and develop
## Installation
The preferred method for installation is [Composer](#composer) but special attention has been given to installation and usage [without Composer](#composer).
### Composer
The simplest method to start a new project is to use composer to create a new project and automatically clone all the necessary files:
#### via create-project
```
composer create-project thetempusproject/thetempusproject test-app
```
#### via clone & install
1. Clone the directory to wherever you want to install the framework.
`git clone https://git.thetempusproject.com/the-tempus-project/thetempusproject.git <test-app>`
1. Open your terminal to the directory you previously cloned the repository.
`cd <test-app>`
1. Install using composer:
`php composer.phar install`
### Manually
1. Clone the directory to wherever you want to install the framework.
`git clone https://git.thetempusproject.com/the-tempus-project/thetempusproject.git <test-app>`
1. Open your terminal to the directory you previously cloned the repository.
`cd <test-app>/`
1. Clone the dependency directories to the vendor/ folder.
```
cd vendor/
git clone https://git.thetempusproject.com/the-tempus-project/bedrock.git bedrock
git clone https://git.thetempusproject.com/the-tempus-project/canary.git canary
git clone https://git.thetempusproject.com/the-tempus-project/hermes.git hermes
git clone https://git.thetempusproject.com/the-tempus-project/houdini.git houdini
```
__Note:__ The autoloader should automatically detect and use the dependencies, but they need to be sorted into the folders ans shown above.
## Docker
To enable quick deployment and collaboration The Tempus Project is distributed with the files to build your own docker images or stack with apache or nginx The included `docker-compose.yml` will load up an entire stack including apache and nginx, as well as a MySQL server with phpmyadmin.
You will need docker installed on your system then you can either download the latest images from DockerHud:
```
docker pull thetempusproject/ttp-apache
docker pull thetempusproject/ttp-nginx
```
Or you can build your own images from this repository. More information can be found in the included README files:
* [Apache Image](docker/ttp-apache/README.md)
* [Nginx Image](docker/ttp-nginx/README.md)
### Docker-Compose
The Docker stack included here will build new versions of the nginx and apache webserver and launch them in individual containers. It will also create 2 more containers; one for php, and one for phpmyadmin.
```
docker-compose -f docker-compose.yml up --build -d --no-cache
```
__Note:__ If you cloned the repository from git, you will need to copy the `docker/.env.example` to `.env` in the root directory and update the contents before proceeding with docker-compose.
## Contributing
TheTempusProject is an open source project and welcomes community contributions. Please refer to the [Contributing file](CONTRIBUTING.md) for more details.
## License
See the [LICENSE](LICENSE) file for licensing information as it pertains to files in this repository.
## Known Issues
- [ ] The blog plugin should add a welcome post during the installResources step of the installer. It doesn't work right now.
## Currently being developed
- [ ] Adding documentation
- [ ] Unit testing
## Future updates
- [ ] Expansion of PDO to allow different database types
- [ ] Update installer to account for database deltas, allowing easy updating.
- [ ] Implement uniformity in terms of error reporting, exceptions, logging.
- [ ] I want to make an api that allows you to download and install new plugins from a centralized repository
- [ ] i want plugin instalation to be compatible with composer for easier management of added plugins.

View File

@ -5,7 +5,7 @@
* This is the base admin controller. Every other admin controller should * This is the base admin controller. Every other admin controller should
* extend this class. * extend this class.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the base api controller. Every other api controller should * This is the base api controller. Every other api controller should
* extend this class. * extend this class.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This class handles all the hard-coded configurations. * This class handles all the hard-coded configurations.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -69,14 +69,21 @@ class Config extends BedrockConfig {
$html .= '<div class="col-lg-6">'; $html .= '<div class="col-lg-6">';
$html .= $fieldHtml; $html .= $fieldHtml;
$html .= '</div>'; $html .= '</div>';
$html .= '</div>';
if ( 'file' === $node['type'] ) { if ( 'file' === $node['type'] ) {
$html .= '<div class="mb-3 row">'; $html .= '<div class="mb-3 row">';
$html .= '<h4 class="col-lg-3 col-form-label text-end">Current Image</h4>'; $html .= '<h4 class="col-lg-3 col-form-label text-end">Current Value</h4>';
$html .= '<div class="col-lg-6">'; $html .= '<div class="col-lg-6">';
$html .= '<input type="text" class="form-control" name="'.$name.'Text" value="'.$node['value'] . '">';
$html .= '</div>';
$html .= '</div>';
$html .= '<div class="mb-3 row">';
$html .= '<h4 class="col-lg-3 col-form-label text-end">Current Image</h4>';
$html .= '<div class="col-lg-6 d-flex justify-content-center">';
$html .= '<img alt="configured image" src="{ROOT_URL}' . $node['value'] . '" class="img-circle img-fluid p-2 avatar-125">'; $html .= '<img alt="configured image" src="{ROOT_URL}' . $node['value'] . '" class="img-circle img-fluid p-2 avatar-125">';
$html .= '</div>'; $html .= '</div>';
$html .= '</div>';
} }
$html .= '</div>';
return Template::parse( $html ); return Template::parse( $html );
} }

View File

@ -4,7 +4,7 @@
* *
* This is the main controller class. * This is the main controller class.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the main TempusProject database model. * This is the main TempusProject database model.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is our class for constructing and sending various kinds of emails. * This is our class for constructing and sending various kinds of emails.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -7,7 +7,7 @@
* error reporting to easily define exactly what feedback you * error reporting to easily define exactly what feedback you
* would like to give. * would like to give.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -6,7 +6,7 @@
* the application. It handles installing the application, installing and updating * the application. It handles installing the application, installing and updating
* models as well as the database, and generating and checking the htaccess file. * models as well as the database, and generating and checking the htaccess file.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This class handles all the hard-coded permissions. * This class handles all the hard-coded permissions.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This class is used as a foundation for all plugins to build from. * This class is used as a foundation for all plugins to build from.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This class handles all the hard-coded preferences. * This class handles all the hard-coded preferences.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the admin log controller. * This is the admin log controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the composer controller. Its only very effective when using composer for autoloading. * This is the composer controller. Its only very effective when using composer for autoloading.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the error logs controller. * This is the error logs controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the groups admin controller. * This is the groups admin controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the admin dashboard controller. * This is the admin dashboard controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -78,6 +78,11 @@ class Home extends AdminController {
$users = Views::simpleView( 'admin.dashboard.users', self::$user->recent( 5 ) ); $users = Views::simpleView( 'admin.dashboard.users', self::$user->recent( 5 ) );
Components::set( 'userDash', $users ); Components::set( 'userDash', $users );
if ( Input::exists( 'submit' ) ) {
$results = Views::simpleView( 'admin.dashboard.users', self::$user->search( Input::post('searchTerm') ) );
Components::set( 'searchResults', $results );
}
Views::view( 'admin.dashboard.dash' ); Views::view( 'admin.dashboard.dash' );
} }
} }

View File

@ -4,7 +4,7 @@
* *
* This is the admin app/user tokens controller. * This is the admin app/user tokens controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -36,6 +36,8 @@ class Images extends AdminController {
APP_ROOT_DIRECTORY . 'app/plugins' APP_ROOT_DIRECTORY . 'app/plugins'
]; ];
private $spacer = [];
private $excludedDirectories = [ private $excludedDirectories = [
'.', '.',
'..', '..',
@ -74,35 +76,17 @@ class Images extends AdminController {
Views::view( 'admin.images.upload' ); Views::view( 'admin.images.upload' );
} }
private function getFolderObject( $folder, $subdirs = '' ) { private function getFolderObject( $folder, $subdirs = '' ) {
$names = explode( DIRECTORY_SEPARATOR, $folder ); $names = explode( DIRECTORY_SEPARATOR, $folder );
$folderName = array_pop( $names ); $folderName = array_pop( $names );
$out = [ $out = [
'spacer' => implode( '', $this->spacer ),
'folderName' => $folderName, 'folderName' => $folderName,
'location' => $folder, 'location' => $folder,
'subdirs' => $subdirs, 'subdirs' => $subdirs,
]; ];
if ( ! empty( $subdirs ) ) { if ( ! empty( $subdirs ) ) {
$out['folderexpand'] = '<i class="fa-solid fa-caret-down justify-content-end"></i>'; $out['folderexpand'] = '<i class="fa fa-caret-down"></i>';
} else { } else {
$out['folderexpand'] = ''; $out['folderexpand'] = '';
} }
@ -116,7 +100,9 @@ class Images extends AdminController {
if ( $top == $sub ) { if ( $top == $sub ) {
$html = ''; $html = '';
} else { } else {
$this->spacer[] = '-> ';
$children = $this->generateFolderHtml( $sub ); $children = $this->generateFolderHtml( $sub );
array_pop( $this->spacer );
Components::set( 'parentfolderName', $object->folderName ); Components::set( 'parentfolderName', $object->folderName );
$html = Views::simpleView( 'forms.folderSelectParent', $children ); $html = Views::simpleView( 'forms.folderSelectParent', $children );
Components::set( 'parentfolderName', '' ); Components::set( 'parentfolderName', '' );
@ -150,28 +136,6 @@ class Images extends AdminController {
return $dirs; return $dirs;
} }
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
self::$title = 'Admin - Images'; self::$title = 'Admin - Images';
@ -199,38 +163,44 @@ class Images extends AdminController {
Debug::error( 'There was an error with your upload.'); Debug::error( 'There was an error with your upload.');
Issues::add( 'error', [ 'There was an error with your upload.' => Check::userErrors() ] ); Issues::add( 'error', [ 'There was an error with your upload.' => Check::userErrors() ] );
} }
// if ( self::$token->create(
// Input::post( 'name' ),
// Input::post( 'notes' ),
// Input::post( 'token_type' )
// ) ) {
// Session::flash( 'success', 'Token Created' );
// Redirect::to( 'admin/images' );
// }
} }
Views::view( 'admin.images.create' ); Views::view( 'admin.images.create' );
} }
public function delete() { public function delete() {
if ( self::$token->delete( [ $id ] ) ) { if ( ! Input::exists( 'fileLocation' ) ) {
Session::flash( 'success', 'Token deleted.' ); Session::flash( 'warning', 'Unknown image.' );
Redirect::to( 'admin/images' );
} }
Redirect::to( 'admin/images' );
$fileLocation = Input::get('fileLocation');
// Ensure the file exists
if ( ! file_exists( $fileLocation ) ) {
Session::flash('error', 'File does not exist.');
Redirect::to('admin/images');
}
// Check if the file is an image
$validMimeTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'];
$fileMimeType = mime_content_type( $fileLocation );
if ( ! in_array( $fileMimeType, $validMimeTypes ) ) {
Session::flash('error', 'Invalid file type. Only images can be deleted.');
Redirect::to('admin/images');
}
// Attempt to delete the file
if (@unlink($fileLocation)) {
Session::flash('success', 'Image deleted.');
} else {
Session::flash('error', 'Failed to delete the image.');
}
Redirect::to('admin/images');
} }
public function rename() { public function rename() {
if ( ! Input::exists( 'fileLocation' ) ) { if ( ! Input::exists( 'fileLocation' ) ) {
Session::flash( 'warning', 'Unknown image.' ); Session::flash( 'warning', 'Unknown image.' );
Redirect::to( 'admin/images' ); Redirect::to( 'admin/images' );
@ -243,7 +213,6 @@ class Images extends AdminController {
Issues::add( 'error', [ 'There was an error renaming the image.' => Check::userErrors() ] ); Issues::add( 'error', [ 'There was an error renaming the image.' => Check::userErrors() ] );
} else { } else {
$result = $this->renameFile( Input::post( 'filelocation' ), Input::post( 'newname' ) ); $result = $this->renameFile( Input::post( 'filelocation' ), Input::post( 'newname' ) );
if ( ! empty( $result ) ) { if ( ! empty( $result ) ) {
Session::flash( 'success', 'Image has been renamed.' ); Session::flash( 'success', 'Image has been renamed.' );
Redirect::to( 'admin/images' ); Redirect::to( 'admin/images' );

View File

@ -4,7 +4,7 @@
* *
* This is the login logs controller. * This is the login logs controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the generic logs controller. * This is the generic logs controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the installed plugins controller. * This is the installed plugins controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the admin routes/redirects controller. * This is the admin routes/redirects controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the admin email controller. The only real use is to send out emails to the various lists. * This is the admin email controller. The only real use is to send out emails to the various lists.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the configuration and settings controller. * This is the configuration and settings controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the admin app/user tokens controller. * This is the admin app/user tokens controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the users admin controller. * This is the users admin controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the api authentication controller. * This is the api authentication controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -24,6 +24,7 @@ class Auth extends ApiController {
self::$tokens = new Token; self::$tokens = new Token;
} }
/**
public function refresh() { public function refresh() {
$token = self::$tokens->refresh( self::$authToken->ID ); $token = self::$tokens->refresh( self::$authToken->ID );
if ( empty( $token ) ) { if ( empty( $token ) ) {
@ -35,4 +36,5 @@ class Auth extends ApiController {
} }
Views::view( 'api.response', ['response' => json_encode( [ $responseType => $response ], true )]); Views::view( 'api.response', ['response' => json_encode( [ $responseType => $response ], true )]);
} }
*/
} }

View File

@ -4,7 +4,7 @@
* *
* This is the api authentication controller. * This is the api authentication controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -31,6 +31,7 @@ class Login extends ApiController {
Template::addHeader( 'Content-Type: application/json; charset=utf-8' ); Template::addHeader( 'Content-Type: application/json; charset=utf-8' );
} }
/**
public function index() { public function index() {
if ( ! Forms::check( 'apiLogin' ) ) { if ( ! Forms::check( 'apiLogin' ) ) {
$responseType = 'error'; $responseType = 'error';
@ -47,4 +48,5 @@ class Login extends ApiController {
$token = self::$tokens->findOrCreateUserToken( $user->ID, true ); $token = self::$tokens->findOrCreateUserToken( $user->ID, true );
return Views::view( 'api.response', ['response' => json_encode( [ $responseType => $token ], true )]); return Views::view( 'api.response', ['response' => json_encode( [ $responseType => $token ], true )]);
} }
*/
} }

View File

@ -4,7 +4,7 @@
* *
* This is the users' api controller. * This is the users' api controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -23,6 +23,13 @@ class Users extends ApiController {
self::$user = new User; self::$user = new User;
} }
/**
* This is actually just for testing. It can provide attack information in the way of user count if not disabled.
*
* @param [type] $id
* @return void
*/
/**
public function find( $id = null ) { public function find( $id = null ) {
$user = self::$user->get( $id ); $user = self::$user->get( $id );
if ( ! $user ) { if ( ! $user ) {
@ -34,4 +41,5 @@ class Users extends ApiController {
} }
Views::view( 'api.response', ['response' => json_encode( [ $responseType => $response ], true )]); Views::view( 'api.response', ['response' => json_encode( [ $responseType => $response ], true )]);
} }
*/
} }

View File

@ -4,7 +4,7 @@
* *
* This is the error controller. * This is the error controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the home or 'index' controller. * This is the home or 'index' controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -106,4 +106,10 @@ class Home extends Controller {
self::$pageDescription = 'Many times, we aren\'t the first to ask why or how something works. Here you will find a list of {SITENAME} commonly asked questions and our best answers.' ; self::$pageDescription = 'Many times, we aren\'t the first to ask why or how something works. Here you will find a list of {SITENAME} commonly asked questions and our best answers.' ;
Views::view( 'faq' ); Views::view( 'faq' );
} }
public function getstarted() {
self::$title = 'Get Started - {SITENAME}';
self::$pageDescription = '{SITENAME} is a great tool to bring your ideas to reality. On this page, you can find out how to get started today.' ;
Views::view( 'start' );
}
} }

View File

@ -0,0 +1,125 @@
<?php
/**
* app/controllers/houdini.php
*
* This is the houdini controller.
*
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Controllers;
use TheTempusProject\Hermes\Functions\Redirect;
use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\Classes\Controller;
class Libraries extends Controller {
public function index() {
self::$title = 'Libraries - {SITENAME}';
self::$pageDescription = '{SITENAME} depends on several very important libraries, some of which are developed exclusively to support the project. Here you can find a list with more information.' ;
Views::view( 'deps.index' );
}
public function ttp( $method = null ) {
self::$title = '{SITENAME} - TheTempusProject';
self::$pageDescription = 'TheTempusProject is the primary repo of {SITENAME} which houses the main application.';
if ( empty( $method ) ) {
return Views::view( 'deps.ttp' );
}
switch ( $method ) {
case 'git':
return Redirect::external( 'https://git.thetempusproject.com/the-tempus-project/thetempusproject' );
case 'packagist':
return Redirect::external( 'https://packagist.org/packages/thetempusproject/thetempusproject' );
case 'changes':
self::$title .= ' Changes';
self::$pageDescription = 'This pages lists the most recent changes to TheTempusProject with some details on those changes.';
return Views::view( 'changes.ttp' );
default:
return Views::view( 'deps.ttp' );
}
}
public function hermes( $method = null ) {
self::$title = '{SITENAME} - Hermes';
self::$pageDescription = 'Hermes is a dependency of {SITENAME} that provides many common helper functions for navigating url components and file systems; designed to work seamlessly regardless of architecture.';
if ( empty( $method ) ) {
return Views::view( 'deps.hermes' );
}
switch ( $method ) {
case 'git':
return Redirect::external( 'https://git.thetempusproject.com/the-tempus-project/hermes' );
case 'packagist':
return Redirect::external( 'https://packagist.org/packages/thetempusproject/hermes' );
case 'changes':
self::$title .= ' Changes';
self::$pageDescription = 'Hermes is a dependency of {SITENAME} and this pages lists the most recent changes with some details on those changes.';
return Views::view( 'changes.hermes' );
default:
return Views::view( 'deps.hermes' );
}
}
public function canary( $method = null ) {
self::$title = '{SITENAME} - Canary';
self::$pageDescription = 'Canary is a dependency of {SITENAME} that both records and reports logs from various PHP applications.';
if ( empty( $method ) ) {
return Views::view( 'deps.canary' );
}
switch ( $method ) {
case 'git':
return Redirect::external( 'https://git.thetempusproject.com/the-tempus-project/canary' );
case 'packagist':
return Redirect::external( 'https://packagist.org/packages/thetempusproject/canary' );
case 'changes':
self::$title .= ' Changes';
self::$pageDescription = 'Canary is a dependency of {SITENAME} and this pages lists the most recent changes with some details on those changes.';
return Views::view( 'changes.canary' );
default:
return Views::view( 'deps.canary' );
}
}
public function bedrock( $method = null ) {
self::$title = '{SITENAME} - Bedrock';
self::$pageDescription = 'Bedrock is a dependency of {SITENAME} that provides many components used to manipulate database data and many helper functions vital for running the entire application.';
if ( empty( $method ) ) {
return Views::view( 'deps.bedrock' );
}
switch ( $method ) {
case 'git':
return Redirect::external( 'https://git.thetempusproject.com/the-tempus-project/bedrock' );
case 'packagist':
return Redirect::external( 'https://packagist.org/packages/thetempusproject/bedrock' );
case 'changes':
self::$title .= ' Changes';
self::$pageDescription = 'Bedrock is a dependency of {SITENAME} and this pages lists the most recent changes with some details on those changes.';
return Views::view( 'changes.bedrock' );
default:
return Views::view( 'deps.bedrock' );
}
}
public function houdini( $method = null ) {
self::$title = '{SITENAME} - Houdini';
self::$pageDescription = 'Houdini is a dependency of {SITENAME} that allows for the creation and manipulation of objects used in html page creation.';
if ( empty( $method ) ) {
return Views::view( 'deps.houdini' );
}
switch ( $method ) {
case 'git':
return Redirect::external( 'https://git.thetempusproject.com/the-tempus-project/houdini' );
case 'packagist':
return Redirect::external( 'https://packagist.org/packages/thetempusproject/houdini' );
case 'changes':
self::$title .= ' Changes';
self::$pageDescription = 'Houdini is a dependency of {SITENAME} and this pages lists the most recent changes with some details on those changes.';
return Views::view( 'changes.houdini' );
default:
return Views::view( 'deps.houdini' );
}
}
}

View File

@ -4,7 +4,7 @@
* *
* This is the user registration controller. * This is the user registration controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the user control panel controller. * This is the user control panel controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -31,7 +31,7 @@ use TheTempusProject\Bedrock\Functions\Session;
class Usercp extends Controller { class Usercp extends Controller {
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
if ( !App::$isLoggedIn ) { if ( ! App::$isLoggedIn ) {
Session::flash( 'notice', 'You must be logged in to view this page!' ); Session::flash( 'notice', 'You must be logged in to view this page!' );
Redirect::home(); Redirect::home();
} }

View File

@ -3,7 +3,7 @@
* *
* This is css used in the debuging console. * This is css used in the debuging console.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -3,15 +3,26 @@
* *
* This file provides dark mode styles to override existing Bootstrap 5 base styles. * This file provides dark mode styles to override existing Bootstrap 5 base styles.
* *
* @version 3.0-dark * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/ */
.context-popover {
background-color: #383838;
color: white;
}
.context-popover .popover-header {
background-color: #2c2c2c;
}
.context-main-border { .context-main-border {
border-color: #f5f5f5!important; border-color: #f5f5f5!important;
} }
.context-main-border-other {
border-color: #1e1e1e!important;
}
.context-main-bg { .context-main-bg {
background-color: #2c2c2c; background-color: #2c2c2c;

View File

@ -3,15 +3,52 @@
* *
* This file is for any css that should be applied site wide. * This file is for any css that should be applied site wide.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/ */
.facebook {
border-color: #1877F2 !important; /* Facebook Blue */
color: #1877F2 !important;
}
.x-black {
border-color: #000000 !important; /* X (formerly Twitter) Black */
color: #000000 !important;
}
.reddit {
border-color: #FF4500 !important; /* Reddit Orange */
color: #FF4500 !important;
}
.opera {
border-color: #FF1B2D !important; /* Opera Red */
color: #FF1B2D !important;
}
.firefox {
border-color: #FF7139 !important; /* Firefox Orange */
color: #FF7139 !important;
}
.edge {
border-color: #0078D7 !important; /* Microsoft Edge Blue */
color: #0078D7 !important;
}
.safari {
border-color: #0B78E3 !important; /* Safari Blue */
color: #0B78E3 !important;
}
.context-main-border { .context-main-border {
border-color: #1e1e1e!important; border-color: #1e1e1e!important;
} }
.context-main-border-other {
border-color: #f5f5f5!important;
}
.context-main-bg { .context-main-bg {
background-color: #f7f7f7; background-color: #f7f7f7;

View File

@ -2,7 +2,7 @@
/** /**
* app/functions/common.php * app/functions/common.php
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

View File

@ -3,11 +3,99 @@
* *
* This file is for 'access anywhere' javascript. * This file is for 'access anywhere' javascript.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/ */
/**
* Progressive Web-App
**/
let deferredPrompt;
const installPrompt = document.getElementById("install-prompt");
const chromeMessage = document.getElementById("chrome-install-message");
const iosMessage = document.getElementById("ios-install-message");
const installButton = document.getElementById("install-button");
const dismissButton = document.querySelector("#install-prompt .btn-close");
// Check if the user previously dismissed the prompt
if ( ! localStorage.getItem("pwaInstallDismissed") ) {
window.addEventListener("beforeinstallprompt", (event) => {
event.preventDefault();
deferredPrompt = event;
installPrompt.classList.remove("d-none");
installPrompt.classList.add("d-block"); // Show the alert
chromeMessage.classList.remove("d-none");
chromeMessage.classList.add("d-block"); // Show the prompt
});
if ( isIos() && ! isInStandaloneMode() ) {
installPrompt.classList.remove("d-none");
installPrompt.classList.add("d-block"); // Show the alert
iosMessage.classList.remove("d-none");
iosMessage.classList.add("d-block"); // Show the prompt
}
}
// ios REQUIRES a service worker
if ( 'serviceWorker' in navigator ) {
navigator.serviceWorker.register('app/js/sw.js')
.then(() => console.log('Service Worker Registered'));
}
// self.addEventListener('install', () => self.skipWaiting());
// self.addEventListener('activate', () => self.clients.claim());
// self.addEventListener('fetch', () => {}); // No file interception
// Handle Install Button Click
if ( installButton ) {
installButton.addEventListener("click", async () => {
if ( deferredPrompt ) {
deferredPrompt.prompt();
const { outcome } = await deferredPrompt.userChoice;
if (outcome === "dismissed") {
setInstallDismissed(); // Store that the user dismissed the prompt
}
deferredPrompt = null; // Reset prompt
installPrompt.classList.remove("d-block");
installPrompt.classList.add("d-none");
}
});
}
// Handle Close Button Click
if ( dismissButton ) {
dismissButton.addEventListener("click", () => {
setInstallDismissed(); // Store that the user dismissed the prompt
});
}
// Function to remember user choice for 7 days
function setInstallDismissed() {
localStorage.setItem("pwaInstallDismissed", Date.now() + 7 * 24 * 60 * 60 * 1000);
installPrompt.classList.remove("d-block"); // Hide the prompt
installPrompt.classList.add("d-none");
}
// Check if the 7-day period has passed
if (localStorage.getItem("pwaInstallDismissed")) {
const dismissUntil = parseInt(localStorage.getItem("pwaInstallDismissed"), 10);
if (Date.now() < dismissUntil) {
//
} else {
localStorage.removeItem("pwaInstallDismissed"); // Reset after 7 days
}
}
function isIos() {
return /iphone|ipad|ipod/i.test(navigator.userAgent);
}
function isInStandaloneMode() {
return window.matchMedia('(display-mode: standalone)').matches || window.navigator.standalone;
}
/** /**
* Automatically selects/de-selects all check boxes associated with that field * Automatically selects/de-selects all check boxes associated with that field
**/ **/
@ -80,14 +168,14 @@ function copyElementText( id ) {
} }
} }
$(document).ready(function() { document.addEventListener("DOMContentLoaded", function () {
$('select').each(function() { document.querySelectorAll("select").forEach(function (select) {
var selectedValue = $(this).attr('value'); var selectedValue = select.getAttribute("value");
if (selectedValue) { if (selectedValue) {
$(this).removeAttr('value'); select.removeAttribute("value");
$(this).find('option').each(function() { select.querySelectorAll("option").forEach(function (option) {
if ($(this).attr('value') === selectedValue) { if (option.getAttribute("value") === selectedValue) {
$(this).prop('selected', true); option.selected = true;
} }
}); });
} }
@ -178,12 +266,45 @@ document.addEventListener('DOMContentLoaded', function () {
}); });
} }
function toggleDarkModePref( value ) { function toggleDarkModePref(value) {
var fields = {}; var fields = new URLSearchParams();
fields.prefName = 'darkMode'; fields.append("prefName", "darkMode");
fields.prefValue = value; fields.append("prefValue", value);
$.post( '/usercp/updatePref', fields ).done(function(response) {
// alert('Timer updated successfully!'); fetch("/usercp/updatePref", {
}); method: "POST",
body: fields,
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
})
// .then(response => response.text()) // Handle response if needed
.catch(error => console.error("Error:", error));
} }
}); });
// this reverses the carets for the folderSelect
document.querySelectorAll('[data-bs-toggle="collapse"]').forEach(button => {
button.addEventListener('click', () => {
setTimeout(() => {
const icon = button.querySelector('i');
// Only proceed if the icon already has one of the relevant classes
if (icon && (icon.classList.contains('fa-caret-down') || icon.classList.contains('fa-caret-up'))) {
icon.classList.toggle('fa-caret-down', button.classList.contains('collapsed'));
icon.classList.toggle('fa-caret-up', !button.classList.contains('collapsed'));
}
}, 150);
});
});
// this should load all popovers
document.addEventListener("DOMContentLoaded", function () {
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
return new bootstrap.Popover(popoverTriggerEl, {
customClass: 'context-popover',
});
});
});

1
app/js/sw.js Normal file
View File

@ -0,0 +1 @@
self.addEventListener('fetch', () => {});

View File

@ -4,7 +4,7 @@
* *
* This class is used for the manipulation of the groups database table. * This class is used for the manipulation of the groups database table.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* Model for handling all logging. * Model for handling all logging.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This class is used for the manipulation of the routes database table. * This class is used for the manipulation of the routes database table.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -7,7 +7,7 @@
* Notes: After refactor, the sessions will use ID's for short term, and Cookies * Notes: After refactor, the sessions will use ID's for short term, and Cookies
* will use the token for long term storage * will use the token for long term storage
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -59,7 +59,7 @@ class Sessions extends DatabaseModel {
public function checkSession( $sessionID ) { public function checkSession( $sessionID ) {
$user = new User; $user = new User;
// @todo lets put this on some sort of realistic checking regime other than check everything every time // @todo lets put this on some sort of realistic checking regime other than check everything every time
if ( $sessionID == false ) { if ( empty( $sessionID ) ) {
Debug::log( 'sessionID false' ); Debug::log( 'sessionID false' );
return false; return false;
} }

View File

@ -4,7 +4,7 @@
* *
* This class is used for the manipulation of the tokens database table. * This class is used for the manipulation of the tokens database table.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -8,7 +8,7 @@
* @todo finish fixing the check functions that were migrated here * @todo finish fixing the check functions that were migrated here
* These could go in the Forms class? * These could go in the Forms class?
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the Blog admin controller. * This is the Blog admin controller.
* *
* @package TP Blog * @package TP Blog
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the blog controller. * This is the blog controller.
* *
* @package TP Blog * @package TP Blog
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the form checking functions for this plugin. * This houses all of the form checking functions for this plugin.
* *
* @package TP Blog * @package TP Blog
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This class is used for the manipulation of the blog database table. * This class is used for the manipulation of the blog database table.
* *
* @package TP Blog * @package TP Blog
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the main plugin info and functionality. * This houses all of the main plugin info and functionality.
* *
* @package TP Blog * @package TP Blog
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the loader for the blog template. * This is the loader for the blog template.
* *
* @package TP Blog * @package TP Blog
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* app/plugins/blog/templates/blog.tpl * app/plugins/blog/templates/blog.tpl
* *
* @package TP Blog * @package TP Blog
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -130,7 +130,6 @@
{FOOT} {FOOT}
</div> </div>
<!-- Bootstrap core JavaScript and jquery --> <!-- Bootstrap core JavaScript and jquery -->
<script language="JavaScript" crossorigin="anonymous" type="text/javascript" src="{JQUERY_CDN}jquery.min.js"></script>
<script language="JavaScript" crossorigin="anonymous" type="text/javascript" src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script> <script language="JavaScript" crossorigin="anonymous" type="text/javascript" src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
<script language="JavaScript" crossorigin="anonymous" type="text/javascript" src="{BOOTSTRAP_CDN}js/bootstrap.min.js"></script> <script language="JavaScript" crossorigin="anonymous" type="text/javascript" src="{BOOTSTRAP_CDN}js/bootstrap.min.js"></script>
<!-- Custom javascript for this template --> <!-- Custom javascript for this template -->

View File

@ -5,7 +5,7 @@
* This is the loader for the rss template. * This is the loader for the rss template.
* *
* @package TP Blog * @package TP Blog
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the bug report admin controller. * This is the bug report admin controller.
* *
* @package TP BugReports * @package TP BugReports
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the bug reports controller. * This is the bug reports controller.
* *
* @package TP BugReports * @package TP BugReports
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the form checking functions for this plugin. * This houses all of the form checking functions for this plugin.
* *
* @package TP BugReports * @package TP BugReports
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This class is used for the manipulation of the bugreports database table. * This class is used for the manipulation of the bugreports database table.
* *
* @package TP BugReports * @package TP BugReports
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the main plugin info and functionality. * This houses all of the main plugin info and functionality.
* *
* @package TP BugReports * @package TP BugReports
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the comments admin controller. * This is the comments admin controller.
* *
* @package TP Comments * @package TP Comments
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the Moderator controller. * This is the Moderator controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the form checking functions for this plugin. * This houses all of the form checking functions for this plugin.
* *
* @package TP Comments * @package TP Comments
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -6,7 +6,7 @@
* of the comments table. * of the comments table.
* *
* @package TP Comments * @package TP Comments
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the main plugin info and functionality. * This houses all of the main plugin info and functionality.
* *
* @package TP Comments * @package TP Comments
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the contact admin controller. * This is the contact admin controller.
* *
* @package TP Contact * @package TP Contact
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the home controller for the contact plugin. * This is the home controller for the contact plugin.
* *
* @package TP Contact * @package TP Contact
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the form checking functions for this plugin. * This houses all of the form checking functions for this plugin.
* *
* @package TP Contact * @package TP Contact
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -7,7 +7,7 @@
* @todo make this send a confirmation email * @todo make this send a confirmation email
* *
* @package TP Contact * @package TP Contact
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the main plugin info and functionality. * This houses all of the main plugin info and functionality.
* *
* @package TP Contact * @package TP Contact
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* This is the user messages controller. * This is the user messages controller.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -4,7 +4,7 @@
* *
* Houses all of the functions for the core messaging system. * Houses all of the functions for the core messaging system.
* *
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the main plugin info and functionality. * This houses all of the main plugin info and functionality.
* *
* @package TP Messages * @package TP Messages
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the notifications admin controller. * This is the notifications admin controller.
* *
* @package TP Notifications * @package TP Notifications
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the home controller for the notifications plugin. * This is the home controller for the notifications plugin.
* *
* @package TP Notifications * @package TP Notifications
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the form checking functions for this plugin. * This houses all of the form checking functions for this plugin.
* *
* @package TP Notifications * @package TP Notifications
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This class is used for the manipulation of the notifications database table. * This class is used for the manipulation of the notifications database table.
* *
* @package TP Notifications * @package TP Notifications
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the main plugin info and functionality. * This houses all of the main plugin info and functionality.
* *
* @package TP Notifications * @package TP Notifications
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the subscriptions admin controller. * This is the subscriptions admin controller.
* *
* @package TP Subscribe * @package TP Subscribe
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This is the home controller for the subscribe plugin. * This is the home controller for the subscribe plugin.
* *
* @package TP Subscribe * @package TP Subscribe
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the form checking functions for this plugin. * This houses all of the form checking functions for this plugin.
* *
* @package TP Subscribe * @package TP Subscribe
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This class is used for the manipulation of the subscribers database table. * This class is used for the manipulation of the subscribers database table.
* *
* @package TP Subscribe * @package TP Subscribe
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -5,7 +5,7 @@
* This houses all of the main plugin info and functionality. * This houses all of the main plugin info and functionality.
* *
* @package TP Subscribe * @package TP Subscribe
* @version 3.0 * @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com> * @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com * @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]

View File

@ -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"
}
}
}

View File

@ -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"
}
}
}

View File

@ -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
}
}

View File

@ -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"
}
}

View File

@ -1,54 +0,0 @@
<?php
/**
* app/resources/controllers/example.php
*
* This is an example controller layout.
*
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @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' );
}
}

View File

@ -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;
}
}

View File

@ -1,20 +0,0 @@
<?php
/**
* app/resources/models/example.php
*
* This is an example model.
*
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @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();
}
}

View File

@ -1,99 +0,0 @@
<?php
/**
* app/plugins/XXXXXXXXXX/plugin.php
*
* This houses all of the main plugin info and functionality.
*
* @package TP XXXXXXXXXX
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @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' => '<i class="fa fa-fw fa-copy"></i> Suggestions',
'url' => '{ROOT_URL}admin/suggestions',
],
];
public $main_links = [
[
'text' => 'Suggestions',
'url' => '{ROOT_URL}suggestions/index',
],
];
public $resourceMatrix = [
[
'title' => 'Welcome',
'content' => '<p>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 <a href="https://TheTempusProject.com">here</a>.</p>',
'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;
}
}

Some files were not shown because too many files have changed in this diff Show More