Merge branch 'main' into joeykimsey-com
prep for deploy
This commit is contained in:
@ -38,6 +38,8 @@ if ( ! defined( 'CONFIG_DIRECTORY' ) ) {
|
|||||||
# Tempus Debugger
|
# Tempus Debugger
|
||||||
define( 'CANARY_SECURE_HASH', 'd73ed7591a30f0ca7d686a0e780f0d05' );
|
define( 'CANARY_SECURE_HASH', 'd73ed7591a30f0ca7d686a0e780f0d05' );
|
||||||
# Tempus Project Core
|
# Tempus Project Core
|
||||||
|
define( 'APP_NAME', 'Joey Kimsey');
|
||||||
|
define( 'TP_DEFAULT_LOGO', 'images/logo.png');
|
||||||
// Check
|
// Check
|
||||||
define( 'MINIMUM_PHP_VERSION', 8.1);
|
define( 'MINIMUM_PHP_VERSION', 8.1);
|
||||||
// Cookies
|
// Cookies
|
||||||
|
@ -32,12 +32,12 @@ class Home extends AdminController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function index() {
|
public function index() {
|
||||||
|
Components::set( 'commentDash', '' );
|
||||||
if ( class_exists( 'TheTempusProject\Plugins\Comments' ) ) {
|
if ( class_exists( 'TheTempusProject\Plugins\Comments' ) ) {
|
||||||
$plugin = new CommentPlugin;
|
$plugin = new CommentPlugin;
|
||||||
|
|
||||||
if ( ! $plugin->checkEnabled() ) {
|
if ( ! $plugin->checkEnabled() ) {
|
||||||
Debug::info( 'Comments Plugin is disabled in the control panel.' );
|
Debug::info( 'Comments Plugin is disabled in the control panel.' );
|
||||||
Components::set( 'commentDash', '' );
|
|
||||||
} else {
|
} else {
|
||||||
$comments = new Comments;
|
$comments = new Comments;
|
||||||
$commentList = Views::simpleView( 'comments.admin.dashboard', $comments->recent( 'all', 5 ) );
|
$commentList = Views::simpleView( 'comments.admin.dashboard', $comments->recent( 'all', 5 ) );
|
||||||
|
@ -21,6 +21,9 @@
|
|||||||
.context-second-bg {
|
.context-second-bg {
|
||||||
background-color: #1e1e1e;
|
background-color: #1e1e1e;
|
||||||
}
|
}
|
||||||
|
.context-third-bg {
|
||||||
|
background-color: #3a3a3a;
|
||||||
|
}
|
||||||
.bg-default {
|
.bg-default {
|
||||||
background-color: #2c2c2c;
|
background-color: #2c2c2c;
|
||||||
}
|
}
|
||||||
@ -142,9 +145,7 @@ body {
|
|||||||
}
|
}
|
||||||
.form-control:focus {
|
.form-control:focus {
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
/* border-color: #85bd3e; */
|
border-color: #1e90ff;
|
||||||
border-color: #1b947f;
|
|
||||||
background-color: #1f1f1f;
|
background-color: #1f1f1f;
|
||||||
/* box-shadow: 0 0 0 .25rem #1b947f; */
|
box-shadow: 0 0 0 .25rem rgba(30, 144, 255, .5);
|
||||||
box-shadow: 0 0 0 .25rem #85bd3e;
|
|
||||||
}
|
}
|
@ -95,22 +95,45 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const ttpDarkmode = document.getElementById('dark-mode-pref');
|
||||||
const toggleButton = document.getElementById('dark-mode-toggle');
|
const toggleButton = document.getElementById('dark-mode-toggle');
|
||||||
const enableButton = document.getElementById('dark-mode-toggle-button');
|
const enableButton = document.getElementById('dark-mode-toggle-button');
|
||||||
const darkModeStylesheet = document.getElementById('dark-mode-stylesheet');
|
const darkModeStylesheet = document.getElementById('dark-mode-stylesheet');
|
||||||
|
let currentState = '';
|
||||||
|
|
||||||
// Check if dark mode is saved in localStorage
|
// Check if dark mode is set by ttp
|
||||||
|
if ( ttpDarkmode ) {
|
||||||
|
if ( 'true' == ttpDarkmode.value ) {
|
||||||
|
currentState = 'enabled';
|
||||||
|
}
|
||||||
|
if ( 'false' == ttpDarkmode.value ) {
|
||||||
|
currentState = 'disabled';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if dark mode is set in localStorage
|
||||||
|
if ( '' == currentState ) {
|
||||||
if ( localStorage.getItem('darkMode') === 'enabled' ) {
|
if ( localStorage.getItem('darkMode') === 'enabled' ) {
|
||||||
|
currentState = 'enabled';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update current button states
|
||||||
|
if ( 'enabled' == currentState ) {
|
||||||
darkModeStylesheet.disabled = false;
|
darkModeStylesheet.disabled = false;
|
||||||
|
|
||||||
|
if ( toggleButton ) {
|
||||||
toggleButton.checked = true;
|
toggleButton.checked = true;
|
||||||
|
}
|
||||||
|
|
||||||
if ( enableButton ) {
|
if ( enableButton ) {
|
||||||
enableButton.innerText = 'Disable Now';
|
enableButton.innerText = 'Disable Now';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Style striped table elements
|
||||||
document.querySelectorAll('.table-striped').forEach((table) => {
|
document.querySelectorAll('.table-striped').forEach((table) => {
|
||||||
if (localStorage.getItem('darkMode') === 'enabled') {
|
if ( 'enabled' == currentState ) {
|
||||||
table.classList.add('table-dark');
|
table.classList.add('table-dark');
|
||||||
} else {
|
} else {
|
||||||
table.classList.add('table-light')
|
table.classList.add('table-light')
|
||||||
@ -131,6 +154,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( toggleButton ) {
|
||||||
toggleButton.addEventListener('click', function () {
|
toggleButton.addEventListener('click', function () {
|
||||||
if (darkModeStylesheet.disabled) {
|
if (darkModeStylesheet.disabled) {
|
||||||
toggleDarkModePref( true );
|
toggleDarkModePref( true );
|
||||||
@ -152,6 +176,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function toggleDarkModePref( value ) {
|
function toggleDarkModePref( value ) {
|
||||||
var fields = {};
|
var fields = {};
|
||||||
|
@ -31,7 +31,7 @@ class Group extends DatabaseModel {
|
|||||||
'defaultGroup' => [
|
'defaultGroup' => [
|
||||||
'type' => 'customSelect',
|
'type' => 'customSelect',
|
||||||
'pretty' => 'The Default Group for new registrations.',
|
'pretty' => 'The Default Group for new registrations.',
|
||||||
'default' => 5,
|
'default' => 4,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
public $databaseMatrix = [
|
public $databaseMatrix = [
|
||||||
|
@ -46,7 +46,7 @@ class Blog extends AdminController {
|
|||||||
return $this->index();
|
return $this->index();
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = self::$posts->newPost( Input::post( 'title' ), Input::post( 'blogPost' ), Input::post( 'submit' ) );
|
$result = self::$posts->newPost( Input::post( 'title' ), Input::post( 'blogPost' ), Input::post( 'slug' ), Input::post( 'submit' ) );
|
||||||
if ( $result ) {
|
if ( $result ) {
|
||||||
Issues::add( 'success', 'Your post has been created.' );
|
Issues::add( 'success', 'Your post has been created.' );
|
||||||
return $this->index();
|
return $this->index();
|
||||||
@ -67,7 +67,7 @@ class Blog extends AdminController {
|
|||||||
Issues::add( 'error', [ 'There was an error with your form.' => Check::userErrors() ] );
|
Issues::add( 'error', [ 'There was an error with your form.' => Check::userErrors() ] );
|
||||||
return $this->index();
|
return $this->index();
|
||||||
}
|
}
|
||||||
if ( self::$posts->updatePost( $data, Input::post( 'title' ), Input::post( 'blogPost' ), Input::post( 'submit' ) ) === true ) {
|
if ( self::$posts->updatePost( $data, Input::post( 'title' ), Input::post( 'blogPost' ), Input::post( 'slug' ), Input::post( 'submit' ) ) === true ) {
|
||||||
Issues::add( 'success', 'Post Updated.' );
|
Issues::add( 'success', 'Post Updated.' );
|
||||||
return $this->index();
|
return $this->index();
|
||||||
}
|
}
|
||||||
|
@ -62,12 +62,17 @@ class Blog extends Controller {
|
|||||||
return $this->index();
|
return $this->index();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( class_exists( 'TheTempusProject\Plugins\Comments' ) ) {
|
||||||
$plugin = new Comments;
|
$plugin = new Comments;
|
||||||
if ( ! $plugin->checkEnabled() ) {
|
if ( ! $plugin->checkEnabled() ) {
|
||||||
Issues::add( 'error', 'Comments are disabled.' );
|
Issues::add( 'error', 'Comments are disabled.' );
|
||||||
return $this->index();
|
return $this->index();
|
||||||
}
|
}
|
||||||
$comments = new CommentsModel;
|
$comments = new CommentsModel;
|
||||||
|
} else {
|
||||||
|
Debug::info( 'error', 'Comments plugin missing.' );
|
||||||
|
return $this->index();
|
||||||
|
}
|
||||||
|
|
||||||
switch ( $sub ) {
|
switch ( $sub ) {
|
||||||
case 'post':
|
case 'post':
|
||||||
@ -99,9 +104,12 @@ class Blog extends Controller {
|
|||||||
return $this->index();
|
return $this->index();
|
||||||
}
|
}
|
||||||
$post = self::$posts->findById( $id );
|
$post = self::$posts->findById( $id );
|
||||||
|
if ( empty( $post ) ) {
|
||||||
|
$post = self::$posts->findBySlug( $id );
|
||||||
if ( empty( $post ) ) {
|
if ( empty( $post ) ) {
|
||||||
return $this->index();
|
return $this->index();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Debug::log( 'Controller initiated: ' . __METHOD__ . '.' );
|
Debug::log( 'Controller initiated: ' . __METHOD__ . '.' );
|
||||||
self::$title = 'Blog Post';
|
self::$title = 'Blog Post';
|
||||||
|
|
||||||
@ -111,13 +119,13 @@ class Blog extends Controller {
|
|||||||
|
|
||||||
Components::set( 'CONTENT_ID', $id );
|
Components::set( 'CONTENT_ID', $id );
|
||||||
Components::set( 'COMMENT_TYPE', self::$posts->tableName );
|
Components::set( 'COMMENT_TYPE', self::$posts->tableName );
|
||||||
|
|
||||||
$plugin = new Comments;
|
|
||||||
if ( ! $plugin->checkEnabled() ) {
|
|
||||||
Components::set( 'NEWCOMMENT', '' );
|
Components::set( 'NEWCOMMENT', '' );
|
||||||
Components::set( 'count', '0' );
|
Components::set( 'count', '0' );
|
||||||
Components::set( 'COMMENTS', '' );
|
Components::set( 'COMMENTS', '' );
|
||||||
} else {
|
|
||||||
|
if ( class_exists( 'TheTempusProject\Plugins\Comments' ) ) {
|
||||||
|
$plugin = new Comments;
|
||||||
|
if ( $plugin->checkEnabled() ) {
|
||||||
$comments = new CommentsModel;
|
$comments = new CommentsModel;
|
||||||
if ( App::$isLoggedIn ) {
|
if ( App::$isLoggedIn ) {
|
||||||
Components::set( 'NEWCOMMENT', Views::simpleView( 'comments.create' ) );
|
Components::set( 'NEWCOMMENT', Views::simpleView( 'comments.create' ) );
|
||||||
@ -127,8 +135,7 @@ class Blog extends Controller {
|
|||||||
Components::set( 'count', $comments->count( self::$posts->tableName, $post->ID ) );
|
Components::set( 'count', $comments->count( self::$posts->tableName, $post->ID ) );
|
||||||
Components::set( 'COMMENTS', Views::simpleView( 'comments.list', $comments->display( 10, self::$posts->tableName, $post->ID ) ) );
|
Components::set( 'COMMENTS', Views::simpleView( 'comments.list', $comments->display( 10, self::$posts->tableName, $post->ID ) ) );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$post = self::$posts->findById( $id );
|
|
||||||
|
|
||||||
self::$title .= ' - ' . $post->title;
|
self::$title .= ' - ' . $post->title;
|
||||||
self::$pageDescription = strip_tags( $post->contentSummaryNoLink );
|
self::$pageDescription = strip_tags( $post->contentSummaryNoLink );
|
||||||
|
@ -32,6 +32,7 @@ class Posts extends DatabaseModel {
|
|||||||
[ 'edited', 'int', '10' ],
|
[ 'edited', 'int', '10' ],
|
||||||
[ 'draft', 'int', '1' ],
|
[ 'draft', 'int', '1' ],
|
||||||
[ 'title', 'varchar', '86' ],
|
[ 'title', 'varchar', '86' ],
|
||||||
|
[ 'slug', 'varchar', '64' ],
|
||||||
[ 'content', 'text', '' ],
|
[ 'content', 'text', '' ],
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -45,7 +46,7 @@ class Posts extends DatabaseModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function newPost( $title, $post, $draft ) {
|
public function newPost( $title, $post, $slug, $draft ) {
|
||||||
if ( !Check::dataTitle( $title ) ) {
|
if ( !Check::dataTitle( $title ) ) {
|
||||||
Debug::info( 'modelBlog: illegal title.' );
|
Debug::info( 'modelBlog: illegal title.' );
|
||||||
|
|
||||||
@ -59,6 +60,7 @@ class Posts extends DatabaseModel {
|
|||||||
$fields = [
|
$fields = [
|
||||||
'author' => App::$activeUser->ID,
|
'author' => App::$activeUser->ID,
|
||||||
'draft' => $draft,
|
'draft' => $draft,
|
||||||
|
'slug' => $slug,
|
||||||
'created' => time(),
|
'created' => time(),
|
||||||
'edited' => time(),
|
'edited' => time(),
|
||||||
'content' => Sanitize::rich( $post ),
|
'content' => Sanitize::rich( $post ),
|
||||||
@ -73,7 +75,7 @@ class Posts extends DatabaseModel {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updatePost( $id, $title, $content, $draft ) {
|
public function updatePost( $id, $title, $content, $slug, $draft ) {
|
||||||
if ( empty( self::$log ) ) {
|
if ( empty( self::$log ) ) {
|
||||||
self::$log = new Log;
|
self::$log = new Log;
|
||||||
}
|
}
|
||||||
@ -94,6 +96,7 @@ class Posts extends DatabaseModel {
|
|||||||
}
|
}
|
||||||
$fields = [
|
$fields = [
|
||||||
'draft' => $draft,
|
'draft' => $draft,
|
||||||
|
'slug' => $slug,
|
||||||
'edited' => time(),
|
'edited' => time(),
|
||||||
'content' => Sanitize::rich( $content ),
|
'content' => Sanitize::rich( $content ),
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
@ -132,22 +135,29 @@ class Posts extends DatabaseModel {
|
|||||||
$draft = '';
|
$draft = '';
|
||||||
$authorName = self::$user->getUsername( $instance->author );
|
$authorName = self::$user->getUsername( $instance->author );
|
||||||
|
|
||||||
$cleanPost = Sanitize::contentShort( $instance->content );
|
// Summarize
|
||||||
$wordsArray = explode( ' ', $cleanPost );
|
if ( ! empty( $instance->slug ) ) {
|
||||||
$postLine = explode( "\n", $cleanPost );
|
$identifier = $instance->slug;
|
||||||
$spaceSummary = implode( ' ', array_splice( $wordsArray, 0, 100 ) );
|
} else {
|
||||||
$lineSummary = implode( "\n", array_splice( $postLine, 0, 5 ) );
|
$identifier = $instance->ID;
|
||||||
if ( strlen( $spaceSummary ) < strlen( $lineSummary ) ) {
|
|
||||||
$contentSummaryNoLink = $spaceSummary;
|
|
||||||
$contentSummary = $spaceSummary;
|
|
||||||
if ( count( $wordsArray, 1 ) >= 100 ) {
|
|
||||||
$contentSummaryNoLink = $contentSummary;
|
|
||||||
$contentSummary .= '... <a href="{ROOT_URL}blog/post/' . $instance->ID . '" class="text-decoration-none">Read More</a>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$cleanPost = Sanitize::contentShort( $instance->content );
|
||||||
|
// By Word
|
||||||
|
$wordsArray = explode( ' ', $cleanPost );
|
||||||
|
$wordSummary = implode( ' ', array_splice( $wordsArray, 0, 100 ) );
|
||||||
|
// By Line
|
||||||
|
$linesArray = explode( "\n", $cleanPost );
|
||||||
|
$lineSummary = implode( "\n", array_splice( $linesArray, 0, 5 ) );
|
||||||
|
|
||||||
|
if ( strlen( $wordSummary ) < strlen( $lineSummary ) ) {
|
||||||
|
$contentSummaryNoLink = $wordSummary;
|
||||||
|
$contentSummary = $wordSummary . '... <a href="{ROOT_URL}blog/post/' . $identifier . '" class="text-decoration-none">Read More</a>';
|
||||||
} else {
|
} else {
|
||||||
$contentSummaryNoLink = $lineSummary;
|
$contentSummaryNoLink = $lineSummary;
|
||||||
$contentSummary = $lineSummary . '... <a href="{ROOT_URL}blog/post/' . $instance->ID . '" class="text-decoration-none">Read More</a>';
|
$contentSummary = $lineSummary . '... <a href="{ROOT_URL}blog/post/' . $identifier . '" class="text-decoration-none">Read More</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$instance->contentSummaryNoLink = $contentSummaryNoLink;
|
$instance->contentSummaryNoLink = $contentSummaryNoLink;
|
||||||
$instance->contentSummary = $contentSummary;
|
$instance->contentSummary = $contentSummary;
|
||||||
|
|
||||||
@ -164,6 +174,7 @@ class Posts extends DatabaseModel {
|
|||||||
}
|
}
|
||||||
$instance->content = Filters::applyOne( 'mentions.0', $instance->content, true );
|
$instance->content = Filters::applyOne( 'mentions.0', $instance->content, true );
|
||||||
$instance->content = Filters::applyOne( 'hashtags.0', $instance->content, true );
|
$instance->content = Filters::applyOne( 'hashtags.0', $instance->content, true );
|
||||||
|
|
||||||
$out[] = $instance;
|
$out[] = $instance;
|
||||||
if ( !empty( $end ) ) {
|
if ( !empty( $end ) ) {
|
||||||
$out = $out[0];
|
$out = $out[0];
|
||||||
@ -291,6 +302,22 @@ class Posts extends DatabaseModel {
|
|||||||
return $this->filter( $postData->results() );
|
return $this->filter( $postData->results() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function findBySlug( $slug, $includeDraft = false ) {
|
||||||
|
$whereClause = [];
|
||||||
|
if ( $includeDraft !== true ) {
|
||||||
|
$whereClause = ['draft', '=', '0', 'AND'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$whereClause = array_merge( $whereClause, ['slug', '=', $slug] );
|
||||||
|
|
||||||
|
$postData = self::$db->get( $this->tableName, $whereClause );
|
||||||
|
if ( !$postData->count() ) {
|
||||||
|
Debug::info( 'No Blog posts found.' );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return $this->filter( $postData->first() );
|
||||||
|
}
|
||||||
|
|
||||||
public function byMonth( $month, $year = 0, $includeDraft = false ) {
|
public function byMonth( $month, $year = 0, $includeDraft = false ) {
|
||||||
if ( 0 === $year ) {
|
if ( 0 === $year ) {
|
||||||
$year = date( 'Y' );
|
$year = date( 'Y' );
|
||||||
|
@ -12,6 +12,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Slug -->
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="slug" class="col-lg-3 col-form-label text-end">URL Slug (for pretty linking):</label>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="slug" id="slug" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- form buttons -->
|
<!-- form buttons -->
|
||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<div class="offset-3 col-lg-6">
|
<div class="offset-3 col-lg-6">
|
||||||
|
@ -12,6 +12,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Slug -->
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="slug" class="col-lg-3 col-form-label text-end">URL Slug (for pretty linking):</label>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="slug" id="slug" value="{slug}" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- form buttons -->
|
<!-- form buttons -->
|
||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<div class="offset-3 col-lg-6">
|
<div class="offset-3 col-lg-6">
|
||||||
|
@ -19,6 +19,9 @@ use TheTempusProject\Houdini\Classes\Views;
|
|||||||
use TheTempusProject\Houdini\Classes\Issues;
|
use TheTempusProject\Houdini\Classes\Issues;
|
||||||
use TheTempusProject\Bedrock\Functions\Check;
|
use TheTempusProject\Bedrock\Functions\Check;
|
||||||
use TheTempusProject\Bedrock\Functions\Input;
|
use TheTempusProject\Bedrock\Functions\Input;
|
||||||
|
use TheTempusProject\TheTempusProject as App;
|
||||||
|
use TheTempusProject\Hermes\Functions\Redirect;
|
||||||
|
use TheTempusProject\Bedrock\Functions\Session;
|
||||||
|
|
||||||
class Messages extends Controller {
|
class Messages extends Controller {
|
||||||
private static $message;
|
private static $message;
|
||||||
@ -27,6 +30,10 @@ class Messages extends Controller {
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
self::$title = 'Messages';
|
self::$title = 'Messages';
|
||||||
self::$message = new Message;
|
self::$message = new Message;
|
||||||
|
if ( ! App::$isLoggedIn ) {
|
||||||
|
Session::flash( 'error', 'You do not have permission to access this page.' );
|
||||||
|
return Redirect::home();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create() {
|
public function create() {
|
||||||
@ -71,8 +78,9 @@ class Messages extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function index() {
|
public function index() {
|
||||||
Views::view( 'messages.inbox', self::$message->getInbox() );
|
Components::set( 'message_inbox', Views::simpleView( 'messages.inbox', self::$message->getInbox() ) );
|
||||||
Views::view( 'messages.outbox', self::$message->getOutbox() );
|
Components::set( 'message_outbox', Views::simpleView( 'messages.outbox', self::$message->getOutbox() ) );
|
||||||
|
Views::view( 'messages.index' );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function read( $id = '' ) {
|
public function read( $id = '' ) {
|
||||||
|
@ -1 +1 @@
|
|||||||
<span class="label label-danger">{MESSAGE_COUNT}</span>
|
<span class="badge bg-danger rounded-pill">{MESSAGE_COUNT}</span>
|
@ -1,7 +1,6 @@
|
|||||||
<h2>Inbox</h2>
|
<h2>Inbox</h2>
|
||||||
{PAGINATION}
|
|
||||||
<form action="{ROOT_URL}messages/delete" method="post">
|
<form action="{ROOT_URL}messages/delete" method="post">
|
||||||
<table class="table table-hover">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 20%">From</th>
|
<th style="width: 20%">From</th>
|
||||||
|
8
app/plugins/messages/views/index.html
Normal file
8
app/plugins/messages/views/index.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<div class="context-main context-main-bg col-10 offset-1 my-3 p-3">
|
||||||
|
<div class="my-3 p-3">
|
||||||
|
{message_inbox}
|
||||||
|
</div>
|
||||||
|
<div class="my-3 p-3">
|
||||||
|
{message_outbox}
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,29 +1,24 @@
|
|||||||
<div class="container">
|
<div class="context-main context-main-bg col-8 offset-2 my-3 p-3">
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-md-6 col-lg-6 col-sm-offset-0 col-md-offset-3 col-lg-offset-3 top-pad" >
|
<div class="col-sm-12 col-md-6 col-lg-6 col-sm-offset-0 col-md-offset-3 col-lg-offset-3 top-pad" >
|
||||||
<div class="card panel-primary">
|
<div class="card panel-primary">
|
||||||
{LOOP}
|
{LOOP}
|
||||||
{SINGLE}
|
{SINGLE}
|
||||||
<div class="card-header">
|
<div class="card-header context-main-bg">
|
||||||
<h3 class="card-title">{subject}</h3>
|
<h5 class="card-title context-main">{subject}</h5>
|
||||||
</div>
|
</div>
|
||||||
{/SINGLE}
|
{/SINGLE}
|
||||||
<div class="card-body">
|
<div class="card-body context-second-bg">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 col-lg-3 " align="center">
|
<div class="col-md-3 col-lg-3 text-center">
|
||||||
<a href="{ROOT_URL}home/profile/{userFrom}">{userFrom}</a><br>
|
<a href="{ROOT_URL}home/profile/{userFrom}">{userFrom}</a><br>
|
||||||
<img alt="User Pic" src="{ROOT_URL}{fromAvatar}" class="img-circle img-responsive">
|
<img alt="User Pic" src="{ROOT_URL}{fromAvatar}" class="img-circle img-fluid">
|
||||||
</div>
|
</div>
|
||||||
<div class=" col-md-9 col-lg-9 ">
|
<div class=" col-md-9 col-lg-9 context-main">
|
||||||
<table class="table table-user-information">
|
{message}
|
||||||
<tbody>
|
|
||||||
<td>{message}</td>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer context-main-bg">
|
||||||
{ADMIN}
|
{ADMIN}
|
||||||
{ID}
|
{ID}
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
@ -36,8 +31,7 @@
|
|||||||
<form action="{ROOT_URL}messages/reply" method="post">
|
<form action="{ROOT_URL}messages/reply" method="post">
|
||||||
<input type="hidden" name="token" value="{TOKEN}">
|
<input type="hidden" name="token" value="{TOKEN}">
|
||||||
<input type="hidden" name="messageID" value="{PID}">
|
<input type="hidden" name="messageID" value="{PID}">
|
||||||
<button name="submit" value="reply" type="submit" class="btn btn-sm btn-primary">Reply</button>
|
<button name="submit" value="reply" type="submit" class="btn btn-md btn-primary my-4">Reply</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
@ -1,49 +1,46 @@
|
|||||||
<div class="dropdown nav-item mx-2">
|
<div class="dropdown nav-item mx-2">
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
class="d-block dropdown-toggle nav-link"
|
class="d-flex align-items-center text-white text-decoration-none dropdown-toggle"
|
||||||
id="messagesDropdown"
|
id="messagesDropdown"
|
||||||
data-bs-toggle="dropdown"
|
data-bs-toggle="dropdown"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
<i class="fa fa-fw fa-envelope"></i><span class="ml-3">{MBADGE}</span>
|
<i class="fa fa-fw fa-envelope"></i><span class="">{MBADGE}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu text-small" aria-labelledby="messagesDropdown">
|
<ul class="dropdown-menu dropdown-menu-dark dropdown-menu-end text-small shadow" aria-labelledby="messagesDropdown">
|
||||||
<li class="message-header">
|
|
||||||
<div class="media">
|
|
||||||
<div class="media-body text-center" style="padding-bottom: 10px; padding-top: 10px">
|
|
||||||
{MESSAGE_COUNT} unread message(s) total
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{LOOP}
|
{LOOP}
|
||||||
<li class="message-preview">
|
<!-- Message Item -->
|
||||||
<a href="{ROOT_URL}messages/view/{ID}">
|
<li>
|
||||||
<div class="media">
|
<a href="{ROOT_URL}messages/view/{ID}" class="dropdown-item">
|
||||||
<span class="float-left">
|
<div class="d-flex">
|
||||||
<img class="media-object avatar-round-40" src="{ROOT_URL}{fromAvatar}" alt="">
|
<h5 class="media-heading text-start">
|
||||||
</span>
|
<img class="" style="width: 40px;" src="{ROOT_URL}{fromAvatar}" alt="">
|
||||||
<div class="media-body">
|
<strong>{userFrom}</strong>
|
||||||
<h5 class="media-heading"><strong>{userFrom}</strong>
|
|
||||||
</h5>
|
</h5>
|
||||||
<p class="small text-muted"><i class="fa fa-clock-o"></i> {DTC}{lastReply}{/DTC}</p>
|
<div class="text-end">
|
||||||
{summary}
|
<div class="media-body">
|
||||||
|
<p class="small text-muted mb-1"><i class="fa fa-clock-o me-1"></i> {DTC}{lastReply}{/DTC}</p>
|
||||||
|
<span>{summary}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{/LOOP}
|
{/LOOP}
|
||||||
{ALT}
|
{ALT}
|
||||||
<li class="message-preview">
|
<li class="px-3 text-center">
|
||||||
<div class="media">
|
<strong>No Messages</strong>
|
||||||
<div class="media-body text-center" style="padding-bottom: 10px; padding-top: 10px">
|
|
||||||
<h5 class="media-heading"><strong>No Messages</strong></h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
{/ALT}
|
{/ALT}
|
||||||
<li class="message-footer text-center">
|
<!-- Footer -->
|
||||||
<a href="{ROOT_URL}messages" class="dropdown-item">Read All New Messages</a>
|
<li>
|
||||||
|
<hr class="dropdown-divider">
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/messages" class="dropdown-item text-center">
|
||||||
|
Read All New Messages
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
@ -1,7 +1,6 @@
|
|||||||
<h2>Outbox</h2>
|
<h2>Outbox</h2>
|
||||||
{PAGINATION}
|
|
||||||
<form action="{ROOT_URL}messages/delete" method="post">
|
<form action="{ROOT_URL}messages/delete" method="post">
|
||||||
<table class="table table-hover">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 20%">To</th>
|
<th style="width: 20%">To</th>
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
|
<div class="context-main context-main-bg col-8 offset-2 my-3 p-3">
|
||||||
<form action="" method="post" class="form-horizontal">
|
<form action="" method="post" class="form-horizontal">
|
||||||
<legend>Reply</legend>
|
<legend class="text-center">Reply</legend>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="message" class="col-lg-3 control-label">Message:</label>
|
<div class="col-6 offset-3">
|
||||||
<div class="col-lg-6">
|
<label for="message" class="control-label">Message:</label>
|
||||||
<textarea class="form-control" name="message" maxlength="2000" rows="10" cols="50" id="message"></textarea>
|
<textarea class="form-control" name="message" maxlength="2000" rows="10" cols="50" id="message"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<input type="hidden" name="messageID" value="{messageID}">
|
<input type="hidden" name="messageID" value="{messageID}">
|
||||||
<input type="hidden" name="token" value="{TOKEN}">
|
<input type="hidden" name="token" value="{TOKEN}">
|
||||||
<button name="submit" value="submit" type="submit" class="btn btn-lg btn-primary center-block">Send</button><br>
|
<div class="text-center">
|
||||||
|
<button name="submit" value="submit" type="submit" class="btn btn-lg btn-primary center-block my-3">Send</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
@ -17,6 +17,8 @@ use TheTempusProject\Houdini\Classes\Issues;
|
|||||||
use TheTempusProject\Classes\Controller;
|
use TheTempusProject\Classes\Controller;
|
||||||
use TheTempusProject\Models\Notification as NotificationsModel;
|
use TheTempusProject\Models\Notification as NotificationsModel;
|
||||||
use TheTempusProject\TheTempusProject as App;
|
use TheTempusProject\TheTempusProject as App;
|
||||||
|
use TheTempusProject\Hermes\Functions\Redirect;
|
||||||
|
use TheTempusProject\Bedrock\Functions\Session;
|
||||||
|
|
||||||
class Notifications extends Controller {
|
class Notifications extends Controller {
|
||||||
protected static $notifications;
|
protected static $notifications;
|
||||||
@ -26,6 +28,10 @@ class Notifications extends Controller {
|
|||||||
self::$notifications = new NotificationsModel;
|
self::$notifications = new NotificationsModel;
|
||||||
self::$title = 'Notifications - {SITENAME}';
|
self::$title = 'Notifications - {SITENAME}';
|
||||||
self::$pageDescription = 'Your recent notifications';
|
self::$pageDescription = 'Your recent notifications';
|
||||||
|
if ( ! App::$isLoggedIn ) {
|
||||||
|
Session::flash( 'error', 'You do not have permission to access this page.' );
|
||||||
|
return Redirect::home();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index() {
|
public function index() {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
data-bs-toggle="dropdown"
|
data-bs-toggle="dropdown"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
<i class="fa fa-fw fa-bell"></i><span class="ms-2">{NBADGE}</span>
|
<i class="fa fa-fw fa-bell"></i><span class="">{NBADGE}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-menu-dark dropdown-menu-end text-small shadow" aria-labelledby="notificationsDropdown">
|
<ul class="dropdown-menu dropdown-menu-dark dropdown-menu-end text-small shadow" aria-labelledby="notificationsDropdown">
|
||||||
{LOOP}
|
{LOOP}
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* app/plugins/redirects/plugin.php
|
|
||||||
*
|
|
||||||
* This houses all of the main plugin info and functionality.
|
|
||||||
*
|
|
||||||
* @package TP Redirects
|
|
||||||
* @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\Classes\Navigation;
|
|
||||||
use TheTempusProject\Classes\Plugin;
|
|
||||||
use TheTempusProject\TheTempusProject as App;
|
|
||||||
|
|
||||||
class Redirects extends Plugin {
|
|
||||||
public $pluginName = 'TP Redirects';
|
|
||||||
public $pluginAuthor = 'JoeyK';
|
|
||||||
public $pluginWebsite = 'https://TheTempusProject.com';
|
|
||||||
public $modelVersion = '1.0';
|
|
||||||
public $pluginVersion = '3.0';
|
|
||||||
public $pluginDescription = 'A simple plugin which adds redirects.';
|
|
||||||
public $permissionMatrix = [
|
|
||||||
'redirects' => [
|
|
||||||
'pretty' => 'Can modify redirects',
|
|
||||||
'default' => false,
|
|
||||||
],
|
|
||||||
];
|
|
||||||
public $admin_links = [
|
|
||||||
[
|
|
||||||
'text' => '<i class="fa fa-fw fa-external-link"></i> Redirects',
|
|
||||||
'url' => '{ROOT_URL}admin/routes',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
}
|
|
@ -38,7 +38,9 @@ class Subscribe extends Plugin {
|
|||||||
public function __construct( $load = false ) {
|
public function __construct( $load = false ) {
|
||||||
parent::__construct( $load );
|
parent::__construct( $load );
|
||||||
if ( ! self::$loaded ) {
|
if ( ! self::$loaded ) {
|
||||||
|
if ( $this->checkEnabled() ) {
|
||||||
Components::append( 'FOOTER_RIGHT', Views::simpleView( 'subscribe.footer.right') );
|
Components::append( 'FOOTER_RIGHT', Views::simpleView( 'subscribe.footer.right') );
|
||||||
|
}
|
||||||
self::$loaded = true;
|
self::$loaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ class DefaultLoader extends Loader {
|
|||||||
if ( self::$loaded ) {
|
if ( self::$loaded ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Components::set( 'DARK_MODE_SETTING', '' );
|
||||||
Components::set( 'TEMPLATE_URL', Template::parse( '{ROOT_URL}app/templates/default/' ) );
|
Components::set( 'TEMPLATE_URL', Template::parse( '{ROOT_URL}app/templates/default/' ) );
|
||||||
if ( VENDOR_AUTOLOADED === true ) {
|
if ( VENDOR_AUTOLOADED === true ) {
|
||||||
Components::set( 'FONT_AWESOME_URL', '/vendor/fortawesome/font-awesome/css/' );
|
Components::set( 'FONT_AWESOME_URL', '/vendor/fortawesome/font-awesome/css/' );
|
||||||
@ -54,9 +55,11 @@ class DefaultLoader extends Loader {
|
|||||||
*/
|
*/
|
||||||
if ( App::$isLoggedIn ) {
|
if ( App::$isLoggedIn ) {
|
||||||
if ( ! empty( App::$activePrefs['darkMode'] ) ) {
|
if ( ! empty( App::$activePrefs['darkMode'] ) ) {
|
||||||
|
Components::set( 'DARK_MODE_SETTING', 'true' );
|
||||||
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main.css">' );
|
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main.css">' );
|
||||||
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main-dark.css" id="dark-mode-stylesheet">' );
|
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main-dark.css" id="dark-mode-stylesheet">' );
|
||||||
} else {
|
} else {
|
||||||
|
Components::set( 'DARK_MODE_SETTING', 'false' );
|
||||||
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main.css">' );
|
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main.css">' );
|
||||||
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main-dark.css" id="dark-mode-stylesheet" disabled>' );
|
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main-dark.css" id="dark-mode-stylesheet" disabled>' );
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<div class="d-flex flex-column min-vh-100">
|
<div class="d-flex flex-column min-vh-100">
|
||||||
<div class="flex-container flex-grow-1">
|
<div class="flex-container flex-grow-1">
|
||||||
|
<!-- Issues -->
|
||||||
{ISSUES}
|
{ISSUES}
|
||||||
<div class="container pt-4">
|
<div class="container pt-4">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -64,10 +65,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/ISSUES}
|
{/ISSUES}
|
||||||
|
<!-- Main Page Content -->
|
||||||
{CONTENT}
|
{CONTENT}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Footer -->
|
||||||
{FOOT}
|
{FOOT}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- User Pref to control Dark mode across frontend and backend -->
|
||||||
|
<input type="hidden" name="dark-mode-pref" id="dark-mode-pref" value="{DARK_MODE_SETTING}">
|
||||||
<!-- Bootstrap core JavaScript and jquery -->
|
<!-- Bootstrap core JavaScript and jquery -->
|
||||||
<script crossorigin="anonymous" src="{JQUERY_CDN}jquery.min.js"></script>
|
<script crossorigin="anonymous" src="{JQUERY_CDN}jquery.min.js"></script>
|
||||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
|
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
|
||||||
|
@ -1 +1 @@
|
|||||||
<span>© 2024 {SITENAME}, Powered by <a href="https://thetempusproject.com" class="text-decoration-none">The Tempus Project</a>.</span>
|
<span>© 2025 {SITENAME}, Powered by <a href="https://thetempusproject.com" class="text-decoration-none">The Tempus Project</a>.</span>
|
@ -29,6 +29,14 @@
|
|||||||
available on this site. If anything here peaks your interest, or you just want to talk more about a project, feel free to contact me here and I should respond relatively quickly.
|
available on this site. If anything here peaks your interest, or you just want to talk more about a project, feel free to contact me here and I should respond relatively quickly.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<button class="carousel-control-prev" type="button" data-bs-target="#myCarousel" data-bs-slide="prev">
|
||||||
|
<span class="carousel-control-prev-icon text-dark" aria-hidden="true"></span>
|
||||||
|
<span class="visually-hidden">Previous</span>
|
||||||
|
</button>
|
||||||
|
<button class="carousel-control-next" type="button" data-bs-target="#myCarousel" data-bs-slide="next">
|
||||||
|
<span class="carousel-control-next-icon text-dark" aria-hidden="true"></span>
|
||||||
|
<span class="visually-hidden">Next</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -20,11 +20,11 @@
|
|||||||
</p>
|
</p>
|
||||||
<!-- Call-to-Action Buttons -->
|
<!-- Call-to-Action Buttons -->
|
||||||
<div class="d-flex justify-content-center gap-3 mt-4">
|
<div class="d-flex justify-content-center gap-3 mt-4">
|
||||||
<a href="/login" class="btn btn-success btn-lg">
|
<a href="/home/login" class="btn btn-success btn-lg">
|
||||||
<i class="fa fa-sign-in-alt me-2"></i> Log In
|
<i class="fa fa-sign-in-alt me-2"></i> Log In
|
||||||
</a>
|
</a>
|
||||||
<a href="/dashboard" class="btn btn-outline-success btn-lg">
|
<a href="/home/index" class="btn btn-outline-success btn-lg">
|
||||||
<i class="fa fa-cogs me-2"></i> Go to Dashboard
|
<i class="fa fa-cogs me-2"></i> Go to Homepage
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
<div class="context-main-bg my-3 pb-3 rounded col-10 offset-1">
|
||||||
{installer-nav}
|
{installer-nav}
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<legend class="my-3 text-center">Configure</legend>
|
<legend class="my-3 text-center">Configure</legend>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
<div class="context-main-bg my-3 pb-3 rounded col-10 offset-1">
|
||||||
{installer-nav}
|
{installer-nav}
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<p class="my-4">All models are required for proper installation of The Tempus Project. In this step, we will add the database tables required for these models. In the next step, you'll be able to select which plugins you would like installed.</p>
|
<p class="my-4">All models are required for proper installation of The Tempus Project. In this step, we will add the database tables required for these models. In the next step, you'll be able to select which plugins you would like installed.</p>
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<ul class="nav nav-tabs justify-content-center mt-4" role="tablist">
|
<div class="nav nav-tabs justify-content-center pt-3 col-10 offset-1" id="nav-tab" role="tablist">
|
||||||
<li class="nav-item context-main-bg mx-1 {menu-Welcome}"><a href="#" class="nav-link context-main">Welcome</a></li>
|
<button class="nav-link {menu-Welcome}" type="button" role="tab">Welcome</button>
|
||||||
<li class="nav-item context-main-bg mx-1 {menu-Terms}"><a href="#" class="nav-link context-main">Terms</a></li>
|
<button class="nav-link {menu-Terms}" type="button" role="tab">Terms</button>
|
||||||
<li class="nav-item context-main-bg mx-1 {menu-Verify}"><a href="#" class="nav-link context-main">Verify</a></li>
|
<button class="nav-link {menu-Verify}" type="button" role="tab">Verify</button>
|
||||||
<li class="nav-item context-main-bg mx-1 {menu-Configure}"><a href="#" class="nav-link context-main">Configure</a></li>
|
<button class="nav-link {menu-Configure}" type="button" role="tab">Configure</button>
|
||||||
<li class="nav-item context-main-bg mx-1 {menu-Routing}"><a href="#" class="nav-link context-main">Routing</a></li>
|
<button class="nav-link {menu-Routing}" type="button" role="tab">Routing</button>
|
||||||
<li class="nav-item context-main-bg mx-1 {menu-Models}"><a href="#" class="nav-link context-main">Models</a></li>
|
<button class="nav-link {menu-Models}" type="button" role="tab">Models</button>
|
||||||
<li class="nav-item context-main-bg mx-1 {menu-Plugins}"><a href="#" class="nav-link context-main">Plugins</a></li>
|
<button class="nav-link {menu-Plugins}" type="button" role="tab">Plugins</button>
|
||||||
<li class="nav-item context-main-bg mx-1 {menu-Resources}"><a href="#" class="nav-link context-main">Resources</a></li>
|
<button class="nav-link {menu-Resources}" type="button" role="tab">Resources</button>
|
||||||
<li class="nav-item context-main-bg mx-1 {menu-User}"><a href="#" class="nav-link context-main">User</a></li>
|
<button class="nav-link {menu-User}" type="button" role="tab">User</button>
|
||||||
<li class="nav-item context-main-bg mx-1 {menu-Complete}"><a href="#" class="nav-link context-main">Complete</a></li>
|
<button class="nav-link {menu-Complete}" type="button" role="tab">Complete</button>
|
||||||
</ul>
|
</div>
|
@ -1,5 +1,5 @@
|
|||||||
|
<div class="context-main-bg my-3 pb-3 rounded col-10 offset-1">
|
||||||
{installer-nav}
|
{installer-nav}
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<p class="my-4">
|
<p class="my-4">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
<div class="context-main-bg my-3 pb-3 rounded col-10 offset-1">
|
||||||
{installer-nav}
|
{installer-nav}
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<p class="my-4">
|
<p class="my-4">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
<div class="context-main-bg my-3 pb-3 rounded col-10 offset-1">
|
||||||
{installer-nav}
|
{installer-nav}
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<p class="mt-4">The Tempus Project uses rewrites in htaccess files (Apache), or location directives (Nginx), to automatically route all incoming traffic through the app. In this step, we will help set-up and then test that the required configurations have been made.</p>
|
<p class="mt-4">The Tempus Project uses rewrites in htaccess files (Apache), or location directives (Nginx), to automatically route all incoming traffic through the app. In this step, we will help set-up and then test that the required configurations have been made.</p>
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-10 text-center">
|
|
||||||
{installer-nav}
|
|
||||||
<h1 class="mt-4">Welcome to The Tempus Project Installer.</h1>
|
|
||||||
<p>This installer will guide you through the process of installing and configuring The Tempus Project. Do not forget to delete this file once you have completed installation.</p>
|
|
||||||
<form action="" method="post">
|
|
||||||
<input type="hidden" name="token" value="{TOKEN}">
|
|
||||||
<button class="btn btn-lg btn-primary center-block" type="submit" name="submit" id="submit" value="submit">Begin Installation</button><br>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,7 +1,7 @@
|
|||||||
|
<div class="context-main-bg my-3 pb-3 rounded col-10 offset-1">
|
||||||
{installer-nav}
|
{installer-nav}
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-10">
|
<div class="col-10">
|
||||||
<div class="install-terms col-lg-8 mx-auto mt-4">
|
<div class="install-terms col-lg-8 mx-auto mt-4">
|
||||||
{TERMS}
|
{TERMS}
|
||||||
</div>
|
</div>
|
@ -1,5 +1,5 @@
|
|||||||
|
<div class="context-main-bg my-3 pb-3 rounded col-10 offset-1">
|
||||||
{installer-nav}
|
{installer-nav}
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-10 pt-4">
|
<div class="col-md-10 pt-4">
|
||||||
<form action="" method="post" class="form-horizontal">
|
<form action="" method="post" class="form-horizontal">
|
@ -1,5 +1,5 @@
|
|||||||
|
<div class="context-main-bg my-3 pb-3 rounded col-10 offset-1">
|
||||||
{installer-nav}
|
{installer-nav}
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<h2 class="mt-4">Requirements</h2>
|
<h2 class="mt-4">Requirements</h2>
|
17
app/views/install/welcome.html
Normal file
17
app/views/install/welcome.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<div class="container">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-10 text-center">
|
||||||
|
<div class="context-main-bg my-3 pb-3 rounded">
|
||||||
|
{installer-nav}
|
||||||
|
<h1 class="mt-4">Welcome to The Tempus Project Installer.</h1>
|
||||||
|
<p>
|
||||||
|
This installer will guide you through the process of installing and configuring The Tempus Project. Do not forget to delete this file once you have completed installation.
|
||||||
|
</p>
|
||||||
|
<form action="" method="post">
|
||||||
|
<input type="hidden" name="token" value="{TOKEN}">
|
||||||
|
<button class="btn btn-lg btn-primary center-block" type="submit" name="submit" id="submit" value="submit">Begin Installation</button><br>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
23
app/views/start.html
Normal file
23
app/views/start.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
|
||||||
|
<h2 class="text-center mb-4">Getting Started with {SITENAME}</h2>
|
||||||
|
<p class="lead">
|
||||||
|
{SITENAME} has been open source for many years now. The hopes and intentions for it were always to give others a leg-up to get started building web-apps like i wish i had as a kid.
|
||||||
|
There were so many tutorials and ideas, expansions and plans for the project.
|
||||||
|
Unfortunately no person is given unlimited time to accomplish their dreams and over the years the idea for a huge repository for learning and education has taken a back seat.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
At this time, the best recommendation available is to contact us for more information.
|
||||||
|
The site here is actively maintained so feel free to utilize any of our available resources for contact.
|
||||||
|
In addition to the site here, you can contact the lead developer (me) directly through <a href="https://joeykimsey.com">JoeyKimsey.com</a>.
|
||||||
|
</p>
|
||||||
|
<p class="text-muted">
|
||||||
|
Right now, this entire system was built and managed by myself. As stated, I have used my own version of this for years, but translating it to a publicly available product is not a 1-to-1 job. There may be bugs or issues encountered while you use the product. I can't guarantee a fix for every need in every case immediately, but I do actively keep track of bugs and work hard to ensure everyone has a great experience using the app.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
If you encounter any bugs, feel free to report them <a href="/bugreport" class="text-decoration-none">here</a>. Likewise, there are forms for feedback, reviews, suggestions, and a general contact form. Thanks for taking the time to check out the product!
|
||||||
|
</p>
|
||||||
|
<div class="text-center mt-4 pb-4">
|
||||||
|
{loggedin}<a href="/bugreport" class="btn btn-primary btn-lg px-5">Report a Bug</a>{/loggedin}
|
||||||
|
<a href="/contact" class="btn btn-outline-secondary btn-lg px-5 ms-3">Contact Us</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -22,9 +22,9 @@
|
|||||||
{
|
{
|
||||||
"components/jquery": "1.9.*",
|
"components/jquery": "1.9.*",
|
||||||
"fortawesome/font-awesome": "4.7",
|
"fortawesome/font-awesome": "4.7",
|
||||||
"thetempusproject/bedrock": "1.0.10",
|
"thetempusproject/bedrock": "1.1",
|
||||||
"thetempusproject/canary": "1.0.5",
|
"thetempusproject/canary": "1.0.6",
|
||||||
"thetempusproject/houdini": "1.0.8",
|
"thetempusproject/houdini": "2.0.1",
|
||||||
"twbs/bootstrap": "5.2.3"
|
"twbs/bootstrap": "5.2.3"
|
||||||
},
|
},
|
||||||
"autoload":
|
"autoload":
|
||||||
|
44
composer.lock
generated
44
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "60848437b2d65e726d854a96b9afcf22",
|
"content-hash": "7b53f62bdce4655bce03a69a5e6ae57a",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "components/jquery",
|
"name": "components/jquery",
|
||||||
@ -26,14 +26,14 @@
|
|||||||
"type": "component",
|
"type": "component",
|
||||||
"extra": {
|
"extra": {
|
||||||
"component": {
|
"component": {
|
||||||
"scripts": [
|
|
||||||
"jquery.js"
|
|
||||||
],
|
|
||||||
"files": [
|
"files": [
|
||||||
"jquery.min.js",
|
"jquery.min.js",
|
||||||
"jquery-migrate.js",
|
"jquery-migrate.js",
|
||||||
"jquery-migrate.min.js",
|
"jquery-migrate.min.js",
|
||||||
"jquery.min.map"
|
"jquery.min.map"
|
||||||
|
],
|
||||||
|
"scripts": [
|
||||||
|
"jquery.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -303,17 +303,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "thetempusproject/bedrock",
|
"name": "thetempusproject/bedrock",
|
||||||
"version": "1.0.10",
|
"version": "1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.thetempusproject.com/the-tempus-project/bedrock",
|
"url": "https://git.thetempusproject.com/the-tempus-project/bedrock",
|
||||||
"reference": "42ade08306525488f2449a2f4e3e05569eee9822"
|
"reference": "3b8e0994912eef8c203c8d47258754d6c78d4b19"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.1.0",
|
"php": ">=8.1.0",
|
||||||
"thetempusproject/canary": ">=1.0",
|
"thetempusproject/canary": "1.0.6",
|
||||||
"thetempusproject/hermes": ">=1.0",
|
"thetempusproject/hermes": "1.0.3",
|
||||||
"thetempusproject/houdini": ">=1.0"
|
"thetempusproject/houdini": "2.0.1"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -344,15 +344,15 @@
|
|||||||
"framework",
|
"framework",
|
||||||
"mvc"
|
"mvc"
|
||||||
],
|
],
|
||||||
"time": "2024-08-21T10:12:54+00:00"
|
"time": "2025-01-22T02:02:57+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "thetempusproject/canary",
|
"name": "thetempusproject/canary",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.thetempusproject.com/the-tempus-project/canary",
|
"url": "https://git.thetempusproject.com/the-tempus-project/canary",
|
||||||
"reference": "35415fbf3c5888ccdb8a8695989176a120026c7f"
|
"reference": "44b2ad688cff933964ec2ff50b408d94c7f51e40"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.1.0"
|
"php": ">=8.1.0"
|
||||||
@ -387,15 +387,15 @@
|
|||||||
"thetempusproject",
|
"thetempusproject",
|
||||||
"tools"
|
"tools"
|
||||||
],
|
],
|
||||||
"time": "2024-08-20T10:26:09+00:00"
|
"time": "2025-01-22T01:39:34+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "thetempusproject/hermes",
|
"name": "thetempusproject/hermes",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.thetempusproject.com/the-tempus-project/hermes",
|
"url": "https://git.thetempusproject.com/the-tempus-project/hermes",
|
||||||
"reference": "31c51c1a5bad2871df800c89f27ace0a49848583"
|
"reference": "4b4e06a98f0f01695bda18de240bb3294d096ef4"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.1.0"
|
"php": ">=8.1.0"
|
||||||
@ -430,20 +430,20 @@
|
|||||||
"thetempusproject",
|
"thetempusproject",
|
||||||
"tools"
|
"tools"
|
||||||
],
|
],
|
||||||
"time": "2024-08-20T10:26:47+00:00"
|
"time": "2025-01-22T01:43:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "thetempusproject/houdini",
|
"name": "thetempusproject/houdini",
|
||||||
"version": "1.0.8",
|
"version": "2.0.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.thetempusproject.com/the-tempus-project/houdini",
|
"url": "https://git.thetempusproject.com/the-tempus-project/houdini",
|
||||||
"reference": "d9e61d3f8f5d10f3fa7ba31907a4b3c1edc76614"
|
"reference": "b03fc3b7ddcdd0213f8f927a9bf1c0c68c62138f"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.1.0",
|
"php": ">=8.1.0",
|
||||||
"thetempusproject/canary": ">=1.0",
|
"thetempusproject/canary": "1.0.6",
|
||||||
"thetempusproject/hermes": ">=1.0"
|
"thetempusproject/hermes": "1.0.3"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -474,7 +474,7 @@
|
|||||||
"thetempusproject",
|
"thetempusproject",
|
||||||
"tools"
|
"tools"
|
||||||
],
|
],
|
||||||
"time": "2024-08-20T10:30:48+00:00"
|
"time": "2025-01-22T01:59:01+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twbs/bootstrap",
|
"name": "twbs/bootstrap",
|
||||||
@ -535,5 +535,5 @@
|
|||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": [],
|
"platform": [],
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.6.0"
|
"plugin-api-version": "2.3.0"
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ class Install extends Controller {
|
|||||||
if ( Input::exists( 'submit' ) ) {
|
if ( Input::exists( 'submit' ) ) {
|
||||||
Issues::add( 'error', ['There was an error with the Installation.' => Check::userErrors()] );
|
Issues::add( 'error', ['There was an error with the Installation.' => Check::userErrors()] );
|
||||||
}
|
}
|
||||||
Views::view( 'install.start' );
|
Views::view( 'install.welcome' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -171,7 +171,7 @@ class Install extends Controller {
|
|||||||
Issues::add( 'error', [ 'There was an error with the Installation.' => Check::userErrors() ] );
|
Issues::add( 'error', [ 'There was an error with the Installation.' => Check::userErrors() ] );
|
||||||
}
|
}
|
||||||
Components::set( 'TERMS', Views::simpleView( 'terms' ) );
|
Components::set( 'TERMS', Views::simpleView( 'terms' ) );
|
||||||
Views::view( 'install.agreement' );
|
Views::view( 'install.terms' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -185,7 +185,7 @@ class Install extends Controller {
|
|||||||
if ( Input::exists( 'submit' ) ) {
|
if ( Input::exists( 'submit' ) ) {
|
||||||
Issues::add( 'error', ['There was an error with the Installation.' => array_merge( Check::userErrors(), Check::systemErrors() )] );
|
Issues::add( 'error', ['There was an error with the Installation.' => array_merge( Check::userErrors(), Check::systemErrors() )] );
|
||||||
}
|
}
|
||||||
Views::view( 'install.check' );
|
Views::view( 'install.verify' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -380,7 +380,7 @@ class Install extends Controller {
|
|||||||
} elseif ( Input::exists( 'submit' ) ) {
|
} elseif ( Input::exists( 'submit' ) ) {
|
||||||
Issues::add( 'error', ['There was an error with your form.' => Check::userErrors()] );
|
Issues::add( 'error', ['There was an error with your form.' => Check::userErrors()] );
|
||||||
}
|
}
|
||||||
Views::view( 'install.adminUser' );
|
Views::view( 'install.user' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user