Sorted by ratingX
Displaying 381-390 of 761 result(s).

Debugging CActiveRecord failed save() attempts

Created 2 years ago by BoazTips0 comments – viewed 16,436 times – ( +5 ) – version 1.1
When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

free PHP IDE CodeLobster supports Yii framework

Created 4 years ago by clodTutorials0 comments – viewed 13,561 times – ( +5 ) – version 1.1
This page is created to supply short directions and general tips for managing a Yii application in Codelobster PHP Edition.

How to provide a fallback or mapping for translation messages?

Created 2 years ago by schmunkHow-tos1 comment – viewed 4,658 times – ( +5 ) – version 1.1
Sometimes you want to use exisiting translations for locales, which do not directly match. An example would be a website targeting Germany (de_de), Austria (de_at) and Switzerland (de_ch, fr_ch, it_ch). Although you may have exisiting translations for German (de), French (fr) and Italian (it), there are problems using it directly.

Popup AJAX DialogBox without any extension

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos6 comments – viewed 16,662 times – ( +8 / -1 )
In this wiki I explain how to show a default popup dialogbox (like Gii does) using an existing module.

How to use Expression in default AccessControl to allow only the owner to do some action

Created 2 years ago by whatifHow-tos2 comments – viewed 27,336 times – ( +8 / -1 ) – version 1.1
Hi Everyone

Use application on production/development environment without making changes

Created 3 years ago by ifdatticTips3 comments – viewed 39,648 times – ( +8 / -1 ) – version 1.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.

i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Created 2 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 16,404 times – ( +8 / -1 ) – version 1.1
Countries sometimes change their laws pertaining to timezones and daylight saving times. This means that GMT+2 can be a different time this August compared to last August! However, by using php's DateTime class (instead of timestamps), we can do both "format" and "timezone" conversions on a single DateTime object (only 2 lines of code) for date, time, timestamp and datetime types - while php takes care of nightmares such as current and historical timezones and daylight saving times.

An important tip when you are using CArrayDataProvider.

Created 3 years ago by sirin kTips0 comments – viewed 9,768 times – ( +8 / -1 ) – version 1.1
Yii ‘s CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an error like “ is not defined”.

Yet another implementation of CPhpAuthManager.

Created 2 years ago by seenivasanHow-tos3 comments – viewed 10,128 times – ( +8 / -1 ) – version 1.1
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.

How to write a simple application component

Created 4 years ago by zaccariaHow-tos5 comments – viewed 48,946 times – ( +20 / -7 ) – version 1.1
An application component is a confortable way for share information among all component of the application