Wiki

Sorted by commentsX
Displaying 81-90 of 782 result(s).

Add information to Yii::app()->user by extending CWebUser

Created 6 years ago by atrandafirTutorials11 comments – viewed 125,022 times – ( +35 ) – version 1.1
This little tutorial explains a way how you can retrieve more parameters from Yii::app()->user by adding a component that extends CWebUser and retrieves the user information from database table named User.

Creating and updating model and its related models in one form, inc. image

Created 4 years ago by BoazHow-tos11 comments – viewed 86,464 times – ( +6 / -3 ) – version 1.1
We start slowly and simple...

Understanding "Safe" Validation Rules

Created 5 years ago by Steve FriedlFAQs11 comments – viewed 113,397 times – ( +94 / -1 ) – version 1.1
A common source of confusion among new Yii users is how the 'safe' validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear up this confusion, as well as explain the notion of Massive Assignment.

An Easy Solution for Dependent dropDownList Using AJAX

Created 4 years ago by mrsTips11 comments – viewed 79,177 times – ( +15 / -1 ) – version 1.1
Sometimes new Yii guys face problem to manage dependent dropDownList using AJAX. I am going to discuss an easy solution about this issue.

jQuery UI Datepicker

Created 3 years ago by softarkHow-tos11 comments – viewed 73,917 times – ( +13 ) – version 1.1
We all love the convenient gadget, namely jQuery UI Datepicker as an input element for date. Yii supports it as CJuiDatePicker. Let's see how to use it.

Caching the config main.php

Created 5 years ago by dckurushinTutorials11 comments – viewed 14,825 times – ( +4 / -2 ) – version 1.1
The config long array included every time, and it's not cached at all!

Special $variables in CGridView and CListView

Created 5 years ago by Steve FriedlTips11 comments – viewed 61,644 times – ( +27 / -2 ) – version 1.1
The popular CListView and CGridView widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.

RBAC Super Simple with Admin and User

Created 2 years ago by evercodeTutorials10 comments – viewed 49,932 times – ( +16 / -3 ) – version 2.0
One of the common requests I see in the forum is how to implement RBAC. While you can implement Yii 2's built-in RBAC, that might be too much for developers who are just starting with Yii 2 or have simpler needs. Sometimes you are looking for a fast solution and just want two flavors, user and admin. And even if you will eventually need more, you can use these methods as a starting point for developing your own features or move on to Yii 2's RBAC.

How to set up Unicode

Created 7 years ago by MikeHow-tos10 comments – viewed 90,477 times – ( +19 ) – version 1.1
To fix issues with display of special language characters once and for all there's a solution: use Unicode UTF-8 everywhere. If everything is set up to use Unicode, you can use mostly every language in your application.
tags: i18n, unicode

Model password confirmation field.

Created 5 years ago by twisted1919How-tos10 comments – viewed 69,422 times – ( +11 / -1 ) – version 1.1
I had some troubles with the password confirmation field for when adding updating user records, so i thought that i should share the way i got it working.