Wiki

Sorted by commentsX
Displaying 571-580 of 742 result(s).

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

Created 5 months ago by le_topTips0 comments – viewed 2,020 times – ( +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.

model rules depended by user roles-permissions

Created about a year ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 7,033 times – ( +3 )
This is a reference about model validators and user roles. In many cases we want model validators to applied only for some privileged users or not

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

Created 5 months ago by Deepak PradhanTips0 comments – viewed 1,687 times – 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

Yii Rights Management Tips

Created 5 months ago by Rajith RTips0 comments – viewed 2,953 times – ( +6 ) – version 1.1
yii rights some tips..

Search a file size range in CGridView

Created about a year ago by CrazyCatTips0 comments – viewed 4,274 times – ( +2 )
Working on a report system of files transfert, I had to let the users simply find files by size. I didn't want to have two fields, I prefer a simple text input, with "human syntax".

Gettext and Poedit HOWTO

Created 5 months ago by Maug LeeTutorials0 comments – viewed 1,995 times – version 1.1
Example settings when using Gettext for i18n.

How to nest DB transactions without actually nesting them.

Created 5 months ago by le_topHow-tos0 comments – viewed 1,833 times – ( +1 ) – version 1.1
To secure your database from inconsistencies resulting from failing (complex) operations, you (should) use transactions. However, complex methods often rely on other complex methods that themselves build on transactions. This HowTo presents a method to nest or embed transactions without relying on the database's nesting capabilities.

Themed translations (i18n)

Created 5 months ago by le_topHow-tos0 comments – viewed 2,227 times – ( +1 ) – version 1.1
When using themes you want to changes some of the translations specifically to the theme while keeping the standard translations for most of the text. Duplicating the main translation file is a headache for maintainance. This how to provides a solution.

Clear CGridView Filters, Sort & Pager

Created 5 months ago by le_topHow-tos0 comments – viewed 4,230 times – ( +2 ) – version 1.1
Clearing CGridView filters and sort orders from the web pages, is usefull for the end user. Yii does not seem to propose a standard method. Furthermore, this is especially usefull when filters are "remembered" in the user's session.

How to filter data using a dropdown list?

Created 6 years ago by qiangTutorials0 comments – viewed 25,292 times – ( +7 ) – version 1.1
A dropdown list can be used to select a value, based on which we can filter the data to be displayed. For example, the extension page has a dropdown list to filter the displayed extensions according to the selected category.