Wiki

Articles in category "how-tos"X
Displaying 161-170 of 255 result(s).

Getting the Most out of APC for Yii

Created 2 years ago by Da:SourcererHow-tos10 comments – viewed 21,848 times – ( +16 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

AssetManager: clearing browser's cache on site update

Created 2 years ago by dhampikHow-tos2 comments – viewed 19,096 times – ( +16 ) – version 1.1
If you like the things to be short and clear, then you can skip right to a short summary of instructions at the end of this article.

Simple Share Widget for Facebook, twitter and google+

Created 2 years ago by softarkHow-tos3 comments – viewed 13,723 times – ( +10 ) – version 1.1
This widget will show a Facebook "like" button and "comments" box together with "tweet" button and "google plusone" button on your page.

CGridView keep focus on the control after filtering

Created 2 years ago by jayalaHow-tos2 comments – viewed 6,927 times – ( +5 ) – version 1.1
You can find the reason why I wrote this article here.
tags: CGridView, filter

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

Created 2 years ago by c@cbaHow-tos3 comments – viewed 8,277 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.

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

Created 2 years ago by c@cbaHow-tos2 comments – viewed 20,479 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 obtain a grammatically correct translation of the model name in giix-generated view files

Created 2 years ago by c@cbaHow-tos0 comments – viewed 7,709 times – ( +4 ) – version 1.1
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.

History Autocomplete

Created 2 years ago by zaccariaHow-tos2 comments – viewed 6,729 times – ( +3 ) – version 1.1
In application development we often have to choose how to mange recurrent values.
tags: autocomplete

How to handle decimal separators (e.g comma instead of dot) for l18n

Created 2 years ago by jpabloHow-tos2 comments – viewed 10,019 times – ( +1 ) – version 1.1
Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.

Tarpit for bad bots

Created 2 years ago by mitherealHow-tos4 comments – viewed 4,757 times – ( +1 ) – version 1.1
I recently built a tarpit for bad bots.
tags: tarpit, bots