As suggested on TaviSuggestions this is a page for discussing/debating the topic of plug-ins. When talking about a plugin I refer to dumping a given file into a given directory, where 'Tavi automatically will be able to use the given plugin. No need for changing other files, just add the file and off you go.
A scheme like this lends itself easy to implement stuff like TaviPatches/ChessBoard, TaviPatches/LocalImages, TaviPatches/HTMLExport.
And if, for some reason, formatting rules should change, one could easily make a plugin which upgraded old rules. I.e. a plugin to fix the soon to be extinct %%Pagename%% syntax.
Today we have a special macro for TaviCategories, [[! ]], and I'm thinking along the same line, so maybe something like [[& PlugInName options to plugin ]]. And then when 'Tavi sees that on this particular page someone wants PlugInName it could include a file aptly named, $PlugInName.php, which contains functions with names where PlugInName is prefixed as not to interfere with the other functions. See TaviSuggestions/PlugInsExample.
Add comments, thoughts and questions here, and lets see what the community thinks of such an extension to 'Tavi.
Plugins, to me at least, are very much where I tend to bust out classes in PHP... WorldMaker
I've got 4 questions: --AaronLaw
A suggestion
If I understand this right, if we put a [[@ PluginName? options to the plugin]] call on a page, "Tavi would go to the plugin directory, try to load a PluginName?.php file and call the PluginName?_main() function passing it the options (if any).
What if I make some complex stuff and need more than one file (classes, config file and so on)?
What I would suggest is this. When "Tavi encounters a plugin call, it goes to the plugin directory and search for the plugin file. If it doesn't find it, it then tries to find a PluginName? subdirectory. If it finds one, it then load the PluginName?.php file.
This would let people do some really complex things.
Thanks : --LouisLapointe