Wiki

Sorted by commentsX
Displaying 91-100 of 470 result(s).

By Example: CHtml

Created 3 years ago by jonahTutorials7 comments – viewed 243,393 times – ( +80 )
"By Example" cookbook pages will provide coding examples for many of the commonly used classes within Yii. We will try to provide as many usage examples as possible for keep these pages as helpful as possible.

Getting the Most out of APC for Yii

Created about a year ago by Da:SourcererHow-tos7 comments – viewed 12,286 times – ( +15 )
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

Saving files to a blob field in the database

Created 2 years ago by zaccariaTips7 comments – viewed 26,393 times – ( +6 / -2 )
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

Using jQuery UI 1.8.10 themes with Yii 1.1.6

Created 2 years ago by a110yTips7 comments – viewed 12,118 times – ( +2 )
When using the latest stable jQuery UI themes (1.8.10) with Yii 1.1.6 (which uses 1.8.6) the widgets don't appear (they're invisible but they're there). In order to make them visible you need to change the following line:

Understanding "Safe" Validation Rules

Created 2 years ago by Steve FriedlFAQs7 comments – viewed 39,805 times – ( +72 )
A common source of confusion among new Yii users is how the 'safe' validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear up this confusion, as well as explain the notion of Massive Assignment.

A simple action for CJuiAutoComplete

Created 2 years ago by tydeas_drTips7 comments – viewed 17,828 times – ( +14 / -1 )
More or less I use auto-complete field for a form. CJuiAutoComplete is a yii widget for this purposes. The common use case is to make an ajax request and retrieve a list from the database. So in this case you have to write a controller action to return you a json encoded list. What if I had a generic action to do this work for me?

How to use YiiBooster TbFileUpload widget

Created 5 months ago by Antonio RamirezHow-tos7 comments – viewed 9,218 times – ( +7 )
The following wiki is to explain how to make use of the TbFileUpload widget from YiiBooster. I have received a couple of requests and I thought was worth writing a wiki for it.

Using CJuiDialog to edit rows in a CGridView

Created about a year ago by Russell EnglandTips7 comments – viewed 18,781 times – ( +2 / -1 )
I have a CGridView with a list of clients/events. For each row (EventClient) I wanted a quick edit dialog.

Creating a CSS Driven Drop Down Menu using CMenu

Created about a year ago by blindMoeHow-tos7 comments – viewed 36,461 times – ( +19 / -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.

Using cache in CActiveDataProvider

Created about a year ago by StammTips7 comments – viewed 9,162 times – ( +17 )
First param in CActiveDataProvider could be a string with model name or instance of class. So, you may use CActiveRecord::cache() for cache, but you need set third param to 2, because you should cache 2 queries: counting and get data.