Wiki

Articles in category "tutorials", sorted by ratingX
Displaying 31-40 of 203 result(s).

Saving CGridView filter

Created 2 months ago by sefburhanTutorials2 comments – viewed 1,609 times – ( +26 ) – version 1.1
In this tutorial we will try to save cgridview filter(search) with title etc. basically we want to save two forms data i.e one represents filters and other data about filters like title, description etc. You can define your own structure for filter saving table here are some basic steps

Drills : Search by a HAS_MANY relation

Created about a year ago by softarkTutorials11 comments – viewed 19,936 times – ( +26 ) – version 1.1
Sometimes we get lost trying to search by a HAS_MANY relation using CActiveRecord or CActiveDataProvider. This article is a series of drills that try to describe the practical techniques of searching by a HAS_MANY relation.

Understanding Scenarios

Created 2 years ago by Luke JurgsTutorials11 comments – viewed 64,763 times – ( +25 ) – version 1.1
Scenarios are an extremely useful tool for separating validation tasks on any class you use derived from CModel. In this tutorial we will use CActiveRecord.

How to implement multiple page layouts in an application

Created 5 years ago by qiangTutorials2 comments – viewed 74,125 times – ( +24 ) – version 1.1
In this tutorial, we describe how to implement multiple layouts for action views in an application. As an example, we assume that the pages in our application will use three different layouts:
tags: layout

Use crypt() for password storage

Created about a year ago by fsbTutorials12 comments – viewed 45,229 times – ( +24 ) – version 1.1
Update: This wiki has been rewritten to be in line with Yii 1.1.14. Since many of the detailed complexities are now handled by Yii, the article focuses on how the crypt() built-in function works and why it's important to use it correctly.

How to add more information to Yii::app()->user

Created 5 years ago by qiangTutorials1 comment – viewed 103,715 times – ( +23 ) – version 1.1
By default, the expression Yii::app()->user returns a CWebUser application component which represents the information that are closely related with the current user. Some information can be persistent throughout the current user session. For example, CWebUser already comes with a name property that stores the username of the current user.

Setting and maintaining the language in Application (i18n)

Created 5 years ago by olafureTutorials11 comments – viewed 68,051 times – ( +23 ) – version 1.1
As seen in this post, Yii doesn't enforce how language is set and maintained within the session.
tags: i18n, translation

How to upload a file using a model

Created 5 years ago by qiangTutorials26 comments – viewed 270,984 times – ( +80 / -6 ) – version 1.1
First declare an attribute to store the file name in the model class (either a form model or an active record model). Also declare a file validation rule for this attribute to ensure a file is uploaded with specific extension name.
tags: File upload

Impersonate Users within Yii Framework

Created 3 years ago by WoilTutorials5 comments – viewed 11,558 times – ( +22 ) – version 1.1
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

Using the configuration file, explain what can be configured.

Created 4 years ago by atrandafirTutorials0 comments – viewed 42,088 times – ( +20 ) – version 1.1
The purpose of this post is to let anyone quickly find how to accomplish a configuration task, and list here all the posibilities of the config.php file and also link to pages that explain how is each thing implemented.