Wiki

Articles in category "tips", sorted by date (updated)X
Displaying 1-10 of 97 result(s).

Assigning dynamic roles to a user Using yii Rights module at the time of user creation and using some special advanced features of yii rights

Updated 15 days ago by Rajith RTips0 comments – viewed 5,105 times – ( +4 )
After Installing Yii Users and Rights to Newly Created Yii app we have to assign dynamic roles to a user at the time of user creation .

Using sub query for doubletts

Updated 27 days ago by mbTips3 comments – viewed 3,734 times – ( +1 )
find doubletts by db fields. in this example i will check doublets for 3 tabelfields (col1,col2,col3). so i will get a subquery with the condition, select and grouping of the tablefields. the having with COUNT() > 1 means: find all records more then one result.

How to use a component before every action of a controller

Updated about a month ago by transistorTips1 comment – viewed 2,602 times – ( +1 )
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

CGridView: Adding behaviors from configuration, and template items from behaviors to CGridView

Updated about a month ago by le_topTips0 comments – viewed 2,263 times – ( +3 )
Changing the way a CGridView is rendered from the configuration file, or through behaviors specified at the moment it is used, is handy to extend a CGridView without creating tons of different classes for it. I am surprised that this is not in the default implementation, so I made my default CGridView implementation.

CjuiDatepicker

Updated about a month ago by hiral darjiTips0 comments – viewed 2,471 times – ( +2 )
If you have two datepicker in one form and you want that a date of from date shold be minimum date of todate then put following code in Cjuidatepicker widget options array:

using jqbargraph to create beautiful graphs

Updated 2 months ago by MAHESH.E.UTips0 comments – viewed 2,326 times – ( +5 )
If you are about to create a graph, the best option i would suggest is the jqbargraph.

CGridView: Render customized/complex datacolumns

Updated 2 months ago by JobloTips7 comments – viewed 57,002 times – ( +55 )
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

CJuiTabs Content

Updated 2 months ago by mbalaTips2 comments – viewed 5,065 times – ( +5 )
When I used CJuiTabs I did something. They are
tags: CJuiTabs

Fixing extensions without modifying their code

Updated 2 months ago by schmunkTips3 comments – viewed 2,107 times – ( +5 )
If you're working a lot with extensions you often stumble upon problems, when you want to include them into your custom web application, like hardcoded or absolute path aliases or classes extended from core application components, which implement addiditonal features.

Adding a date range search for CGridView the easy way

Updated 2 months ago by mikewalenTips2 comments – viewed 3,587 times – ( +6 )
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.