Wiki articles

Showing 661-680 of 827 items.

Uploading multiple images with CMultiFileUpload

Created 14 years ago by rsingh rsingh, updated 14 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.
33 0
38 followers
Viewed: 134 534 times
Version: 1.1
Category: How-tos

How-To: Create a REST API

Created 14 years ago by jwerner jwerner, updated 11 years ago by Rohit Suthar Rohit Suthar.

This article will explain how to create a REST API with the Yii framework.

98 2
123 followers
Viewed: 522 848 times
Version: 1.1
Category: How-tos

Ativando temas no Zii Widgets

Created 14 years ago by Ivan Wilhelm Ivan Wilhelm, updated 14 years ago by Ivan Wilhelm Ivan Wilhelm.

Um aspecto do design da interface de usuário tem a ver com a coerência do design e da utilização das cores entre os diferentes componentes da interface do usuário utilizada.

4 2
4 followers
Viewed: 13 845 times
Version: 1.1
Category: Tutorials

An easy way to use escopes and CActiveDataProvider

Created 14 years ago by Rafael Garcia Rafael Garcia, updated 14 years ago by Rafael Garcia Rafael Garcia.

Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.

1 1
10 followers
Viewed: 39 388 times
Version: 1.1
Category: Tips

An easy way to display a success page using flash messages

Created 14 years ago by qiang qiang, updated 14 years ago by qiang qiang.

We often need to display a success page after the user has submitted a form without problem. We may show some welcome message after a user registers a new account. There are many ways to implement this workflow. In this article, I will explain a method that exploits flash messages.

21 0
29 followers
Viewed: 61 602 times
Version: 1.1
Category: Tips

To configure Yii path in Windows platform

Created 14 years ago by Coda Coda, updated 14 years ago by Coda Coda.

I can see many questions regarding configuring the path using Windows OS. I could hardly get the right information about it. The cook book has defined for Linux. So I would like to share my idea on it. To configure the Yii path using Windows OS,

0 6
4 followers
Viewed: 52 708 times
Version: 1.1
Category: Tutorials

Actions code reuse with CAction

Created 14 years ago by Antonio Ramirez Antonio Ramirez, updated 14 years ago by Antonio Ramirez Antonio Ramirez.

Gii provides us normally with the following code on the 'actionCreate':

public function actionCreate()
{
   $model=new ModelName;

33 0
19 followers
Viewed: 57 935 times
Version: 1.1
Category: How-tos

Configuring controller access rules to default-deny

Created 14 years ago by Steve Friedl Steve Friedl, updated 12 years ago by nsanden 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: 143 540 times
Version: 1.1
Category: How-tos

Create your own Validation Rule

Created 14 years ago by nickcv nickcv, updated 13 years ago by Gismo 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: 285 564 times
Version: 1.1
Category: How-tos

Understanding Virtual Attributes and get/set methods

Created 14 years ago by Steve Friedl Steve Friedl, updated 14 years ago by GOsha 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: 214 315 times
Version: 1.1
Category: Tutorials

caching controllers with filters()

Created 15 years ago by RusAlex RusAlex, updated 15 years ago by Maurizio Domba Cerin 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: 19 838 times
Version: 1.1
Category: How-tos

Understanding Autoloading, Helper Classes and Helper Functions

Created 15 years ago by Steve Friedl Steve Friedl, updated 14 years ago by GOsha 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: 128 075 times
Version: 1.1
Category: Tutorials

Updating fields on a form with Ajax and Json

Created 15 years ago by Russell England Russell England, updated 15 years ago by Russell England 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: 99 071 times
Version: 1.1
Category: How-tos

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 15 years ago by xrx xrx, updated 13 years ago by xrx 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: 55 078 times
Version: 1.1
Category: How-tos

A simple action for CJuiAutoComplete

Created 15 years ago by tydeas_dr tydeas_dr, updated 14 years ago by Thiago Souza Thiago Souza.

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

15 1
19 followers
Viewed: 51 866 times
Version: 1.1
Category: Tips

Understanding "Safe" Validation Rules

Created 15 years ago by Steve Friedl Steve Friedl, updated 13 years ago by Gismo 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: 199 462 times
Version: 1.1
Category: FAQs

CGridView and AjaxForm Connect

Created 15 years ago by PinkBrainPlan PinkBrainPlan, updated 15 years ago by PinkBrainPlan 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: 29 992 times
Version: 1.1
Category: How-tos

How to use Smarty renderer in Yii

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

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

3 0
7 followers
Viewed: 23 721 times
Version: 1.1
Category: How-tos

Keeping a running total in a CGridView

Created 15 years ago by Steve Friedl Steve Friedl, updated 14 years ago by tydeas_dr tydeas_dr.

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

22 0
19 followers
Viewed: 83 032 times
Version: 1.1
Category: How-tos
Tags: CGridView

URL component access functions

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