Wiki

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

Using filters with CGridView and CArrayDataProvider

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

How to add ajax-loading indicators

Created 3 years ago by schmunkTutorials5 comments – viewed 25,589 times – ( +25 )
With yii you're able to create ajax requests and updates easily. But most times you always want to show a loading indicatior to your user.
tags: AJAX

How to translate and do the translations the easy way

Created about a year ago by Roman SolomatinHow-tos3 comments – viewed 25,566 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

Creating a parameterized LIKE query

Created 2 years ago by Steve FriedlFAQs4 comments – viewed 25,187 times – ( +15 )
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

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

Created 2 years ago by Steve FriedlHow-tos5 comments – viewed 25,154 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 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 24,680 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 24,479 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

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

Created 2 years ago by Steve FriedlFAQs2 comments – viewed 24,434 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

Displaying image in a CGridView column.

Created about a year ago by sirin kHow-tos5 comments – viewed 24,373 times – ( +12 / -1 )
This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.
tags: CGridView, image

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

Created 2 years ago by Maurizio DombaHow-tos5 comments – viewed 24,148 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.