sangar82 / CodeIgniter-Starter

Codeigniter 2.1.3 base for fast development
Other
40 stars 23 forks source link

Codeigniter Starter

Custom Codeigniter with preinstalled features:

Codeigniter Version

The Codeigniter Version is 2.1.3

Server Requirements

PHP version 5.3.5 or newer. At this moment, Scaffolding works only with MySql and models works with phpactiverecord

Installation

The installation is the same as Codeigniter.

Please see the installation instruccions of Codeigniter http://codeigniter.com/user_guide/installation/index.html

Create the database and import the tables with the mysql_dump.sql file

Edit the files with your preferences (domain, languages, database, authentification):

Create a virtualhost with the the same domain that you write in config.php. If you want more languages, create more ServerAlias

<VirtualHost *:80>

    ServerName www.mydomain.com

    ServerAlias en.mydomain.com

    ServerAlias es.mydomain.com

    ServerAlias ca.mydomain.com

    DocumentRoot /www/mydomain.com

</VirtualHost>

Enjoy!!

Backend user and password

The default user to access to the private zone is:

user:       admin@admin.com

password:   password

How create a new scaffold

Sangar Scaffolds creates the files for CRUD operations for you!

It creates the tables on the database, the controllers, the models and the views.

It also modifies the routes.php file.

You can create forms with the followings elements:

This version has more features that sangar scaffold spark. http://getsparks.org/packages/sangar-scaffold/versions/HEAD/show

Each element has validation rules and the possibility to do it multilanguage.

Create also a paginated list view.

To create a new scaffold, login into the private zone, and search the link 'Scaffolds' on the top of the page

Translate controllers name and controllers method names

If you want to translate controllers names and controllers method names edit the file

/application/language/controller_translations.php

and

/application/language/method_translations.php. 

For use in your views use the helper transurl_helper.php:

<?=lang_anchor(controller_name, method_name, params)?>

Example:

<?=lang_anchor('users', 'edit', '1')?>

(It produces a link in the actual language, with the controller and method names translated)