Here's a simples suggestion, about the plugin initialization, why not
define a method to check if the plugin is correctly installed ( a file
presence or check the table existence ), and do the initialization it
self on the setup file.

This would allow a reinitialization of the plugin even after installed,
and would only work after initialized.

An ideia I'm shure there's other :)

On Mon, 2006-12-04 at 17:43 +0100, Marco Gaiarin wrote:
> I'm starting to code a plugin, for now i'm starting using the example
> plugin and extending it a little bit, but i'm finding some trouble.
> 
> AFAIK reading https://dev.indepnet.net:8080/plugins/wiki/CreatePlugin
> in french (english seems outdated/less accurate) the only needed things
> are _relpos.php, index.php, config.php and setup.php, with the rest
> (inc, locale, front, ...) as a mere suggestion on how to organize the
> code.
> So seems that there's no fixed rules on how to code, so i can use
> normal php and i'm not forced to OO php code (probably i'll use oo
> code, but for experimenting i'm more comfortable with plain code).
> 
> I've noted that in the example code the only hook not defined are the
> setup hook, and also on other two plugin i'm looking at (backup and
> appweb) the setup hook are not defined; but plugin install someway, so
> where the installation/setup/table creation code belong to?
> 
> 
> Clearly, the first things this app need are table creation, and i'm
> just stopped on this. ;)
> 
> 
> Could be the example plugin be extended a bit to have at least a
> descriptive table and a form that use them?
> I think that 98% of plugins are like this, and extending a plugin it is
> a better task then simplyfy one. ;)
> 
> [or, someone can point me to an existing glpi plugin that it is really
> simple?]
> 

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Glpi-dev mailing list
[email protected]
https://mail.gna.org/listinfo/glpi-dev

Reply via email to