Wiki

Articles in category "tutorials", sorted by viewsX
Displaying 101-110 of 255 result(s).

Simple access control

Created 5 years ago by szfjozsefTutorials4 comments – viewed 38,471 times – ( +4 / -9 ) – 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.

Add information to Yii::app()->user by extending CWebUser (better version)

Created 7 years ago by emixTutorials5 comments – viewed 38,054 times – ( +5 / -2 ) – version 1.1
I found a better solution.
tags: Yii, user, rbac

Adding login form to each page

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

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

Created 5 years ago by c@cbaTutorials10 comments – viewed 37,433 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.

Ajax Login form with validation errors inside jQuery modal dialog

Created 4 years ago by praviTutorials4 comments – viewed 37,194 times – ( +6 / -1 ) – version 1.1
I would like to share my little experience with Yii to the community in the form of the below small wiki:
tags: ajax login

Tabular Input, Validating and Saving related models

Created 4 years ago by Xavier JohnTutorials5 comments – viewed 33,967 times – ( +8 / -1 ) – version 1.1
This tutorial shows how to use a model to save and validate related (MANY_MANY) models.

CButtonColumn: Use special variable $data for the 'id' in the 'options' of a button

Created 5 years ago by bluezedTutorials5 comments – viewed 33,470 times – ( +10 / -2 ) – version 1.1
In an application I had a CGridView with a CButtonColumn and for an Ajax-Request I needed to make sure that the IDs of the buttons would not change when the GridView was updated so in effect I wanted to link them to the $data->id. So I tried:

Email template functionality with manage content from database

Created 4 years ago by kiran sharmaTutorials6 comments – viewed 33,215 times – ( +5 / -4 ) – version 1.1
I hadn't specify whole flow as I assume you know yii crud flow well, and Quick understand of my specified admin flow.. :)
tags: email, template

List with multiple checkbox

Created 7 years ago by matkazTutorials3 comments – viewed 33,153 times – ( +4 / -1 ) – version 1.1
It is a common case coders often come accross. For example the purpose of these checkbox is to mark records to be deleted

How to display Dependent drop-down value using ajax call with dynamically

Created 3 years ago by Ankit ModiTutorials4 comments – viewed 33,103 times – ( +3 / -3 ) – version all
Hi Friends, In this tutorial I write a code display dependent drop-down value using ajax call.