Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 11-20 of 255 result(s).

Single sign on across multiple subdomains

Created 3 years ago by ianarĂ©How-tos9 comments – viewed 24,764 times – ( +31 ) – version 1.1
This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.

Create your own Validation Rule

Created 3 years ago by nickcvHow-tos11 comments – viewed 105,078 times – ( +71 / -3 ) – version 1.1
Some times the core validation rules provided by Yii won't satisfy all your needs, so you'll need to create your very own validation rule.

Enforcing "You must agree" requirements in forms

Created 3 years ago by Steve FriedlHow-tos3 comments – viewed 14,098 times – ( +29 ) – version 1.1
Checkboxes have two possible values, true and false, but some applications require that the user select one particular value before proceeding. Examples might be:
tags: validation

Searching and Sorting by Count of Related Items in CGridView

Created 2 years ago by softarkHow-tos13 comments – viewed 26,163 times – ( +28 ) – version 1.1
Let's say we have two models and relation between them:

Cookie management in Yii

Created 3 years ago by TrejderHow-tos5 comments – viewed 73,344 times – ( +41 / -1 ) – version 1.1
Cookie management in Yii is easy, but may not be so obvious for the beginners to this framework, so I wrote this simple article to clear some doubts out.

Creating a jQueryUI Sortable CGridView

Created 2 years ago by blindMoeHow-tos22 comments – viewed 26,314 times – ( +41 / -1 ) – version 1.1
I have had to do this a couple of times now so I figured I would share it with the community. I am going to keep this short because I really hope that you are familiar with jQueryUI's Sortable class before starting this tutorial.

Multiple-database support in Yii

Created 3 years ago by Steve FriedlHow-tos14 comments – viewed 58,047 times – ( +27 ) – version 1.1
The customary configuration of a Yii application includes just a single database section in the protected/config/main.php file, but it's easy to extend this to support more than one, tying each Model to one of the databases.
tags: Database

How to use a Widget as an Action Provider

Created 3 years ago by Antonio RamirezHow-tos14 comments – viewed 27,448 times – ( +27 ) – version 1.1
As written on the API docs: An Action Provider Widget is a widget that has declared several actions by using its 'public static function actions()'. After, a Controller can easily import all its declared actions on its 'public function actions()'.
tags: Widgets, CAction

X-Sendfile - serve large static files efficiently from web applications

Created 3 years ago by Maurizio Domba CerinHow-tos5 comments – viewed 35,304 times – ( +26 ) – version 1.1
Normally when we want users to download a file, that file is put in a folder under the web application root and the web server does the rest.

How to use an application behavior to maintain runtime configuration

Created 2 years ago by zaccariaHow-tos3 comments – viewed 21,349 times – ( +26 ) – version 1.1
In this tutorial will be explained a method to manage some configuration runtime. This excellent tutorial follows a similar approach, but requires to write a masterclass which all controllers are supposed to extend, following this wiki you can achieve the same by only editing the configuration.