Wiki

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

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

Created 5 years ago by c@cbaTutorials10 comments – viewed 36,970 times – ( +15 / -1 ) – version 1.1
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 name of the event suggests, this event handler will be called at the beginning of each request, so its a good place to check whether a language is provided (via post, session or cookie) and set the application language accordingly. We also implement a simple Language-Selector Widget, which can render the language options as ajax-links or as a drop-down list.

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

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

Update/delete model with CJuiDialog (works in CGridView)

Created 6 years ago by ifdatticTutorials6 comments – viewed 68,107 times – ( +15 / -1 ) – version 1.1
This is based on this article.

Eclipse PDT - code-hints, references and other goodies

Created 8 years ago by mindehTutorials2 comments – viewed 30,813 times – ( +14 / -1 ) – version 1.1
Since PHP is dynamically typed language, the way IDE may help you is limited.
tags: IDE

How to use ldap in UserIdentity for authentication

Created 7 years ago by BeerSercTutorials15 comments – viewed 52,426 times – ( +14 / -1 ) – version 1.1
Yii does not have an LDAP class itself, but its very easy to implement LDAP in the stock UserIdentity class.

Module based login

Created 6 years ago by suriyansureshTutorials6 comments – viewed 58,091 times – ( +14 / -1 ) – version 1.1
If you want to add module based login to a site without using RBAC, please follow these guidelines.

How to customize the error message of a validation rule

Created 8 years ago by qiangTutorials4 comments – viewed 102,833 times – ( +18 / -2 ) – version 1.1
Validators extending from CValidator all have a property named 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:

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

Created 6 years ago by Juan CalvoTutorials4 comments – viewed 54,174 times – ( +17 / -2 ) – 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 create a breadcrumb widget

Created 8 years ago by knutTutorials4 comments – viewed 71,837 times – ( +13 / -1 ) – version 1.1
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.

Simplified meta tags

Created 7 years ago by Y!!Tutorials5 comments – viewed 43,361 times – ( +13 / -1 ) – version 1.1
If we want to set meta tags on a per page (controller-action) basis, we may use the clientScript application component.