Wiki

Articles in category "tips", sorted by viewsX
Displaying 41-50 of 153 result(s).

An easy way to use escopes and CActiveDataProvider

Created 5 years ago by Rafael GarciaTips8 comments – viewed 27,637 times – ( +1 / -1 ) – version 1.1
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.

Search method of a model for filters when using dates - unixtimestamp in database

Created 5 years ago by MukkeTips1 comment – viewed 27,383 times – ( +10 ) – version 1.1
I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

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

Created 2 years ago by Kostas Apazidis (KonApaz)Tips2 comments – viewed 26,226 times – ( +2 / -1 ) – version 1.1
First of all, You have to find out the class of the desired icon, so visit the http://getbootstrap.com/2.3.2/base-css.html#icons

Real Time Logging

Created 5 years ago by lucifuriousTips3 comments – viewed 24,596 times – ( +14 ) – version 1.1
I've seen a lot of people asking about the logging facilities in Yii and thought I'd share a nice little class I wrote that provides near real-time logging.

Troubleshooting Rights Extension

Created 4 years ago by junxiongTips6 comments – viewed 22,768 times – ( +8 ) – version 1.1
Rights is one of user interface for Yii's Role Base Access Control extension. It is one of most downloaded extensions in Yii's Web.

Avoiding duplicate script download when using Ajax calls to render different Views

Created 5 years ago by Antonio RamirezTips6 comments – viewed 22,687 times – ( +13 / -1 ) – version 1.1
I had to partially render two types of views, depending on user selection. Wanted to display a GRID or a LIST style with an event that AJAX'ed new contents and update a layer with them.
tags: tutorial, AJAX, views

Send asset folder path to a javascript of a widget

Created 5 years ago by sensorarioTips4 comments – viewed 21,911 times – ( +4 ) – version 1.1
When you develop a widget, you could need one image that is in the assets folder, you can use it simply within a css. You can load a css or javascript script doing this:

How to call a default layout for every module and how to work <php echo $content; ?>

Created 3 years ago by Ankit ModiTips0 comments – viewed 21,663 times – ( -2 )
Hi Friends, Hi Friends, Some common question is difficult to how to create the layout on yii and how to work

FORM with GET method causes repeated stacking of URL Parameters

Created 2 years ago by Kartik VTips2 comments – viewed 20,152 times – ( +43 / -4 ) – version all
You are using an ActiveForm in yii (both v1.x or 2), with a GET method like below:

Debugging CActiveRecord failed save() attempts

Created 3 years ago by BoazTips0 comments – viewed 19,989 times – ( +5 ) – version 1.1
When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.