Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins should have easy access to their own configuration file #5444

Closed
mattab opened this issue Jan 3, 2008 · 4 comments
Closed

Plugins should have easy access to their own configuration file #5444

mattab opened this issue Jan 3, 2008 · 4 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jan 3, 2008

We have to make it easy for plugins to have their own Configuration file, the same way they have their own translation file, etc.

@mattab
Copy link
Member Author

mattab commented Nov 20, 2008

now available via the Option table; better solution than having an option file by plugin.
see function Piwik_GetOption($name)
and
function Piwik_UpdateOption($name, $value, $autoload = 0)

in
https://github.com/piwik/piwik/blob/master/core/Option.php

@mattab
Copy link
Member Author

mattab commented Aug 13, 2009

I believe we just need to write a small FAQ question about how to store and get values like in a config file, using the option mechanism.

@robocoder
Copy link
Contributor

Can we add a cache layer to this? I envision future tracker plugins may want to access their configuration.

@mattab
Copy link
Member Author

mattab commented Jul 22, 2010

Actually it is best not to make it easy for plugin to have config file, or they might be misused. Settings should be stored in the DB using Piwik_SetOption helper, and settings should be editable in the UI. For other constants and magic numbers, fine to have them as class internals.

@mattab mattab added this to the Piwik 0.8 - A Web Analytics platform milestone Jul 8, 2014
@mattab mattab closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2024
@sgiehl sgiehl modified the milestones: For Prioritization, 0.8 Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

4 participants