Ticket #24 (closed New feature: wontfix)

Opened 4 years ago

Last modified 19 months ago

Plugins should have easy access to their own configuration file

Reported by: matt Owned by:
Priority: major Milestone: Piwik 0.8 - A Web Analytics platform
Component: Core Keywords:
Cc: Sensitive: no

Description

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

Change History

Changed 4 years ago by matt

  • component changed from Plugins to Plugin architecture

Changed 4 years ago by matt

  • milestone set to Stable release

Changed 3 years ago by matt

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  http://dev.piwik.org/trac/browser/trunk/core/Option.php

Changed 3 years ago by matt

  • component changed from Plugin architecture to Core

Changed 2 years ago by vipsoft

  • sensitive unset
  • milestone changed from 4- Stable release to 3- Surviving The Wild

Changed 2 years ago by matt

  • milestone changed from 3- Surviving The Wild to 2 - Piwik 0.8 - A Web Analytics platform

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.

Changed 2 years ago by koteiko

Changed 2 years ago by vipsoft

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

Changed 19 months ago by matt

  • status changed from new to closed
  • resolution set to wontfix

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.

Note: See TracTickets for help on using tickets.