Wiki

Articles in category "tips"X
Displaying 81-90 of 141 result(s).

Change buttons on our CGridView extending yii

Created 2 years ago by sensorarioTips5 comments – viewed 23,918 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 =).

Use application on production/development environment without making changes

Created 2 years ago by ifdatticTips3 comments – viewed 31,931 times – ( +8 / -1 ) – version 1.1
I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

Managing constants easily

Created 2 years ago by briiC.lvTips4 comments – viewed 10,843 times – ( +4 ) – version 1.1
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.

Using counters with ActiveRecord

Created 2 years ago by davi_alexandreTips8 comments – viewed 20,437 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).

1:n relations sometimes require CDbCriteria.together

Created 2 years ago by fsbTips5 comments – viewed 26,892 times – ( +16 ) – version 1.1
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

CGridView: Render customized/complex datacolumns

Created 3 years ago by JobloTips13 comments – viewed 116,612 times – ( +73 ) – version 1.1
If you have to display a overview of related data in a table, you can use the CListView, create your view with table/tr/td tags and implement db-queries in the view to display detaildata of the current (master-)record.
tags: CGridView

Yii Security-extended guide

Created 3 years ago by bingjie2680Tips11 comments – viewed 15,285 times – ( +6 / -6 ) – version 1.1
This article is called extended guide is because there is already a security guide in the Yii tutorial security section. but that guide is not complete in the sense that it does not rise the developers' attention to some other commonly happening attacks: SQL injection and magic URL, which can be major vulnerabilities in your application without much caring.

Understanding series articles

Created 3 years ago by GOshaTips0 comments – viewed 8,001 times – ( +16 ) – version 1.1
Here are all wiki articles from "Understanding" series by Yii wiki contributors:

CGridView: Update/create records in a CJuiDialog

Created 3 years ago by JobloTips11 comments – viewed 38,675 times – ( +14 ) – version 1.1
My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

CGridView: Display the full record (actionView) in a CJuiDialog

Created 3 years ago by JobloTips7 comments – viewed 35,859 times – ( +15 ) – version 1.1
If you show a model (with a lot of attributes) partially in a CGridView, it can be helpful when the user can take a quick look at the full record with all attributes without displaying the view as a page and afterwards returning back to the gridview.