Wiki

Articles in category "tips", sorted by viewsX
Displaying 31-40 of 141 result(s).

Change buttons on our CGridView extending yii

Created 2 years ago by sensorarioTips5 comments – viewed 24,098 times – ( +11 ) – version 1.1
In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).

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

Created 3 years ago by MukkeTips1 comment – viewed 23,284 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.

Extending common classes to allow better customization

Created 4 years ago by Steve FriedlTips0 comments – viewed 22,870 times – ( +43 ) – version 1.1
The two most commonly-used base classes in most Yii applications are CController and CActiveRecord, each extended to your own particular models and controllers.

An easy way to use escopes and CActiveDataProvider

Created 3 years ago by Rafael GarciaTips8 comments – viewed 22,258 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.

Customize CGridView columns directly in your view

Created 2 years ago by clapasTips4 comments – viewed 21,946 times – ( +3 / -2 ) – version 1.1
You usually take a model instance passed into your view to provide data to a CGridView in this way:

Using counters with ActiveRecord

Created 3 years ago by davi_alexandreTips8 comments – viewed 20,685 times – ( +14 / -1 ) – 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).

Real Time Logging

Created 3 years ago by lucifuriousTips3 comments – viewed 19,775 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.

Yii实战中8个必备常用的扩展,模块和

Created 3 years ago by Darwin WenTips2 comments – viewed 19,760 times – ( +2 / -3 ) – version 1.1
在经过畅K网的实战后,总结一下在Yii的项目中会经常用到的组件和一些基本的使用方法,分享给大家,同时也给自己留个备忘录,下面我以代码加图片说明.
tags: module, Widgets

How to use a component before every action of a controller

Created about a year ago by transistorTips1 comment – viewed 19,146 times – ( +2 / -1 ) – version 1.1
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

Troubleshooting Rights Extension

Created 2 years ago by junxiongTips6 comments – viewed 19,050 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.