Wiki

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

Use application on production/development environment without making changes

Created 5 years ago by ifdatticTips3 comments – viewed 52,235 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 7,585 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 5 years ago by waitforitHow-tos3 comments – viewed 24,355 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,016 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 7 years ago by ricardogranaTutorials3 comments – viewed 13,322 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 21,748 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 7 years ago by mindplayTutorials3 comments – viewed 27,456 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 64,258 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...

Remove Byte Order Mark (BOM) from files recursively

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos3 comments – viewed 18,393 times – ( +5 / -2 ) – version all
Ok, this wiki is not only for yii projects.

Performance - A Guide For Best Practice

Created 7 years ago by Y!!Tutorials3 comments – viewed 19,765 times – ( +8 / -6 ) – version 1.1
In this guide I will explain best practise regarding performance in MySQL, PHP and of course our loved Yii Framework. Since this is a complex topic, I will start with some basics and then expand this guide from time to time. Since this wiki can become big, you may click on View history - there you can see what changes have been made, so you don't miss anything.
tags: performance