Releases: bkader/skeleton
2.1.5
We simply fixed minor (or medium) errors:
- Fixed the problem with removing all filters using the
remove_all_filtersfunction without arguments [88f0298]. - When using
prep_formmethod 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/layoutsif the active theme does not provide them [7956c23]. Views are:login.php,recover.php,register.php,resend.php,reset.phpandrestore.phpwithinTHEME_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.phpgetting 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 oflinewhen translating lines. - Moves modules, plugins, themes and users actions from
Ajax.phpcontroller to their respective controllers. - Added some backward compatibility functions (back to PHP 5.2) [6e96930].
- Removed
site_urlfunction fromKB_url_helper.phpand added_uri_stringthat 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.jsfile because an independent Menus Manager module will be developed [
9878d1b]. - More useful functions were added to
base.phpfile [view all]. - Fixed
admin_url,admin_anchor,nonce_admin_urlandnonce_admin_anchorfor a better modules contexts guess [6f132a4]. - Added
Dummy Moduleto demonstrate how to add content to dashboard without having views, using onlyinit.phpfile and few actions. - Added possible dashboard top level menus for modules.
- Added the
Autoloaderclass which you can use to register classes without having toincludeorrequirethem [view file]. - Added support for
PHP-Gettext[6fe9c63]. - Some functions were removed from
Theme.phplibrary toKB_Router.phpclass [ecfe906]. - Added
siteinfoandget_siteinfofunctions [152b089]. - Added Data_Cache object and cache system using $GLOBALS, just like WordPress [Wiki].
2.0.0
-
Folders structure has been changed:
applicationwhich contains your applicaiton files.contentcontains all publicly accessible folders and files.skeletoncontains Skeleton and CodeIgniter files, so make sure you know/remember what you edit in case of future updates.
-
No more modules within
Skeletonfolder. 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/bkaderfolder 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_hashandpassword_verify. Simply use:phpass_hashandphpass_check. - PHPMailer is used to send emails.
- Spyc used to read/write YAML files. Two helpers were added:
yaml_read_fileandyaml_write_file. We will talk more about this later. - We added two more helpers:
json_read_fileandjson_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.jsonfiles while themes use theirstyle.cssto 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/assetsfolder instead of Skeleton's to allow multiple applications sharing the same installation. -
Added the
do_extensionmethod to Theme library so that extensions are put back in case of usingno_extensionmethod 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_formmethod, 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.jsonfiles and they can even be translated:
{
"submenu": {
"uri1": "Title 1",
"uri2": "Title 2"
},
"translations": {
"uri1": {
"french": "Anything",
"arabic": "Bla Bla bla"
}
}
}-
KB_Image_lib.phpadded for better image resizing/cropping. See example of usage. -
Fixed issue with
Kbcore_entities.phplibrary not applyingurl_titleto usernames. -
Added jQuery validation to
Admin.phpcontrollers of the following modules:settings,users,menusandmedia. -
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.jsonfiles (example). - Modules dashboard links can be translated the same way, within the
manifest.jsonfile (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 urlsystem is removed and replace with a fancynoncesystem. 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.phpcreated and handles nonces with its methods or their helpers:create_nonceandverify_nonce:
create_nonce('action-name');
verify_nonce('nonce', 'action-name');KB_form_helper.phpsaw more functions:form_nonce,form_referrer,_configureand_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_headerandadmin_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_menuandafter_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.uiobject 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.ajaxobject 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.