Wiki

Articles tagged with "config", sorted by ratingX
Displaying 11-17 of 17 result(s).

Use application on production/development environment without making changes

Created 3 years ago by ifdatticTips3 comments – viewed 32,353 times – ( +8 / -1 ) – version 1.1
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.

Moving the vendor directory for multiple projects

Created 22 days ago by mariosimaremareHow-tos2 comments – viewed 1,600 times – ( +4 ) – version 2.0
This How-To is useful if you are planning to move the Yii vendor directory outside the default location.

Configuring Yii to run on both Windows and OSX

Created 10 months ago by trondHow-tos2 comments – viewed 2,849 times – ( +2 ) – version 1.1
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:
tags: config

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

Created 2 years ago by Alexander PalamarchukTips1 comment – viewed 5,209 times – ( +2 / -1 ) – version 1.1
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 server and never (generally speaking) - on the production.
tags: config

How to use a component before every action of a controller

Created about a year ago by transistorTips1 comment – viewed 19,197 times – ( +2 / -1 ) – version 1.1
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

Yii configuration: Dynamic & User dependent

Created 2 months ago by le_topHow-tos0 comments – viewed 1,830 times – ( +1 ) – version 1.1
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 from the database when actually used for the first time, which is after Yii is loaded. Actually, you can use pretty much any method that relies on Yii with this method.

Setting static modules' properties in config

Created 2 years ago by Alexander PalamarchukTips0 comments – viewed 5,673 times – ( +2 / -2 ) – version 1.1
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.
tags: config, module