Wiki

Sorted by ratingX
Displaying 131-140 of 750 result(s).

Accessing data in a join table with the related models

Created 3 years ago by fsbHow-tos8 comments – viewed 80,956 times – ( +26 / -1 ) – version 1.1
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.

Using standard filters in CGridView custom fields

Created 4 years ago by GOshaHow-tos4 comments – viewed 54,431 times – ( +17 ) – version 1.1
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.For example: We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0. So we do the usual thing:

htmlOptions explained for various controls.

Created 4 years ago by WoilTips1 comment – viewed 46,559 times – ( +17 ) – version 1.1
Most controls that are rendered by CHtml have an argument called $htmlOptions. This argument is an array that holds the attributes of the HTML element. For example the following code:

CListView AJAX filtering

Created 4 years ago by DragaTutorials17 comments – viewed 52,999 times – ( +17 ) – version 1.1
This tutorial shows how to filter CListView items by AJAX, and it's compatible with disabled JavaScript users In my case this has been done to filter users list

Understanding series articles

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

Simple authorization system

Created 3 years ago by GustavoHow-tos1 comment – viewed 26,288 times – ( +16 ) – version 1.1
How to create a simple (non-RBAC) authorization system

1:n relations sometimes require CDbCriteria.together

Created 3 years ago by fsbTips5 comments – viewed 29,941 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.

Manage application configuration in different modes

Created 6 years ago by qiangTutorials5 comments – viewed 32,811 times – ( +16 ) – version 1.1
Info: This tutorial references the idea presented in Jonah's excellent blog article.

Getting the Most out of APC for Yii

Created 3 years ago by Da:SourcererHow-tos10 comments – viewed 30,497 times – ( +16 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

Create custom button button with AJAX function in CGridView

Created 2 years ago by nkdHow-tos1 comment – viewed 41,158 times – ( +16 ) – version 1.1
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.