Wiki

Sorted by ratingX
Displaying 71-80 of 601 result(s).

Use crypt() for password storage

Created about a year ago by fsbTutorials12 comments – viewed 45,753 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.

Filter / Search with CListView

Created 2 years ago by JohnPollardHow-tos7 comments – viewed 27,128 times – ( +24 ) – version 1.1
This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

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

Created 5 years ago by qiangTutorials1 comment – viewed 104,292 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,389 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

URL management for Websites with secure and nonsecure pages

Created about a year ago by qiangHow-tos9 comments – viewed 15,703 times – ( +23 ) – version 1.1
In this article, I will describe how to manage URLs for a Website that has both secure and nonsecure content.
tags: URL

How to upload a file using a model

Created 5 years ago by qiangTutorials26 comments – viewed 272,760 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,598 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".

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 3 years ago by xrxHow-tos14 comments – viewed 29,753 times – ( +22 ) – version 1.1
Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

Common Yii questions

Created 2 years ago by dckurushinFAQs2 comments – viewed 31,709 times – ( +21 ) – version 1.1
Here I suggest to list the most common questions you meet in the forum or freenode irc. Feel free to edit this wiki article, and add another question with answer

Using Yii with PHP 5.4 built-in webserver instead of Apache

Created 2 years ago by samdarkHow-tos1 comment – viewed 8,702 times – ( +21 ) – version 1.1
Since version 5.4 PHP can work as a simple webserver so you can develop Yii applications without installing Apache. That's how to use it: