Wiki

Sorted by viewsX
Displaying 101-110 of 599 result(s).

Implementing a User Level Access System

Created 2 years ago by Antonio RamirezTutorials12 comments – viewed 37,189 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.

"Why do I get a 403 error when trying to use Gii?"

Created 3 years ago by Steve FriedlFAQs3 comments – viewed 37,110 times – ( +7 ) – version 1.1
After enabling the Gii module in your protected/config/main.php file and then try to use it with http://example.com/index.php?r=gii, you get an error:
tags: Gii, config

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

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

Special $variables in CGridView and CListView

Created 2 years ago by Steve FriedlTips10 comments – viewed 37,101 times – ( +23 / -1 ) – version 1.1
The popular CListView and CGridView widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.

Beginner / Intro Tutorials (please add to / update this list)

Created 4 years ago by Ivo RoperTutorials1 comment – viewed 37,082 times – ( +5 ) – version 1.1
This is a central location to collect links to "Getting Started" documentation beyond the blog demo and Creating First Yii Application. Please help the community by adding general, introductory links and descriptions to this page.

Using Yii with Nginx and PHP-FPM

Created 3 years ago by LericHow-tos10 comments – viewed 36,750 times – ( +17 ) – version 1.1
This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.

Saving files to a blob field in the database

Created 3 years ago by zaccariaTips7 comments – viewed 36,739 times – ( +6 / -2 ) – version 1.1
As a follow-up from the How to upload a file using a model wiki entry that explains how to save a file to the filesystem, this article will do the same using a blob field in the database.
tags: File upload

Use shortcut functions to reduce typing

Created 4 years ago by qiangTutorials8 comments – viewed 36,560 times – ( +53 ) – version 1.1
Because Yii intends to be integrated nicely with third-party libraries, it does not define any global functions. Everything in Yii needs to be addressed with full class name or object scopes. For example, to access the current user, we need to use Yii::app()->user; to access application parameters, we need Yii::app()->params['name']; and so on. While editors like textmate can help alleviate the problem of these lengthy typings, it is worthwhile to define global shortcut functions to some commonly used method calls. They will make the application code look cleaner.

Using setFlash for displaying various kind of messages

Created 3 years ago by TrejderHow-tos6 comments – viewed 36,145 times – ( +4 / -5 ) – version 1.1
In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.
tags: flash, error, message

X-Sendfile - serve large static files efficiently from web applications

Created 3 years ago by Maurizio Domba CerinHow-tos5 comments – viewed 35,317 times – ( +26 ) – version 1.1
Normally when we want users to download a file, that file is put in a folder under the web application root and the web server does the rest.