From: Reini U. <ru...@x-...> - 2004-08-22 14:34:15
|
I carry for some weeks now this idea with me and want to share it. The problem is that several plugins produce page lists, and other plugins accept page lists as input, but there's no connection between them. For example BackLinks produces a list of pages, which could be used as pages argument for the IncludePage plugin, if it will be extended for multiple pages, or as argument to the ListSubpages, WikiAdminSetAcl, WikiAdminSearchReplace plugins. Or for the example for the exclude argument I would like to discuss an additional API for plugins which is similar to run() but returns ony a list of pages, not the HTML'ized UL list, which in turn can be used as input argument to other plugins. Similar to unix pipes. Arguments accepting only a single pagename will take the first page from the list. The list method will share the same code as run, but only returns a LIST of pagenames, not the HTML objects. For the start list() could extract the pagename list from the run() method. Several plugins will require a unification of the "pages" vs. "p" vs. "s" argument. Examples: Select the pages linking to HomePage to change a text. <?plugin WikiAdminSearchReplace p=<?plugin-list BackLinks page="HomePage" ?> ?> List the subpages of the first page starting with "Doc*": <?plugin ListSubpages basepage=<?plugin-list TitleSearch s="Doc*" ?> ?> remove some of the orphaned pages: <?plugin WikiAdminRemove p=<?plugin-list OrphanedPages ?> ?> -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |