]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/WikiPlugin
ViewSource link, better actionpage usage
[SourceForge/phpwiki.git] / pgsrc / WikiPlugin
1 Date: Mon, 23 Feb 2004 17:28:55 -0500
2 Mime-Version: 1.0 (Produced by PhpWiki 1.3.8pre)
3 X-Rcs-Id: $Id: WikiPlugin,v 1.11 2004-05-02 15:10:08 rurban Exp $
4 Content-Type: application/x-phpwiki;
5   pagename=WikiPlugin;
6   pgsrc_version="3 $Revision: 1.11 $";
7   flags="";
8   markup=2;
9   charset=iso-8859-1
10 Content-Transfer-Encoding: binary
11
12 PhpWiki supports plugins since 1.3.x
13
14 ~WikiPlugins allow one to easily add new types of dynamic content (as
15 well as other functionality) to wiki pages within PhpWiki.  In this
16 very wiki, the RecentChanges, BackLinks, LikePages and most other indexing 
17 scheme pages are all implemented using plugins.
18
19 Sooner or later the old-style phpwiki: [MagicPhpWikiURLs] will be replaced 
20 by plugins too.
21
22 !!!Example
23
24 Currently, one invokes a plugin by putting something like:
25
26 <verbatim>
27 <?plugin BackLinks?>
28 </verbatim>
29
30 into a regular wiki-page.  That particular example produces as list of
31 pages which link to the current page.  Here it is:
32
33 <?plugin BackLinks?>
34
35 (This is great for Category and Topic pages.  You can use this to get
36 an automatic in-line listing of pages in the Category or Topic.)
37
38 !!!Details
39
40 Plugins can take certain named arguments (most do).  The values of
41 these arguments can be determined four different ways.  In order of
42 precedence:
43
44 # The plugin invocation can specify the value for an argument, like so:
45   <verbatim>
46   <?plugin BackLinks page=OtherPage ?>
47   </verbatim>
48
49 # The argument can be specified via an HTTP query argument.  This
50   doesn't happen (is not allowed) unless the argument is mentioned in
51   the plugin invocation:
52
53   <verbatim>
54   <?plugin BackLinks page ?>
55   </verbatim>
56
57 # Default values specified in the plugin invocation:
58
59   <verbatim>
60   <?plugin BackLinks page||=OtherPage ?>
61   </verbatim>
62
63 # The plugin must supply default values for each argument it uses.
64   Such default args may be overriden by URL arguments like so: 
65   <verbatim>
66     BackLinks?page=ThisPage&sortby=-mtime
67   </verbatim>
68   (The BackLinks plugin uses the current page as the default value for
69   the ''page'' argument.)
70
71 !!! There exist four basic types of plugins:
72
73 All this plugins derive from WikiPlugin class extending the run method
74 which returns a object tree of HTML objects, and may react on any
75 provided arguments from the ~WikiPage (see the args below) or
76 optionally overridden by arguments from the url (GET or POST args) (if defined via '||=').
77
78   *plugin-form* is used to display a input type=text box for the default argument.
79
80   *plugin-head* does not exist anymore. It was used to pass special headers to the HTTP output only, 
81   which might be needed for framesets, redirection (RedirectToPlugin) and inserting 
82   global javascript. plugin-head is not called inside the body.
83
84   *plugin-link* may be used to change the outgoing links for this page.
85
86 <verbatim>
87 <?plugin PluginName [args...] ?>
88 </verbatim>
89
90 <verbatim>
91 <?plugin-form PluginName [args...] ?>
92 </verbatim>
93
94 <verbatim>
95 <?plugin-link PluginName [args...] ?>
96 </verbatim>
97 ;:This is not used in any plugin so far.
98
99 <verbatim>
100 <?plugin-head PluginName [args...] ?>
101 </verbatim>
102 ;:This is not used anymore.
103
104
105 !!!Existing Plugins
106
107 See PluginManager for the actual list. Most plugins have their own description page with the name *Plugin* appended.
108
109 * AllPages
110 * AllUsers
111 * [AuthorHistory|AuthorHistoryPlugin]
112 * BackLinks
113 * CacheTest
114 * [Calendar|CalendarPlugin]
115 * [CalendarList|CalendarListPlugin]
116 * [Comment|CommentPlugin]
117 * [EditMetaData|EditMetaDataPlugin]
118 * [ExternalSearch|ExternalSearchPlugin]
119 * [FrameInclude|FrameIncludePlugin]
120 * FullTextSearch
121 * FuzzyPages
122 * [HelloWorld|HelloWorldPlugin]
123 * [IncludePage|IncludePagePlugin]
124 * IncludeSiteMap
125 * InterWikiSearch
126 * LikePages
127 * ListSubpages
128 * MostPopular
129 * [OldStyleTable|OldStyleTablePlugin]
130 * OrphanedPages
131 * PageDump
132 * [PageGroup|PageGroupTest]
133 * PageHistory
134 * PageInfo
135 * PageTrail
136 * [PhotoAlbum|PhotoAlbumPlugin]
137 * [PhpHighlight|PhpHighlightPlugin]
138 * [PhpWeather|PhpWeatherPlugin]
139 * PluginManager
140 * PrevNext
141 * RandomPage
142 * [RawHtml|RawHtmlPlugin]
143 * RecentChanges
144 * RecentChangesCached
145 * [RedirectTo|RedirectToPlugin]
146 * [RichTable|RichTablePlugin]
147 * SiteMap
148 * [SystemInfo|SystemInfoPlugin]
149 * TexToPng
150 * TitleSearch
151 * [Transclude|TranscludePlugin]
152 * [UnfoldSubpages|UnfoldSubpagesPlugin]
153 * UpLoad
154 * UserPreferences
155 * VisualWiki
156 * WantedPages
157 * [WikiAdminChmod|PhpWikiAdministration/Chmod]
158 * [WikiAdminRemove|PhpWikiAdministration/Remove]
159 * [WikiAdminRename|PhpWikiAdministration/Rename]
160 * [WikiAdminSearchReplace|PhpWikiAdministration/Replace]
161 * [WikiAdminSelect|PhpWikiAdministration#Page Explorer]
162 * [WikiAdminUtils|PhpWikiAdministration#PhpWiki Internals]
163 * [WikiBlog|WikiBlogPlugin]
164 * WikiForm
165 * _AuthInfo
166 * _BackendInfo
167 * _PreferencesInfo
168 * text2png
169
170 !!!More Ideas for Plugins
171
172 * Integrate Search form with individual InterWiki map entries
173   e.g. Search Php Website for:[ ] (Search)
174 * Various other indexing schemes.
175 * Diff
176 * PdfOut: action handler for PrintAsPdf or DumpToPdf
177 * Insert XML/RSS/RDF news content from =location=xxx= where location
178   is a parameter to the plugin, maybe include some formatting control
179   of the output generated.
180
181 -----
182
183 Pages in this category:
184
185 <?plugin BackLinks page=[pagename] noheader=1?>
186
187 * FullTextSearch: FindPage
188 * TitleSearch: LikePages (match_head, match_tail).
189
190 -----
191
192 PhpWikiDocumentation