Wiki

Articles in category "tutorials", sorted by commentsX
Displaying 31-40 of 249 result(s).

Understanding "Assets"

Created 5 years ago by Steve FriedlTutorials12 comments – viewed 150,142 times – ( +57 ) – version 1.1
Many newcomers to Yii ask about the assets/ directory found under the webroot, and this article means to explain why it's there and how to work with it.

Implementing a User Level Access System

Created 5 years ago by Antonio RamirezTutorials12 comments – viewed 50,913 times – ( +28 / -1 ) – version 1.1
I would like to provide you a quick tip on how to implement user level access to your Yii applications.

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

Created 3 years ago by softarkTutorials11 comments – viewed 33,791 times – ( +15 ) – version 1.1
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.

Create / Generate PDF files with TCPDF plugin (Example to generate Table with TCPDF plugin)

Created 3 years ago by codesutraTutorials11 comments – viewed 49,588 times – ( +6 ) – version 1.1
Few days ago i was playing with TCPF plugin to create a PDF files. Since i have checked few available extension and also checked some forum threads but still i dont get my expected result for PDF file.

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

Created 6 years ago by atrandafirTutorials11 comments – viewed 122,266 times – ( +35 ) – version 1.1
This little tutorial explains a way how you can retrieve more parameters from Yii::app()->user by adding a component that extends CWebUser and retrieves the user information from database table named User.

Caching the config main.php

Created 4 years ago by dckurushinTutorials11 comments – viewed 14,350 times – ( +4 / -2 ) – version 1.1
The config long array included every time, and it's not cached at all!

RBAC Super Simple with Admin and User

Created about a year ago by evercodeTutorials10 comments – viewed 43,562 times – ( +15 / -3 ) – version 2.0
One of the common requests I see in the forum is how to implement RBAC. While you can implement Yii 2's built-in RBAC, that might be too much for developers who are just starting with Yii 2 or have simpler needs. Sometimes you are looking for a fast solution and just want two flavors, user and admin. And even if you will eventually need more, you can use these methods as a starting point for developing your own features or move on to Yii 2's RBAC.

A very easy way to setup yiic on WAMP server (without extra windows settings)

Created 3 years ago by Kostas Apazidis (KonApaz)Tutorials10 comments – viewed 35,343 times – ( +6 / -1 ) – version 1.1
Assuming that you have already install the wampserver on your windows.

Organize directories for applications with front-end and back-end

Created 7 years ago by qiangTutorials10 comments – viewed 72,941 times – ( +28 ) – version 1.1
Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing directories of the code for both ends.

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

Created 4 years ago by c@cbaTutorials10 comments – viewed 34,109 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.