https://github.com/bkader/ci-starter-kit

My CodeIgniter starter kit with basic needed libraries to start a new CI application.

https://github.com/bkader/ci-starter-kit

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.3%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

My CodeIgniter starter kit with basic needed libraries to start a new CI application.

Basic Info
  • Host: GitHub
  • Owner: bkader
  • License: mit
  • Language: PHP
  • Default Branch: master
  • Size: 2.37 MB
Statistics
  • Stars: 8
  • Watchers: 4
  • Forks: 1
  • Open Issues: 0
  • Releases: 1
Archived
Created about 9 years ago · Last pushed over 8 years ago
Metadata Files
Readme License

README.md

CodeIgniter Starter Kit (Demo)

What is this?

Because I am a huge fan of CodeIgniter, I made a small collection of needed resources and put them all together into a single brute project that I simply copy then edit to start developing a CI-based web application.

How to use?

All you have to do is to copy all files, or the one you need, to your workspace and do tiny modifications and configuration.

What is included?

  • HMVC structure using wiredesignz extension.
  • Automatic detection of your base_url that you can change to use your own (see).
  • .htaccess so you would never see index.php on your URLs.
  • Encryption key automatically generated and stored in application/encryption_key.php file (see how it's done).
  • My own Theme Library with two (2) themes included (Bootstrap and Semanti UI) and it is so easy to add yours.
  • Laraval static routing.
  • Some libraries: Bcrypt, Markdown.
  • All modules can have their own admin aria by simply adding an admin controller to them (application/modules/MODULE/controllers/Admin.php). This controller should extend *Admin_Controller** in which you have to set your own checking logic.
  • Controllers that require a logged in user should simply extend User_Controller instead of MY_Controller and don't forget to add your checking logic as well.
  • A dummy module is added so you simply copy-paste it and keep only folders that you need then create your files.
  • A very useful hook is added: compress.php that will simply compress your HTML output when you set your environment to production.
  • Instead of calling Form validation library on a method that requires it, I have added a method with optional rules array that you can use as a shortcut. See the method: prepare_form()

    How to use prepare_form() method?

    Let us say in my Users controller, I have a login() method that has a username and a passwordfields with some rules. This is how my code should look like:

    class Users extends MYController { // Site login page. public function login() { // I start by prepare the form validation. $this->prepareform(array( // Username field. array( 'field' => 'username', 'label' => 'Username', 'rules' => 'required' ), // Password field. array( 'field' => 'password', 'label' => 'Password', 'rules' => 'required|min_length[8]' ) ));

        // Now I prepare form fields.
        $this->data['username'] = array(
            'name'        => 'username',
            'id'          => 'username',
            'placeholder' => 'Username',
            'value'       => set_value('username')
        );
        $this->data['password'] = array(
            'type'        => 'password',
            'name'        => 'password',
            'id'          => 'password',
            'placeholder' => 'Password',
            'value'       => set_value('Password')
        );
    
        // I proceed to form validation now.
        if ($this->form_validation->run() == FALSE)
        {
            $this->theme->title('Login');
            $this->theme->load('login', $this->data);
        }
        else
        {
            // Proceed to login after collecting data.
        }
    
    }
    

    } In my view file that I named login.php (here without any styling):

    <?php echo formopen('login'); ?> <?php echo forminput($username); ?> <?php echo forminput($password); ?> <?php echo formsubmit('login', 'Login'); ?>

Credits

All credits go to their respective owners! And a little bit for me for doing this with so much love.

Owner

  • Name: Kader Bouyakoub
  • Login: bkader
  • Kind: user
  • Location: Algeria
  • Company: @ianhubnet

Simple dynamic guy, a developer, a gamer, a geek and specialized in anything as long as I can learn it.

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels