Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 121-130 of 341 result(s).

Keeping a running total in a CGridView

Created 4 years ago by Steve FriedlHow-tos4 comments – viewed 26,736 times – ( +24 ) – version 1.1
This tip created in conjunction with IRC #yii channel users emilsedgh and tydeas - thanks!
tags: CGridView

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

Created 2 years ago by skwordenHow-tos4 comments – viewed 15,189 times – ( +4 / -1 ) – version 1.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.

Image resize on the fly

Created 2 years ago by TpoxaHow-tos4 comments – viewed 16,480 times – ( +4 ) – version 1.1
For example have folder with image resources which are public accessible
tags: yii, image-resize

Managing a star rating with the StarRating widget in Yii 2

Created about a year ago by Kartik VHow-tos4 comments – viewed 5,045 times – ( +38 / -5 ) – version 2.0
In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

Updating fields on a form with Ajax and Json

Created 4 years ago by Russell EnglandHow-tos4 comments – viewed 49,745 times – ( +12 / -1 ) – version 1.1
I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.

How to use YiiBooster Bootstrap Gallery

Created 2 years ago by Antonio RamirezHow-tos4 comments – viewed 23,918 times – ( +4 ) – version 1.1
Since version 1.0.4, Yii developers can make use of the image gallery provided by Sebastian Tshan, a great javascript developer that has created some true gems like the jquery file upload plugin.

Using International Dates

Created 4 years ago by Russell EnglandHow-tos4 comments – viewed 32,420 times – ( +18 ) – version 1.1
I needed British (dd/mm/yyyy) formatted dates throughout my application but found it very difficult to find examples of how to do this - until I found this excellent forum post http://www.yiiframework.com/forum/index.php?/topic/3649-dealing-with-i18n-date-formats/

Sub-domains with different databases in Yii!

Created 4 years ago by jwerdHow-tos4 comments – viewed 13,603 times – ( +2 ) – version 1.1
Sub-domains with different databases in Yii!

Using updateAll and deleteAll with scopes

Created 11 months ago by le_topHow-tos4 comments – viewed 13,030 times – ( +5 ) – version 1.1
Using CActiveRecord->updateAll() and CActiveRecord->deleteAll() with scopes and criteria requires some tricks that are explained in this article. While findAll() , find() and some other methods use scopes automatically, updateAll() and deleteAll() do not.

Alternative folder structure for a standard Yii app

Created 2 years ago by TrejderHow-tos4 comments – viewed 10,486 times – ( +5 ) – version 1.1
I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.