Wiki articles

Showing 481-500 of 653 items.

A simple action for XUpload extension

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

All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action

3 0
5 followers
Viewed: 22 140 times
Version: 1.1
Category: Tips

Relations: BELONGS_TO versus HAS_ONE

Created 14 years ago by Steve Friedl Steve Friedl, updated 12 years ago by Jorgee Jorgee.

It's very common to see new Yii users confusing the relations HAS_ONE and BELONGS_TO, and getting it wrong means you won't get proper values back. And though we'll talk about HAS_MANY as well, we're specifically omitting the MANY_MANY relation because it's a whole different animal.

56 0
35 followers
Viewed: 170 227 times
Version: 1.1
Category: FAQs

Yii实战中8个必备常用的扩展,模块和

Created 14 years ago by Darwin Wen Darwin Wen, updated 14 years ago by Darwin Wen Darwin Wen.

在经过畅K网的实战后,总结一下在Yii的项目中会经常用到的组件和一些基本的使用方法,分享给大家,同时也给自己留个备忘录,下面我以代码加图片说明.

2 3
9 followers
Viewed: 43 143 times
Version: 1.1
Category: Tips

Yii tinymce结合syntaxHighlighter和syntax

Created 14 years ago by Darwin Wen Darwin Wen, updated 14 years ago by Darwin Wen Darwin Wen.

首先我们需要下载好Yii tinymce扩展,放入你的extensions目录下,

1 0
0 follower
Viewed: 15 015 times
Version: 1.1
Category: Tutorials

How to avoid multiple Ajax Request

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

CHtml::ajaxLink(), CHtml::ajaxSubmitButton() and similar methods are great, but if they are located inside a portion of the page that is already loaded via ajax something bad will happen, something you may even not notice if you are not using tools like firebugs...

17 0
27 followers
Viewed: 69 501 times
Version: 1.1
Category: How-tos

Prevent asset publishing for CListView

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

If you don't want to use any of the AJAX features of CListView and thus want to prevent that it publishes any of its asset files, you can extend it and create a sub class like this:

2 0
6 followers
Viewed: 15 525 times
Version: 1.1
Category: How-tos

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 840 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 601 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 934 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 538 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 563 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 309 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 072 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 069 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 077 times
Version: 1.1
Category: How-tos