Wiki

Sorted by date (updated)X
Displaying 291-300 of 470 result(s).

Use application on production/development environment without making changes

Updated about a year ago by ifdatticTips2 comments – viewed 16,152 times – ( +8 / -1 )
I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

How to ensure unicity to url

Updated about a year ago by marcovtwoutTips3 comments – viewed 8,203 times – ( +14 )
Many time for SEO porpouses is important that each page will have a unique address.
tags: SEO, unique, URL

Managing constants easily

Updated about a year ago by briiC.lvTips4 comments – viewed 6,177 times – ( +4 )
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.

Rendering a view file in a console application

Updated about a year ago by TompiHow-tos1 comment – viewed 4,389 times – ( +2 )
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.

How to add a named scope to ActiveRecords with a behavior

Updated about a year ago by yiqing95Tutorials1 comment – viewed 9,519 times – ( +3 )
Since Yii 1.0.5 you can use named scopes with ActiveRecords. They are a great help in simplifying your query calls.

Searching and sorting by related model in CGridView

Updated about a year ago by redguyTutorials49 comments – viewed 59,581 times – ( +77 )
Lets say we have two models and relation between them:

1:n relations sometimes require CDbCriteria.together

Updated about a year ago by fsbTips4 comments – viewed 13,904 times – ( +13 )
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

How to use Flash, Zend AMF and Yii Framework

Updated about a year ago by janistoTutorials0 comments – viewed 6,238 times – ( +3 )
This is a simple demo how to use Zend_AMF with Yii.
tags: flash, zend, Zend_AMF, AMF

CPhpAuthManager - how it works, and when to use it

Updated about a year ago by François GannazHow-tos5 comments – viewed 12,352 times – ( +1 / -3 )
Before reading this article, you should first learn this How to setup RBAC with a php file

Using events with CAction classes

Updated about a year ago by 张 迪Tips0 comments – viewed 7,561 times – ( +8 )
There are some good guides out there explaining how to work with events and the ways to attach them to your components, but none (that I know) explain the following way to configure your events with CAction classes on your controllers the following way.