From: Reini U. <ru...@x-...> - 2004-02-22 19:25:45
|
Whit Blauvelt schrieb: > Are there instructions somewhere about how PhpWiki plugins work, or style > guidelines for them, or ...? I'm looking for something at a level that > assumes the reader knows PHP fairly well, but is new to PhpWiki and not too > familiar with plugin architectures, let alone how PhpWiki instantiates one. Best see all existing plugins, and for hardcore code the plugin loader: lib/WikiPlugin.php. We have four basic types of plugin invocation: <?plugin PluginName [args...] ?> The typical plugin returns the output of ->run() as HTML object. It can react on any argument, either from the plugin args in the page or the dynamic request args (GET or POST args). <?plugin-form PluginName [args...] ?> Displays a input type=text with the default argument <?plugin-link PluginName [args...] ?> ?? please ask Jeff. Never used that. <?plugin-head PluginName [args...] ?> Here you can set or change any HTML header. Useful for framesets, javascripts or redirects. > What I want to be able to do is add an option where a page can include a > subclass of its "children" in the page output, so that a class of links from > a page to new pages which are intended as comments on it can afford an > option of displaying those comments (other pages) integrated into the page - > or not. Combine that with the new login and permissions scheme, and it might > make for a useful addition to range of ways it can be used for collaboration > on works-in-progress. I don't understand it fully. You want to get the links from subpages and optionally display them? sounds easy. > This is something I'd like to be able to demo before April, so it looks like > the best strategy to learn to build it as a plugin for the development > version, rather than take an arbitrary timeslice of it and make a bunch of > ugly hacks to get the desired behavior. But I haven't found where the > PhpWiki plugin interface and design goals are spelled out yet. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |