Bkader Skeleton Versions Save

A ready-to-use CodeIgniter skeleton with tons of new features and a whole new concept of hooks (actions and filters) as well as a ready-to-use and application-free themes and plugins system.

2.1.5

5 years ago

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 with jQuery 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 and restore.php within THEME_VIEWS_PATH/users/_file_.

2.1.3

5 years ago

Updated to CodeIgniter 3.1.9.
Seel full changelog.

2.1.2

5 years ago

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

5 years ago
  • Added translations to modules licenses and authors [489fbee].
  • Used __ function instead of line 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 from KB_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

5 years ago
  • 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 and nonce_admin_anchor for a better modules contexts guess [6f132a4].
  • Added Dummy Module to demonstrate how to add content to dashboard without having views, using only init.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 to include or require them [view file].
  • Added support for PHP-Gettext [6fe9c63].
  • Some functions were removed from Theme.php library to KB_Router.php class [ecfe906].
  • Added siteinfo and get_siteinfo functions [152b089].
  • Added Data_Cache object and cache system using $GLOBALS, just like WordPress [Wiki].

2.0.0

5 years ago
  • 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 and password_verify. Simply use: phpass_hash and phpass_check.
    • PHPMailer is used to send emails.
    • Spyc used to read/write YAML files. Two helpers were added: yaml_read_file and yaml_write_file. We will talk more about this later.
    • We added two more helpers: json_read_file and json_write_file. Do they need to be explained?
  • 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 their style.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.

1.5.1

6 years ago
  • This release comes with a minor fix for issue #7
  • Fixed issue when dynamically changing themes (see).

1.5.0

6 years ago
  • 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 using no_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 to nonce_ for better understanding but old ones were kept for backward compatibility (safe_urlnonce_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 applying url_title to usernames.

  • Added jQuery validation to Admin.php controllers of the following modules: settings, users, menus and media.

  • Fixed CodeIgniter typo #5462.

1.4.1

6 years ago
  • 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

6 years ago

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

  1. Modules now have their own routes set in their manifest.json files (example).
  2. 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": "[email protected]",
    "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": "الأعضاء"
    }
  }
}

  1. Media manager enhanced with better design and additional bulk selection/deletion feature.
  2. Skeleton code rewritten a bit for better performance.
  3. The old safe url system is removed and replace with a fancy nonce 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.
}
  1. KB_Security.php created and handles nonces with its methods or their helpers: create_nonce and verify_nonce:
create_nonce('action-name');
verify_nonce('nonce', 'action-name');
  1. 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.
  1. 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 and admin_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 and after_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.

  1. 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.
  2. 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)

  1. 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.
  1. 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.