YII webapp customising from ground up


A)) config/main.php 1. name your webapp ‘name’=’my webapp’ 2.  enable gii ‘gii’=>array( ‘class’=>’system.gii.GiiModule’, ‘password’=>’password’, // If removed, Gii defaults to localhost only. Edit carefully to taste. ‘ipFilters’=>array(‘127.0.0.1′,’::1′), ), ), 3. create your database scheme 4.  beautify url ‘urlManager’=>array( ‘urlFormat’=>’path’, ‘rules’=>array( ‘<controller:\w+>/<id:\d+>’=>'<controller>/view’, ‘<controller:\w+>/<action:\w+>/<id:\d+>’=>'<controller>/<action>’, ‘<controller:\w+>/<action:\w+>’=>'<controller>/<action>’, ), ), 5. enable mysql or point to sqldatabase ‘db’=>array( ‘connectionString’ =>…

Using Google Transliterate API with YII


Using Google Transliterate API is straight forward. However to meet the goals of the small project (Webapp for food Catering company) I need to overcome following challenges. Want to change id of text box (Tablename_fieldname) at will Google text box id defaults to transliterateTextarea. I was not able to figure out how to change the…

Handling related models in YII forms


Many AWBs can be carried in one Trip. One AWB can be carried across Many Trips. We will use MySQL for the database. Below is the schema. tbl_tripAWB is the junction table. CREATE TABLE tbl_trip( id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, truckId TINYINT UNSIGNED NOT NULL, departureDate DATETIME NOT NULL, tripOrigin MEDIUMINT UNSIGNED…

First Step before Creating a Webapp with YII


Install LAMP Server Install PHPunit % sudo pear channel-discover pear.phpunit.de% sudo pear install phpunit/PHPUnit Install Selenium Download Selenium Remote Control (Selenium RC) zip file from http://seleniumhq.org/download/.Run Server from shell % java -jar selenium-server.jar Running the Functional Tests Before we can run this functional test, we need to make a couple of configuration changes to our…