by prettyscripts on 2010-11-26 14:30:00 • Leave a comment »
tool
i'm working on a Yii-based project which requires to display chinese. this isn't a problem because the framework already caters for multilanguages.
the problem is editing the translation file.
fyi i develope projects on linux servers and use putty to…
more »Tags: chinese, framework, language, putty, telnet, utf8, yii
by prettyscripts on 2010-11-23 16:49:00 • Leave a comment »
php • yii
with displaying pages of results with CGridView, there are page links to navigate to various pages. there are 'Previous' and 'Last buttons. but where are 'First' and 'Last' buttons? when viewing the source code, you can see these buttons in html code.…
more »Tags: buttons, framework, navigation, yii
by prettyscripts on 2010-11-16 11:16:06 • 2 comments »
php • sql • yii
when selecting a column as alias name, a variable (property) of the same name must be manually defined in the model. eg, if the sql is:select column_1 as alias_a from table_1 in the model file:class MyModel as CActiveRecord { public $alias…
more »Tags: alias, framework, model, select, sql, yii
by prettyscripts on 2010-11-12 15:40:00 • 8 comments »
php • yii
by default the filter for each data column is a text field. to display the field as drop down list, CDataColumn::filter property must be set as an array. for example, for user table there's column for sex represented by 1 = male and 2 = female. in the…
more »Tags: column, dropdown, filter, framework, grid, input, yii
by prettyscripts on 2010-10-29 11:58:44 • Leave a comment »
php • yii
the following codes are called from a view files, and assume the file to be included is named partial.php. to render a view from the current controller, ie view files are from the same directory:$this->renderPartial('partial'); to render a…
more »Tags: code, framework, include, php, render, view, yii