Skip to content

Commit

Permalink
Update to v0.1.9
Browse files Browse the repository at this point in the history
- Add listing active Pages to Link select for FAQ's.
- Fix FAQ output displaying entities.
- Add Category for FAQ's.
- Add ability for FAQ's to be open when displayed.
- Add Forum System, still work to be done.
- Forum Post Pinning filter to pin checkbox toggle.
- Create text Snippet function for search results to highlight search term, and truncate leading and following text.
  • Loading branch information
Dennis Suitters committed Aug 25, 2021
1 parent 8d0ffcd commit 648fa06
Show file tree
Hide file tree
Showing 924 changed files with 2,836 additions and 93 deletions.
27 changes: 8 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
### v0.1.8
- Add sort field to find items on Content and Users on Account administration pages.
- Fix purchase when logged in parser showing noticed on non inventory items.
- Fix button and input styling in administration.
- Restyle Footer "Back To Top" link, and fix styling for client sites so they have better mobile responsiveness.
- Fix Footer Template Blocks to work better as responsive elements.
- Fix Footer Template Blocks display with toggable options correctly.
- Fix missing URL declaration in `core/add_account.php` resulting in malformed activation link.
- Fix display order not working for Business Hours in Footer area.
- Add ability to upload Theme ZIP files.
- Fix `array_unique()` throwing errors if array is empty.
- Add check if CURL is installed and enabled when installing.
- Add display of number of issues that need to be resolved when installing.
- Add embed Audio plugin for Summernote.
- Fix typo in notification when Booking Invoice is created.
- Add FAQ Administration Editing, and Front End Parsing.
- Make sure Quick Edit dropdown gets closed when switching from List to Cards.
- Change logged in label from "Administration" to "Account", to reduce confusion.
- Add SQL to clear `activate` login field to faciliate activating accounts with activation issues.
### v0.1.9
- Add listing active Pages to Link select for FAQ's.
- Fix FAQ output displaying entities.
- Add Category for FAQ's.
- Add ability for FAQ's to be open when displayed.
- Add Forum System, still work to be done.
- Forum Post Pinning filter to pin checkbox toggle.
- Create text Snippet function for search results to highlight search term, and truncate leading and following text.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![AuroraCMS](core/images/readmelogo.jpg)
AuroraCMS the **Free** Australian Open Source [MIT](https://github.com/DiemenDesign/AuroraCMS/blob/master/LICENSE) licensed Content Management System, built primarily for Australian Businesses, built utilising [PHP](http://php.net/), PDO, [jQuery](http://jquery.com/) and [iCONS](https://github.com/DiemenDesign/iCONS). Built to take advantage of HTML5 and CSS3, with necessary SEO attributes that fit in with Google's recommendations, Micro-formats, JSON-LD, ARIA (A11Y), and general SEO Markup.

Current version is v0.1.8
Current version is v0.1.9

### Features
- AuroraCMS is a Quasi-MVC, Front End is completely MVC, with some AJAX Functions for Form Processing.
Expand Down
17 changes: 15 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,30 @@ This is a quick list of things what need to be fixed or worked on to help those
- Fix update core system
- Fix Selected Administration Theme colour
- Adjust Mobile Responsiveness
- Forum
- Add option to disallow user from posting even when logged in.
- Add Permanent, relabellable Help Ticket Category/Topic, where only the ticket user and administration can view posted ticker/post.
- Inventory
- Customer/Contact List, more of a selection Widget for emails and orders.
- Orders
- Add Orders Quick Edit Dropdown.
- Mobile Display Formatting.
- Newsletters
- Improve editing for Newsletter Email Layout, including being able to add Content, either manually or auto-generated by new content, or filterable by Tags for the Newsletter to associate relevant Content.

- Forum.
- Front End
- Forum
- Tracking of read posts.
- Editing Replies, Posts.
- Quote Posts/replies.
- Set displaying posts via ranking, enable posts and replies to be changed to another viewing rank.
- Add Emoji's to Editor.
- Add Giphy to Editor.
- Add Reactions to posts and replies.
- Add Mentions, Article, and other forum post linking.
- Link Products/Services into posts/replies.
- Raffle System.
- Landing Page for Product, Service, Event promotion.
- Special Product Promotion, with cookie setting for persistent dismissal. (Will basically be an image overlay, with optional countdown, and close button).

- Add Content to the Wiki Pages on how to use AuroraCMS and how to create Templates.
- Add Instructional [Videos to the AuroraCMS YouTube Channel](https://www.youtube.com/channel/UC9vFbrBKmnSgf8TNUBvDX2Q)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.8
v0.1.9
28 changes: 22 additions & 6 deletions core/add_faq.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,26 @@
* @author Dennis Suitters <dennis@diemen.design>
* @copyright 2014-2019 Diemen Design
* @license http://opensource.org/licenses/MIT MIT License
* @version 0.1.8
* @version 0.1.9
* @link https://github.com/DiemenDesign/AuroraCMS
* @notes This PHP Script is designed to be executed using PHP 7+
*/
if(session_status()==PHP_SESSION_NONE)session_start();
require'db.php';
$c=isset($_POST['c'])?filter_input(INPUT_POST,'c',FILTER_SANITIZE_STRING):'';
$t=isset($_POST['t'])?filter_input(INPUT_POST,'t',FILTER_SANITIZE_STRING):'';
$da=$_POST['da'];
if($t!=''){
$s=$db->prepare("INSERT IGNORE INTO `".$prefix."content` (`title`,`contentType`,`notes`,`ti`) VALUES (:title,'faq',:da,:ti)");
$open=isset($_POST['open'])?filter_input(INPUT_POST,'open',FILTER_SANITIZE_NUMBER_INT):0;
$da=isset($_POST['da'])?filter_input(INPUT_POST,'da',FILTER_SANITIZE_STRING):'';
if($t!=''||$da!=''){
if($open==1)
$opt="0000000001000000";
else
$opt="0000000000000000";
$s=$db->prepare("INSERT IGNORE INTO `".$prefix."content` (`title`,`options`,`category_1`,`contentType`,`notes`,`ti`) VALUES (:title,:options,:category,'faq',:da,:ti)");
$s->execute([
':title'=>$t,
':options'=>$opt,
':category'=>$c,
':da'=>$da,
':ti'=>time()
]);
Expand All @@ -27,7 +35,8 @@
'window.top.window.$("#faqs").append(`'.
'<div id="l_'.$id.'">'.
'<div class="row">'.
'<details open>'.
'<h5>'.$c.'</h5>'.
'<details'.($open==1?' open':'').'>'.
'<summary>'.
$t.
'<form class="float-right" target="sp" action="core/purge.php">'.
Expand All @@ -44,4 +53,11 @@
'`);'.
'window.top.window.toastr["success"]("FAQ added!");'.
'</script>';
}else echo'<script>window.top.window.toastr["error"]("No Question Text was entered!");</script>';
}else{
if($t==''&&$da==''){
echo'<script>window.top.window.toastr["error"]("No Question or Answer Text was entered!");</script>';
}else{
if($t=='')echo'<script>window.top.window.toastr["error"]("No Question Text was entered!");</script>';
if($da=='')echo'<script>window.top.window.toastr["error"]("No Answer Text was entered!");</script>';
}
}
178 changes: 178 additions & 0 deletions core/add_forumdata.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
<?php
/**
* AuroraCMS - Copyright (C) Diemen Design 2019
*
* @category Administration - Core - Add Forum Data
* @package core/add_forumdata.php
* @author Dennis Suitters <dennis@diemen.design>
* @copyright 2014-2019 Diemen Design
* @license http://opensource.org/licenses/MIT MIT License
* @version 0.1.9
* @link https://github.com/DiemenDesign/AuroraCMS
* @notes This PHP Script is designed to be executed using PHP 7+
*/
if(session_status()==PHP_SESSION_NONE)session_start();
require'db.php';
$config=$db->query("SELECT * FROM `".$prefix."config` WHERE `id`='1'")->fetch(PDO::FETCH_ASSOC);
function svg2($svg,$class=null,$size=null){
return'<i class="i'.($size!=null?' i-'.$size:'').($class!=null?' '.$class:'').'">'.file_get_contents('images/i-'.$svg.'.svg').'</i>';
}
function rank($txt){
if($txt==0)return'visitor';
if($txt==100)return'subscriber';
if($txt==200)return'member';
if($txt==210)return'member-silver';
if($txt==220)return'member-bronze';
if($txt==230)return'member-gold';
if($txt==240)return'member-platinum';
if($txt==300)return'client';
if($txt==310)return'wholesale-silver';
if($txt==320)return'wholesale-bronze';
if($txt==330)return'wholesale-gold';
if($txt==340)return'wholesale-platinum';
if($txt==400)return'contributor';
if($txt==500)return'author';
if($txt==600)return'editor';
if($txt==700)return'moderator';
if($txt==800)return'manager';
if($txt==900)return'administrator';
if($txt==1000)return'developer';
}
$act=isset($_POST['act'])?filter_input(INPUT_POST,'act',FILTER_SANITIZE_STRING):'';
if($act=='category'){
$t=isset($_POST['t'])?filter_input(INPUT_POST,'t',FILTER_SANITIZE_STRING):'';
$da=isset($_POST['da'])?filter_input(INPUT_POST,'da',FILTER_SANITIZE_STRING):'';
$rank=isset($_POST['rank'])?filter_input(INPUT_POST,'rank',FILTER_SANITIZE_STRING):0;
$el='#cats';
$s=$db->prepare("INSERT IGNORE INTO `".$prefix."forumCategory` (`rank`,`title`,`notes`,`ti`) VALUES (:rank,:title,:notes,:ti)");
$s->execute([
':rank'=>$rank,
':title'=>$t,
':notes'=>$da,
':ti'=>time()
]);
$id=$db->lastInsertId();
$s=$db->prepare("UPDATE `".$prefix."forumCategory` SET `ord`=:ord WHERE `id`=:id");
$s->execute([
':id'=>$id,
':ord'=>$id
]);
$html='<div id="cats_'.$id.'" class="item row mb-3 border-1 bg-white">'.
'<div class="card col-12 border-0">'.
'<div class="form-row">'.
'<form class="d-inline-flex" target="sp" method="post" action="core/update.php">'.
'<input type="hidden" name="id" value="'.$id.'">'.
'<input type="hidden" name="t" value="forumCategory">'.
'<input type="hidden" name="c" value="title">'.
'<div class="input-text">'.svg2('drag','cathandle').'</div>'.
'<div class="input-text">Category</div>'.
'<input type="text" name="da" value="'.$t.'" placeholder="Enter a Category...">'.
'<button class="save d-inline-flex" data-tooltip="tooltip" data-style="zoom-in" aria-label="Save">'.svg2('save').'</button>'.
'</form>'.
'<form class="d-inline-flex" target="sp" method="post" action="core/update.php">'.
'<input type="hidden" name="id" value="'.$id.'">'.
'<input type="hidden" name="t" value="forumCategory">'.
'<input type="hidden" name="c" value="notes">'.
'<div class="input-text">Description</div>'.
'<input type="text" name="da" value="'.$da.'" placeholder="Enter a Description...">'.
'<button class="save" data-tooltip="tooltip" data-style="zoom-in" aria-label="Save">'.svg2('save').'</button>'.
'</form>'.
'<div class="input-text">'.
'<form class="d-inline-flex" target="sp" method="post" action="core/toggle.php">'.
'<input type="hidden" name="id" value="'.$id.'">'.
'<input type="hidden" name="b" value="0">'.
'<input type="hidden" name="t" value="forumCategory">'.
'<input type="hidden" name="c" value="pin">'.
'<label for="pin'.$id.'">Pin: </label><input type="checkbox" id="pin'.$id.'" onchange="this.form.submit();">'.
'</form>'.
'</div>'.
'<form class="d-inline-flex" target="sp" method="post" action="core/purgeforum.php">'.
'<input type="hidden" name="t" value="forumCategory">'.
'<input type="hidden" name="id" value="'.$id.'">'.
'<button class="trash" data-tooltip="tooltip" aria-label="Delete">'.svg2('trash').'</button>'.
'</form>'.
'</div>'.
'<small class="badger badge-'.rank($rank).'">Available to '.ucwords(($rank==0?'everyone':str_replace('-',' ',rank($rank)))).'</small>'.
'</div>'.
'<div id="topics_'.$id.'" class="card-body ml-3 mt-3">'.
'<form target="sp" method="post" action="core/add_forumdata.php">'.
'<input type="hidden" name="act" value="topic">'.
'<input type="hidden" name="id" value="'.$id.'">'.
'<input type="hidden" name="rank" value="'.$rank.'">'.
'<div class="form-row">'.
'<div class="input-text">Topic</div>'.
'<input type="text" name="t" value="" placeholder="Enter a Topic Title...">'.
'<div class="input-text">Description</div>'.
'<input type="text" name="da" value="" placeholder="Enter a Short Description...">'.
'<button class="add" data-tooltip="tooltip" aria-label="Add">'.svg2('add').'</button>'.
'</div>'.
'</form>'.
'</div>'.
'</div>';
}
if($act=='topic'){
$cid=isset($_POST['id'])?filter_input(INPUT_POST,'id',FILTER_SANITIZE_NUMBER_INT):0;
$t=isset($_POST['t'])?filter_input(INPUT_POST,'t',FILTER_SANITIZE_STRING):'';
$da=isset($_POST['da'])?filter_input(INPUT_POST,'da',FILTER_SANITIZE_STRING):'';
$rank=isset($_POST['rank'])?filter_input(INPUT_POST,'rank',FILTER_SANITIZE_STRING):0;
$el='#topics_'.$cid;
$s=$db->prepare("INSERT IGNORE INTO `".$prefix."forumTopics` (`rank`,`cid`,`title`,`notes`,`ti`) VALUES (:rank,:cid,:title,:notes,:ti)");
$s->execute([
':rank'=>$rank,
':cid'=>$cid,
':title'=>$t,
':notes'=>$da,
':ti'=>time()
]);
$id=$db->lastInsertId();
$s=$db->prepare("UPDATE `".$prefix."forumTopics` SET `ord`=:ord WHERE `id`=:id");
$s->execute([
':id'=>$id,
':ord'=>$id
]);
$html='<div id="topic_'.$id.'" class="item row mt-3 bg-white">'.
'<div class="card col-12">'.
'<div class="form-row">'.
'<form class="d-inline-flex" target="sp" method="post" action="core/update.php">'.
'<input type="hidden" name="id" value="'.$id.'">'.
'<input type="hidden" name="t" value="forumTopics">'.
'<input type="hidden" name="c" value="title">'.
'<div class="input-text">'.svg2('drag','subhandle').'</div>'.
'<div class="input-text">Topic</div>'.
'<input class="text-input" type="text" name="da" value="'.$t.'" placeholder="Enter a Topic...">'.
'<button class="save d-inline-flex" data-tooltip="tooltip" data-style="zoom-in" aria-label="Save">'.svg2('save').'</button>'.
'</form>'.
'<form class="d-inline-flex" target="sp" method="post" action="core/update.php">'.
'<input type="hidden" name="id" value="'.$id.'">'.
'<input type="hidden" name="t" value="forumTopics">'.
'<input type="hidden" name="c" value="notes">'.
'<div class="input-text">Description</div>'.
'<input type="text" name="da" value="'.$da.'" placeholder="Enter a Description...">'.
'<button class="save d-inline-flex" data-tooltip="tooltip" data-style="zoom-in" aria-label="Save">'.svg2('save').'</button>'.
'</form>'.
'<div class="input-text">'.
'<form class="d-inline-flex" target="sp" method="post" action="core/toggle.php">'.
'<input type="hidden" name="id" value="'.$id.'">'.
'<input type="hidden" name="b" value="0">'.
'<input type="hidden" name="t" value="forumTopics">'.
'<input type="hidden" name="c" value="pin">'.
'<label for="pin'.$id.'">Pin: </label><input type="checkbox" id="pin'.$id.'" onchange="this.form.submit();">'.
'</form>'.
'</div>'.
'<form class="d-inline-flex" target="sp" method="post" action="core/purgeforum.php">'.
'<input type="hidden" name="t" value="forumTopics">'.
'<input type="hidden" name="id" value="'.$id.'">'.
'<button class="trash" data-tooltip="tooltip" aria-label="Delete">'.svg2('trash').'</button>'.
'</form>'.
'</div>'.
'</div>'.
'<div class="ghost2 hidden"></div>'.
'</div>';
}
echo'<script>'.
'window.top.window.$("'.$el.'").append(`'.$html.'`);'.
'window.top.window.toastr["success"]("'.ucwords($act).' Added");';
if($act=='topic'){
echo'window.top.window.$("#cd_'.$cid.'").addClass("d-none");';
}
echo'</script>';
Loading

0 comments on commit 648fa06

Please sign in to comment.