Wiki articles

Showing 121-140 of 804 items.

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: 11 323 times
Version: 1.1
Category: Tips
Tags: php, syntax

Getting information from the current locale

Created a year ago by CeBe, updated a year ago by CeBe.

Yii 2.0 comes with a formatter component to format dates, numbers, and other values for international users according to their locale. This is very useful for displaying data. When working with incoming data or when using enhanced input methods like the [MaskedInput widget](https://www.yiiframework.com/doc/api/2.0/yii-widgets-maskedinp...

5 0
2 followers
Viewed: 11 368 times
Version: 2.0
Category: How-tos

Simple Multiple Environment Setup with Default Yii Installation

Created 6 years ago by Ibrar Turi, updated 5 years ago by CeBe.

After installing Yii basic application on our systems, most of the time we want to have multiple environment such as local, dev and live setup. Most of the times when we want to make changes to configuration file, we have to over-write configurations file for each environment.

2 0
8 followers
Viewed: 11 421 times
Version: 1.1
Category: How-tos

Understanding series articles

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

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

16 0
13 followers
Viewed: 11 451 times
Version: 1.1
Category: Tips

[pt-br] O guia de estudos do Yii para iniciantes

Created 7 years ago by Rodrigo Coelho, updated 7 years ago by Rodrigo Coelho.

You can find the english version of this wiki here: The complete beginner's study guide for the Yii Framework.

1 0
3 followers
Viewed: 11 451 times
Version: 1.1
Category: Tips
Tags:

Q: My yiic tool cannot run model and crud commands. Why?

Created 11 years ago by qiang, updated 11 years ago by mishhh.

Some PHP installations may use a different php.ini file for CLI PHP (command line PHP parser). As a result, when running the model or crud command in yiic shell, you may encounter errors like "YiiBase::include(PDO.php): failed to open stream..." or "...could not find driver", even though the requirement checker confirms you have PDO and the corresponding database driver.

0 0
1 follower
Viewed: 11 467 times
Version: 1.1
Category: Tutorials
Tags:

Attaching multiple event handlers to onBeginRequest

Created 6 years ago by Boaz, updated 5 years ago by CeBe.

There came the need to perform two operations, always, on 'application boot' time. Example? My real world example involved some geo-location logic (that's the first operation) and syncing of some session details so KcFinder can be in sync with the user in context - each user with his own session container (the second).

1 0
2 followers
Viewed: 11 505 times
Version: 1.1
Category: How-tos

Define general array and variable and call it to anywhere in application

Created 7 years ago by bhavesh vaghela, updated 7 years ago by Maurizio Domba Cerin.

Create param.php file in protected/config

Yii::app()->params['TEXT_ACTIVE'] = 'Active'; //1 for active

1 4
3 followers
Viewed: 11 566 times
Version: 1.1
Category: Tutorials
Tags:

TimeZone dropDown

Created 7 years ago by Tibor Katelbach, updated 7 years ago by Maurizio Domba Cerin.

I spend a bit of time looking for the this piece of code while building time feature on a site this tutorial also helped Local time zones and locales

3 0
4 followers
Viewed: 11 627 times
Version: 1.1
Category: How-tos

Use phing to make Yii application "installable"

Created 7 years ago by sensorario, updated 7 years ago by Maurizio Domba Cerin.

To use this "how-to", you need to install phing in your machine.

7 0
10 followers
Viewed: 11 639 times
Version: 1.1
Category: How-tos
Tags: phing

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 699 times
Version: 1.1
Category: How-tos

Setting static modules' properties in config

Created 7 years ago by Alexander Palamarchuk, updated 7 years ago by Alexander Palamarchuk.

You may face a situation when you need to access to a configurable module's property from everywhere and you don't have an instance of this module's class.

1 1
2 followers
Viewed: 11 704 times
Version: 1.1
Category: Tips
Tags: config, module

Tunneling using SSH in a limited enviroment

Created 6 years ago by nineinchnick, updated 5 years ago by CeBe.

This tutorial describes how to connect to a remote service via tunnel when only most basic software is available on the remote server. It is not directly related to Yii. It could be hovewer useful for web developers working with shared hosting sites with limited access.

1 0
3 followers
Viewed: 11 718 times
Version: all
Category: Others

BaseModuleAR class with MultiActiveRecord

Created 8 years ago by dinhtrung, updated 8 years ago by Gustavo.

MultiActiveRecord is an extension that add support for multiple database connection for your application.

2 0
0 follower
Viewed: 11 769 times
Version: 1.1
Category: Tips

Adding Bash Command Completion for Yii Commands

Created 7 years ago by Dustin Oprea, updated 7 years ago by Dustin Oprea.

This article discusses the installation/configuration of the YiiBash project (https://github.com/dsoprea/YiiBash).

3 0
5 followers
Viewed: 11 824 times
Version: 1.1
Category: How-tos

Making friends' configs, DB credentials and paths with version control

Created 7 years ago by Alexander Palamarchuk, updated 7 years ago by ajsharma.

In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test s...

1 1
4 followers
Viewed: 11 857 times
Version: 1.1
Category: Tips
Tags: config

How to validate the uniqueness of multiple columns

Created 5 years ago by oligalma, updated 4 years ago by oligalma.

I am going to show you an effective way to validate the uniqueness of multiple columns.

1 0
2 followers
Viewed: 11 884 times
Version: 1.1
Category: How-tos

Our WebApp that will run without downtime during update/upgrade

Created 8 years ago by Pinoy Coderz, updated 7 years ago by Maurizio Domba Cerin.

How many of us wonder how we can upgrade the website without hurting the operation of our WebApp?

8 2
7 followers
Viewed: 11 911 times
Version: 1.1
Category: Tutorials
Tags: tutorial

Safely checking if a model class exists (without exploding)

Created 5 years ago by Boaz, updated 5 years ago by CeBe.

While rewriting the PcReportContent extension I'm maintaining I've bumped to a challenge. This wiki was born out of it.

1 0
2 followers
Viewed: 11 983 times
Version: 1.1
Category: How-tos

Yii behind a reverse proxy, SSL support and correct IP logging

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

If you are hosting Yii behind a reverse proxy, for example nginx, and you are having issues with your logs showing the proxies IP, or the urls being created arn't being created for SSL because your SSL certs are located on your reverse proxy instead of the Yii server, this code may be able to help you. I placed them in the very top of Yii's entry script, index.php

0 0
2 followers
Viewed: 11 987 times
Version: 1.1
Category: Tips