Wiki

Sorted by viewsX
Displaying 91-100 of 469 result(s).

Using filters with CGridView and CArrayDataProvider

Created about a year ago by marcovtwoutHow-tos12 comments – viewed 24,404 times – ( +10 )
Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

Model password confirmation field.

Created about a year ago by twisted1919How-tos5 comments – viewed 24,355 times – ( +7 )
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.

Moving project code outside of webroot (plus multiple project support)

Created 2 years ago by Steve FriedlHow-tos5 comments – viewed 24,263 times – ( +22 / -1 )
Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).
tags: config, security

How to translate and do the translations the easy way

Created about a year ago by Roman SolomatinHow-tos3 comments – viewed 24,199 times – ( +17 / -1 )
I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.
tags: i18n

How to use single form to collect data for two or more models (CActiveForm and Ajax Validation edition)

Created about a year ago by RusAlexHow-tos8 comments – viewed 23,779 times – ( +16 )
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

Common Yii questions

Created about a year ago by dckurushinFAQs2 comments – viewed 23,524 times – ( +20 )
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

Creating a parameterized LIKE query

Created about a year ago by Steve FriedlFAQs3 comments – viewed 23,501 times – ( +14 )
It's common to see users wishing to make substring DB queries, using the % metacharacter used to match anything; in this FAQ we'll search the tbl_comments table from the blog tutorial hoping to find the text in $match in the content column

"Why do I get a 403 error when trying to use Gii?"

Created 2 years ago by Steve FriedlFAQs2 comments – viewed 23,305 times – ( +7 )
After enabling the Gii module in your protected/config/main.php file and then try to use it with http://example.com/index.php?r=gii, you get an error:
tags: Gii, config

How to create/save more Model inputs and make them repeatable with jQuery

Created 4 years ago by qiangTutorials2 comments – viewed 23,292 times – ( +10 )
This is the first real problem that I encountered using Yii, trying to make a Model input repeatable in the form, validate and save them.

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

Created 2 years ago by Maurizio DombaHow-tos5 comments – viewed 23,017 times – ( +24 )
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.