Various changes
mobile-friendly ui updates admin user-edit bugfix file cleanup added searchFields add blog search remove unused code add maintenance mode config
This commit is contained in:
@ -171,4 +171,16 @@ class Blog extends Controller {
|
||||
self::$pageDescription = '{SITENAME} blog posts easily and conveniently sorted by years.';
|
||||
Views::view( 'blog.list', self::$posts->byYear( $year ) );
|
||||
}
|
||||
|
||||
public function search() {
|
||||
$results = [];
|
||||
if ( Input::exists( 'submit' ) ) {
|
||||
$dbResults = self::$posts->search( Input::post('searchTerm') );
|
||||
if ( ! empty( $dbResults ) ) {
|
||||
$results = $dbResults;
|
||||
}
|
||||
}
|
||||
Components::set( 'searchResults', Views::simpleView( 'blog.list', $results ) );
|
||||
Views::view( 'blog.searchResults' );
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,11 @@ use TheTempusProject\Models\Comments;
|
||||
|
||||
class Posts extends DatabaseModel {
|
||||
public $tableName = 'posts';
|
||||
public $searchFields = [
|
||||
'title',
|
||||
'slug',
|
||||
'content',
|
||||
];
|
||||
public static $comments = false;
|
||||
|
||||
public $databaseMatrix = [
|
||||
|
@ -37,6 +37,7 @@ class Blog extends Plugin {
|
||||
'posts' => [
|
||||
[
|
||||
'title' => 'Welcome',
|
||||
'slug' => '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}',
|
||||
|
@ -26,9 +26,10 @@ class BlogLoader extends DefaultLoader {
|
||||
*/
|
||||
public function __construct() {
|
||||
$posts = new Posts;
|
||||
Components::set('SIDEBAR', Views::simpleView('blog.sidebar', $posts->recent(5)));
|
||||
Components::set('SIDEBAR2', Views::simpleView('blog.sidebar2', $posts->archive()));
|
||||
Components::set('SIDEBARABOUT', Views::simpleView('blog.about'));
|
||||
Components::set('SIDEBAR', Views::simpleView('blog.widgets.recent', $posts->recent(5)));
|
||||
Components::set('SIDEBAR2', Views::simpleView('blog.widgets.archive', $posts->archive()));
|
||||
Components::set('SIDEBARABOUT', Views::simpleView('blog.widgets.about'));
|
||||
Components::set('SIDEBARSEARCH', Views::simpleView('blog.widgets.search'));
|
||||
Components::set('BLOGFEATURES', '');
|
||||
Navigation::setCrumbComponent( 'BLOG_BREADCRUMBS', Input::get( 'url' ) );
|
||||
Components::set( 'BLOG_TEMPLATE_URL', Template::parse( '{ROOT_URL}app/plugins/comments/' ) );
|
||||
|
@ -39,26 +39,44 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation -->
|
||||
<header class="p-3 text-bg-dark">
|
||||
<div class="container">
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
|
||||
<img src="{ROOT_URL}{LOGO}" class="bi me-2" width="40" height="32" role="img" aria-label="{SITENAME} Logo">
|
||||
<a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-white text-decoration-none">
|
||||
{SITENAME}
|
||||
</a>
|
||||
{topNavLeft}
|
||||
<div class="text-end d-flex align-items-center">
|
||||
{topNavRight}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<header class="p-3 text-bg-dark">
|
||||
<div class="container">
|
||||
<div class="d-flex align-items-center position-relative">
|
||||
<!-- Navbar Toggler (Left) -->
|
||||
|
||||
<!-- Centered Logo (Now inside normal document flow) -->
|
||||
<a href="/" class="d-flex align-items-center text-white text-decoration-none d-md-none mx-auto">
|
||||
<img src="{ROOT_URL}{LOGO}" width="40" height="32" alt="{SITENAME} Logo" class="bi">
|
||||
</a>
|
||||
|
||||
<!-- Logo (Normal Position for Large Screens) -->
|
||||
<a href="/" class="d-flex align-items-center text-white text-decoration-none d-none d-md-flex">
|
||||
<img src="{ROOT_URL}{LOGO}" width="40" height="32" alt="{SITENAME} Logo" class="bi">
|
||||
</a>
|
||||
|
||||
<div class="navbar-expand-md flex-grow-1">
|
||||
<div class="collapse navbar-collapse d-md-flex" id="mainMenu">
|
||||
<!-- Centered Navigation -->
|
||||
<div class="d-none d-md-block d-flex justify-content-center w-100 position-absolute start-50 translate-middle-x">
|
||||
{topNavLeft}
|
||||
</div>
|
||||
<div class="d-flex justify-content-center flex-grow-1 d-md-none">
|
||||
{topNavLeft}
|
||||
</div>
|
||||
|
||||
<!-- Right-Side Content (Push to End) -->
|
||||
<div class="d-flex flex-row justify-content-center align-items-center mt-3 mt-md-0 ms-md-auto">
|
||||
{topNavRight}
|
||||
</div>
|
||||
</div> <!-- End Collapse -->
|
||||
</div> <!-- End Navbar Expand -->
|
||||
|
||||
<button class="me-3 d-md-none btn btn-md btn-outline-light" type="button" data-bs-toggle="collapse" data-bs-target="#mainMenu" aria-controls="mainMenu" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="d-flex flex-column min-vh-100">
|
||||
<div class="flex-container flex-grow-1">
|
||||
{ISSUES}
|
||||
@ -79,24 +97,27 @@
|
||||
|
||||
<div class="pt-4">
|
||||
<div class="container">
|
||||
<h3 class="pb-4 mb-4 fst-italic border-bottom">
|
||||
<h3 class="pb-4 mb-4 fst-italic border-bottom context-main-border">
|
||||
{SITENAME} Blog
|
||||
</h3>
|
||||
<div class="row g-5">
|
||||
<div class="d-md-flex g-5">
|
||||
<!-- Main Content -->
|
||||
<div class="col-md-8">
|
||||
<div class="col-12 col-md-8">
|
||||
{CONTENT}
|
||||
</div>
|
||||
<!-- Sidebar Content -->
|
||||
<div class="col-md-4">
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="position-sticky" style="top: 2rem;">
|
||||
<div class="p-4">
|
||||
<div class="ps-md-2 ps-lg-5">
|
||||
{SIDEBARABOUT}
|
||||
</div>
|
||||
<div class="p-4">
|
||||
<div class="ps-md-2 ps-lg-5">
|
||||
{SIDEBARSEARCH}
|
||||
</div>
|
||||
<div class="ps-md-2 ps-lg-5">
|
||||
{SIDEBAR}
|
||||
</div>
|
||||
<div class="p-4">
|
||||
<div class="ps-md-2 ps-lg-5">
|
||||
{SIDEBAR2}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +0,0 @@
|
||||
<div class="p-4 mb-3 rounded context-main-bg">
|
||||
<h4 class="fst-italic">About</h4>
|
||||
<p class="mb-0">
|
||||
The blog is mostly here to serve ass a simple way to link to long-form content on the site. There won't be any breaking news or tell-all stories here. Just good ole fashioned boring crap no one wants to read.
|
||||
</p>
|
||||
</div>
|
@ -2,7 +2,7 @@
|
||||
<legend class="text-center">Add Blog Post</legend>
|
||||
<hr>
|
||||
{ADMIN_BREADCRUMBS}
|
||||
<form action="" method="post">
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<!-- Title -->
|
||||
<div class="mb-3 row">
|
||||
|
@ -2,7 +2,7 @@
|
||||
<legend class="text-center">Edit Blog Post</legend>
|
||||
<hr>
|
||||
{ADMIN_BREADCRUMBS}
|
||||
<form action="" method="post">
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<!-- Title -->
|
||||
<div class="mb-3 row">
|
||||
|
@ -7,7 +7,7 @@
|
||||
</div><!-- /.blog-post -->
|
||||
</div><!-- /.blog-main -->
|
||||
</div><!-- /.row -->
|
||||
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<legend>New Blog Post</legend>
|
||||
<div class="form-group">
|
||||
<label for="title" class="col-lg-3 control-label">Title</label>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{LOOP}
|
||||
<article class="blog-post">
|
||||
<article class="blog-post context-main-bg p-2">
|
||||
<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/{authorName}" class="text-decoration-none">{authorName}</a></p>
|
||||
<div class="well">
|
||||
@ -9,7 +9,7 @@
|
||||
<hr>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<article class="blog-post">
|
||||
<p class="blog-post-meta">No Posts Found.</p>
|
||||
</article>
|
||||
<div class="text-center">
|
||||
<p class="h5">No Posts Found</p>
|
||||
</div>
|
||||
{/ALT}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-sm-12 blog-main">
|
||||
<div class="blog-post">
|
||||
<div class="col-lg-12 col-sm-12 blog-main context-main-bg p-1 p-md-2 mb-2 rounded">
|
||||
<div class="blog-post mb-5 pb-5">
|
||||
<h2 class="blog-post-title">{title}</h2>
|
||||
<hr>
|
||||
<p class="blog-post-meta">{DTC date}{created}{/DTC} by <a href="{ROOT_URL}home/profile/{authorName}" class="text-decoration-none">{authorName}</a></p>
|
||||
|
@ -1,15 +0,0 @@
|
||||
<div class="card">
|
||||
<div class="card-header bg-info">
|
||||
<h3 class="card-title">Recent Posts</h3>
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
{LOOP}
|
||||
<li class="list-group-item">
|
||||
<a href="{ROOT_URL}blog/post/{ID}">{title}</a>
|
||||
</li>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<li class="list-group-item">No Posts to show</li>
|
||||
{/ALT}
|
||||
</ul>
|
||||
</div>
|
3
app/plugins/blog/views/searchResults.html
Normal file
3
app/plugins/blog/views/searchResults.html
Normal file
@ -0,0 +1,3 @@
|
||||
<legend class="text-center my-2">Search Results</legend>
|
||||
<hr>
|
||||
{searchResults}
|
@ -1,18 +0,0 @@
|
||||
<div class="card context-main-bg">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Recent Posts</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ol class="list-unstyled">
|
||||
{LOOP}
|
||||
<li><a href="{ROOT_URL}blog/post/{ID}" class="text-decoration-none">{title}</a></li>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<li>No Posts to show</li>
|
||||
{/ALT}
|
||||
</ol>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="{ROOT_URL}blog" class="text-decoration-none">View All</a>
|
||||
</div>
|
||||
</div>
|
@ -1,15 +0,0 @@
|
||||
<div class="card context-main-bg">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Archives</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ol class="list-unstyled">
|
||||
{LOOP}
|
||||
<li>({count}) <a href="{ROOT_URL}blog/month/{month}/{year}" class="text-decoration-none">{monthText} {year}</a></li>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<li>None To Show</li>
|
||||
{/ALT}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
11
app/plugins/blog/views/widgets/about.html
Normal file
11
app/plugins/blog/views/widgets/about.html
Normal file
@ -0,0 +1,11 @@
|
||||
<div class="pb-2 pb-lg-3">
|
||||
<div class="card rounded context-main-bg">
|
||||
<div class="card-body">
|
||||
<h4 class="fst-italic">About</h4>
|
||||
<p class="mb-0">
|
||||
The blog is mostly here to serve ass a simple way to link to long-form content on the site.
|
||||
There won't be any breaking news or tell-all stories here. Just good ole fashioned boring crap no one wants to read.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
17
app/plugins/blog/views/widgets/archive.html
Normal file
17
app/plugins/blog/views/widgets/archive.html
Normal file
@ -0,0 +1,17 @@
|
||||
<div class="pb-2 pb-lg-3">
|
||||
<div class="card rounded context-main-bg">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Archives</h3>
|
||||
</div>
|
||||
<div class="card-body context-second-bg">
|
||||
<ol class="list-unstyled">
|
||||
{LOOP}
|
||||
<li>({count}) <a href="{ROOT_URL}blog/month/{month}/{year}" class="text-decoration-none">{monthText} {year}</a></li>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<li>None To Show</li>
|
||||
{/ALT}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
20
app/plugins/blog/views/widgets/recent.html
Normal file
20
app/plugins/blog/views/widgets/recent.html
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="pb-2 pb-lg-3">
|
||||
<div class="card rounded context-main-bg">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Recent Posts</h3>
|
||||
</div>
|
||||
<div class="card-body context-second-bg">
|
||||
<ol class="list-unstyled">
|
||||
{LOOP}
|
||||
<li><a href="{ROOT_URL}blog/post/{ID}" class="text-decoration-none">{title}</a></li>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<li>No Posts to show</li>
|
||||
{/ALT}
|
||||
</ol>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="{ROOT_URL}blog" class="text-decoration-none">View All</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
18
app/plugins/blog/views/widgets/search.html
Normal file
18
app/plugins/blog/views/widgets/search.html
Normal file
@ -0,0 +1,18 @@
|
||||
<div class="pb-2 pb-lg-3">
|
||||
<div class="card rounded context-main-bg">
|
||||
<div class="card-body">
|
||||
<form method="post" action="/blog/search">
|
||||
<fieldset>
|
||||
<!-- Hidden Token -->
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
|
||||
<!-- Search -->
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" aria-label="Search Terms" name="searchTerm" id="searchTerm">
|
||||
<button type="submit" class="btn btn-secondary bg-primary" name="submit" value="submit">Search</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -51,7 +51,7 @@ class Bugreport extends Plugin {
|
||||
];
|
||||
public $contact_footer_links = [
|
||||
[
|
||||
'text' => 'Bug Report',
|
||||
'text' => 'Report a Bug',
|
||||
'url' => '{ROOT_URL}bugreport',
|
||||
'filter' => 'loggedin',
|
||||
],
|
||||
|
@ -1,15 +1,20 @@
|
||||
<div class="col-8 mx-auto p-4 rounded shadow-sm mb-5 context-main-bg mt-4 container">
|
||||
<h2 class="text-center mb-4">Bug Report</h2>
|
||||
<div class="m-2 m-lg-4">
|
||||
<div class="col-12 mx-5 col-sm-10 col-lg-8 mx-auto p-4 rounded shadow-sm context-main-bg">
|
||||
<h2 class="text-center mb-4">Report a Bug</h2>
|
||||
<hr>
|
||||
<p>Thank you for visiting our bug reporting page. We value our users' input highly and in an effort to better serve your needs, please fill out the form below to help us address this issue.</p>
|
||||
<p>We read each and every bug report submitted, and by submitting this form you allow us to send you a follow-up email.</p>
|
||||
<form action="" method="post">
|
||||
<p class="text-center text-sm-start">
|
||||
Thank you for visiting our bug reporting page. We value our users' input highly and in an effort to better serve your needs, please fill out the form below to help us address this issue.
|
||||
</p>
|
||||
<p class="text-center text-sm-start">
|
||||
We read each and every bug report submitted, and by submitting this form you allow us to send you a follow-up email.
|
||||
</p>
|
||||
<form method="post">
|
||||
<!-- Page URL -->
|
||||
<div class="mb-3">
|
||||
<label for="url" class="form-label">Page you were trying to reach:</label>
|
||||
<input type="url" name="url" id="url" class="form-control" aria-describedby="urlHelp" required>
|
||||
<small id="urlHelp" class="form-text text-muted">
|
||||
What is the URL of the page you actually received the error on? (The URL is the website address. Example: {ROOT_URL}home)
|
||||
This is the URL of the page you actually received the error.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
@ -18,7 +23,7 @@
|
||||
<label for="ourl" class="form-label">Page you were on:</label>
|
||||
<input type="url" name="ourl" id="ourl" class="form-control" aria-describedby="ourlHelp">
|
||||
<small id="ourlHelp" class="form-text text-muted">
|
||||
What is the URL of the page you were on before you received the error? (The URL is the website address. Example: {ROOT_URL}home/newhome)
|
||||
This is the URL of the page you were on before you received the error.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
@ -37,8 +42,11 @@
|
||||
|
||||
<!-- Description -->
|
||||
<div class="mb-3">
|
||||
<label for="entry" class="form-label">Describe the problem/error as best as you can: (max: 2000 characters)</label>
|
||||
<textarea class="form-control" name="entry" id="entry" rows="6" maxlength="2000" required></textarea>
|
||||
<label for="entry" class="form-label">Describe the error you received: </label>
|
||||
<textarea class="form-control" name="entry" id="entry" rows="6" maxlength="2000" aria-describedby="descHelp" required></textarea>
|
||||
<small id="descHelp" class="form-text text-muted">
|
||||
(max: 2000 characters)
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- Hidden Token -->
|
||||
@ -49,4 +57,5 @@
|
||||
<button type="submit" name="submit" value="submit" class="btn btn-primary btn-lg">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
@ -3,7 +3,7 @@
|
||||
<legend class="text-center">Edit Comment</legend>
|
||||
<hr>
|
||||
{ADMIN_BREADCRUMBS}
|
||||
<form action="" method="post" class="container py-4">
|
||||
<form method="post" class="container py-4">
|
||||
<fieldset>
|
||||
<div class="mb-3 row">
|
||||
<label for="comment" class="col-lg-5 col-form-label text-end">Comment:</label>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<form action="" method="post" class="text-center mx-auto mt-4" style="max-width: 600px;">
|
||||
<form method="post" class="text-center mx-auto mt-4" style="max-width: 600px;">
|
||||
<div class="mb-3">
|
||||
<textarea
|
||||
class="form-control"
|
||||
|
@ -1,14 +1,14 @@
|
||||
<div class="card">
|
||||
<div class="card-header d-flex align-items-center justify-content-between context-second-bg context-main">
|
||||
<div class="card-header d-flex align-items-center justify-content-between context-main-bg context-main">
|
||||
<h3 class="card-title mb-0">
|
||||
<i class="fa fa-fw fa-comment"></i> Comments
|
||||
</h3>
|
||||
<span class="badge bg-primary">{count}</span>
|
||||
</div>
|
||||
<div class="card-body context-main-bg context-main">
|
||||
<div class="card-body context-second-bg">
|
||||
<ul class="list-group list-group-flush">
|
||||
{LOOP}
|
||||
<li class="list-group-item context-second-bg context-main mb-2">
|
||||
<li class="list-group-item context-main-bg context-main mb-2">
|
||||
<div class="d-flex align-items-start">
|
||||
<div class="me-3">
|
||||
<img src="{ROOT_URL}{avatar}" class="rounded-circle" alt="User Avatar" style="width: 50px; height: 50px;">
|
||||
@ -28,7 +28,7 @@
|
||||
</li>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<li class="list-group-item context-second-bg context-main mb-2">
|
||||
<li class="list-group-item context-main-bg mb-2">
|
||||
<div class="text-center">
|
||||
<p class="mb-0">Be the first to comment.</p>
|
||||
</div>
|
||||
|
@ -1,45 +1,47 @@
|
||||
<div class="context-main-bg container py-4 my-4">
|
||||
<h2 class="text-center mb-4">Contact Us</h2>
|
||||
<div class="col-lg-6 offset-md-3">
|
||||
<p>
|
||||
Here at <strong>{SITENAME}</strong>, we highly value your feedback. We constantly strive to provide our users with the highest level of quality in everything we do.
|
||||
</p>
|
||||
<p>
|
||||
If you would like to provide any suggestions or comments on our service, we ask that you please fill out the quick form below and let us know what's on your mind.
|
||||
</p>
|
||||
<div class="m-2 m-lg-4">
|
||||
<div class="context-main-bg container py-2 my-2 py-lg-4 my-lg-4">
|
||||
<h2 class="text-center mb-4">Contact Us</h2>
|
||||
<div class="col-12 col-lg-6 offset-lg-3">
|
||||
<p class="text-center text-lg-start">
|
||||
Here at <strong>{SITENAME}</strong>, we highly value your feedback. We constantly strive to provide our users with the highest level of quality in everything we do.
|
||||
</p>
|
||||
<p class="text-center text-lg-start">
|
||||
If you would like to provide any suggestions or comments on our service, we ask that you please fill out the quick form below and let us know what's on your mind.
|
||||
</p>
|
||||
</div>
|
||||
<form method="post">
|
||||
<!-- Name -->
|
||||
<div class="mb-3 row">
|
||||
<label for="name" class="col-lg-3 col-form-label text-lg-end">Name:</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Email (Optional) -->
|
||||
<div class="mb-3 row">
|
||||
<label for="contactEmail" class="col-lg-3 col-form-label text-lg-end">E-mail: (optional)</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="email" class="form-control" name="contactEmail" id="contactEmail">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Feedback -->
|
||||
<div class="mb-3 row">
|
||||
<label for="entry" class="col-lg-3 col-form-label text-lg-end">Feedback:</label>
|
||||
<div class="col-lg-6">
|
||||
<textarea class="form-control" name="entry" id="entry" rows="6" maxlength="2000" required></textarea>
|
||||
<small class="form-text text-muted">Max: 2000 characters</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hidden Token -->
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
|
||||
<!-- Submit Button -->
|
||||
<div class="text-center">
|
||||
<button type="submit" name="submit" value="submit" class="btn btn-primary btn-lg">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
<!-- Name -->
|
||||
<div class="mb-3 row">
|
||||
<label for="name" class="col-lg-3 col-form-label text-end">Name:</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Email (Optional) -->
|
||||
<div class="mb-3 row">
|
||||
<label for="contactEmail" class="col-lg-3 col-form-label text-end">E-mail: (optional)</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="email" class="form-control" name="contactEmail" id="contactEmail">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Feedback -->
|
||||
<div class="mb-3 row">
|
||||
<label for="entry" class="col-lg-3 col-form-label text-end">Feedback:</label>
|
||||
<div class="col-lg-6">
|
||||
<textarea class="form-control" name="entry" id="entry" rows="6" maxlength="2000" required></textarea>
|
||||
<small class="form-text text-muted">Max: 2000 characters</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hidden Token -->
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
|
||||
<!-- Submit Button -->
|
||||
<div class="text-center">
|
||||
<button type="submit" name="submit" value="submit" class="btn btn-primary btn-lg">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
@ -259,7 +259,9 @@ class Message extends DatabaseModel {
|
||||
}
|
||||
$messageOut['fromAvatar'] = self::$user->getAvatar( $message->userFrom );
|
||||
$messageOut['userTo'] = self::$user->getUsername( $message->userTo );
|
||||
$messageOut['userToPretty'] = \ucfirst( $messageOut['userTo'] );
|
||||
$messageOut['userFrom'] = self::$user->getUsername( $message->userFrom );
|
||||
$messageOut['userFromPretty'] = \ucfirst( $messageOut['userFrom'] );
|
||||
$out[] = (object) $messageOut;
|
||||
if ( !empty( $end ) ) {
|
||||
$out = $out[0];
|
||||
|
@ -1,57 +1,73 @@
|
||||
<div class="container py-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4">
|
||||
<form action="" method="post" class="needs-validation">
|
||||
<legend class="mb-4">New Message</legend>
|
||||
<fieldset>
|
||||
<!-- To User Field -->
|
||||
<div class="mb-3 row">
|
||||
<label for="toUser" class="col-sm-6 col-form-label">To:</label>
|
||||
<div class="col-sm-6">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="toUser"
|
||||
id="toUser"
|
||||
value="{prepopuser}"
|
||||
required>
|
||||
<div class="m-2 m-lg-4">
|
||||
<div class="col-12 mx-5 col-sm-10 col-lg-8 mx-auto p-4 rounded shadow-sm context-main-bg">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{ROOT_URL}messages" class="text-decoration-none">
|
||||
Messages
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
Create
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6 col-lg-6">
|
||||
<form method="post" class="needs-validation">
|
||||
<legend class="mb-3">New Message</legend>
|
||||
<fieldset>
|
||||
<!-- To User Field -->
|
||||
<div class="mb-3 row">
|
||||
<label for="toUser" class="col-sm-6 col-form-label">To:</label>
|
||||
<div class="col-sm-6">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="toUser"
|
||||
id="toUser"
|
||||
value="{prepopuser}"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Subject Field -->
|
||||
<div class="mb-3 row">
|
||||
<label for="subject" class="col-sm-6 col-form-label">Subject:</label>
|
||||
<div class="col-sm-6">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="subject"
|
||||
id="subject"
|
||||
required>
|
||||
|
||||
<!-- Subject Field -->
|
||||
<div class="mb-3 row">
|
||||
<label for="subject" class="col-sm-6 col-form-label">Subject:</label>
|
||||
<div class="col-sm-6">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="subject"
|
||||
id="subject"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Message Field -->
|
||||
<div class="mb-3">
|
||||
<label for="message" class="form-label">Message:</label>
|
||||
<textarea
|
||||
class="form-control"
|
||||
name="message"
|
||||
id="message"
|
||||
rows="6"
|
||||
maxlength="2000"
|
||||
required></textarea>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
<div class="text-center text-md-start">
|
||||
<button
|
||||
type="submit"
|
||||
name="submit"
|
||||
value="submit"
|
||||
class="btn btn-primary btn-lg">
|
||||
Send
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Message Field -->
|
||||
<div class="mb-3">
|
||||
<label for="message" class="form-label">Message:</label>
|
||||
<textarea
|
||||
class="form-control"
|
||||
name="message"
|
||||
id="message"
|
||||
rows="6"
|
||||
maxlength="2000"
|
||||
required></textarea>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
<button
|
||||
type="submit"
|
||||
name="submit"
|
||||
value="submit"
|
||||
class="btn btn-primary btn-lg">
|
||||
Send
|
||||
</button>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,14 +1,14 @@
|
||||
<h2>Inbox</h2>
|
||||
<form action="{ROOT_URL}messages/delete" method="post">
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20%">From</th>
|
||||
<th style="width: 25%">Subject</th>
|
||||
<th style="width: 15%">Last Reply</th>
|
||||
<th style="width: 20%"></th>
|
||||
<th style="width: 15%">From</th>
|
||||
<th style="width: 40%">Subject</th>
|
||||
<th style="width: 20%">Last Reply</th>
|
||||
<th style="width: 10%"></th>
|
||||
<th style="width: 10%">
|
||||
<th style="width: 10%"></th>
|
||||
<th style="width: 5%">
|
||||
<INPUT type="checkbox" onchange="checkAll(this)" name="check.t" value="T_[]"/>
|
||||
</th>
|
||||
</tr>
|
||||
@ -16,11 +16,11 @@
|
||||
<tbody>
|
||||
{LOOP}
|
||||
<tr {unreadBadge}>
|
||||
<td><a href="{ROOT_URL}home/profile/{userFrom}">{userFrom}</a></td>
|
||||
<td><a href="{ROOT_URL}messages/view/{ID}">{subject}</a></td>
|
||||
<td>{DTC}{lastReply}{/DTC}</td>
|
||||
<td><a href="{ROOT_URL}messages/read/{ID}">Mark as read</a></td>
|
||||
<td><a href="{ROOT_URL}messages/delete/{ID}">Delete</a></td>
|
||||
<td><a href="{ROOT_URL}home/profile/{userFrom}" class="text-decoration-none">{userFromPretty}</a></td>
|
||||
<td><a href="{ROOT_URL}messages/view/{ID}" class="text-decoration-none">{subject}</a></td>
|
||||
<td>{DTC date}{lastReply}{/DTC}</td>
|
||||
<td><a href="{ROOT_URL}messages/read/{ID}" class="btn btn-sm btn-info"><i class="fa-solid fa-envelope-open"></i></a></td>
|
||||
<td><a href="{ROOT_URL}messages/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
|
||||
<td>
|
||||
<input type="checkbox" value="{ID}" name="T_[]">
|
||||
</td>
|
||||
@ -35,5 +35,6 @@
|
||||
{/ALT}
|
||||
</tbody>
|
||||
</table>
|
||||
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger">Delete</button> <a href="{ROOT_URL}messages/create" class="btn btn-sm btn-primary">New message</a>
|
||||
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button>
|
||||
<a href="{ROOT_URL}messages/create" class="btn btn-sm btn-primary">New message</a>
|
||||
</form>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<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 class="m-2 m-lg-4">
|
||||
<div class="col-12 col-sm-10 col-lg-8 mx-auto p-md-2 p-lg-4 rounded shadow-sm context-main-bg context-main">
|
||||
<div class="my-3 p-3">
|
||||
{message_inbox}
|
||||
</div>
|
||||
<div class="my-3 p-3">
|
||||
{message_outbox}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,43 +0,0 @@
|
||||
<div class="container">
|
||||
<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="card panel-primary">
|
||||
{LOOP}
|
||||
{SINGLE}
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{subject}</h3>
|
||||
</div>
|
||||
{/SINGLE}
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-lg-3 " align="center">
|
||||
<a href="{ROOT_URL}home/profile/{userFrom}">{userFrom}</a><br>
|
||||
<img alt="User Pic" src="{ROOT_URL}{fromAvatar}" class="img-circle img-responsive">
|
||||
</div>
|
||||
<div class=" col-md-9 col-lg-9 ">
|
||||
<table class="table table-user-information">
|
||||
<tbody>
|
||||
<td>{message}</td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
{ADMIN}
|
||||
{ID}
|
||||
<span class="float-right">
|
||||
{DTC}{sent}{/DTC}
|
||||
</span>
|
||||
{/ADMIN}
|
||||
</div>
|
||||
{/LOOP}
|
||||
</div>
|
||||
<form action="{ROOT_URL}messages/reply" method="post">
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
<input type="hidden" name="messageID" value="{PID}">
|
||||
<button name="submit" value="reply" type="submit" class="btn btn-sm btn-primary">Reply</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,37 +1,53 @@
|
||||
<div class="context-main context-main-bg col-8 offset-2 my-3 p-3">
|
||||
<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">
|
||||
{LOOP}
|
||||
{SINGLE}
|
||||
<div class="card-header context-main-bg">
|
||||
<h5 class="card-title context-main">{subject}</h5>
|
||||
<div class="m-2 m-lg-4">
|
||||
<div class="col-12 mx-5 col-sm-10 col-lg-8 mx-auto p-4 rounded shadow-sm context-main-bg context-main">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{ROOT_URL}messages" class="text-decoration-none">
|
||||
Messages
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
View
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<div class="card panel-primary col-lg-8 mx-auto text-center">
|
||||
{LOOP}
|
||||
{SINGLE}
|
||||
<div class="card-header context-second-bg">
|
||||
<p class="card-title context-main text-center h3">{subject}</p>
|
||||
</div>
|
||||
{/SINGLE}
|
||||
<div class="card-body context-other-bg">
|
||||
<div class="row">
|
||||
<div class="col-4 col-lg-3 text-center">
|
||||
<a href="{ROOT_URL}home/profile/{userFrom}" class="text-decoration-none">{userFromPretty}</a><br>
|
||||
<img alt="User Pic" src="{ROOT_URL}{fromAvatar}" class="img-circle img-fluid mt-2">
|
||||
</div>
|
||||
{/SINGLE}
|
||||
<div class="card-body context-second-bg">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-lg-3 text-center">
|
||||
<a href="{ROOT_URL}home/profile/{userFrom}">{userFrom}</a><br>
|
||||
<img alt="User Pic" src="{ROOT_URL}{fromAvatar}" class="img-circle img-fluid">
|
||||
</div>
|
||||
<div class=" col-md-9 col-lg-9 context-main">
|
||||
{message}
|
||||
</div>
|
||||
<div class="col-8 col-lg-9 text-start">
|
||||
{message}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer context-main-bg">
|
||||
{ADMIN}
|
||||
{ID}
|
||||
<span class="float-right">
|
||||
</div>
|
||||
<div class="card-footer context-second-bg">
|
||||
{ADMIN}
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="">
|
||||
{ID}
|
||||
</div>
|
||||
<div class="">
|
||||
{DTC}{sent}{/DTC}
|
||||
</span>
|
||||
{/ADMIN}
|
||||
</div>
|
||||
{/LOOP}
|
||||
</div>
|
||||
<form action="{ROOT_URL}messages/reply" method="post">
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
<input type="hidden" name="messageID" value="{PID}">
|
||||
<button name="submit" value="reply" type="submit" class="btn btn-md btn-primary my-4">Reply</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/ADMIN}
|
||||
</div>
|
||||
{/LOOP}
|
||||
</div>
|
||||
<form action="{ROOT_URL}messages/reply" method="post">
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
<input type="hidden" name="messageID" value="{PID}">
|
||||
<button name="submit" value="reply" type="submit" class="btn btn-md btn-primary my-4">Reply</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
@ -1,4 +1,4 @@
|
||||
<div class="dropdown nav-item mx-2">
|
||||
<div class="dropdown nav-item mx-2 my-2 my-lg-0">
|
||||
<a
|
||||
href="#"
|
||||
class="d-flex align-items-center text-white text-decoration-none dropdown-toggle"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<h2>Outbox</h2>
|
||||
<form action="{ROOT_URL}messages/delete" method="post">
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20%">To</th>
|
||||
@ -15,10 +15,10 @@
|
||||
<tbody>
|
||||
{LOOP}
|
||||
<tr>
|
||||
<td><a href="{ROOT_URL}home/profile/{userTo}">{userTo}</a></td>
|
||||
<td><a href="{ROOT_URL}messages/view/{ID}">{subject}</a></td>
|
||||
<td><a href="{ROOT_URL}home/profile/{userTo}" class="text-decoration-none">{userToPretty}</a></td>
|
||||
<td><a href="{ROOT_URL}messages/view/{ID}" class="text-decoration-none">{subject}</a></td>
|
||||
<td>{DTC date}{sent}{/DTC}</td>
|
||||
<td><a href="{ROOT_URL}messages/delete/{ID}">Delete</a></td>
|
||||
<td><a href="{ROOT_URL}messages/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
|
||||
<td>
|
||||
<input type="checkbox" value="{ID}" name="F_[]">
|
||||
</td>
|
||||
@ -33,5 +33,5 @@
|
||||
{/ALT}
|
||||
</tbody>
|
||||
</table>
|
||||
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger">Delete</button>
|
||||
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button>
|
||||
</form>
|
@ -1,5 +1,5 @@
|
||||
<div class="context-main context-main-bg col-8 offset-2 my-3 p-3">
|
||||
<form action="" method="post" class="form-horizontal">
|
||||
<form method="post">
|
||||
<legend class="text-center">Reply</legend>
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
|
@ -2,8 +2,7 @@
|
||||
<legend class="text-center">Send Notification</legend>
|
||||
<hr>
|
||||
{ADMIN_BREADCRUMBS}
|
||||
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<!-- Group -->
|
||||
<div class="mb-3 row">
|
||||
|
@ -1,4 +1,6 @@
|
||||
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
|
||||
|
||||
<div class="m-2 m-lg-4">
|
||||
<div class="col-12 mx-5 col-sm-10 col-lg-8 mx-auto p-4 rounded shadow-sm context-main-bg">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<legend class="text-center">Notifications</legend>
|
||||
@ -26,7 +28,7 @@
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<tr>
|
||||
<td colspan="7" class=" context-main">
|
||||
<td colspan="3" class="text-center context-main">
|
||||
No Notifications
|
||||
</td>
|
||||
</tr>
|
||||
@ -35,4 +37,5 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,5 +1,5 @@
|
||||
<!-- Notifications Dropdown -->
|
||||
<div class="dropdown nav-item mx-2">
|
||||
<div class="dropdown nav-item mx-2 my-2 my-lg-0">
|
||||
<a
|
||||
href="#"
|
||||
class="d-flex align-items-center text-white text-decoration-none dropdown-toggle"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<legend class="text-center">Add Subscriber</legend>
|
||||
<hr>
|
||||
{ADMIN_BREADCRUMBS}
|
||||
<form action="" method="post">
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<!-- Subject -->
|
||||
<div class="mb-3 row">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="col-md-5 offset-md-1 mb-3 text-center">
|
||||
<div class="col-12 col-sm-6 col-md-3 offset-0 offset-lg-2 mb-3 text-center">
|
||||
<h5 class="">Subscribe</h5>
|
||||
<div class="d-flex flex-column flex-sm-row gap-2 justify-content-center mx-auto">
|
||||
<form action="{ROOT_URL}subscribe/home" method="post" class="form-horizontal">
|
||||
<div class="d-flex flex-column w-75 w-sm-100 gap-2 justify-content-center mx-auto">
|
||||
<form action="{ROOT_URL}subscribe/home" method="post">
|
||||
<label for="email" class="visually-hidden">Email address</label>
|
||||
<input name="email" id="email" type="email" class="form-control my-2" placeholder="Email address" autocomplete="email">
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<form action="{ROOT_URL}subscribe/home" method="post" class="form-horizontal">
|
||||
<form action="{ROOT_URL}subscribe/home" method="post">
|
||||
<input type="email" placeholder="Email" id="email" name="email" autocomplete="email">
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
<button name="submit" value="submit" type="submit" class="btn btn-lg btn-primary center-block">Submit</button><br>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<form action="{ROOT_URL}home/unsubscribe" method="post" class="form-horizontal">
|
||||
<form action="{ROOT_URL}home/unsubscribe" method="post">
|
||||
<input type="email" placeholder="Email" id="email" name="email">
|
||||
<input type="hidden" name="token" value="{TOKEN}">
|
||||
<button name="submit" value="submit" type="submit" class="btn btn-lg btn-primary center-block">Submit</button><br>
|
||||
|
Reference in New Issue
Block a user