Wiki articles in category Tips

Showing 1-20 of 117 items.
Created 3 years ago by VINAY Kr. SHARMA, updated 3 years ago by VINAY Kr. SHARMA.

Things to Consider when application hosting on AppFog

I faced many issues when hosted our company website on AppFog.

1 0
2 followers
Viewed: 4 370 times
Version: 1.1
Category: Tips
Created 3 years ago by le_top, updated 3 years ago by le_top.

Selecting best language based on Browser language and available languages.

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.

2 0
2 followers
Viewed: 7 309 times
Version: 1.1
Category: Tips
Created 3 years ago by Rajith R, updated 3 years ago by Rajith R.

Yii Rights Management Tips

yii rights some tips..

2 0
4 followers
Viewed: 7 929 times
Version: 1.1
Category: Tips
Created 3 years ago by le_top, updated 3 years ago by le_top.

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

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.

1 0
2 followers
Viewed: 5 197 times
Version: 1.1
Category: Tips
Created 3 years ago by Kostas Apazidis (KonApaz), updated 3 years ago by Kostas Apazidis (KonApaz).

Add model validator in Controller

There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way

1 1
3 followers
Viewed: 19 790 times
Version: 1.1
Category: Tips
Created 3 years ago by le_top, updated 3 years ago by le_top.

Expert's model generation with Gii

Efficient coding with Yii implies efficient use of the code generator. This article shares the personalised Gii templates that were built starting from the standard templates proposed by AweGen.

1 0
2 followers
Viewed: 10 392 times
Version: 1.1
Category: Tips
Created 3 years ago by le_top, updated 3 years ago by le_top.

Search scenario (CGridView, etc.): avoid default values from database as search condition.

Yii has a neat "trick" that will assign default values to new CActiveRecords. When performing a search() though, this is pretty annoying as they automatically apply as filter values.

1 0
3 followers
Viewed: 6 857 times
Version: 1.1
Category: Tips
Created 4 years ago by rafaelt88, updated 3 years ago by rafaelt88.

View a related field in CGridView

Generally we need to show one or more fields from a model that is related to another model used in CGridView. For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".

1 0
3 followers
Viewed: 13 259 times
Version: 1.1
Category: Tips
Created 4 years ago by Kostas Apazidis (KonApaz), updated 4 years ago by Kostas Apazidis (KonApaz).

Make an ajax request to another server using JSONP

There are cases that you want to make an ajax request to another server and get the results.

1 0
3 followers
Viewed: 9 413 times
Version: 1.1
Category: Tips
Created 4 years ago by Anas AbuDayah, updated 4 years ago by Anas AbuDayah.

Create URL to language switcher anchor with langhandler

This topic is related with langhandler extension

1 1
2 followers
Viewed: 5 871 times
Version: 1.1
Category: Tips
Created 4 years ago by Kartik V, updated 4 years ago by toph.

FORM with GET method causes repeated stacking of URL Parameters

// In Yii 1.x $form = $this->beginWidget('CActiveForm', [

'id' => 'order-search-form',
'method' => 'get',

]); echo $form->textInput($searchModel, 'id'); echo CHtml::submitButton('Find', ['class' => 'btn btn-primary']); $this->endWidget(); `

3 2
40 followers
Viewed: 36 322 times
Version: all
Category: Tips
Created 4 years ago by lgastmans, updated 4 years ago by lgastmans.

Update Gridview with Dropdown Selection

I recently worked on updating the content of a gridview based on the selection of a dropdown menu. I thought I should share it in the forum...

0 0
4 followers
Viewed: 12 023 times
Version: 1.1
Category: Tips
Created 4 years ago by chandran, updated 4 years ago by CeBe.

CGridView customized CCheckBoxColumn

Hi friends,

3 0
6 followers
Viewed: 14 503 times
Version: 1.1
Category: Tips
Created 4 years ago by Patrice, updated 4 years ago by CeBe.

Yiistrap TbHtml::navbarSearchForm

Hi all,

0 0
3 followers
Viewed: 11 081 times
Version: 1.1
Category: Tips
Created 4 years ago by Kostas Apazidis (KonApaz), updated 3 years ago by Rohit Suthar.

Custom column in TbGridView with icon by condition, find out icon class glyphicons easy (YiiBooster)

2 0
5 followers
Viewed: 31 827 times
Version: 1.1
Category: Tips
Created 4 years ago by Sharon Lavie, updated 2 years ago by Sharon Lavie.

Multi Data Provider

Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).

1 0
4 followers
Viewed: 10 914 times
Version: 1.1
Category: Tips
Created 4 years ago by simon604, updated 3 years ago by razvanphp.

New Relic Error Alert with Yii

Introduction

2 0
4 followers
Viewed: 16 756 times
Version: 1.1
Category: Tips
1 0
6 followers
Viewed: 20 632 times
Version: 1.1
Category: Tips
Created 4 years ago by cihappy, updated 3 years ago by Rohit Suthar.

Useful Multilanguage extensions collection and use.

What I want to achieve:

2 0
3 followers
Viewed: 6 980 times
Version: 1.1
Category: Tips
Created 5 years ago by mistryb, updated 3 years ago by mistryb.

Customizing the CMenu Widget

The CMenu class provides some useful features for generating menus in your web application.

1 0
4 followers
Viewed: 55 804 times
Version: 1.1
Category: Tips