Wiki

Sorted by commentsX
Displaying 321-330 of 786 result(s).

The Comedy of Errors

Created 6 years ago by fsbOthers3 comments – viewed 10,541 times – ( +21 / -1 ) – 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 kartik Growl with Yii2 flash messages

Created 2 years ago by skwordenHow-tos3 comments – viewed 30,189 times – ( +8 / -1 ) – version 2.0
This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).

Use application on production/development environment without making changes

Created 6 years ago by ifdatticTips3 comments – viewed 54,134 times – ( +8 / -2 ) – 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.

Multiple CGridView virtual attributes, retrieved from a single model function. Also communication between CGridView columns and rows; and between CGridView and its own parent view.

Created 2 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 8,168 times – ( +1 / -1 ) – version 1.1
We probably have all used a virtual attribute (model function) to retrieve complex or related data for a CGridView column:

Secure password hashing with bCrypt

Created 6 years ago by waitforitHow-tos3 comments – viewed 24,875 times – ( +9 / -1 ) – 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.

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

Created 5 years ago by c@cbaHow-tos3 comments – viewed 13,389 times – ( +9 / -1 ) – 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 8 years ago by ricardogranaTutorials3 comments – viewed 13,737 times – ( +7 / -1 ) – 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 4 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 22,502 times – ( +8 / -2 ) – 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 local time this August compared to last August! It could even be a different date!

SQL Logging and Profiling in FireBug (Yii 1.1)

Created 8 years ago by mindplayTutorials3 comments – viewed 28,195 times – ( +7 / -1 ) – version 1.1
During development, it's often very handy to have SQL logging and profiling.
tags: Logging

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created 5 years ago by c@cbaTutorials3 comments – viewed 65,650 times – ( +28 / -2 ) – version 1.1
    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this: 'value'=>'$data->author->username',.     Now we might want to use $data in the declaration of the htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...