Wiki

Articles in category "tutorials", sorted by viewsX
Displaying 71-80 of 230 result(s).

How to log changes of ActiveRecords?

Created 5 years ago by pfthTutorials7 comments – viewed 32,507 times – ( +37 / -2 ) – version 1.1
A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a CActiveRecord Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecords very easily.
tags: Logging

Working with radiobutton list

Created 2 years ago by vibhaJadwaniTutorials2 comments – viewed 32,097 times – ( +9 ) – version 1.1
This is a tutorial to work with radioButtonList which will handle enum datatype. Form design and validation both are detailed here.

Adding login form to each page

Created 5 years ago by pestaaTutorials5 comments – viewed 31,487 times – ( +3 / -2 ) – version 1.1
After adding proper form to the main layout, like:

Custom Number Formatting or Decimal Separators and i18n

Created 2 years ago by c@cbaTutorials8 comments – viewed 30,457 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...

Multiple Databases and Multiple Domains

Created 4 years ago by got 2 doodleTutorials2 comments – viewed 30,173 times – ( +14 / -2 ) – version 1.1
Add these lines in /config/main.php
tags: database

Create Excel File with PHPExcel Plugin (Insert Image in Excel Sheet ,Use Template to Create Excel File, Create New Sheet)

Created about a year ago by codesutraTutorials4 comments – viewed 29,876 times – ( +6 )
This is an example for how to create Excel File with PHPExcel library.This article is inspired by Wikki Article return by Antonio Ramirez and extension created by marcovtwout for PHPExcel library.

Manage application configuration in different modes

Created 5 years ago by qiangTutorials5 comments – viewed 29,753 times – ( +16 ) – version 1.1
Info: This tutorial references the idea presented in Jonah's excellent blog article.

Simplified meta tags

Created 4 years ago by Y!!Tutorials4 comments – viewed 29,750 times – ( +13 ) – version 1.1
If we want to set meta tags on a per page (controller-action) basis, we may use the clientScript application component.

Exporting CGridView results to CSV file

Created 2 years ago by RusAlexTutorials9 comments – viewed 29,283 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

Simple access control

Created 2 years ago by szfjozsefTutorials4 comments – viewed 29,153 times – ( +4 / -8 ) – version 1.1
For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.