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

Load data from internal/external source to fill form fields

Created about a year ago by skwordenHow-tos3 comments – viewed 9,912 times – ( +1 ) – version 2.0
This wiki is to show you how to use jQuery get and JSON to get data from a dropdown/any form field and fill form fields with the values instantaneously. First, I'll give example use cases of what I'm going to teach you so you can quickly see if this is for you.

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

Created 4 years ago by c@cbaHow-tos3 comments – viewed 12,018 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 6 years ago by ricardogranaTutorials3 comments – viewed 12,226 times – ( +7 ) – version 1.1
This method was inspirated on the excellent text about different environments available at
tags: module

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

Created 3 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 19,122 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.

SQL Logging and Profiling in FireBug (Yii 1.1)

Created 6 years ago by mindplayTutorials3 comments – viewed 25,206 times – ( +7 ) – 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 4 years ago by c@cbaTutorials3 comments – viewed 58,660 times – ( +28 / -1 ) – 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 2 years ago by Kostas Apazidis (KonApaz)How-tos3 comments – viewed 14,506 times – ( +5 / -1 ) – version all
Ok, this wiki is not only for yii projects.

Simple Jui Autocomplete in yii2

Created 10 months ago by ajithTutorials3 comments – viewed 9,750 times – ( -1 ) – version 2.0
In this tutorial i will explain how to use jui auto complete in yii2. The Autocomplete widget enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.

Performance - A Guide For Best Practice

Created 6 years ago by Y!!Tutorials3 comments – viewed 18,501 times – ( +8 / -5 ) – 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

Using loginRequiredAjaxResponse to solve ajax session timeout

Created 4 years ago by RutgerHow-tos3 comments – viewed 25,407 times – ( +13 ) – version 1.1
This solution requires Yii 1.1.9 or above