Add-ons

Bootstrap form helpers

Generate HTML form fields and buttons with Bootstrap CSS style.

All new helpers are named with bs_ prefix and can be used as same as their original.
For example, Bootstrap version of form_input() is bs_form_input().

Example output: <input class="form-control" type="text" value="">

Installation

• MY_form_helper.php → application/helpers/MY_form_helper.php

Ion auth

https://github.com/benedmunds/CodeIgniter-Ion-Auth

Simple and Lightweight Auth System based on Redux Auth 2.

  • Not included Mongodb model and Bcrypt library.
  • Only included English language.
  • Customized controller to use with HMVC and CIS Template library.
  • Used CIS Bootstrap form helpers for better form display.
  • Already wrapped with Authentication library to be extended quickly.

Installation

• config/ion_auth.php → application/config/config/ion_auth.php
• controllers/auth.php → application/modules/auth/controllers/controllers/auth.php
• controllers/auth_ajax.php → application/modules/auth/controllers/controllers/auth_ajax.php
• language/auth_lang.php → application/language/english/language/auth_lang.php
• language/ion_auth_lang.php → application/language/english/language/ion_auth_lang.php
• libraries/Bcrypt.php → application/libraries/libraries/Bcrypt.php
• libraries/Ion_auth/Ion_auth.php → application/libraries/Ion_auth/libraries/Ion_auth/Ion_auth.php
• libraries/Authentication.php → application/libraries/libraries/Authentication.php
• models/ion_auth_model.php → application/models/models/ion_auth_model.php
• views/email/activate.tpl.php → application/modules/auth/views/email/views/email/activate.tpl.php
• views/email/forgot_password.tpl.php → application/modules/auth/views/email/views/email/forgot_password.tpl.php
• views/email/new_password.tpl.php → application/modules/auth/views/email/views/email/new_password.tpl.php
• views/change_password.php → application/modules/auth/views/views/change_password.php
• views/create_group.php → application/modules/auth/views/views/create_group.php
• views/create_user.php → application/modules/auth/views/views/create_user.php
• views/deactivate_user.php → application/modules/auth/views/views/deactivate_user.php
• views/edit_group.php → application/modules/auth/views/views/edit_group.php
• views/edit_user.php → application/modules/auth/views/views/edit_user.php
• views/forgot_password.php → application/modules/auth/views/views/forgot_password.php
• views/index.php → application/modules/auth/views/views/index.php
• views/login.php → application/modules/auth/views/views/login.php
• views/reset_password.php → application/modules/auth/views/views/reset_password.php
• pagelet_ion_auth.php → application/modules/skeleton/views/content/pagelet_ion_auth.php
  • Set your assets URL in application/config/assets.php file.
    Example: $config['assets_url'] = 'http://localhost/ciske/assets/';.
  • Run SQL script from application/modules/addons/data/ion_auth/sql/ion_auth.sql file.
    Or use Ion auth's db migration application/modules/addons/data/ion_auth/migrations/001_install_ion_auth.php.
    Note: These files are not copied out automatically. If your choice is using migration, you will have to copy the migration file yourself and do some extra steps as described here.
  • Set your database settings in application/config/database.php file.
  • Edit your encryption key in application/config/config.php file.
  • Customize library config in application/config/ion_auth.php file.

Skeleton (only available after installed)

http://farmaciapascual.com/#ion-auth


jQuery file upload

https://github.com/blueimp/jQuery-File-Upload

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.

  • Only included the basic plugin with PHP upload handler.
  • Packed into a photo upload pagelet.
    Simply add this single line of code on your form to load the upload button:
    echo Modules::run("photo/_pagelet_upload_control");

Installation

• config/upload.php → application/config/config/upload.php
• controllers/photo.php → application/modules/photo/controllers/controllers/photo.php
• controllers/photo_ajax.php → application/modules/photo/controllers/controllers/photo_ajax.php
• libraries/jQuery_file_upload/Uploadhandler.php → application/libraries/jQuery_file_upload/libraries/jQuery_file_upload/Uploadhandler.php
• libraries/Uploader.php → application/libraries/libraries/Uploader.php
• views/upload_control/template_error.php → application/modules/photo/views/upload_control/views/upload_control/template_error.php
• views/upload_control/template_holder.php → application/modules/photo/views/upload_control/views/upload_control/template_holder.php
• views/upload_control/template_item.php → application/modules/photo/views/upload_control/views/upload_control/template_item.php
• views/upload_control/template_progress.php → application/modules/photo/views/upload_control/views/upload_control/template_progress.php
• views/pagelet_upload_control.php → application/modules/photo/views/views/pagelet_upload_control.php
• views/upload.php → application/modules/photo/views/views/upload.php
• fileupload.js → assets/js/fileupload.js
• pagelet_jquery_file_upload.php → application/modules/skeleton/views/content/pagelet_jquery_file_upload.php

Skeleton (only available after installed)

http://farmaciapascual.com/#jquery-file-upload


validate.js

https://github.com/rickharrison/validate.js

Lightweight JavaScript form validation library inspired by CodeIgniter.

  • Use CIS.Form.validation(formName, rules) to check rules of all form fields and show error on each field.
  • Use CIS.Form.showMessage($form, message, type) to show a general success/error form message.

Installation

• controllers/form_validation_example.php → application/modules/form_validation_example/controllers/controllers/form_validation_example.php
• controllers/form_validation_example_ajax.php → application/modules/form_validation_example/controllers/controllers/form_validation_example_ajax.php
• views/example_form.php → application/modules/form_validation_example/views/views/example_form.php
• views/pagelet_example_form.php → application/modules/form_validation_example/views/views/pagelet_example_form.php
• formvalidation.js → assets/js/formvalidation.js
• pagelet_validate_js.php → application/modules/skeleton/views/content/pagelet_validate_js.php

Skeleton (only available after installed)

http://farmaciapascual.com/#validate-js