Wiki

Articles in category "tutorials", sorted by commentsX
Displaying 41-50 of 235 result(s).

Behaviors & events

Created 5 years ago by pestaaTutorials10 comments – viewed 92,335 times – ( +50 ) – version 1.1
These features provide endless possibilities and unbelievable flexibility, but as current documentation does not give more than a few examples, it might be difficult to fully understand their internals and requirements.

Display an AJAX tree from your DB using CTreeView

Created 4 years ago by Fran├žois GannazTutorials10 comments – viewed 47,236 times – ( +21 ) – version 1.1
This example uses a MySQL DB with a table named tree with the fields id, name, and parent_id. The parent_id will be NULL for root elements. The SQL is kept simple (no autoinc, no FK, etc).
tags: AJAX, CTreeView

Ajax form submiting in Yii

Created 2 years ago by sirin kTutorials10 comments – viewed 87,483 times – ( +13 / -4 ) – version 1.1
hi guys, Here I'm going to give you a working example of ajax form submiting in Yii.

Exporting CGridView results to CSV file

Created 2 years ago by RusAlexTutorials9 comments – viewed 31,013 times – ( +6 / -3 ) – version 1.1
A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.
tags: cgridview, export, csv

Creating a database-driven hierarchical Structure combined with CMenu and superfish

Created 4 years ago by thyseusTutorials9 comments – viewed 40,973 times – ( +15 ) – version 1.1
Note: Please also take a look at the newer EMenu extension. This works even better that the deprecated CDropDownMenu!
tags: menu

Events explained

Created 2 years ago by pligorTutorials9 comments – viewed 25,415 times – ( +22 / -3 ) – version 1.1
Let's see what exactly are the events in Yii!

How to automate timestamps in ActiveRecord models

Created 5 years ago by dalipTutorials8 comments – viewed 106,618 times – ( +30 ) – version 1.1
There are many ways to automate the setting of timestamps in yii ActiveRecord models. Three are presented here:

How to learn Yii?!

Created 3 years ago by yJeroenTutorials8 comments – viewed 65,626 times – ( +25 ) – version all
Here is a step by step To-Do list for Yii beginners. The list is an advice of what tutorials and documentation you can walk through to get a full understanding of the Yii Framework. These can be a help to learn Yii.

Use shortcut functions to reduce typing

Created 5 years ago by qiangTutorials8 comments – viewed 40,946 times – ( +56 ) – version 1.1
Because Yii intends to be integrated nicely with third-party libraries, it does not define any global functions. Everything in Yii needs to be addressed with full class name or object scopes. For example, to access the current user, we need to use Yii::app()->user; to access application parameters, we need Yii::app()->params['name']; and so on. While editors like textmate can help alleviate the problem of these lengthy typings, it is worthwhile to define global shortcut functions to some commonly used method calls. They will make the application code look cleaner.

Custom Number Formatting or Decimal Separators and i18n

Created 2 years ago by c@cbaTutorials8 comments – viewed 33,150 times – ( +6 ) – version 1.1
By default, the decimal separator in php (also in mysql) is a dot (.). So when we work with floats in Yii (in calculations, validation, sql statements etc.), the decimal separator has to be a dot. If we want to use for example a comma (,) as the decimal separator, that is if we want to display numbers and enable users to enter numbers with a comma before the decimals, we have to...