Articles in category "tutorials", sorted by viewsX
Displaying 81-90 of 242 result(s).

Simplified meta tags

Created 5 years ago by Y!!Tutorials5 comments – viewed 36,026 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.

Multiple Databases and Multiple Domains

Created 5 years ago by got 2 doodleTutorials2 comments – viewed 35,370 times – ( +15 / -2 ) – version 1.1
Add these lines in /config/main.php
tags: database

To configure Yii path in Windows platform

Created 4 years ago by CodaTutorials2 comments – viewed 35,003 times – ( +3 / -6 ) – version 1.1
I can see many questions regarding configuring the path using Windows OS. I could hardly get the right information about it. The cook book has defined for Linux. So I would like to share my idea on it. To configure the Yii path using Windows OS,

Adding login form to each page

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

Manage application configuration in different modes

Created 6 years ago by qiangTutorials5 comments – viewed 34,105 times – ( +17 ) – version 1.1
Info: This tutorial references the idea presented in Jonah's excellent blog article.

Setting application parameters dynamically in the back-end

Created 3 years ago by PablovpTutorials6 comments – viewed 33,692 times – ( +13 / -1 ) – version 1.1
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.

Simple access control

Created 3 years ago by szfjozsefTutorials4 comments – viewed 33,684 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.

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

Created 3 years ago by c@cbaTutorials10 comments – viewed 31,456 times – ( +15 ) – 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.

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

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

Custom Login Error Messages

Created 2 years ago by whoopassTutorials1 comment – viewed 30,513 times – ( +11 ) – version 1.1
The Yii Framework is very powerful and it provides a lot of functionality right from the pre-built webapp. One of the nice things that is already established for you as a developer is the Login authentication. While the default configuration simply sets it up to run against an array of hard coded usernames and passwords, the Yii Blog Tutorial provides a how to in connecting that login authentication method to a database so you can run your logins against the registered users. Talk about sweet deal.