Wiki

Sorted by ratingX
Displaying 41-50 of 601 result(s).

XUpload Workflow

Created about a year ago by AsgarothTutorials25 comments – viewed 39,992 times – ( +31 ) – version 1.1
This wiki describes a more complex workflow using the XUpload widget

Single sign on across multiple subdomains

Created 3 years ago by ianarĂ©How-tos9 comments – viewed 24,882 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,737 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.

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

Created 4 years ago by atrandafirTutorials10 comments – viewed 84,323 times – ( +30 ) – 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.

Code style

Created 3 years ago by zaccariaTips2 comments – viewed 12,759 times – ( +29 ) – version 1.1
Often, when writing widgets or editing Yii code, it is unclear whether or not the code is following the MVC pattern.
tags: mvc

Enforcing "You must agree" requirements in forms

Created 3 years ago by Steve FriedlHow-tos3 comments – viewed 14,159 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

How to automate timestamps in ActiveRecord models

Created 5 years ago by dalipTutorials7 comments – viewed 89,283 times – ( +28 ) – version 1.1
There are many ways to automate the setting of timestamps in yii ActiveRecord models. Three are presented here:

Organize directories for applications with front-end and back-end

Created 4 years ago by qiangTutorials10 comments – viewed 55,563 times – ( +28 ) – version 1.1
Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing directories of the code for both ends.

SEO-conform Multilingual URLs + Language Selector Widget (i18n)

Created 2 years ago by c@cbaTutorials35 comments – viewed 34,841 times – ( +28 ) – version 1.1
You have a multilingual application, and you want the URL of a page to be different for different languages, to account for SEO. The URL for the contact page for example should look like http://something.com/en/contact in english, and http://something.com/de/contact in german. This tutorial describes how to make it happen. Note that currently selected language is always a part of the URL, and thus available to the application through $_GET. You don't have to use sessions variables to keep track of the language if you don't want to.

Searching and Sorting by Count of Related Items in CGridView

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