Wiki

Articles in category "tips", sorted by ratingX
Displaying 41-50 of 154 result(s).

A simple class to use a different db for a module

Created 6 years ago by tydeas_drTips3 comments – viewed 18,865 times – ( +10 / -1 ) – version 1.1
What would you do if you want/need to have a different than the main database connection in an module's models?

Using events with CAction classes

Created 5 years ago by Antonio RamirezTips0 comments – viewed 15,230 times – ( +10 / -1 ) – version 1.1
There are some good guides out there explaining how to work with events and the ways to attach them to your components, but none (that I know) explain the following way to configure your events with CAction classes on your controllers the following way.

Avoiding duplicate script download when using Ajax calls to render different Views

Created 5 years ago by Antonio RamirezTips6 comments – viewed 23,989 times – ( +13 / -2 ) – version 1.1
I had to partially render two types of views, depending on user selection. Wanted to display a GRID or a LIST style with an event that AJAX'ed new contents and update a layer with them.
tags: tutorial, AJAX, views

Adding a date range search for CGridView the easy way

Created 4 years ago by mikewalenTips6 comments – viewed 31,369 times – ( +12 / -2 ) – version 1.1
After a lot of research, everything I found on adding date range searching to a CGridView advanced search form seemed to involve adding two new public variables (e.g. $date_from, $date_to), 'safe' rules for the new variables, and a rather chunky if/elseif/else check in the search() method. This probably isn't a hassle for most, but because many of the tables in my database contain two or three and sometimes four date columns (e.g. date_created, date_modified, date_deleted etc.), it meant I was having to add up to eight public variables, the corresponding safe rules, and modifying the search() criteria for each date attribute. So, I set about creating a better way and I thought I'd share my work with the community.

Cgridview counter column

Created 3 years ago by Nisanth thulasiTips5 comments – viewed 6,205 times – ( +9 / -1 )
some times we want to show the serialNo on cgridview .

How to filter CGridView with From Date and To Date datepicker

Created 5 years ago by kiran sharmaTips16 comments – viewed 49,668 times – ( +17 / -5 ) – version 1.1
This artical is related to allow user to filter CGridView with date range using datepicker on submit button. Here I use Yii Cookie to preserve date in datepicker textbox after submitting the form.

Troubleshooting Rights Extension

Created 5 years ago by junxiongTips6 comments – viewed 23,872 times – ( +8 / -1 ) – 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.

Integrating Yii with Wordpress

Created 6 years ago by isekreamTips5 comments – viewed 55,065 times – ( +10 / -2 ) – version 1.1
Well I finally had some time and tinkered a bit with the notion of integrating wordpress and Yii. Now for me I wanted to use Yii as a framework to develop wordpress plugins. Using some tips from imasia Article I was able to do a simple integration of yii as a wordpress plugin. The integration was very basic and i just used yii with its default installation site. I don;t know how it will really react with CRUD application as yet but it was fairly easy to integrate after reading the article...

Importing CSV file to mysql table using "LOAD DATA" command.

Created 5 years ago by sirin kTips6 comments – viewed 49,166 times – ( +7 / -1 ) – version 1.1
hi, Here i am giving you some simple step to import huge data from a csv file to your mysql table.this is useful when you have a very huge data to import from csv format.
tags: csv, mysql, import

BootProgressColumn - Progress Bar Inside GridView Column compatible with 'bootstrap' extension

Created 5 years ago by LuizTips1 comment – viewed 16,637 times – ( +7 / -1 ) – version 1.1
A little hint of how to create a progress bar inside the column of the grid, using the 'bootstrap' extension.