Wiki articles in category Tips

Showing 81-100 of 162 items.

using jqbargraph to create beautiful graphs

Created 11 years ago by MAHESH.E.U, updated 11 years ago by MAHESH.E.U.

If you are about to create a graph, the best option i would suggest is the jqbargraph.

5 0
9 followers
Viewed: 11 451 times
Version: 1.1
Category: Tips

CjuiDatepicker

Created 11 years ago by hiral darji, updated 11 years ago by hiral darji.

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:

'onSelect'=>'js:function(selected) {
$("#HostelRoomStatusMaster_room_status_master_end_date").datepicker("option","minDate",selected);
				}',
1 0
5 followers
Viewed: 11 458 times
Version: 1.1
Category: Tips

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

Created 11 years ago by le_top, updated 11 years ago by le_top.

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.

3 0
3 followers
Viewed: 14 808 times
Version: 1.1
Category: Tips

How to use a component before every action of a controller

Created 11 years ago by transistor, updated 11 years ago by transistor.

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.

2 0
4 followers
Viewed: 50 594 times
Version: 1.1
Category: Tips

Using sub query for doubletts

Created 11 years ago by mb, updated 10 years ago by mb.

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.

$model=new MyModel('search');
$model->unsetAttributes();

3 0
10 followers
Viewed: 24 976 times
Version: 1.1
Category: Tips

Using CListView to display items next to each other (in columns)

Created 10 years ago by thyseus, updated 10 years ago by thyseus.

When using CListView to display multiple views next to each other, we can use the $index variable inside the viewFile to achieve this. As far as i know there is no extension or out-of-the-box functionality for this, so we need to apply a little hack:

4 0
6 followers
Viewed: 17 762 times
Version: Unknown (update)
Category: Tips

More on SSE and Yii

Created 10 years ago by Firebreaker, updated 10 years ago by Firebreaker.

This is not actually Yii involved.

1 0
1 follower
Viewed: 9 541 times
Version: Unknown (update)
Category: Tips

Inline views, write less

Created 10 years ago by Firebreaker, updated 10 years ago by Firebreaker.

Sometimes writing views like

3 0
3 followers
Viewed: 11 552 times
Version: Unknown (update)
Category: Tips

Search a file size range in CGridView

Created 10 years ago by CrazyCat, updated 10 years ago by CrazyCat.
  1. Create an Active Record Behavior that builds the criteria for the search() method and attach it to your model
  2. Modify the search() method of the model to merge the behavior's criteria in with the rest of the searchable attributes
2 0
2 followers
Viewed: 11 689 times
Version: Unknown (update)
Category: Tips

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

Created 11 years ago by Rajith R, updated 10 years ago by Rajith R.

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 .

7 0
13 followers
Viewed: 59 821 times
Version: 1.1
Category: Tips

How to Display tooltp(qtip) on CGridview dynamic

Created 10 years ago by Ankit Modi, updated 10 years ago by softark.

Hi Friends,

0 0
4 followers
Viewed: 15 759 times
Version: Unknown (update)
Category: Tips

How to preload dropdowns in CForm

Created 10 years ago by transistor, updated 10 years ago by transistor.

So you want to use CForm (form builder), but need to preload dropdowns in a form? It's simpler than it seems.
You got your CFormModel, CForm and the actual Form, right?
Let's say you have the typical State -> City dependent dropdowns, so you would want to load the from with the State and City selected.

1 0
2 followers
Viewed: 11 884 times
Version: Unknown (update)
Category: Tips

Cgridview counter column

Created 10 years ago by Nisanth thulasi, updated 10 years ago by trond.

some times we want to show the serialNo on cgridview .

4 0
8 followers
Viewed: 10 750 times
Version: Unknown (update)
Category: Tips

How to call a default layout for every module and how to work <php echo $content; ?>

Created 10 years ago by Ankit Modi, updated 10 years ago by Ankit Modi.

Hi Friends, Hi Friends, Some common question is difficult to how to create the layout on yii and how to work

0 0
1 follower
Viewed: 40 828 times
Version: Unknown (update)
Category: Tips

How to upload image(photo), and path entry in database with update functionality

Created 11 years ago by kiran sharma, updated 10 years ago by Shahcheraghean.

I saw many posts that community newbie is confuse in image/photo upload with random name. so I post this topic covering all useful things regarding to image/photo upload(not covering image attribute related functionality)

15 0
39 followers
Viewed: 210 013 times
Version: 1.1
Category: Tips

Rendering Views and Updating them with Ajax

Created 10 years ago by Manish Gupta, updated 10 years ago by Manish Gupta.

I wanted to implement a widget that could refresh itself through Ajax without refreshing the whole page. CGridView and CListView are excellent examples of such widgets.

1 0
7 followers
Viewed: 27 950 times
Version: Unknown (update)
Category: Tips

Set a menu - reusable code

Created 10 years ago by Kostas Apazidis (KonApaz), updated 10 years ago by Kostas Apazidis (KonApaz).

As we know Using crud generator creates menu items in view files (for each view file have a varius menu items)

1 0
3 followers
Viewed: 11 419 times
Version: Unknown (update)
Category: Tips

Adding a date range search for CGridView the easy way

Created 11 years ago by mikewalen, updated 10 years ago by mikewalen.
  1. Create an Active Record Behavior that builds the criteria for the search() method and attach it to your model
  2. Modify the search() method of the model to merge the behavior's criteria in with the rest of the searchable attributes
  3. Modify the _search form view to add the date range inputs
6 0
11 followers
Viewed: 42 071 times
Version: 1.1
Category: Tips

1:n relations sometimes require CDbCriteria.together

Created 12 years ago by fsb, updated 10 years ago by fsb.

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.

15 0
12 followers
Viewed: 51 321 times
Version: 1.1
Category: Tips

Create thermometer using rgraph

Created 10 years ago by Ankit Modi, updated 10 years ago by Ankit Modi.

Hi friends,

2 0
4 followers
Viewed: 12 516 times
Version: Unknown (update)
Category: Tips