]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FMagicPhpWikiURLs
Produced by PhpWiki 1.4.0RC-20100415
[SourceForge/phpwiki.git] / pgsrc / Help%2FMagicPhpWikiURLs
1 Date: Thu, 15 Apr 2010 16:32:58 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC-20100415)
3 X-Rcs-Id: $Id$
4 Content-Type: application/x-phpwiki;
5   pagename=Help%2FMagicPhpWikiURLs;
6   flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
7   markup=2;
8   charset=UTF-8
9 Content-Transfer-Encoding: binary
10
11 == About phpwiki: URLs
12
13 A special type of URL is available for making links to perform
14 administrative and other special functions in ~PhpWiki.  Here is a
15 brief description of how they work.
16
17 The basic syntax of a phpwiki: URL is
18
19 <pre>
20 **phpwiki:**//pagename//**?**//query-args//
21 </pre>
22
23 If //pagename// is omitted it defaults to the current page.
24
25 //Query-args// should be a set of parameters in standard HTTP GET
26 format.
27
28 The "action=//x//" parameter should almost always be given.  It can be one of
29 **browse**, **diff**, **edit**, **viewsource**,
30 **zip**, **dumpserial**, **loadserial**,
31 **remove**, **lock**, **unlock**,
32 **login**, **logout**, **setprefs** or **save**.
33 The default action is **browse**.
34
35 Some of the actions accept other parameters.
36
37 | **FullTextSearch**, **TitleSearch** | Accepts **s**=search term, and **size**=input size.
38 | **edit**                            | Accepts **version**.
39 | **remove**                          | Accepts **verify**.
40 | **save**                            | Accepts **editversion**, **minor_edit**, and  **content**.
41 | **setprefs**                        | Accepts **edit_area_width**, **edit_area_height**.
42
43 === Writing Magic Links in Wiki Pages
44
45 A magic link looks like:
46
47 <pre>
48 **~[** //text// **|** //phpwiki-url// **]**
49 </pre>
50
51 The "//text// **|**" is optional but usually recommended.  If given it
52 will provide the label for the link.
53
54 The //phpwiki-url// is a **phpwiki:** URL as described above.
55
56 ==== Some examples
57
58 {{{
59 [ Edit the SandBox | phpwiki:SandBox?action=edit ]
60 }}}
61 will generate a link which will take you directly to editing the
62 SandBox, like so: [Edit the SandBox | phpwiki:SandBox?action=edit].
63
64 Other possibilites:
65 * [ Diff the SandBox | phpwiki:SandBox?action=diff ],
66 * [ Lock the HomePage | phpwiki:HomePage?action=lock ],
67 * [ Get a Full Zip Dump | phpwiki:?action=zip&include=all ],
68 * Search for [ Page titles containing 'wiki' | phpwiki:?action=TitleSearch&s=wiki ]
69
70 === Writing Magic Forms in Wiki Pages
71
72 **//Note://** //The old syntax for Magic forms is no longer supported.
73 They are superseded by// ##<?plugin-form>##.
74
75 If the plugin is called using **<?plugin-form** instead of **<?plugin**
76 and the plugin supports searching, then it will be rendered as a form.
77
78 | //size// | If given, specifies the size of the input area.
79 | //s//    | Specifies the default value for the input.
80
81 ==== Examples
82
83 A search plugin invoked with **<?plugin** instead of **<?plugin-form**
84 simply inserts the search results of the plugin:
85
86 {{{
87 <<TitleSearch s=wiki noheader=true limit=10>>
88 }}}
89
90 Search results for Page titles containing 'wiki':
91
92 <<TitleSearch s=wiki noheader=true limit=10>>
93
94 {{{
95 <?plugin-form FullTextSearch ?>
96 }}}
97
98 gives
99
100 <?plugin-form FullTextSearch ?>
101
102 While
103
104 {{{
105 <?plugin-form TitleSearch formsize=12 ?>
106 }}}
107
108 yields
109
110 <?plugin-form TitleSearch formsize=12 ?>
111
112 <noinclude>
113 ----
114 [[PhpWikiDocumentation]]
115 </noinclude>