GetSimple Support Forum
activating the plugin and setting it up - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: activating the plugin and setting it up (/showthread.php?tid=4389)



activating the plugin and setting it up - ale - 2013-02-27

when a plugin is activated, change_plugin() should give a chance to the plugin to initialize itself (things like checking if all the paths it needs are writable...)

i there is an interest i might spend some time and make a proposition for it...

ciao
a.l.e


RE: activating the plugin and setting it up - shawn_a - 2013-02-28

Register plugin is a function that gets called when a plugin is initialized.
Just do call whatever you want before that.


RE: activating the plugin and setting it up - ale - 2013-02-28

hi shawn,

looking at the code, `register_plugin()` seems to get called each time the plugin is loaded.

i'm looking for a way to do some sanity checks when the plugin gets activated (so first used!) and not each time a page is loaded.


RE: activating the plugin and setting it up - shawn_a - 2013-02-28

Ahh hmm I was looking at implementing a plugin flag for that so we can indicate new plugins.
Something like might make it easier to know if its first run.