Wiki

Articles in category "tutorials", sorted by viewsX
Displaying 61-70 of 235 result(s).

Use shortcut functions to reduce typing

Created 5 years ago by qiangTutorials8 comments – viewed 40,983 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.

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created 2 years ago by c@cbaTutorials3 comments – viewed 40,728 times – ( +28 / -1 ) – version 1.1
    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this: 'value'=>'$data->author->username',.     Now we might want to use $data in the declaration of the htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...

Send mail using YiiMail extension

Created about a year ago by RKATutorials8 comments – viewed 40,214 times – ( +8 ) – version 1.1
Let me show a simpe example to send mail using YiiMail extension in 5 steps. It also includes any template view if required along with the content.
tags: YiiMail

Beginner / Intro Tutorials (please add to / update this list)

Created 5 years ago by Ivo RoperTutorials1 comment – viewed 38,970 times – ( +5 ) – version 1.1
This is a central location to collect links to "Getting Started" documentation beyond the blog demo and Creating First Yii Application. Please help the community by adding general, introductory links and descriptions to this page.

Introducción al control de acceso basado en roles (RBAC)

Created 3 years ago by Juan CalvoTutorials4 comments – viewed 38,023 times – ( +17 / -1 ) – version 1.1
Todos los que hemos empezado a utilizar Yii para crear aplicaciones Web, nos hemos dado de bruces cuando hemos intentado poner a funcionar el RBAC (acceso de control basado en roles).

How to use ldap in UserIdentity for authentication

Created 4 years ago by BeerSercTutorials15 comments – viewed 37,525 times – ( +12 ) – version 1.1
Yii does not have an LDAP class itself, but its very easy to implement LDAP in the stock UserIdentity class.

Yii for beginners 2

Created about a year ago by rackyczTutorials2 comments – viewed 37,418 times – ( +29 ) – version 1.1
Hi :-) Is that you again? Welcome !! :-)

config Use MS SQL SERVER 2005 2008.

Created 3 years ago by vcxz_1982Tutorials1 comment – viewed 37,053 times – ( +4 ) – version 1.1
Use SQL SERVER 2000, the date format not like: yyyy/mm/dd hh:mm:ss. So I change to use SQL SERVER 2008 EXPRESS.

Installing WAMP - Apache, MySQL, & PHP on Windows 7

Created 4 years ago by YetiTutorials1 comment – viewed 34,978 times – ( +2 / -1 ) – version 1.1
Installing WAMP on XP was pretty easy; W7 is not so trivial. It's not difficult once you know, but it took me best part of a day to figure out and required gleaning various bits of information from around the web; this tutorial brings it all together in one place to (hopefully) make other peoples lives that bit easier. It does assume that you are reasonably happy configuring Apache, PHP, and MySQL and mainly deals with the W7 quirks.

Working with radiobutton list

Created 2 years ago by vibhaJadwaniTutorials3 comments – viewed 34,903 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.