Wiki

Articles in category "tips", sorted by date (updated)X
Displaying 21-30 of 154 result(s).

Selecting best language based on Browser language and available languages.

Updated 3 years ago by le_topTips0 comments – viewed 6,512 times – ( +2 / -1 ) – version 1.1
Your application is international and you have to select the best language for the user. Your user may have selected 'fr_CA' and you have 'fr_FR' or 'fr' available. What do you do? Here is a tip.

New Relic Error Alert with Yii

Updated 3 years ago by razvanphpTips2 comments – viewed 16,356 times – ( +6 / -1 ) – version 1.1
Introduction

YII2 Pagination Options

Updated 3 years ago by VivekYiiTips0 comments – viewed 9,021 times – ( +1 / -1 ) – version 2.0
solution here If we are using default pagination option like
tags: pagination, View, vivs

Using counters with ActiveRecord

Updated 3 years ago by marcovtwoutTips9 comments – viewed 31,265 times – ( +14 / -2 ) – version 1.1
Let's say, for example, that you are developing a blog or some kind of CMS and you want to track the number of times each post was viewed (maybe to show a list of the most viewed ones).

Yii 2 list of path aliases available with default basic and advanced app.

Updated 3 years ago by Kartik VTips3 comments – viewed 106,761 times – ( +53 / -6 ) – version 2.0
If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

Useful Multilanguage extensions collection and use.

Updated 3 years ago by Rohit SutharTips2 comments – viewed 6,766 times – ( +3 / -1 ) – version 1.1
What I want to achieve:

Customizing the CMenu Widget

Updated 3 years ago by mistrybTips1 comment – viewed 53,404 times – ( +5 / -2 ) – version 1.1
The CMenu class provides some useful features for generating menus in your web application.

Yii Rights Management Tips

Updated 3 years ago by Rajith RTips0 comments – viewed 7,107 times – ( +6 / -1 ) – version 1.1
yii rights some tips..

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

Updated 3 years ago by Deepak PradhanTips0 comments – viewed 3,815 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

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

Updated 3 years ago by le_topTips0 comments – viewed 4,753 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.