Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 51-60 of 316 result(s).

Using standard filters in CGridView custom fields

Created 3 years ago by GOshaHow-tos4 comments – viewed 50,558 times – ( +17 ) – version 1.1
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.For example: We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0. So we do the usual thing:

Using Yii with Nginx and PHP-FPM

Created 3 years ago by LericHow-tos10 comments – viewed 42,320 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.

Simple authorization system

Created 2 years ago by GustavoHow-tos1 comment – viewed 24,492 times – ( +16 ) – version 1.1
How to create a simple (non-RBAC) authorization system

Getting the Most out of APC for Yii

Created 2 years ago by Da:SourcererHow-tos10 comments – viewed 26,682 times – ( +16 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

Moving project code outside of webroot (plus multiple project support)

Created 3 years ago by Steve FriedlHow-tos8 comments – viewed 39,572 times – ( +22 / -1 ) – version 1.1
Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).
tags: config, security

Creating a CSS Driven Drop Down Menu using CMenu

Created 3 years ago by blindMoeHow-tos9 comments – viewed 66,422 times – ( +22 / -1 ) – version 1.1
CMenu offers great functionality and the ability to customize just about every aspect of the output. There are many times when I need to create a drop down menu or simply modify the look to make the designers happy. Because this seems to be a common task for me, I figured I would share my code to create a very simple drop down menu that other people could use.

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Created 2 years ago by c@cbaHow-tos3 comments – viewed 24,538 times – ( +14 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options. The main code was contributed by zaccaria in the forum (see this post).

Create custom button button with AJAX function in CGridView

Created 2 years ago by nkdHow-tos1 comment – viewed 35,188 times – ( +14 ) – version 1.1
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.

Using Bootstrap with LESS

Created about a year ago by Chris83How-tos1 comment – viewed 34,950 times – ( +14 ) – version 1.1
I discovered Twitter Bootstrap almost two years ago. After trying it out for a while I fell in love with it. It didn't take long before I realized that it would be great to write an extension that allowed developers to start using Bootstrap in their Yii projects. One night I sat down and started writing what later became my now popular bootstrap extension. Now that the extension is quite widely used in the community I felt that it was time to write about how to use Bootstrap to its full potential. If you use the Bootstrap CSS files you're really missing out on some great features. After reading this article you'll be able to take full advantage of Bootstrap using LESS.

Integrating HybridAuth directly into Yii without an extension

Created about a year ago by biz devHow-tos7 comments – viewed 25,008 times – ( +14 ) – version 1.1
This article tries to explain the steps required in integrating the HybridAuth into Yii directly, without using an extension.