Wiki articles in category Tips

Showing 1-20 of 119 items.

Convert JSON data to html table for display on page

Created 2 years ago by shiv shiv, updated 7 months ago by samdark samdark.

I have a calls which help me display json directly in html table.

0 0
2 followers
Viewed: 92 737 times
Version: all
Category: Tips
Tags: html, JSON

What SQL-Statement creates yii?

Created 7 years ago by Necip Necip, updated 7 years ago by Necip Necip.

The usual way to find out what Yii has created for an SQL query is to mutilate the SQL in the sourcecode and call the program again so that the SQL statement with errors is displayed. Or you can use the SQL logger, which must be switched on and off each time and logs all SQL statements, which leads to an enormous slowdown in program execution and decelerates your workflow.

0 0
1 follower
Viewed: 13 840 times
Version: 1.1
Category: Tips

Things to Consider when application hosting on AppFog

Created 10 years ago by VINAY Kr. SHARMA VINAY Kr. SHARMA, updated 10 years ago by VINAY Kr. SHARMA VINAY Kr. SHARMA.

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

1 0
1 follower
Viewed: 9 114 times
Version: 1.1
Category: Tips

Selecting best language based on Browser language and available languages.

Created 10 years ago by le_top le_top, updated 10 years ago by le_top le_top.

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
1 follower
Viewed: 17 105 times
Version: 1.1
Category: Tips

Yii Rights Management Tips

Created 10 years ago by Rajith R Rajith R, updated 10 years ago by Rajith R Rajith R.

yii rights some tips..

2 0
4 followers
Viewed: 14 517 times
Version: 1.1
Category: Tips

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

Created 10 years ago by le_top le_top, updated 10 years ago by le_top le_top.

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
1 follower
Viewed: 11 315 times
Version: 1.1
Category: Tips

Add model validator in Controller

Created 10 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz), updated 10 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz).

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: 33 303 times
Version: 1.1
Category: Tips

Expert's model generation with Gii

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top.

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: 18 518 times
Version: 1.1
Category: Tips

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

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top.

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
2 followers
Viewed: 11 830 times
Version: 1.1
Category: Tips

View a related field in CGridView

Created 11 years ago by rafaelt88 rafaelt88, updated 10 years ago by rafaelt88 rafaelt88.

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".

2 0
3 followers
Viewed: 19 890 times
Version: 1.1
Category: Tips

Make an ajax request to another server using JSONP

Created 11 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz), updated 11 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz).

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

1 0
2 followers
Viewed: 14 627 times
Version: 1.1
Category: Tips

Create URL to language switcher anchor with langhandler

Created 11 years ago by Anas AbuDayah Anas AbuDayah, updated 11 years ago by Anas AbuDayah Anas AbuDayah.

This topic is related with langhandler extension

1 1
2 followers
Viewed: 12 042 times
Version: 1.1
Category: Tips

FORM with GET method causes repeated stacking of URL Parameters

Created 11 years ago by Kartik V Kartik V, updated 11 years ago by toph toph.

// 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(); `

7 2
41 followers
Viewed: 64 416 times
Version: all
Category: Tips

Update Gridview with Dropdown Selection

Created 11 years ago by lgastmans lgastmans, updated 11 years ago by lgastmans lgastmans.

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: 18 050 times
Version: 1.1
Category: Tips

CGridView customized CCheckBoxColumn

Created 11 years ago by chandran chandran, updated 11 years ago by CeBe CeBe.

Hi friends,

3 0
6 followers
Viewed: 21 119 times
Version: 1.1
Category: Tips

Yiistrap TbHtml::navbarSearchForm

Created 11 years ago by Patrice Patrice, updated 11 years ago by CeBe CeBe.

Hi all,

0 0
3 followers
Viewed: 20 752 times
Version: 1.1
Category: Tips

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

Created 11 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz), updated 11 years ago by Rohit Suthar Rohit Suthar.
2 0
5 followers
Viewed: 43 037 times
Version: 1.1
Category: Tips

Multi Data Provider

Created 11 years ago by Sharon Lavie Sharon Lavie, updated 9 years ago by Sharon Lavie Sharon Lavie.

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: 19 833 times
Version: 1.1
Category: Tips

New Relic Error Alert with Yii

Created 11 years ago by simon604 simon604, updated 10 years ago by razvanphp razvanphp.

Introduction

2 0
4 followers
Viewed: 21 903 times
Version: 1.1
Category: Tips
1 0
6 followers
Viewed: 66 015 times
Version: 1.1
Category: Tips