]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/WikiPlugin
Jeff's hacks II.
[SourceForge/phpwiki.git] / pgsrc / WikiPlugin
1 The latest hacks include support for !WikiPlugins.
2
3 !WikiPlugins allow one to easily add new types of dynamic content (as well as other functionality)
4 to wiki pages within PhpWiki.  In this very wiki, the RecentChanges,  BackLinks,
5 LikePages and DebugInfo pages are all implemented using plugins. 
6 I expect that the search result pages, as well as much PhpWikiAdministration will
7 soon be implemented via plugins as well.  (I think the oh-so-ugly
8 [MagicPhpWikiURLs] can be replaced by plugins, too.)
9
10 !Example
11
12 Currently, one invokes a plugin by putting something like:
13
14   <?''''plugin !BackLinks?>
15
16 into a regular wiki-page.  That particular example produces as list
17 of pages which link to the current page.  Here it is:
18
19 <?plugin BackLinks?>
20
21 (This is great for Category and Topic pages.  You can use this to get
22 an automatic in-line listing of pages in the Category or Topic.)
23
24 !Details
25
26 (This is all subject to change.)
27
28 Plugins can take certain named arguments (most do).
29 The values of these arguments can be determined four different ways.
30 In order of precedence:
31 # The plugin invocation can specify the value for an argument, like so:
32 ;;: <?''''plugin !BackLinks page=!OtherPage ?>
33 # 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:
34 ;;: <?''''plugin !BackLinks page ?>
35 # Default values specified in the plugin invocation:
36 ;;: <?''''plugin !BackLinks page||=!OtherPage ?>
37 # The plugin must supply default values for each argument it uses.  (The BackLinks plugin uses
38 the current page as the default value for the ''page'' argument.
39
40
41 !More Ideas for Plugins
42 * Search
43 * MostPopular
44 * WantedPages, OrphanPages, other various indexing schemes.
45 * Diff, PageHistory
46 * TitleSearch: LikePages (match_head, match_tail).
47 * Redirect plugin -- <?''''plugin Redirect target=!OtherPage ?>
48 * Calendar