Per project settings

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
daqfx
Posts: 3
Joined: 06 Mar 2015, 01:05

Per project settings

Post by daqfx »

I was trying to figure out how to customize settings per project and originally thought that this will work:

Code: Select all

if ($t_project_id == 1) {
 // custom settings
}
Unfortunately, it looks like if user is only assigned to a single project, this setting is not set. Is there a better variable to use or a proper method of setting custom strings, etc. per project?

Thanks.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Per project settings

Post by atrol »

There is a function helper_get_current_project()
Please use Search before posting and read the Manual
daqfx
Posts: 3
Joined: 06 Mar 2015, 01:05

Re: Per project settings

Post by daqfx »

Just a heads up for anybody else trying to make per project customizations - I also had to include the following to use the function suggested by atrol:

Code: Select all

require_once('core.php');
require_once('core/project_api.php');
require_once('core/access_api.php');
I incorrectly assumed at first that core.php would be enough.
Post Reply