Wiki articles

Showing 141-160 of 651 items.

Creating a database-driven hierarchical Structure combined with CMenu and superfish

Created 14 years ago by thyseus, updated 12 years ago by thyseus.

Note: Please also take a look at the newer EMenu extension. This works even better that the deprecated CDropDownMenu!

15 0
24 followers
Viewed: 62 987 times
Version: 1.1
Category: Tutorials
Tags: menu

How to hide index.php on nginx

Created 15 years ago by miles, updated 12 years ago by Darwin Wen.

For a complete sample Nginx+PHP-FPM config, view this how-to: Nginx & PHP-FPM

4 0
12 followers
Viewed: 91 719 times
Version: 1.1
Category: Tutorials
Tags: URL

How to use single form to collect data for two or more models (CActiveForm and Ajax Validation edition)

Created 12 years ago by RusAlex, updated 12 years ago by Darwin Wen.

With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

16 0
33 followers
Viewed: 72 443 times
Version: 1.1
Category: How-tos

Functional Testing in Yii using Goutte and PHPUnit

Created 12 years ago by putera, updated 12 years ago by putera.

We will use Symfony 2 components for writing tests for Yii project, it's gonna be fun :).

6 0
17 followers
Viewed: 29 979 times
Version: 1.1
Category: Tutorials

Autocomplete in console command

Created 12 years ago by Stamm, updated 12 years ago by Stamm.

Missed of autocomplete in bash console commands yii make me sad.

3 0
4 followers
Viewed: 15 395 times
Version: 1.1
Category: Tutorials

TDD with PHPUnit_Story and Yii

Created 12 years ago by sidewinder, updated 12 years ago by sidewinder.

Having said all of that, I want to add that the purpose of this article is not to convince anyone to write tests or design following TDD patterns. I'm not going to change the world to what I think is good. It's just about showing how to use some tools together with Yii Framework.

7 0
9 followers
Viewed: 24 003 times
Version: 1.1
Category: Tutorials

File uploads in CForm (Form builder)

Created 12 years ago by Luke Jurgs, updated 12 years ago by Luke Jurgs.

While there is a reasonable amount of documentation regarding CForm (form builder) and file uploads seperately, there really is not any coverage of both in combination.

9 0
10 followers
Viewed: 52 026 times
Version: 1.1
Category: How-tos

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 891 times
Version: 1.1
Category: Tutorials

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 395 times
Version: 1.1
Category: Tutorials

Understanding Virtual Attributes and get/set methods

Created 13 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 569 times
Version: 1.1
Category: Tutorials

Understanding series articles

Created 12 years ago by GOsha, updated 12 years ago by GOsha.

Here are all wiki articles from "Understanding" series by Yii wiki contributors:

16 0
12 followers
Viewed: 14 116 times
Version: 1.1
Category: Tips

Common Yii questions

Created 12 years ago by dckurushin, updated 12 years ago by migajek.

Put attention of the question answer form

14 0
23 followers
Viewed: 57 972 times
Version: 1.1
Category: FAQs

Force a User to Change Their Password (ChangePasswordFilter)

Created 12 years ago by waterloomatt, updated 12 years ago by waterloomatt.

Sometimes you need to force a user to change their password after x number of days. This article describes how to implement this using a filter, ChangePasswordFilter.

14 0
10 followers
Viewed: 29 562 times
Version: 1.1
Category: Tutorials

How to work with flash messages

Created 15 years ago by pfth, updated 12 years ago by François Gannaz.

Set your messages in a controller:

Yii::app()->user->setFlash('success', "Data1 saved!");
Yii::app()->user->setFlash('error', "Data2 failed!");
Yii::app()->user->setFlash('notice', "Data3 ignored.");
51 0
40 followers
Viewed: 386 310 times
Version: 1.1
Category: Tutorials

How to insert a Simple Dialog Box

Created 12 years ago by bluyell, updated 12 years ago by bluyell.

I build this simple PHP class (DialogBox.php at the bottom of this wiki) to help you in the dialog box usage on Yii applications. The goal is run any Yii actions into this dialog box and return the resulting value to the calling instance.

5 0
9 followers
Viewed: 39 575 times
Version: 1.1
Category: How-tos

Application-driven database with CDbMigration and an extended CActiveRecord

Created 12 years ago by Tudor Ilisoi, updated 12 years ago by Tudor Ilisoi.

This is an incipient implementation of application-driven database with Yii.

8 0
10 followers
Viewed: 16 405 times
Version: 1.1
Category: Others

How to re enable logging during unit testing

Created 12 years ago by Asgaroth, updated 12 years ago by Asgaroth.

Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

11 0
10 followers
Viewed: 25 489 times
Version: 1.1
Category: How-tos

Creating a parameterized LIKE query

Created 12 years ago by Steve Friedl, updated 12 years ago by Asgaroth.

It's common to see users wishing to make substring DB queries, using the % metacharacter used to match anything; in this FAQ we'll search the tbl_comments table from the blog tutorial hoping to find the text in $match in the content column

13 0
21 followers
Viewed: 143 498 times
Version: 1.1
Category: FAQs

Increasing AR performance in connections with Oracle

Created 13 years ago by Trejder, updated 12 years ago by igorsantos07.

Please, note. This article is entirely based on a work done by me colleague developer, who hasn't got account on this webpage and also hasn't got time for writing this article. I'm writing it for him. I will try to forward him any comments that may appear, but can't assure if/when he'll be able to answer. I'm far, far less experienced in Oracle therefore I won't probably be able to help myself.

1 0
15 followers
Viewed: 49 910 times
Version: 1.1
Category: How-tos

How to validate CSRF token with session

Created 12 years ago by yangmls, updated 12 years ago by yangmls.

First of all, You must change component config to enable the default Yii CSRF validation.

21 0
27 followers
Viewed: 100 341 times
Version: 1.1
Category: How-tos
Tags: CSRF, session