Wiki articles

Showing 141-160 of 650 items.

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

Created 9 years ago by thyseus, updated 7 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: 53 726 times
Version: 1.1
Category: Tutorials
Tags: menu

How to hide index.php on nginx

Created 10 years ago by miles, updated 7 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: 69 585 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 7 years ago by RusAlex, updated 7 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.

15 0
33 followers
Viewed: 63 146 times
Version: 1.1
Category: How-tos

Functional Testing in Yii using Goutte and PHPUnit

Created 7 years ago by putera, updated 7 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: 25 194 times
Version: 1.1
Category: Tutorials

Autocomplete in console command

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

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

3 0
4 followers
Viewed: 12 010 times
Version: 1.1
Category: Tutorials

TDD with PHPUnit_Story and Yii

Created 7 years ago by sidewinder, updated 7 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: 19 716 times
Version: 1.1
Category: Tutorials

File uploads in CForm (Form builder)

Created 7 years ago by Luke Jurgs, updated 7 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: 47 013 times
Version: 1.1
Category: How-tos

Understanding "Assets"

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

45 0
40 followers
Viewed: 182 391 times
Version: 1.1
Category: Tutorials

Understanding Autoloading, Helper Classes and Helper Functions

Created 8 years ago by Steve Friedl, updated 7 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
27 followers
Viewed: 110 236 times
Version: 1.1
Category: Tutorials

Understanding Virtual Attributes and get/set methods

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

65 0
44 followers
Viewed: 168 647 times
Version: 1.1
Category: Tutorials

Understanding series articles

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

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

16 0
13 followers
Viewed: 10 985 times
Version: 1.1
Category: Tips

Common Yii questions

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

Put attention of the question answer form

14 0
23 followers
Viewed: 47 585 times
Version: 1.1
Category: FAQs

Force a User to Change Their Password (ChangePasswordFilter)

Created 7 years ago by waterloomatt, updated 7 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: 22 258 times
Version: 1.1
Category: Tutorials

How to work with flash messages

Created 10 years ago by pfth, updated 7 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.");
50 0
41 followers
Viewed: 327 128 times
Version: 1.1
Category: Tutorials

How to insert a Simple Dialog Box

Created 7 years ago by bluyell, updated 7 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
10 followers
Viewed: 33 305 times
Version: 1.1
Category: How-tos

Application-driven database with CDbMigration and an extended CActiveRecord

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

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

8 0
10 followers
Viewed: 12 674 times
Version: 1.1
Category: Others

How to re enable logging during unit testing

Created 7 years ago by Asgaroth, updated 7 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: 19 773 times
Version: 1.1
Category: How-tos

Creating a parameterized LIKE query

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

Increasing AR performance in connections with Oracle

Created 8 years ago by Trejder, updated 7 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: 32 565 times
Version: 1.1
Category: How-tos

How to validate CSRF token with session

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

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

20 0
27 followers
Viewed: 70 293 times
Version: 1.1
Category: How-tos
Tags: CSRF, session