Install () - How it works?


I’m working on creating Piwik plugin. I know it is possible to perform actions during installation, uninstallation, activation, … .

I am trying to understand how the activation of its functions. To activate (), I understood.

However, I only slightly with install (). Can you tell me at what time this function is activated?

This is the moment where we dump the plugin? At the moment when the plugin is available in the Administration menu plugins?

thank you for your help


install()is executed only once and should be used for creating SQL tables.

to force install() to display again you can delete the plugin name from config/config.ini.php under PluginInstalled[]

Ok, thanks Matt.

However, when the function uninstall() is she activate?

To uninstall, it removes the plugin directory, how piwik retrieves the code execute?

thank you

Not implemented yet, we will implement it in 3-4 months

But it’s weird, the core Core / plugin.php Implement this function. I’m working on the release of piwik 1.9.1.

Thanks for your help.

@djik, as matt said, the functionality is not implemented yet. Right now there is only the function stub in core/Plugin.php. We will address this in the upcoming months.