Wiki articles in category Tips

Showing 121-140 of 162 items.

using multiple radio button

Created 13 years ago by francis ja, updated 10 years ago by Rohit Suthar.

When we use multiple radio buttons with same name in Yii many people have the problem on getting the value of the selected radiobutton. The radioButtonList can be used for that, but if we need to use radioButton itself to place the button any where in a view, we need to include one more parameter in htmloption array().

6 0
13 followers
Viewed: 75 482 times
Version: 1.1
Category: Tips

Boost composer-asset-plugin update speed

Created 9 years ago by schmunk, updated 8 years ago by samdark.

If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update tasks.

6 0
6 followers
Viewed: 30 226 times
Version: 2.0
Category: Tips

Yii2 Report Grid

Created 7 years ago by Chris Backhouse, updated 7 years ago by Chris Backhouse.

There are some very advanced grids in the Yii2 community, specifically Kartik's amazing gridview extensions but they all designed for interactive screen use.

6 0
7 followers
Viewed: 35 823 times
Version: 2.0
Category: Tips

Fixing extensions without modifying their code

Created 12 years ago by schmunk, updated 12 years ago by schmunk.

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.

6 0
10 followers
Viewed: 18 636 times
Version: 1.1
Category: Tips

Adding a date range search for CGridView the easy way

Created 12 years ago by mikewalen, updated 11 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: 43 608 times
Version: 1.1
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 12 years ago by Rajith R, updated 12 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: 61 623 times
Version: 1.1
Category: Tips

Using counters with ActiveRecord

Created 13 years ago by davi_alexandre, updated 10 years ago by marcovtwout.

Let's say, for example, that you are developing a blog or some kind of CMS and you want to track the number of times each post was viewed (maybe to show a list of the most viewed ones).

11 1
17 followers
Viewed: 46 784 times
Version: 1.1
Category: Tips

Ajax update

Created 14 years ago by zaccaria, updated 14 years ago by zaccaria.

Often happens to have the need of change a part of the page with ajax.

16 2
14 followers
Viewed: 59 670 times
Version: 1.1
Category: Tips
Tags: AJAX

A simple class to use a different db for a module

Created 14 years ago by tydeas_dr, updated 14 years ago by Maurizio Domba Cerin.

What would you do if you want/need to have a different than the main database connection in an module's models?

8 0
12 followers
Viewed: 31 095 times
Version: 1.1
Category: Tips

Change buttons on our CGridView extending yii

Created 13 years ago by sensorario, updated 13 years ago by sensorario.

In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).

9 0
9 followers
Viewed: 36 842 times
Version: 1.1
Category: Tips

How to filter CGridView with From Date and To Date datepicker

Created 13 years ago by kiran sharma, updated 12 years ago by kiran sharma.

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.

9 0
26 followers
Viewed: 64 760 times
Version: 1.1
Category: Tips
9 0
15 followers
Viewed: 33 598 times
Version: 1.1
Category: Tips

Using events with CAction classes

Created 13 years ago by Antonio Ramirez, updated 13 years ago by 张 迪.

As you know, events are used by:

9 0
9 followers
Viewed: 24 628 times
Version: 1.1
Category: Tips

A simple action for CJuiAutoComplete

Created 14 years ago by tydeas_dr, updated 13 years ago by Thiago Souza.

Simple as that. I have placed this action in my extension folder like:

15 1
19 followers
Viewed: 50 393 times
Version: 1.1
Category: Tips

Styling Radio Buttons

Created 14 years ago by Steve Friedl, updated 14 years ago by Steve Friedl.

The default behavior with radio button lists is ugly, and I figured out mostly how to style them a coupla different ways. I'll used the blog tutorial example (but with my own posting modes):

10 0
9 followers
Viewed: 70 529 times
Version: 1.1
Category: Tips

Search method of a model for filters when using dates - unixtimestamp in database

Created 14 years ago by Mukke, updated 14 years ago by jwerner.

I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

10 0
11 followers
Viewed: 38 852 times
Version: 1.1
Category: Tips

Directory independent extensions

Created 14 years ago by GOsha, updated 14 years ago by GOsha.

Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases:

// take the curr...
16 1
7 followers
Viewed: 17 951 times
Version: 1.1
Category: Tips

CGridView: Update/create records in a CJuiDialog

Created 13 years ago by Joblo, updated 13 years ago by Joblo.

My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

12 0
26 followers
Viewed: 58 924 times
Version: 1.1
Category: Tips

The complete beginner's study guide for the Yii Framework

Created 12 years ago by Rodrigo Coelho, updated 12 years ago by Rodrigo Coelho.

Start studying the MVC pattern. You will understand the roles of the model, the view and the controller and know where goes each part of the code.

12 0
19 followers
Viewed: 116 927 times
Version: 1.1
Category: Tips

PHPStorm & NetBeans autocomplete problem

Created 12 years ago by Stageline, updated 12 years ago by Stageline.

The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.

12 0
14 followers
Viewed: 22 913 times
Version: 1.1
Category: Tips