Wiki articles in category Tutorials

Showing 181-200 of 264 items.

MVC primer and 5 minute form walkthrough

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

This tutorial assumes some basic knowledge of Yii and a functional development environment.

8 0
6 followers
Viewed: 29 377 times
Version: 1.1
Category: Tutorials

Simple Mail Queue

Created 10 years ago by waterloomatt, updated 8 years ago by Bizley.

The basic idea is to create a complete mail message and store it a Db table along with all info necessary for sending valid emails (to_email, from_email, from_name, subject etc.)

8 0
14 followers
Viewed: 28 429 times
Version: 1.1
Category: Tutorials

Batch Gridview data ajax send splitted in chunks displaying bootstrap Progress bar

Created 5 years ago by toaster, updated 5 years ago by toaster.

The scenario in which this wiki can be useful is when you have to send an (huge) array of model ids and perform a time consuming computation with it like linking every model to other models. The idea is to split the array into smaller arrays and perform sequential ajax requests, showing the calculation progress using a [Bootstrap Progress bar](https://www.yiiframework.com/extension/yiisoft/yii2-bo...

8 0
2 followers
Viewed: 33 006 times
Version: 2.0
Category: Tutorials

Relational Query - Lazy Loading and Eager Loading in Yii 1.1 / with and together

Created 10 years ago by softark, updated 8 years ago by softark.

It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's important to note that you should distinguish 2 different modes in the Eager Loading in Yii 1.1.x.

9 0
22 followers
Viewed: 59 448 times
Version: 1.1
Category: Tutorials

Manage (Target) Language in Multilingual Applications + A Language Selector Widget (i18n)

Created 12 years ago by c@cba, updated 12 years ago by c@cba.

In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language. This tutorial shows a Yii-way of doing this.
We implement an event handler for the onBeginRequest event; as the nam...

9 0
19 followers
Viewed: 49 594 times
Version: 1.1
Category: Tutorials

Collaborative software with git

Created 12 years ago by sensorario, updated 12 years ago by Maurizio Domba Cerin.

The most difficult thing in a big project, is to manage conflicts with files modified by others users. Git can do this work for us.

9 0
9 followers
Viewed: 13 855 times
Version: 1.1
Category: Tutorials

Ordering Models by Weight with CJuiSortable

Created 14 years ago by Matt Kelliher, updated 10 years ago by Phil Loaiza.

In this tutorial we will be setting up a content type to be ordered by weight using the JUI Sortable plugin.

9 0
10 followers
Viewed: 16 401 times
Version: 1.1
Category: Tutorials
Tags:

Working with radiobutton list

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

This is a tutorial to work with radioButtonList which will handle enum datatype. Form design and validation both are detailed here.

9 0
10 followers
Viewed: 129 807 times
Version: 1.1
Category: Tutorials

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

Created 13 years ago by Juan Calvo, updated 13 years ago by Juan Calvo.

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).

15 1
9 followers
Viewed: 73 302 times
Version: 1.1
Category: Tutorials

How to create a breadcrumb widget

Created 15 years ago by knut, updated 11 years ago by Yang He.

Here's a simple way to create a breadcrumb widget to be used in your templates. The idea is just to isolate how the breadcrumb is generated based on an array of crumbs.

10 0
11 followers
Viewed: 83 775 times
Version: 1.1
Category: Tutorials
Tags:

Front-end developer's guide

Created 12 years ago by jonah, updated 12 years ago by waitekk.

This wiki is a work in progress.

10 0
19 followers
Viewed: 40 490 times
Version: 1.1
Category: Tutorials

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 8 years ago by softark, updated 4 years ago by samdark.

It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's very important to know how the Eager Loading approach works in Yii 2. It has changed drastically from that of Yii 1.1, and there are common misunderstandings about it in the community.

10 0
6 followers
Viewed: 55 843 times
Version: 2.0
Category: Tutorials

Using CJuiDialog to display flash Messages in Dialogues

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

In order to nicely display flash Messages, create view like this called views/site/dialog.php :

10 0
9 followers
Viewed: 28 726 times
Version: 1.1
Category: Tutorials
Tags:

Logout CSRF Protection

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

CSRF is the acronymn for Cross-site request forgery.
It is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.

10 0
11 followers
Viewed: 29 491 times
Version: 1.1
Category: Tutorials

How to create/save more Model inputs and make them repeatable with jQuery

Created 14 years ago by qiang, updated 11 years ago by Yang He.

This is the first real problem that I encountered using Yii, trying to make a Model input repeatable in the form, validate and save them.

11 0
16 followers
Viewed: 51 308 times
Version: 1.1
Category: Tutorials
Tags:

How to use ldap in UserIdentity for authentication

Created 14 years ago by BeerSerc, updated 10 years ago by Navarr.

Yii does not have an LDAP class itself, but its very easy to implement LDAP in the stock UserIdentity class.

11 0
18 followers
Viewed: 90 051 times
Version: 1.1
Category: Tutorials

Setting application parameters dynamically in the back-end

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

I was wondering how to set-up the application parameters in the back-end to use them all around the application without the need of using the database and I came up with this solution, I hope it helps somebody else.

12 0
16 followers
Viewed: 62 768 times
Version: 1.1
Category: Tutorials

i18n for your model in just 1 line

Created 14 years ago by mintao, updated 13 years ago by Orteko.

A simple trick to get the localized version of a model field is to add this little method to your models.

12 0
9 followers
Viewed: 19 270 times
Version: 1.1
Category: Tutorials
Tags: i18n

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

Created 12 years ago by c@cba, updated 12 years ago by c@cba.

    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 `...

19 1
14 followers
Viewed: 79 771 times
Version: 1.1
Category: Tutorials

How to customize the error message of a validation rule

Created 15 years ago by qiang, updated 11 years ago by Yang He.

Validators extending from [CValidator] all have a property named [message|CValidator::message]. You can set this property in the corresponding validation rule to customize the error message. For example, the following validation rule uses an error message that is different from the default one:

13 0
14 followers
Viewed: 144 072 times
Version: 1.1
Category: Tutorials
Tags: