Compare commits

..

5 Commits
4.0.2 ... 4.0.4

Author SHA1 Message Date
ca850bb46b UI fixes and composer bump 2025-01-27 00:26:43 -05:00
35b7be92a6 bugfixes and small features
Fixed config switches not registering the correct current value
Added better ux when image uploads are disabled
Fixed an issue where uploaded files were not being handled correctly
Added the ability to disable user registrations
Fixed some variables being unintendedly protected
2025-01-26 15:13:34 -05:00
d4751696f3 sendmail bugfix 2025-01-23 22:39:11 -05:00
fa12dd20ba add redirect link to admin 2025-01-23 22:25:33 -05:00
41a6aed209 route bugfix 2025-01-23 22:22:08 -05:00
33 changed files with 229 additions and 98 deletions

View File

@ -35,7 +35,7 @@ class Config extends BedrockConfig {
case 'radio': case 'radio':
case 'bool': case 'bool':
case 'boolean': case 'boolean':
$fieldHtml = Forms::getSwitchHtml( $fieldname, [ 'true', 'false' ], $node['value'] ); $fieldHtml = Forms::getSwitchHtml( $fieldname, $node['value'] );
break; break;
case 'select': case 'select':
$fieldHtml = Forms::getSelectHtml( $fieldname, $options, $node['value'] ); $fieldHtml = Forms::getSelectHtml( $fieldname, $options, $node['value'] );

View File

@ -19,6 +19,7 @@ use TheTempusProject\Bedrock\Functions\Check;
use TheTempusProject\Bedrock\Functions\Upload; use TheTempusProject\Bedrock\Functions\Upload;
use TheTempusProject\Bedrock\Functions\Input; use TheTempusProject\Bedrock\Functions\Input;
use TheTempusProject\TheTempusProject as App; use TheTempusProject\TheTempusProject as App;
use TheTempusProject\Bedrock\Classes\Config;
class Preferences { class Preferences {
public static $preferences = false; public static $preferences = false;
@ -208,6 +209,15 @@ class Preferences {
if ( $tempPrefsArray['type'] == 'checkbox' ) { if ( $tempPrefsArray['type'] == 'checkbox' ) {
$tempPrefsArray['type'] = 'switch'; $tempPrefsArray['type'] = 'switch';
} }
if ( 'file' === $tempPrefsArray['type'] ) {
// dv( Config::getValue( 'uploads/images' ) );
if ( ! Config::getValue( 'uploads/images' ) ) {
Debug::info( 'Preference hidden because uploads are disabled.' );
continue;
}
}
$inputTypes[ $tempPrefsArray['type'] ][] = self::getFormFieldHtml( $name, $tempPrefsArray['pretty'], $tempPrefsArray['type'], $tempPrefsArray['value'], $tempPrefsArray['options'] ); $inputTypes[ $tempPrefsArray['type'] ][] = self::getFormFieldHtml( $name, $tempPrefsArray['pretty'], $tempPrefsArray['type'], $tempPrefsArray['value'], $tempPrefsArray['options'] );
} }
foreach ( $inputTypes as $skip => $items ) { foreach ( $inputTypes as $skip => $items ) {
@ -295,6 +305,7 @@ class Preferences {
$prefsArray[$name] = $route . Upload::last(); $prefsArray[$name] = $route . Upload::last();
} else { } else {
Issues::add( 'error', [ 'There was an error with your upload.' => Check::userErrors() ] ); Issues::add( 'error', [ 'There was an error with your upload.' => Check::userErrors() ] );
unset( $prefsArray[$name] );
} }
} }
} }

View File

@ -17,8 +17,10 @@ use TheTempusProject\Classes\AdminController;
use TheTempusProject\Models\User; use TheTempusProject\Models\User;
use TheTempusProject\Models\Comments; use TheTempusProject\Models\Comments;
use TheTempusProject\Models\Posts; use TheTempusProject\Models\Posts;
use TheTempusProject\Models\Contact;
use TheTempusProject\Plugins\Comments as CommentPlugin; use TheTempusProject\Plugins\Comments as CommentPlugin;
use TheTempusProject\Plugins\Blog as BlogPlugin; use TheTempusProject\Plugins\Blog as BlogPlugin;
use TheTempusProject\Plugins\Contact as ContactPlugin;
use TheTempusProject\Canary\Bin\Canary as Debug; use TheTempusProject\Canary\Bin\Canary as Debug;
class Home extends AdminController { class Home extends AdminController {
@ -58,6 +60,19 @@ class Home extends AdminController {
} }
} }
if ( class_exists( 'TheTempusProject\Plugins\Contact' ) ) {
$plugin = new ContactPlugin;
if ( ! $plugin->checkEnabled() ) {
Debug::info( 'Contact Plugin is disabled in the control panel.' );
Components::set( 'contactDash', '' );
} else {
$posts = new Contact;
$postsList = Views::simpleView( 'contact.admin.dashboard', $posts->listPaginated( 5 ) );
Components::set( 'contactDash', $postsList );
}
}
self::$user = new User; self::$user = new User;
$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 );

View File

@ -36,7 +36,7 @@ class Routes extends AdminController {
} }
public function create() { public function create() {
if ( Input::exists( 'redirect_type' ) ) { if ( ! Input::exists( 'redirect_type' ) ) {
return Views::view( 'admin.routes.create' ); return Views::view( 'admin.routes.create' );
} }

View File

@ -18,6 +18,7 @@ use TheTempusProject\Houdini\Classes\Issues;
use TheTempusProject\Houdini\Classes\Views; use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\Models\User; use TheTempusProject\Models\User;
use TheTempusProject\Models\Subscribe; use TheTempusProject\Models\Subscribe;
use TheTempusProject\Plugins\Subscribe as Plugin;
class SendMail extends AdminController { class SendMail extends AdminController {
public static $user; public static $user;
@ -27,10 +28,24 @@ class SendMail extends AdminController {
parent::__construct(); parent::__construct();
self::$title = 'Admin - Send Mail'; self::$title = 'Admin - Send Mail';
self::$user = new User; self::$user = new User;
if ( class_exists( 'TheTempusProject\Plugins\Subscribe' ) ) {
$plugin = new Plugin;
if ( ! $plugin->checkEnabled() ) {
Issues::add( 'notice', 'Subscriptions are disabled so those feature will be unavailable.' );
} else {
self::$subscribe = new Subscribe; self::$subscribe = new Subscribe;
} }
} else {
Issues::add( 'notice', 'Subscriptions plugin is not installed so those feature will be unavailable.' );
}
}
private function emailSubscribers( $params ) { private function emailSubscribers( $params ) {
if ( empty( self::$subscribe ) ) {
Issues::add( 'error', 'Subscriptions plugin is unavailable' );
return;
}
$list = self::$subscribe->list(); $list = self::$subscribe->list();
if ( empty( $list ) ) { if ( empty( $list ) ) {
Issues::add( 'error', 'No subscribers found' ); Issues::add( 'error', 'No subscribers found' );

View File

@ -24,6 +24,7 @@ use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\TheTempusProject as App; use TheTempusProject\TheTempusProject as App;
use TheTempusProject\Classes\Controller; use TheTempusProject\Classes\Controller;
use TheTempusProject\Classes\Forms; use TheTempusProject\Classes\Forms;
use TheTempusProject\Bedrock\Classes\Config;
class Register extends Controller { class Register extends Controller {
public function confirm( $code = null ) { public function confirm( $code = null ) {
@ -46,6 +47,11 @@ class Register extends Controller {
public function index() { public function index() {
self::$title = '{SITENAME} Sign Up'; self::$title = '{SITENAME} Sign Up';
self::$pageDescription = 'Many features of {SITENAME} are disabled or hidden from unregistered users. On this page you can sign up for an account to access all the app has to offer.'; self::$pageDescription = 'Many features of {SITENAME} are disabled or hidden from unregistered users. On this page you can sign up for an account to access all the app has to offer.';
if ( ! Config::getValue( 'main/registrationEnabled' ) ) {
return Issues::add( 'notice', 'The site administrator has disable the ability to register a new account.' );
}
Components::set( 'TERMS', Views::simpleView( 'terms' ) ); Components::set( 'TERMS', Views::simpleView( 'terms' ) );
if ( App::$isLoggedIn ) { if ( App::$isLoggedIn ) {
return Issues::add( 'notice', 'You are currently logged in.' ); return Issues::add( 'notice', 'You are currently logged in.' );

View File

@ -101,15 +101,17 @@ class Usercp extends Controller {
$menu = Views::simpleView( 'nav.usercp', App::$userCPlinks ); $menu = Views::simpleView( 'nav.usercp', App::$userCPlinks );
Navigation::activePageSelect( $menu, null, true, true ); Navigation::activePageSelect( $menu, null, true, true );
$prefs = new Preferences; $prefs = new Preferences;
$fields = App::$activePrefs; $userPrefs = App::$activePrefs;
if ( Input::exists( 'submit' ) ) { if ( Input::exists( 'submit' ) ) {
$fields = $prefs->convertFormToArray( true, false ); $fields = $prefs->convertFormToArray( true, false );
// @TODO now i may need to rework the form checker to work with this....
// if (!Forms::check('userPrefs')) {
// Issues::add( 'error', [ 'There was an error with your request.' => Check::userErrors() ] );
// }
self::$user->updatePrefs( $fields, App::$activeUser->ID ); self::$user->updatePrefs( $fields, App::$activeUser->ID );
Issues::add( 'success', 'Your preferences have been updated.' ); Issues::add( 'success', 'Your preferences have been updated.' );
// if the image upload fails, need to fall back on original
if ( empty( $fields['avatar'] ) ) {
$fields['avatar'] = $userPrefs['avatar'];
}
} else {
$fields = $userPrefs;
} }
Components::set( 'AVATAR_SETTINGS', $fields['avatar'] ); Components::set( 'AVATAR_SETTINGS', $fields['avatar'] );
Components::set( 'PREFERENCES_FORM', $prefs->getFormHtml( $fields ) ); Components::set( 'PREFERENCES_FORM', $prefs->getFormHtml( $fields ) );

View File

@ -28,6 +28,10 @@
background-color: #2c2c2c; background-color: #2c2c2c;
} }
hr {
color: #f5f5f5;
}
.bg-none,.bg-warning { .bg-none,.bg-warning {
color: #000 !important; color: #000 !important;
@ -145,6 +149,7 @@ body {
background-color: #1f1f1f; background-color: #1f1f1f;
color: #e0e0e0; color: #e0e0e0;
} }
.form-control:focus { .form-control:focus {
color: #e0e0e0; color: #e0e0e0;
border-color: #1e90ff; border-color: #1e90ff;

View File

@ -13,6 +13,13 @@
background-color: #eaeaea; background-color: #eaeaea;
} }
.nav-link.active {
font-weight: bold; /* Make the text bold */
}
hr {
color: #000;
}
.context-main-bg { .context-main-bg {
background-color: #f7f7f7; background-color: #f7f7f7;
@ -57,7 +64,7 @@
bottom: 2.5px; bottom: 2.5px;
left: 5px; left: 5px;
transition: transform 0.3s ease-in-out; transition: transform 0.3s ease-in-out;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); box-shadow: 0 2px 4px #00000033;
} }
/* Change background color when checked */ /* Change background color when checked */

View File

@ -168,9 +168,11 @@ class Posts extends DatabaseModel {
$draft = ' <b>Draft</b>'; $draft = ' <b>Draft</b>';
} }
$instance->isDraft = $draft; $instance->isDraft = $draft;
$instance->authorName = $authorName; $instance->authorName = \ucfirst( $authorName );
if ( self::$comments !== false ) { if ( self::$comments !== false ) {
$instance->commentCount = self::$comments->count( 'blog', $instance->ID ); $instance->commentCount = self::$comments->count( 'blog', $instance->ID );
} else {
$instance->commentCount = 0;
} }
$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 );

View File

@ -21,7 +21,7 @@
<tbody> <tbody>
{LOOP} {LOOP}
<tr> <tr>
<td><a href="{ROOT_URL}admin/blog/view/{ID}">{title}</a>{isDraft}</td> <td><a href="{ROOT_URL}admin/blog/view/{ID}" class="text-decoration-none">{title}</a>{isDraft}</td>
<td>{authorName}</td> <td>{authorName}</td>
<td>{commentCount}</td> <td>{commentCount}</td>
<td>{DTC}{created}{/DTC}</td> <td>{DTC}{created}{/DTC}</td>

View File

@ -1,7 +1,7 @@
{LOOP} {LOOP}
<article class="blog-post"> <article class="blog-post">
<h2 class="blog-post-title mb-1">{title}</h2> <h2 class="blog-post-title mb-1">{title}</h2>
<p class="blog-post-meta">{DTC date}{created}{/DTC} by <a href="{ROOT_URL}home/profile/{author}" class="text-decoration-none">{authorName}</a></p> <p class="blog-post-meta">{DTC date}{created}{/DTC} by <a href="{ROOT_URL}home/profile/{authorName}" class="text-decoration-none">{authorName}</a></p>
<div class="well"> <div class="well">
{contentSummary} {contentSummary}
</div> </div>

View File

@ -3,7 +3,7 @@
<div class="blog-post"> <div class="blog-post">
<h2 class="blog-post-title">{title}</h2> <h2 class="blog-post-title">{title}</h2>
<hr> <hr>
<p class="blog-post-meta">{DTC date}{created}{/DTC} by <a href="{ROOT_URL}home/profile/{author}" class="text-decoration-none">{authorName}</a></p> <p class="blog-post-meta">{DTC date}{created}{/DTC} by <a href="{ROOT_URL}home/profile/{authorName}" class="text-decoration-none">{authorName}</a></p>
{content} {content}
{ADMIN} {ADMIN}
<hr> <hr>

View File

@ -1,11 +1,15 @@
<div class="p-4"> <div class="card context-main-bg">
<h4 class="fst-italic">Archives</h4> <div class="card-header">
<ul class="list-unstyled mb-0"> <h3 class="card-title">Archives</h3>
</div>
<div class="card-body">
<ol class="list-unstyled">
{LOOP} {LOOP}
<li>({count}) <a href="{ROOT_URL}blog/month/{month}/{year}" class="text-decoration-none">{monthText} {year}</a></li> <li>({count}) <a href="{ROOT_URL}blog/month/{month}/{year}" class="text-decoration-none">{monthText} {year}</a></li>
{/LOOP} {/LOOP}
{ALT} {ALT}
<li>None To Show</li> <li>None To Show</li>
{/ALT} {/ALT}
</ul> </ol>
</div>
</div> </div>

View File

@ -0,0 +1,29 @@
<table class="table context-main">
<thead>
<tr>
<th style="width: 5%"></th>
<th style="width: 25%"></th>
<th style="width: 55%"></th>
<th style="width: 5%"></th>
<th style="width: 5%"></th>
</tr>
</thead>
<tbody>
{LOOP}
<tr>
<td>{ID}</td>
<td>{DTC}{time}{/DTC}</td>
<td>{feedback}</td>
<td><a href="{ROOT_URL}admin/contact/view/{ID}" class="btn btn-sm btn-primary"><i class="fa fa-fw fa-upload"></i></a></td>
<td><a href="{ROOT_URL}admin/contact/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
</tr>
{/LOOP}
{ALT}
<tr>
<td class="text-center" colspan="5">
No Contact forms to show.
</td>
</tr>
{/ALT}
</tbody>
</table>

View File

@ -34,14 +34,16 @@ class AdminLoader extends DefaultLoader {
} }
$links[$key]->url = '#' . $name . 'Dropdown'; $links[$key]->url = '#' . $name . 'Dropdown';
$links[$key]->text = '<span>' . $link->text . '</span><i class="fa fa-fw fa-caret-down ms-2"></i>'; $links[$key]->text = '<span>' . $link->text . '</span><i class="fa fa-fw fa-caret-down ms-2"></i>';
$links[$key]->duuuuuuuh = Views::simpleView( 'nav.adminSub', $out ); $links[$key]->subnav = Views::simpleView( 'nav.adminSub', $out );
} else { } else {
$links[$key]->linkClasses = 'nav-link'; $links[$key]->linkClasses = 'nav-link';
$links[$key]->linkAttributes = ''; $links[$key]->linkAttributes = '';
$links[$key]->duuuuuuuh = ''; $links[$key]->subnav = '';
} }
} }
Components::set( 'ADMIN_LINKS', Views::simpleView( 'nav.admin', $links ) ); $menu = Views::simpleView( 'nav.admin', $links );
$activeMenu = Navigation::activePageSelect( $menu, Input::get( 'url' ), false, true );
Components::set( 'ADMIN_LINKS', $activeMenu );
Navigation::setCrumbComponent( 'ADMIN_BREADCRUMBS', Input::get( 'url' ) ); Navigation::setCrumbComponent( 'ADMIN_BREADCRUMBS', Input::get( 'url' ) );
} }
} }

View File

@ -73,7 +73,9 @@ class DefaultLoader extends Loader {
$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>' );
} }
Components::set( 'topNavRight', Template::parse( App::$topNavRight . '{STATUS}' ) ); Components::set( 'topNavRight', Template::parse( App::$topNavRight . '{STATUS}' ) );
Components::set( 'topNavLeft', Views::simpleView( 'nav.main', Navigation::getMenuLinks( App::MAIN_MENU_NAME ) ) ); $menu = Views::simpleView( 'nav.main', Navigation::getMenuLinks( App::MAIN_MENU_NAME ) );
$activeMenu = Navigation::activePageSelect( $menu, Input::get( 'url' ), false, true );
Components::set( 'topNavLeft', $activeMenu );
Components::set( 'colorSelect', Views::simpleView( 'forms.colorSelect' ) ); Components::set( 'colorSelect', Views::simpleView( 'forms.colorSelect' ) );
Components::set( 'iconSelect', Views::simpleView( 'forms.iconSelect' ) ); Components::set( 'iconSelect', Views::simpleView( 'forms.iconSelect' ) );
Navigation::setCrumbComponent( 'BREADCRUMB', Input::get( 'url' ) ); Navigation::setCrumbComponent( 'BREADCRUMB', Input::get( 'url' ) );

View File

@ -8,6 +8,11 @@
{commentDash} {commentDash}
</div> </div>
</div> </div>
<div class="row">
<div class="col-10 offset-1">
{contactDash}
</div>
</div>
<div class="row"> <div class="row">
<div class="col-10 offset-1"> <div class="col-10 offset-1">
{blogDash} {blogDash}

View File

@ -18,8 +18,8 @@
<tbody> <tbody>
{LOOP} {LOOP}
<tr> <tr>
<td><a href="{ROOT_URL}admin/groups/view/{ID}">{name}</a></td> <td><a href="{ROOT_URL}admin/groups/view/{ID}" class="text-decoration-none">{name}</a></td>
<td><a href="{ROOT_URL}admin/groups/listmembers/{ID}">{userCount}</a></td> <td><a href="{ROOT_URL}admin/groups/listmembers/{ID}" class="text-decoration-none">{userCount}</a></td>
<td><a href="{ROOT_URL}admin/groups/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a></td> <td><a href="{ROOT_URL}admin/groups/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a></td>
<td><a href="{ROOT_URL}admin/groups/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td> <td><a href="{ROOT_URL}admin/groups/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
<td> <td>

View File

@ -1,6 +1,8 @@
<h1>{groupName} <small>user list</small></h1> <div class="context-main-bg context-main p-3">
{PAGINATION} <legend class="text-center">{groupName} <small>user list</small></legend>
<form action="{ROOT_URL}admin/users/delete" method="post"> <hr>
{ADMIN_BREADCRUMBS}
<form action="{ROOT_URL}admin/users/delete" method="post">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
@ -18,7 +20,7 @@
{LOOP} {LOOP}
<tr> <tr>
<td>{ID}</td> <td>{ID}</td>
<td><a href='{ROOT_URL}admin/users/view/{ID}'>{username}</a></td> <td><a href='{ROOT_URL}admin/users/view/{ID}' class="text-decoration-none">{username}</a></td>
<td>{DTC date}{registered}{/DTC}</td> <td>{DTC date}{registered}{/DTC}</td>
<td><a href="{ROOT_URL}admin/users/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a></td> <td><a href="{ROOT_URL}admin/users/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a></td>
<td><a href="{ROOT_URL}admin/users/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td> <td><a href="{ROOT_URL}admin/users/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
@ -37,4 +39,5 @@
</tbody> </tbody>
</table> </table>
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button> <button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button>
</form> </form>
</div>

View File

@ -17,7 +17,7 @@
<tbody> <tbody>
{LOOP} {LOOP}
<tr> <tr>
<td><a href="{ROOT_URL}admin/plugins/view/{name}">{name}</a></td> <td><a href="{ROOT_URL}admin/plugins/view/{name}" class="text-decoration-none">{name}</a></td>
<td>{enabled_txt}</td> <td>{enabled_txt}</td>
<td>{installStatus}</td> <td>{installStatus}</td>
<td>{version}</td> <td>{version}</td>

View File

@ -22,7 +22,7 @@
{LOOP} {LOOP}
<tr> <tr>
<td align="center">{ID}</td> <td align="center">{ID}</td>
<td><a href='{ROOT_URL}admin/routes/view/{ID}'>{nickname}</a></td> <td><a href='{ROOT_URL}admin/routes/view/{ID}' class="text-decoration-none">{nickname}</a></td>
<td>{redirect_type}</td> <td>{redirect_type}</td>
<td>{original_url}</td> <td>{original_url}</td>
<td>{forwarded_url}</td> <td>{forwarded_url}</td>

View File

@ -1,4 +1,6 @@
<div class="context-main-bg context-main p-3"> <div class="context-main-bg context-main p-3">
<legend class="text-center">Settings</legend>
<hr>
{ADMIN_BREADCRUMBS} {ADMIN_BREADCRUMBS}
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data"> <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
<fieldset> <fieldset>

View File

@ -14,7 +14,7 @@
<tbody> <tbody>
{LOOP} {LOOP}
<tr> <tr>
<td><a href='{ROOT_URL}admin/tokens/view/{ID}'>{name}</a></td> <td><a href='{ROOT_URL}admin/tokens/view/{ID}' class="text-decoration-none">{name}</a></td>
<td>{token_type}</td> <td>{token_type}</td>
<td><a href="{ROOT_URL}admin/tokens/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a></td> <td><a href="{ROOT_URL}admin/tokens/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a></td>
<td><a href="{ROOT_URL}admin/tokens/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td> <td><a href="{ROOT_URL}admin/tokens/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>

View File

@ -20,7 +20,7 @@
{LOOP} {LOOP}
<tr> <tr>
<td align="center">{ID}</td> <td align="center">{ID}</td>
<td><a href='{ROOT_URL}admin/users/view/{ID}'>{username}</a></td> <td><a href='{ROOT_URL}admin/users/view/{ID}' class="text-decoration-none">{username}</a></td>
<td>{DTC date}{registered}{/DTC}</td> <td>{DTC date}{registered}{/DTC}</td>
<td><a href="{ROOT_URL}admin/users/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a></td> <td><a href="{ROOT_URL}admin/users/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a></td>
<td><a href="{ROOT_URL}admin/users/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td> <td><a href="{ROOT_URL}admin/users/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>

View File

@ -4,7 +4,7 @@
<a href="{url}" class="text-white {linkClasses}" {linkAttributes}> <a href="{url}" class="text-white {linkClasses}" {linkAttributes}>
{text} {text}
</a> </a>
{duuuuuuuh} {subnav}
</li> </li>
{/LOOP} {/LOOP}
</ul> </ul>

View File

@ -1,6 +1,6 @@
<ul class="collapse list-unstyled ms-3 text-small shadow" id="{dropdownName}Dropdown"> <ul class="collapse list-unstyled ms-3 text-small shadow" id="{dropdownName}Dropdown">
{LOOP} {LOOP}
<li class="nav-item"><a href="{url}" class="nav-link text-white">{text}</a></li> <li class="nav-item"><a href="{url}" class="submenu nav-link text-white">{text}</a></li>
{/LOOP} {/LOOP}
</ul> </ul>

View File

@ -1,5 +1,13 @@
<ul class="nav col-12 col-lg-auto mb-2 justify-content-center mb-md-0 mx-auto"> <nav class="navbar navbar-expand col-12 col-lg-auto mb-2 justify-content-center mb-md-0 mx-auto">
<div class="container-fluid">
<ul class="navbar-nav">
{LOOP} {LOOP}
<li><a href="{url}" class="nav-link px-2 text-white">{text}</a></li> <li class="nav-item">
<a href="{url}" class="nav-link px-2 text-white">
{text}
</a>
</li>
{/LOOP} {/LOOP}
</ul> </ul>
</div>
</nav>

View File

@ -3,7 +3,7 @@
<hr> <hr>
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-6"> <div class="col-md-6">
<form action="" method="post" class=""> <form action="" method="post" class="" enctype="multipart/form-data">
<fieldset> <fieldset>
{PREFERENCES_FORM} {PREFERENCES_FORM}
</fieldset> </fieldset>

View File

@ -134,6 +134,10 @@ class TheTempusProject extends Bedrock {
], ],
], ],
], ],
[
'text' => '<i class="fa fa-fw fa-external-link"></i> Redirects',
'url' => '{ROOT_URL}admin/routes',
],
]; ];
public $main_links = [ public $main_links = [
[ [
@ -287,6 +291,11 @@ class TheTempusProject extends Bedrock {
"pretty" => "Enable CSRF Token for all forms.", "pretty" => "Enable CSRF Token for all forms.",
"default" => true "default" => true
], ],
"registrationEnabled" => [
"type" => "radio",
"pretty" => "Allow new users to register an account.",
"default" => true
],
"loginLimit" => [ "loginLimit" => [
"type" => "text", "type" => "text",
"pretty" => "Maximum Login Attempts per hour", "pretty" => "Maximum Login Attempts per hour",
@ -300,17 +309,15 @@ class TheTempusProject extends Bedrock {
], ],
"uploads" => [ "uploads" => [
"images" => [ "images" => [
"type"=> "radio", "type" => "radio",
"pretty"=> "Upload Images Enabled", "pretty" => "Upload Images Enabled",
"default"=> true, "default" => true,
"protected"=> true, "value" => true,
"value"=> true,
], ],
"maxImageSize"=> [ "maxImageSize"=> [
"type" => "text", "type" => "text",
"pretty" => "Maximum size for image uploads", "pretty" => "Maximum size for image uploads",
"default" => 500000, "default" => 500000,
"protected" => true,
"value" => 500000, "value" => 500000,
] ]
], ],

View File

@ -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.1", "thetempusproject/bedrock": "1.1.1",
"thetempusproject/canary": "1.0.6", "thetempusproject/canary": "1.0.6",
"thetempusproject/houdini": "2.0.1", "thetempusproject/houdini": "2.0.2",
"twbs/bootstrap": "5.2.3" "twbs/bootstrap": "5.2.3"
}, },
"autoload": "autoload":

16
composer.lock generated
View File

@ -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": "7b53f62bdce4655bce03a69a5e6ae57a", "content-hash": "b54d2da34f833481cff28144a669b2aa",
"packages": [ "packages": [
{ {
"name": "components/jquery", "name": "components/jquery",
@ -303,17 +303,17 @@
}, },
{ {
"name": "thetempusproject/bedrock", "name": "thetempusproject/bedrock",
"version": "1.1", "version": "1.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": "3b8e0994912eef8c203c8d47258754d6c78d4b19" "reference": "bcd73d58f9d7df41b5ec0f12871ff15cfcc215ae"
}, },
"require": { "require": {
"php": ">=8.1.0", "php": ">=8.1.0",
"thetempusproject/canary": "1.0.6", "thetempusproject/canary": "1.0.6",
"thetempusproject/hermes": "1.0.3", "thetempusproject/hermes": "1.0.3",
"thetempusproject/houdini": "2.0.1" "thetempusproject/houdini": "2.0.2"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -344,7 +344,7 @@
"framework", "framework",
"mvc" "mvc"
], ],
"time": "2025-01-22T02:02:57+00:00" "time": "2025-01-27T05:07:05+00:00"
}, },
{ {
"name": "thetempusproject/canary", "name": "thetempusproject/canary",
@ -434,11 +434,11 @@
}, },
{ {
"name": "thetempusproject/houdini", "name": "thetempusproject/houdini",
"version": "2.0.1", "version": "2.0.2",
"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": "b03fc3b7ddcdd0213f8f927a9bf1c0c68c62138f" "reference": "fb027a4ebc327e709ad3da29a4cf112894c2b7e6"
}, },
"require": { "require": {
"php": ">=8.1.0", "php": ">=8.1.0",
@ -474,7 +474,7 @@
"thetempusproject", "thetempusproject",
"tools" "tools"
], ],
"time": "2025-01-22T01:59:01+00:00" "time": "2025-01-27T05:02:14+00:00"
}, },
{ {
"name": "twbs/bootstrap", "name": "twbs/bootstrap",

View File

@ -195,16 +195,22 @@ class Install extends Controller {
public function configure() { public function configure() {
if ( Forms::Check( 'installConfigure' ) ) { if ( Forms::Check( 'installConfigure' ) ) {
$logo = 'images/logo.png'; $logo = 'images/logo.png';
$logoLarge = 'images/logoLarge.png';
if ( Input::exists( 'logo' ) && Upload::image( 'logo', 'System' ) ) { if ( Input::exists( 'logo' ) && Upload::image( 'logo', 'System' ) ) {
$logo = 'Uploads/Images/System/' . Upload::last(); $logo = 'Uploads/Images/System/' . Upload::last();
} }
TheTempusProject::$activeConfig->load( BEDROCK_CONFIG_JSON ); TheTempusProject::$activeConfig->load( BEDROCK_CONFIG_JSON );
$baseConfig = TheTempusProject::$configMatrix; $baseConfig = TheTempusProject::$configMatrix;
$baseConfig['main']['logo']['value'] = $logo; $baseConfig['main']['logo']['value'] = $logo;
$baseConfig['main']['logoLarge']['value'] = $logoLarge;
$baseConfig['main']['name']['value'] = Input::postNull( 'siteName' ); $baseConfig['main']['name']['value'] = Input::postNull( 'siteName' );
$baseConfig['main']['template']['value'] = $baseConfig['main']['template']['default']; $baseConfig['main']['template']['value'] = $baseConfig['main']['template']['default'];
$baseConfig['main']['tokenEnabled']['value'] = $baseConfig['main']['tokenEnabled']['default']; $baseConfig['main']['tokenEnabled']['value'] = $baseConfig['main']['tokenEnabled']['default'];
$baseConfig['main']['registrationEnabled']['value'] = $baseConfig['main']['registrationEnabled']['default'];
$baseConfig['main']['loginLimit']['value'] = $baseConfig['main']['loginLimit']['default']; $baseConfig['main']['loginLimit']['value'] = $baseConfig['main']['loginLimit']['default'];
$baseConfig['main']['loginTimer']['value'] = $baseConfig['main']['loginTimer']['default'];
$baseConfig['uploads']['images']['value'] = $baseConfig['uploads']['images']['default'];
$baseConfig['uploads']['maxImageSize']['value'] = $baseConfig['uploads']['maxImageSize']['default'];
$baseConfig['database']['dbEnabled']['value'] = $baseConfig['database']['dbEnabled']['default']; $baseConfig['database']['dbEnabled']['value'] = $baseConfig['database']['dbEnabled']['default'];
$baseConfig['database']['dbHost']['value'] = Input::postNull( 'dbHost' ); $baseConfig['database']['dbHost']['value'] = Input::postNull( 'dbHost' );
$baseConfig['database']['dbMaxQuery']['value'] = $baseConfig['database']['dbMaxQuery']['default']; $baseConfig['database']['dbMaxQuery']['value'] = $baseConfig['database']['dbMaxQuery']['default'];