You can find the reason why I wrote this article here.
You can find the reason why I wrote this article here.
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.
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](...
The giix code generator has out of the box i18n support for model names and attribute labels (besides other cool features > check it out!) .
But I want to factor in not only the plural form, but also the grammatical cases (especially the accusative) while translating 'Manage Objects', 'Create Object', 'Edit Object' etc.
In application development we often have to choose how to mange recurrent values.
Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.
I recently built a tarpit for bad bots.
This is a simple example that will give you a base for designing a database driven menu system that will use CMenu to be rendered.
In this article I will show you how to implement a secure password hashing mechanism in your Yii projects using a bCrypt class.
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.
I had some troubles with the password confirmation field for when adding updating user records, so i thought that i should share the way i got it working.
How to create a simple (non-RBAC) authorization system
YII_DEBUG
to true (by default, it is defined in index.php
)
and put alongside error_reporting(E_ALL);
.
Then errors and warnings will stop the execution an...First of all, You must change component config to enable the default Yii CSRF validation.
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.
I build this simple PHP class (DialogBox.php at the bottom of this wiki) to help you in the dialog box usage on Yii applications. The goal is run any Yii actions into this dialog box and return the resulting value to the calling instance.
While there is a reasonable amount of documentation regarding CForm (form builder) and file uploads seperately, there really is not any coverage of both in combination.
It is actually mentioned in the documentation
In this How-To I'll show you: