PuTTY and chinese

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

yii: where are first and last navigation buttons?

by prettyscripts on 2010-11-23 16:49:00 • Leave a comment »

phpyii

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

yii: accessing value in select as column

by prettyscripts on 2010-11-16 11:16:06 • 2 comments »

phpsqlyii

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

yii: drop down list filter in CGridView

by prettyscripts on 2010-11-12 15:40:00 • 8 comments »

phpyii

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

yii: rendering a view

by prettyscripts on 2010-10-29 11:58:44 • Leave a comment »

phpyii

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