Wiki

Sorted by viewsX
Displaying 421-430 of 482 result(s).

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 9 months ago by BoazHow-tos2 comments – viewed 3,588 times – ( +5 / -1 )
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

an easy way to required multi columns(At least one cannot be blank)

Created about a year ago by 1065227709Tips0 comments – viewed 3,580 times – ( +1 )
in model add the following code:
tags: rules

Serial Numbers (item counts) in GridView

Created 8 months ago by PeRoChAkHow-tos2 comments – viewed 3,550 times – ( +1 )
Sometime we need to display numbers of items per page with their counting as a serial number.

Disable login page if user is logged in

Created about a month ago by freezingbananaTutorials1 comment – viewed 3,506 times – ( +3 / -11 )
This is a very simple tutorial that demonstrates how to redirect user back to the returnUrl if he is already logged in.

Facebook DeAuthorize callback URL and its response data.

Created 9 months ago by sirin kTutorials1 comment – viewed 3,491 times – ( +3 )
Facebook Deauthorize callback is used to getting notification to the app owner when a user uninstall our app from their fan page or profile.
tags: facebook

Catching bounce messages (NDR) and piping them to a Yii command

Created 9 months ago by bennounaTutorials0 comments – viewed 3,407 times – ( +1 )
In order to avoid bounce messages and unsolicited registrations, most webapps send automatic activation emails upon user registration, and the account remain inactive as long as it is not activated. Better yet, you can periodically purge your data by removing accounts that have not yet been activated.

TimeZone dropDown

Created 6 months ago by Tibor KatelbachHow-tos0 comments – viewed 3,404 times – ( +1 )
I spend a bit of time looking for the this piece of code while building time feature on a site this tutorial also helped Local time zones and locales

PHPStorm & NetBeans autocomplete problem

Created 3 months ago by StagelineTips0 comments – viewed 3,381 times – ( +16 )
The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.

How to use a component before every action of a controller

Created 2 months ago by transistorTips1 comment – viewed 3,333 times – ( +1 )
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

Yet another implementation of CPhpAuthManager.

Created 2 months ago by seenivasanHow-tos2 comments – viewed 3,321 times – ( +5 )
In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at main application level to controller level. This way we have pulverised auth data for entire site into smaller units. Finally we are going to look at couple of examples.