Wiki

Sorted by viewsX
Displaying 141-150 of 683 result(s).

Create custom button button with AJAX function in CGridView

Created about a year ago by nkdHow-tos1 comment – viewed 31,452 times – ( +14 ) – 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.

How to log changes of ActiveRecords?

Created 5 years ago by pfthTutorials7 comments – viewed 31,425 times – ( +35 / -2 ) – version 1.1
A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a CActiveRecord Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecords very easily.
tags: Logging

How to validate CSRF token with session

Created 2 years ago by yangmlsHow-tos1 comment – viewed 31,130 times – ( +20 ) – version 1.1
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

Adding Yii Search to Your Browser Search Box

Created 3 years ago by qiangTips1 comment – viewed 31,050 times – ( +28 ) – version 1.1
The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.
tags: search

Adding login form to each page

Created 4 years ago by pestaaTutorials5 comments – viewed 31,020 times – ( +3 / -2 ) – version 1.1
After adding proper form to the main layout, like:

Using CJuiDatePicker for CGridView filter

Created 2 years ago by softarkHow-tos12 comments – viewed 30,492 times – ( +20 ) – version 1.1
We can use a CJuiDatePicker for a CGridView inline filter.

Update two models with one view

Created 2 years ago by sensorarioTips11 comments – viewed 30,344 times – ( +10 / -2 ) – version 1.1
Suppose to have two models: Users and Emails. You do not want to store email in a Users model. And User can have 0 or many emails. This is the form generated to create a new user (just username).
tags: database, model, view, form

Using Yii with Oracle through PDO

Created 3 years ago by TrejderTips6 comments – viewed 30,239 times – ( +1 ) – version 1.1
When you are developing an webapp with Yii that will be using Oracle RDBMS you should take a look at these issues in which you may run into it.

Working with radiobutton list

Created 2 years ago by vibhaJadwaniTutorials2 comments – viewed 30,053 times – ( +9 ) – version 1.1
This is a tutorial to work with radioButtonList which will handle enum datatype. Form design and validation both are detailed here.

Integrating Wordpress and Yii: still another approach, using Yii as the router/controller

Created 2 years ago by acorncomHow-tos23 comments – viewed 29,995 times – ( +20 ) – version 1.1
A lot of people have written posts on integrating Yii and WordPress. This article combines goncin's approach with an article I read about integrating Symfony and WordPress and applies it all to Yii and WordPress.