Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 41-50 of 322 result(s).

Create custom button button with AJAX function in CGridView

Created 2 years ago by nkdHow-tos1 comment – viewed 36,956 times – ( +15 ) – 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.

Reliable Alternative For Yii::app()->request->isAjaxRequest AND Adding Data To Ajax Form With JS

Created 3 years ago by ibo_sHow-tos2 comments – viewed 36,566 times – ( +15 / -1 ) – version 1.1
In this How-To I'll show you:

Using Bootstrap with LESS

Created about a year ago by Chris83How-tos1 comment – viewed 35,824 times – ( +14 ) – version 1.1
I discovered Twitter Bootstrap almost two years ago. After trying it out for a while I fell in love with it. It didn't take long before I realized that it would be great to write an extension that allowed developers to start using Bootstrap in their Yii projects. One night I sat down and started writing what later became my now popular bootstrap extension. Now that the extension is quite widely used in the community I felt that it was time to write about how to use Bootstrap to its full potential. If you use the Bootstrap CSS files you're really missing out on some great features. After reading this article you'll be able to take full advantage of Bootstrap using LESS.

How to show ajax delete status in CGridView like flash messages

Created 3 years ago by hasanaviHow-tos12 comments – viewed 35,375 times – ( +22 ) – version 1.1
I've seen many tickets regarding how to show friendly delete confirmation using CGridView's CButtonColumn in ajax request. If you are using relational database, after producing CRUD functionality when you try to delete a record in ajax mode which has child record it can't be deleted and you can see the ajax loader forever. By this way you can't show the users if a record has been successfully deleted or if there are some problem in flash style (setFlash() / getFlash())

CKEditor Integration (includes steps for file uploads) - Step by Step

Created 2 years ago by shulmeHow-tos11 comments – viewed 35,254 times – ( +24 ) – version 1.1
Hey guys, I'm hoping other people will find this helpful. Today I went through the process of adding CKEditor to one of my projects, and then integrating KCFinder as the image uploader. It will be used in a CActiveForm, without the use of any crazy weird widgets. All paths are relative, using Yii functions, so this will work no matter where you install. Here it is:

Using CJuiDatePicker for CGridView filter

Created 2 years ago by softarkHow-tos13 comments – viewed 34,984 times – ( +23 ) – version 1.1
We can use a CJuiDatePicker for a CGridView inline filter.

How to validate CSRF token with session

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

File uploads in CForm (Form builder)

Created 3 years ago by Luke JurgsHow-tos2 comments – viewed 34,815 times – ( +12 ) – version 1.1
While there is a reasonable amount of documentation regarding CForm (form builder) and file uploads seperately, there really is not any coverage of both in combination.

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

Created 2 years ago by acorncomHow-tos23 comments – viewed 34,672 times – ( +22 ) – 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.

Custom Autocomplete Display and Value Submission

Created 3 years ago by Antonio RamirezHow-tos5 comments – viewed 34,577 times – ( +12 / -1 ) – version 1.1
How many of us has wondered how to create an autocomplete that will display the names of a related models but do require the id of that selected name to be submitted for model creation/update?