Wiki

Articles in category "tips", sorted by viewsX
Displaying 151-154 of 154 result(s).

A universal model attribute for its synthetic representation

Created about a year ago by Alexandre RodichevskiTips2 comments – viewed 4,906 times – ( -1 ) – version 2.0
It is convenient to use the same identification attribute, say info, in all of the active records of your application. It should be a virtual read-only attribute defined by a getter method, its label being the model name.

Provide SVG when the browser supports it, else PNG (using CHtml::image overload)

Created 3 years ago by le_topTips0 comments – viewed 4,757 times – ( +1 / -1 ) – version 1.1
Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.

Things to Consider when application hosting on AppFog

Created 3 years ago by VINAY Kr. SHARMATips0 comments – viewed 3,988 times – ( +1 / -1 ) – version 1.1
I faced many issues when hosted our company website on AppFog.

Analyse the server's USER-AGENT against browsecap file to determine it's capability.

Created 3 years ago by Deepak PradhanTips0 comments – viewed 3,816 times – ( -1 ) – version 2.0
Does your application need to know user's details on browser details, os and device type? We can use PHP's misc. function to achieve that provided you have an update copy of browsercap.ini