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.