Wiki articles

Showing 161-180 of 799 items.

Actions code reuse with CAction

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

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

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

33 0
19 followers
Viewed: 47 779 times
Version: 1.1
Category: How-tos

To configure Yii path in Windows platform

Created 8 years ago by Coda, updated 8 years ago by 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: 44 199 times
Version: 1.1
Category: Tutorials

An easy way to display a success page using flash messages

Created 8 years ago by qiang, updated 8 years ago by 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: 46 869 times
Version: 1.1
Category: Tips

An easy way to use escopes and CActiveDataProvider

Created 8 years ago by Rafael Garcia, updated 8 years ago by 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: 32 971 times
Version: 1.1
Category: Tips

Ativando temas no Zii Widgets

Created 8 years ago by Ivan Wilhelm, updated 8 years ago by 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: 10 659 times
Version: 1.1
Category: Tutorials

How-To: Create a REST API

Created 8 years ago by jwerner, updated 4 years ago by Rohit Suthar.

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

97 2
126 followers
Viewed: 406 031 times
Version: 1.1
Category: How-tos

Uploading multiple images with CMultiFileUpload

Created 8 years ago by rsingh, updated 8 years ago by Maurizio Domba Cerin.
33 0
39 followers
Viewed: 113 164 times
Version: 1.1
Category: How-tos

Prevent asset publishing for CListView

Created 8 years ago by Mike, updated 8 years ago by 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: 11 316 times
Version: 1.1
Category: How-tos

How to avoid multiple Ajax Request

Created 8 years ago by nickcv, updated 8 years ago by 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: 59 619 times
Version: 1.1
Category: How-tos

Yii tinymce结合syntaxHighlighter和syntax

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

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

1 0
0 follower
Viewed: 10 659 times
Version: 1.1
Category: Tutorials

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

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

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

2 3
9 followers
Viewed: 35 282 times
Version: 1.1
Category: Tips

Relations: BELONGS_TO versus HAS_ONE

Created 8 years ago by Steve Friedl, updated 5 years ago by 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: 143 233 times
Version: 1.1
Category: FAQs

A simple action for XUpload extension

Created 8 years ago by tydeas_dr, updated 8 years ago by 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: 17 709 times
Version: 1.1
Category: Tips

Using International Dates

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

So here is my complete solution - note that I'm using the 'short' date format throughout.

15 0
24 followers
Viewed: 42 473 times
Version: 1.1
Category: How-tos

Syntax check

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

This will syntax check each php file recursively from the current directory.

4 0
2 followers
Viewed: 10 719 times
Version: 1.1
Category: Tips
Tags: php, syntax

CListView AJAX filtering

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

This tutorial shows how to filter CListView items by AJAX, and it's compatible with disabled JavaScript users
In my case this has been done to filter users list

13 0
27 followers
Viewed: 72 530 times
Version: 1.1
Category: Tutorials

How to generate Yii-like Documentation

Created 8 years ago by Asgaroth, updated 6 years ago by fsb.

Something a good application cant miss is documentation, and what would be better than some nice formatted HTML documentation that can be auto-generated from your code, we know several tools that already do this like phpDocumentor, but today we are introducing Yii Docs Generator...

41 0
43 followers
Viewed: 38 591 times
Version: 1.1
Category: How-tos
Tags: doc

How to write a simple application component

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

An application component is a confortable way for share information among all component of the application

14 7
14 followers
Viewed: 65 057 times
Version: 1.1
Category: How-tos

Converting an Artisteer Theme to Yii

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

There are two approaches to converting an Artisteer theme. The first is to simply copy an existing Artisteer – based Yii theme, overlay the CSS and images, then make any necessary tweaks to the layout files. This is undoubtedly the fastest route, but won't teach you as much as doing it from scratch. That's ok. Sometimes getting the job done is the top priority. The second approach is more gen...

6 0
12 followers
Viewed: 27 897 times
Version: 1.1
Category: How-tos

Getting nulls from database instead of empty strings

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

To get null from database instead of empty strings you need to set up your DB connection as follows:

13 0
11 followers
Viewed: 14 411 times
Version: 1.1
Category: Tips
Tags: database, null