Wiki articles

Showing 141-160 of 650 items.

Understanding "Assets"

Created 8 years ago by Steve Friedl, updated 8 years ago by GOsha.

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.

46 0
40 followers
Viewed: 185 137 times
Version: 1.1
Category: Tutorials

Using jQuery UI 1.8.10 themes with Yii 1.1.6

Created 8 years ago by a110y, updated 8 years ago by samdark.

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:

2 0
2 followers
Viewed: 20 246 times
Version: 1.1
Category: Tips

yii vim eclimd how it works

Created 8 years ago by RusAlex, updated 8 years ago by RusAlex.

I want to create a wiki page, and therefore im opening this discussion on this forum, for answering all questions and see other opinions, how do you use vim with yii.

8 0
8 followers
Viewed: 11 008 times
Version: 1.1
Category: How-tos
Tags: eclimd, vim, vimrc

Cookie management in Yii

Created 8 years ago by Trejder, updated 6 years ago by resurtm.

Cookie management in Yii is easy, but may not be so obvious for the beginners to this framework, so I wrote this simple article to clear some doubts out.

38 1
41 followers
Viewed: 165 214 times
Version: 1.1
Category: How-tos

Using Yii with Nginx and PHP-FPM

Created 8 years ago by Leric, updated 8 years ago by grigori.

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.

18 0
20 followers
Viewed: 75 735 times
Version: 1.1
Category: How-tos

Impersonate Users within Yii Framework

Created 8 years ago by Woil, updated 8 years ago by Woil.

For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

20 0
21 followers
Viewed: 20 855 times
Version: 1.1
Category: Tutorials

The directory structure of the Yii project site

Created 8 years ago by qiang, updated 6 years ago by Yang He.

In this article, we describe the directory structure used by yiiframework.com - the official Yii framework website. While this structure may look overly complicated for small projects or may not be optimal in some sense, we believe it is appropriate for medium or large projects in a team development environment. In fact, we have successfully used the similar structure in some other big projects.

76 0
97 followers
Viewed: 211 173 times
Version: 1.1
Category: Others

URL component access functions

Created 8 years ago by Steve Friedl, updated 8 years ago by Steve Friedl.

Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest class wraps various $_SERVER variables to break down the URL into its constituent parts.

28 0
16 followers
Viewed: 15 929 times
Version: 1.1
Category: Tips
Tags: request, URL

Keeping a running total in a CGridView

Created 8 years ago by Steve Friedl, updated 8 years ago by tydeas_dr.

This tip created in conjunction with IRC #yii channel users emilsedgh and tydeas - thanks!

22 0
19 followers
Viewed: 35 720 times
Version: 1.1
Category: How-tos
Tags: CGridView

How to use Smarty renderer in Yii

Created 8 years ago by dongbeta, updated 8 years ago by dongbeta.

At first, create a class named SmartyRenderer under application/components or any directory you want.

3 0
7 followers
Viewed: 21 387 times
Version: 1.1
Category: How-tos

CGridView and AjaxForm Connect

Created 8 years ago by PinkBrainPlan, updated 8 years ago by PinkBrainPlan.

<?php $this->widget('zii.widgets.grid.CGridView', array(

'dataProvider' => $dataprovider,
'id'=>'recipient_table',
    'selectionChanged'=>'updateEditForm',
'columns' => array(
	'rec_id',
            'org.nachname',
            'org.vorname',
            'org_id',
            array(
                'class'=>'CButtonColumn',
                'template'=>'{...
1 0
10 followers
Viewed: 24 120 times
Version: 1.1
Category: How-tos

Understanding "Safe" Validation Rules

Created 8 years ago by Steve Friedl, updated 7 years ago by Gismo.

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.

73 0
45 followers
Viewed: 148 017 times
Version: 1.1
Category: FAQs

A simple action for CJuiAutoComplete

Created 8 years ago by tydeas_dr, updated 8 years ago by Thiago Souza.

Simple as that. I have placed this action in my extension folder like:

15 1
19 followers
Viewed: 44 700 times
Version: 1.1
Category: Tips

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 8 years ago by xrx, updated 7 years ago by xrx.

Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

23 0
29 followers
Viewed: 46 257 times
Version: 1.1
Category: How-tos

Updating fields on a form with Ajax and Json

Created 8 years ago by Russell England, updated 8 years ago by Russell England.

I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.

10 0
22 followers
Viewed: 62 778 times
Version: 1.1
Category: How-tos

Understanding Autoloading, Helper Classes and Helper Functions

Created 8 years ago by Steve Friedl, updated 8 years ago by GOsha.

Many Yii users ask how to create helper classes and functions, and though there are numerous approaches spread out among the forum and wiki articles, this Tutorial tries to bring it all together in one place.

22 0
27 followers
Viewed: 111 598 times
Version: 1.1
Category: Tutorials

caching controllers with filters()

Created 8 years ago by RusAlex, updated 8 years ago by Maurizio Domba Cerin.

Hello, this article will describe some aspects about caching controllers with filters() method in your controller. And I will describe some problems I meet when using this approach for caching, the main problem was

2 0
8 followers
Viewed: 15 148 times
Version: 1.1
Category: How-tos

Understanding Virtual Attributes and get/set methods

Created 8 years ago by Steve Friedl, updated 8 years ago by GOsha.

When you define or extend a class, you can create class variables and methods in Yii just like you can in any other PHP system:

class Comment extends CActiveRecord {
    public $helperVariable;
    public function rules() { ... }
    ...
}

and then use them in the obvious way:

$var   = $model->helperVariable;
$rules = $model->rules();

This part everybody understa...

65 0
44 followers
Viewed: 172 026 times
Version: 1.1
Category: Tutorials

Create your own Validation Rule

Created 8 years ago by nickcv, updated 7 years ago by Gismo.

Some times the core validation rules provided by Yii won't satisfy all your needs, so you'll need to create your very own validation rule.

58 0
53 followers
Viewed: 231 499 times
Version: 1.1
Category: How-tos

Configuring controller access rules to default-deny

Created 8 years ago by Steve Friedl, updated 5 years ago by nsanden.

Starting with the blog tutorial, Yii developers are familiar with the notion of access rules defined in the controller, where the actions are allowed or denied depending on the user's name or role.

class CommentController extends CController {
    public function filters()
    {
        return array( 'accessControl' ); // perform access control for CRUD operations
    }

11 0
12 followers
Viewed: 95 168 times
Version: 1.1
Category: How-tos