Wiki

Sorted by commentsX
Displaying 291-300 of 718 result(s).

How to re enable logging during unit testing

Created 3 years ago by AsgarothHow-tos3 comments – viewed 11,798 times – ( +11 ) – version 1.1
Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

How to access a component of a module from within the module itself

Created 5 years ago by OriginalCopyTutorials3 comments – viewed 21,847 times – ( +5 / -1 ) – version 1.1
The Yii documentation states:
tags: module

How to create/save more Model inputs and make them repeatable with jQuery

Created 5 years ago by qiangTutorials3 comments – viewed 34,433 times – ( +12 ) – version 1.1
This is the first real problem that I encountered using Yii, trying to make a Model input repeatable in the form, validate and save them.

The Comedy of Errors

Created 3 years ago by fsbOthers3 comments – viewed 7,591 times – ( +20 ) – version 1.1
Please join the party by adding your own favorite Yii programming errors. Be sure to leave at least a hint at the correction.

Use application on production/development environment without making changes

Created 2 years ago by ifdatticTips3 comments – viewed 32,301 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.

Secure password hashing with bCrypt

Created 2 years ago by waitforitHow-tos3 comments – viewed 19,048 times – ( +9 ) – version 1.1
In this article I will show you how to implement a secure password hashing mechanism in your Yii projects using a bCrypt class.

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Created 2 years ago by c@cbaHow-tos3 comments – viewed 25,375 times – ( +14 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options. The main code was contributed by zaccaria in the forum (see this post).

How to extend CFormatter, add i18n support to booleanFormat and use it in CDetailView

Created 2 years ago by c@cbaHow-tos3 comments – viewed 9,619 times – ( +9 ) – version 1.1
As you know, the CDetailView widget displays details of a single model. If no formatting is specified, boolean values that are stored in the database as 0 and 1, are represented in the detail view as 0 and 1. If formatted as boolean, they are represented as 'No' and 'Yes'. We want to add i18n support, so that Yes and No appear in the current language.

Encapsulate db and module configurations

Created 5 years ago by ricardogranaTutorials3 comments – viewed 9,857 times – ( +7 ) – version 1.1
This method was inspirated on the excellent text about different environments available at http://www.yiiframework.com/doc/cookbook/32/
tags: module

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

Created about a year ago by Gerhard LiebenbergHow-tos3 comments – viewed 12,463 times – ( +7 / -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.