Releases: bkader/skeleton
2.1.5
We simply fixed minor (or medium) errors:
- Fixed the problem with removing all filters using the
remove_all_filters
function without arguments [88f0298]. - When using
prep_form
method withjQuery Validation
, scripts are added to your list of enqueued assets! The problem is that we forgot to add files extensions. So we added them [771dd51]. - Put back the possiblity to use dashboad authentication
views/layouts
if the active theme does not provide them [7956c23]. Views are:login.php
,recover.php
,register.php
,resend.php
,reset.php
andrestore.php
withinTHEME_VIEWS_PATH/users/_file_
.
2.1.3
Updated to CodeIgniter 3.1.9.
Seel full changelog.
v2.1.2
Changelog
Minor fixes were done on the code and some hooks were added for more flexibility.
Theme.php
- Fixed
Theme.php
getting always the current theme details when retrieving all themes - 9381313. - Themes details are no longer stored in database. It is useless - efec4a3 / 1a26352.
Hooks
- Allow users to add extra modules, plugins and themes headers (information) - eb68461. Examples:
// For modules:
add_action('modules_headers', function($headers) {
$headers['new_key'] = 'Default value';
return $headers;
});
// For plugins:
add_action('plugins_headers', function($headers) {
$headers['new_key'] = 'Default value';
return $headers;
});
// For themes, your only need to add keys.
add_action('themes_headers', function($headers) {
$headers[] = 'new_key';
return $headers;
});
2.1.1
- Added translations to modules licenses and authors [489fbee].
- Used
__
function instead ofline
when translating lines. - Moves modules, plugins, themes and users actions from
Ajax.php
controller to their respective controllers. - Added some backward compatibility functions (back to PHP 5.2) [6e96930].
- Removed
site_url
function fromKB_url_helper.php
and added_uri_string
that will handle finding named routes [f05243b] and added the possibility to chain named routes [f4c90d1]. - Added optional GET parameter into "uri_string" method and its helper [9dc0450].
- Fixed issue #9 - [6b63605].
2.1.0
- Added external vendor files licenses [957eeaa].
- Fixed dashboard reports menu [785b307].
- Removed
menus.js
file because an independent Menus Manager module will be developed [
9878d1b]. - More useful functions were added to
base.php
file [view all]. - Fixed
admin_url
,admin_anchor
,nonce_admin_url
andnonce_admin_anchor
for a better modules contexts guess [6f132a4]. - Added
Dummy Module
to demonstrate how to add content to dashboard without having views, using onlyinit.php
file and few actions. - Added possible dashboard top level menus for modules.
- Added the
Autoloader
class which you can use to register classes without having toinclude
orrequire
them [view file]. - Added support for
PHP-Gettext
[6fe9c63]. - Some functions were removed from
Theme.php
library toKB_Router.php
class [ecfe906]. - Added
siteinfo
andget_siteinfo
functions [152b089]. - Added Data_Cache object and cache system using $GLOBALS, just like WordPress [Wiki].
2.0.0
-
Folders structure has been changed:
application
which contains your applicaiton files.content
contains all publicly accessible folders and files.skeleton
contains Skeleton and CodeIgniter files, so make sure you know/remember what you edit in case of future updates.
-
No more modules within
Skeleton
folder. Modules are only within your application folder or public modules folder. -
Media manage and menus manager will be developed separately so noone will be forced to have them If he/she doesn't want them.
-
Lots of useful function were added. You can see
skeleton/third_party/bkader
folder for more details. -
More useful vendor libraries and their helpers were added:
- htmLawed used to XSS clean using its helper
deep_xss_clean
. - phpass used instead of Bcrypt. It falls back to
password_hash
andpassword_verify
. Simply use:phpass_hash
andphpass_check
. - PHPMailer is used to send emails.
- Spyc used to read/write YAML files. Two helpers were added:
yaml_read_file
andyaml_write_file
. We will talk more about this later. - We added two more helpers:
json_read_file
andjson_write_file
. Do they need to be explained?
- htmLawed used to XSS clean using its helper
-
More functions can be found in
skeleton/third_party/bkader
. -
The core has been hugely rewritten for better performance (you'll notice that) and easy use.
-
New dashboard look and modules contexts. See the dashboard homepage for more details.
-
Plugins and modules use
manifest.json
files while themes use theirstyle.css
to hold themes details. We may get back to use manifest file for even better performance. -
The dasboard has its own login page. If the current theme does not have views user for authentication or registration methods, Skeleton will fall-back to its default views (don't worry, they're quit cool).
-
Lots of filters/actions are available and they allow you to change logo, copyright, image to the right, lots of texts and images on the dashboard so you can customize it the way you wish.
More changes were done, so many changes that we might certainly have missed some. Try the demo if you want to test the product first.
Fixed Captcha Checker
jQuery validation and more
-
Dashboard cached assets are stored within the
application/cache/assets
folder instead of Skeleton's to allow multiple applications sharing the same installation. -
Added the
do_extension
method to Theme library so that extensions are put back in case of usingno_extension
method first.
$this->theme->no_extension()->add(...);
// Right after do:
$this->theme->do_extension();
- Added jQuery validation library and automatic messages generation from set rules. when using the
prep_form
method, pass your form jQuery selector as the second argument. If you want to apply filters to the plugins parameters, pass the filter suffix as the third parameter (option because it will be automatically generated if not provided):
$this->prep_form($rules, $selector, $filter);
// Example
$this->prep_form(array(
array('field' => 'username',
'label' => 'Username', // Or: "lang:username"
'rules' => 'trim|required|min_length[5])
), '#login');
// To add a filter (example: submitHanlder):
add_filter('jquery_validate_submitHandler-login', function ($handler) {
// Do whatever you want as long as you return it.
});
-
Functions with
safe_
as prefix were renamed tononce_
for better understanding but old ones were kept for backward compatibility (safe_url
→nonce_url
). -
Modules dashboard links can have their submenus displayed if defined in their
manifest.json
files and they can even be translated:
{
"submenu": {
"uri1": "Title 1",
"uri2": "Title 2"
},
"translations": {
"uri1": {
"french": "Anything",
"arabic": "Bla Bla bla"
}
}
}
-
KB_Image_lib.php
added for better image resizing/cropping. See example of usage. -
Fixed issue with
Kbcore_entities.php
library not applyingurl_title
to usernames. -
Added jQuery validation to
Admin.php
controllers of the following modules:settings
,users
,menus
andmedia
. -
Fixed CodeIgniter typo #5462.
Minor fixes and enhancements.
- Added forgotten settings module dashboard translations (dd7519e).
- Fixed calling action using $PLG object to simply using the function (6d758f6 ).
- Used the registered "post_controller_construtor" instead of calling the method on KB_Controller (0dd836a and 520ac65).
- Fixed issue with menus slugs not being URL-titled (7e28ee1).
- All HTML is compressed (when used) except for
<pre>
tags content (351f1cd).
1.4.0
FIRST THING TO DO
Make sure you apply the provided SQL dump FIRST.. It contains some added things to the options
table. Once done, you'll notice changes to the settings page, uploads section.
PHP
- Modules now have their own routes set in their
manifest.json
files (example). - Modules dashboard links can be translated the same way, within the
manifest.json
file (example).
{
"name": "Module Name",
"description": "Module Description",
"version": "1.0.0",
"author": "You Name",
"author_uri": "https://yourweb.site",
"author_email": "your@email.address",
"license": "MIT",
"enabled": true,
"routes": {
"whatever": "module/whatever",
"get:whatever": "module/whatever",
"post:whatever": "module/whatever",
"whatever": "null"
},
"admin_menu": "Text On Dashboard",
"admin_order": 5,
"translations": {
"admin_menu": {
"french": "Utilisateurs",
"arabic": "الأعضاء"
}
}
}
- Media manager enhanced with better design and additional bulk selection/deletion feature.
- Skeleton code rewritten a bit for better performance.
- The old
safe url
system is removed and replace with a fancynonce
system. You must provide an action that you will check on the next request.
// In your form:
echo form_open();
echo form_nonce('your-action-name');
// Then you check in your controller:
if (true !== $this->check_nonce('your-action-name')) {
// Did no't pass.
}
KB_Security.php
created and handles nonces with its methods or their helpers:create_nonce
andverify_nonce
:
create_nonce('action-name');
verify_nonce('nonce', 'action-name');
KB_form_helper.php
saw more functions:form_nonce
,form_referrer
,_configure
and_transfigure
.
form_nonce('action-name'); // Creates the nonce hidden input + referrer.
form_referrer(); // Creates the hidden referrer input.
_translate() // Translates a string that contains "lang:.."
_configure(); // Gets a config value from string containing "config:...".
__transfigure(); // Gets a config or translation for the selected string.
- The dashboard comes with extra actions you can use:
admin_navbar
: in case you want to add a navigation to the admin navbar.admin_navbar_right
: in case you want to add a navigation to the admin right navbar.admin_user_menu
: in case you want to add a navigation to the admin right navbar.admin_page_header
andadmin_page_footer
: located above and below your module's admin views.in_admin_footer
: located right above the footer.admin_menu
: to add anchors to the dashboard sidebar menu.before_admin_menu
andafter_admin_menu
: to add anything before or after sidebar navigation.
It comes with other filters:
* admn_logo
: if you want to alter dashboard logo.
* admin_footer_text
: if you want to change the footer "Thank you..." text.
* admin_version_text
: If you want to replace the text displaying the version.
-
KB_Upload
(loaded using:$this->load->library('upload');
) library added to give you freedom changing upload behavior from your plugins/themes. It comes with few filters that you can use:upload_dir
: In case you want to change the upload directory without changing the setting.upload_xxx
: used to change configuration. x stands for one of these parameters:allowed_types
,max_size
,max_width
,max_height
,min_width
,min_height
,file_ext_tolower
,encrypt_name
,remove_spaces
.
-
Table Library have a tag used to alter table tags:
table_tags
. It takes an array as argument, so you may change any tag you want then return the final array (important).
JavaScript (dashboard)
- We added a new
csk.ui
object useful for confirmation messages and alerts:
csk.ui.confirm("Are you sure?", trueCallback, falseCallback);
csk.ui.alert("You alert message", "success"); // success, error, info or warning.
- AJAX requests are queued for better performance. You can use the
csk.ajax
object to handle AJAX requests, so the next request will not fire unless the previous one is completed.
csk.ajax.request("your url", function () {
type: "POST",
data: {},
complete: function () {}
});
Notice
To reduce used resources to the minimum (fonts), we may get rid of fonts we are using (Fira Sans, Oswald, Ruda, Droid Arabic Kufi and Dubai) and simply use availble ones. What do you think? Let us know on Facebook or even Twitter.