Wiki articles

Showing 141-160 of 651 items.

Understanding "Assets"

Created 13 years ago by Steve Friedl, updated 12 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: 207 675 times
Version: 1.1
Category: Tutorials

Using jQuery UI 1.8.10 themes with Yii 1.1.6

Created 13 years ago by a110y, updated 13 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: 23 241 times
Version: 1.1
Category: Tips

yii vim eclimd how it works

Created 13 years ago by RusAlex, updated 12 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: 12 861 times
Version: 1.1
Category: How-tos
Tags: eclimd, vim, vimrc

Cookie management in Yii

Created 13 years ago by Trejder, updated 11 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
40 followers
Viewed: 192 982 times
Version: 1.1
Category: How-tos

Using Yii with Nginx and PHP-FPM

Created 13 years ago by Leric, updated 12 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: 108 486 times
Version: 1.1
Category: How-tos

Impersonate Users within Yii Framework

Created 13 years ago by Woil, updated 13 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: 26 180 times
Version: 1.1
Category: Tutorials

The directory structure of the Yii project site

Created 13 years ago by qiang, updated 11 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.

77 0
96 followers
Viewed: 244 929 times
Version: 1.1
Category: Others

URL component access functions

Created 13 years ago by Steve Friedl, updated 13 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: 19 015 times
Version: 1.1
Category: Tips
Tags: request, URL

Keeping a running total in a CGridView

Created 13 years ago by Steve Friedl, updated 12 years ago by tydeas_dr.

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

22 0
19 followers
Viewed: 41 602 times
Version: 1.1
Category: How-tos
Tags: CGridView

How to use Smarty renderer in Yii

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

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

3 0
7 followers
Viewed: 22 612 times
Version: 1.1
Category: How-tos

CGridView and AjaxForm Connect

Created 13 years ago by PinkBrainPlan, updated 13 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: 27 368 times
Version: 1.1
Category: How-tos

Understanding "Safe" Validation Rules

Created 13 years ago by Steve Friedl, updated 11 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.

75 0
46 followers
Viewed: 181 572 times
Version: 1.1
Category: FAQs

A simple action for CJuiAutoComplete

Created 13 years ago by tydeas_dr, updated 12 years ago by Thiago Souza.

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

15 1
19 followers
Viewed: 48 997 times
Version: 1.1
Category: Tips

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 13 years ago by xrx, updated 11 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: 51 569 times
Version: 1.1
Category: How-tos

Updating fields on a form with Ajax and Json

Created 13 years ago by Russell England, updated 13 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: 95 267 times
Version: 1.1
Category: How-tos

Understanding Autoloading, Helper Classes and Helper Functions

Created 13 years ago by Steve Friedl, updated 12 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
26 followers
Viewed: 122 299 times
Version: 1.1
Category: Tutorials

caching controllers with filters()

Created 13 years ago by RusAlex, updated 13 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: 17 701 times
Version: 1.1
Category: How-tos

Understanding Virtual Attributes and get/set methods

Created 12 years ago by Steve Friedl, updated 12 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...

66 0
44 followers
Viewed: 202 283 times
Version: 1.1
Category: Tutorials

Create your own Validation Rule

Created 12 years ago by nickcv, updated 11 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.

59 0
54 followers
Viewed: 272 173 times
Version: 1.1
Category: How-tos

Configuring controller access rules to default-deny

Created 12 years ago by Steve Friedl, updated 10 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: 105 268 times
Version: 1.1
Category: How-tos