Date: Mon, 23 Feb 2004 17:28:55 -0500 Mime-Version: 1.0 (Produced by PhpWiki 1.3.8pre) X-Rcs-Id: $Id: WikiPlugin,v 1.11 2004-05-02 15:10:08 rurban Exp $ Content-Type: application/x-phpwiki; pagename=WikiPlugin; pgsrc_version="3 $Revision: 1.11 $"; flags=""; markup=2; charset=iso-8859-1 Content-Transfer-Encoding: binary PhpWiki supports plugins since 1.3.x ~WikiPlugins allow one to easily add new types of dynamic content (as well as other functionality) to wiki pages within PhpWiki. In this very wiki, the RecentChanges, BackLinks, LikePages and most other indexing scheme pages are all implemented using plugins. Sooner or later the old-style phpwiki: [MagicPhpWikiURLs] will be replaced by plugins too. !!!Example Currently, one invokes a plugin by putting something like: into a regular wiki-page. That particular example produces as list of pages which link to the current page. Here it is: (This is great for Category and Topic pages. You can use this to get an automatic in-line listing of pages in the Category or Topic.) !!!Details Plugins can take certain named arguments (most do). The values of these arguments can be determined four different ways. In order of precedence: # The plugin invocation can specify the value for an argument, like so: # The argument can be specified via an HTTP query argument. This doesn't happen (is not allowed) unless the argument is mentioned in the plugin invocation: # Default values specified in the plugin invocation: # The plugin must supply default values for each argument it uses. Such default args may be overriden by URL arguments like so: BackLinks?page=ThisPage&sortby=-mtime (The BackLinks plugin uses the current page as the default value for the ''page'' argument.) !!! There exist four basic types of plugins: All this plugins derive from WikiPlugin class extending the run method which returns a object tree of HTML objects, and may react on any provided arguments from the ~WikiPage (see the args below) or optionally overridden by arguments from the url (GET or POST args) (if defined via '||='). *plugin-form* is used to display a input type=text box for the default argument. *plugin-head* does not exist anymore. It was used to pass special headers to the HTTP output only, which might be needed for framesets, redirection (RedirectToPlugin) and inserting global javascript. plugin-head is not called inside the body. *plugin-link* may be used to change the outgoing links for this page. ;:This is not used in any plugin so far. ;:This is not used anymore. !!!Existing Plugins See PluginManager for the actual list. Most plugins have their own description page with the name *Plugin* appended. * AllPages * AllUsers * [AuthorHistory|AuthorHistoryPlugin] * BackLinks * CacheTest * [Calendar|CalendarPlugin] * [CalendarList|CalendarListPlugin] * [Comment|CommentPlugin] * [EditMetaData|EditMetaDataPlugin] * [ExternalSearch|ExternalSearchPlugin] * [FrameInclude|FrameIncludePlugin] * FullTextSearch * FuzzyPages * [HelloWorld|HelloWorldPlugin] * [IncludePage|IncludePagePlugin] * IncludeSiteMap * InterWikiSearch * LikePages * ListSubpages * MostPopular * [OldStyleTable|OldStyleTablePlugin] * OrphanedPages * PageDump * [PageGroup|PageGroupTest] * PageHistory * PageInfo * PageTrail * [PhotoAlbum|PhotoAlbumPlugin] * [PhpHighlight|PhpHighlightPlugin] * [PhpWeather|PhpWeatherPlugin] * PluginManager * PrevNext * RandomPage * [RawHtml|RawHtmlPlugin] * RecentChanges * RecentChangesCached * [RedirectTo|RedirectToPlugin] * [RichTable|RichTablePlugin] * SiteMap * [SystemInfo|SystemInfoPlugin] * TexToPng * TitleSearch * [Transclude|TranscludePlugin] * [UnfoldSubpages|UnfoldSubpagesPlugin] * UpLoad * UserPreferences * VisualWiki * WantedPages * [WikiAdminChmod|PhpWikiAdministration/Chmod] * [WikiAdminRemove|PhpWikiAdministration/Remove] * [WikiAdminRename|PhpWikiAdministration/Rename] * [WikiAdminSearchReplace|PhpWikiAdministration/Replace] * [WikiAdminSelect|PhpWikiAdministration#Page Explorer] * [WikiAdminUtils|PhpWikiAdministration#PhpWiki Internals] * [WikiBlog|WikiBlogPlugin] * WikiForm * _AuthInfo * _BackendInfo * _PreferencesInfo * text2png !!!More Ideas for Plugins * Integrate Search form with individual InterWiki map entries e.g. Search Php Website for:[ ] (Search) * Various other indexing schemes. * Diff * PdfOut: action handler for PrintAsPdf or DumpToPdf * Insert XML/RSS/RDF news content from =location=xxx= where location is a parameter to the plugin, maybe include some formatting control of the output generated. ----- Pages in this category: * FullTextSearch: FindPage * TitleSearch: LikePages (match_head, match_tail). ----- PhpWikiDocumentation