Wiki

Displaying 71-80 of 468 result(s).

Image resize on the fly

Created 6 months ago by TpoxaHow-tos3 comments – viewed 5,513 times – ( +4 )
For example have folder with image resources which are public accessible
tags: yii, image-resize

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 6 months ago by Xgamer99Tips3 comments – viewed 4,001 times – ( +1 )
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.

Yii shorten common functions with OOP style

Created 6 months ago by pdtkameTips3 comments – viewed 3,705 times – ( +9 / -14 )
This article will show how you can use Yii common functions as shorten OOP function. These functions will help you work with Yii common functions is easier as OOP style.

Cheat Sheet: Displaying Name instead of Numbers and Displaying Alphanumeric instead of numeric values

Created 6 months ago by skwordenHow-tos4 comments – viewed 5,487 times – ( +3 / -1 )
I keep a reference to some simple but painful task if you forget a common or something. I am new to Yii and this took awhile for me to figure out. Everything I read said do this or do that and not a single one worked for me. However, the following did.

pass variables or content block from view file to layout file

Created 6 months ago by yiqing95How-tos0 comments – viewed 5,175 times – ( +1 )
If you use yiic to generate webApplication there will be a layout folder under the protected/views/, and the Controller class under protected/components which will use by default these layouts files.

Localized version of CFormatter

Created 6 months ago by marcovtwoutHow-tos2 comments – viewed 1,889 times – ( +3 )
The default CFormatter (accessible through Yii::app()->format) is not locale aware, unfortunately. Until it is, here is a quick and easy way to localize it, by extending the default class.

Create custom button button with AJAX function in CGridView

Created 7 months ago by nkdHow-tos0 comments – viewed 9,570 times – ( +4 )
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.