Wiki

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

Debugging CActiveRecord failed save() attempts

Created 3 years ago by BoazTips0 comments – viewed 19,357 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.

Check users online, user last activity, user last ip

Created about a year ago by frazelliHow-tos5 comments – viewed 8,500 times – ( +5 ) – version 1.1
DbHttpSession

free PHP IDE CodeLobster supports Yii framework

Created 4 years ago by clodTutorials0 comments – viewed 14,240 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 3 years ago by schmunkHow-tos1 comment – viewed 5,255 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.

multiple CActiveDataProviders in one CGridView

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos7 comments – viewed 19,387 times – ( +8 / -1 ) – version 1.1
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

Popup AJAX DialogBox without any extension

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 18,380 times – ( +8 / -1 ) – version 1.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 32,605 times – ( +8 / -1 ) – version 1.1
Hi Everyone

Use application on production/development environment without making changes

Created 4 years ago by ifdatticTips3 comments – viewed 44,832 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 18,568 times – ( +8 / -1 ) – version 1.1
Countries sometimes change their laws pertaining to time zones 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 "time zone" 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 time zones and daylight saving times.

An important tip when you are using CArrayDataProvider.

Created 3 years ago by sirin kTips0 comments – viewed 10,971 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 “yourmodel.id is not defined”.