Showing 1-14 of 14 items.

Yii configuration: Dynamic & User dependent

Created 12 years ago by le_top le_top, updated 12 years ago by le_top le_top. 0 comments

It is difficult to perform user dependent theming through a general configuration in 'main.php'. This article proposes a method to do so through a Factory that dynamically generates classes to allow delayed resolution of actual user values. This means that you can refer to values that are stored in the database through the CActiveRecord before Yii is actually loaded. The values will be fetched...

1 0
1
Viewed: 16 709 times
Version: 1.1
Category: How-tos

Configuring Yii to run on both Windows and OSX

Created 12 years ago by trond trond, updated 12 years ago by CeBe CeBe. 2 comments

If you develop your Yii project on both Windows and Mac, there can be a problem setting up the configuration unless the configurations for both system are identical. On my machines I have the following configurations:

1 0
4
Viewed: 17 279 times
Version: 1.1
Category: How-tos

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

Created 14 years ago by Alexander Palamarchuk Alexander Palamarchuk, updated 13 years ago by ajsharma ajsharma. 1 comment

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
Viewed: 21 817 times
Version: 1.1
Category: Tips

YiiBoilerplate - Setup a professional project structure in seconds

Created 14 years ago by Antonio Ramirez Antonio Ramirez, updated 13 years ago by Antonio Ramirez Antonio Ramirez. 53 comments

Even though it looks complicated at the beginning, you will find that it is not that hard as it seems once you understand its structure. Yii's project structure wiki obviously inspired a lot of this setup, and you will find that some of the paragraphs here are taken from their wiki.

39 0
81
Viewed: 118 788 times
Version: 1.1
Category: Others

Use application on production/development environment without making changes

Created 14 years ago by ifdattic ifdattic, updated 14 years ago by ifdattic ifdattic. 3 comments

I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

8 1
11
Viewed: 82 142 times
Version: 1.1
Category: Tips

The directory structure of the Yii project site

Created 15 years ago by qiang qiang, updated 13 years ago by Yang He Yang He. 42 comments

In this article, we describe the directory structure used by yiiframework.com - the official Yii framework website. While this structure may look overly complicated for small projects or may not be optimal in some sense, we believe it is appropriate for medium or large projects in a team development environment. In fact, we have successfully used the similar structure in some other big projects.

77 0
95
Viewed: 265 997 times
Version: 1.1
Category: Others

Setting and getting systemwide static parameters

Created 15 years ago by Steve Friedl Steve Friedl, updated 15 years ago by Steve Friedl Steve Friedl. 3 comments

Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.

11 0
12
Viewed: 153 738 times
Version: 1.1
Category: How-tos

Moving project code outside of webroot (plus multiple project support)

Created 15 years ago by Steve Friedl Steve Friedl, updated 15 years ago by Steve Friedl Steve Friedl. 8 comments

Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).

21 1
19
Viewed: 71 984 times
Version: 1.1
Category: How-tos

"Why do I get a 403 error when trying to use Gii?"

Created 15 years ago by Steve Friedl Steve Friedl, updated 15 years ago by Steve Friedl Steve Friedl. 3 comments

After enabling the Gii module in your protected/config/main.php file and then try to use it with http://example.com/index.php?r=gii, you get an error: ~~~ Error 403 You are not allowed to access this page. ~~~ This is almost certainly caused by the IP filtering mechanism that Gii uses to protect your system from outsiders - by default it allows localhost only (both IPv4 and IPv6), and r...

6 0
5
Viewed: 94 115 times
Version: 1.1
Category: FAQs

Manage application configuration in different modes

Created 17 years ago by qiang qiang, updated 14 years ago by 张 迪 张 迪. 5 comments

Application configuration determines how an Yii application should behave, because it is the only parameter passed in the entry script. An application, on the other hand, needs to behave differently under different circumstances. For example, an application may need different configurations when running in production mode, development mode and testing mode; In a team development environment, each...

15 0
15
Viewed: 76 797 times
Version: 1.1
Category: Tutorials