]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/MagicPhpWikiURLs
Jeff hacks again: LOT's of changes.
[SourceForge/phpwiki.git] / pgsrc / MagicPhpWikiURLs
1 !!! About phpwiki: URLs
2
3 A special type of URL is available for making links to perform
4 administrative and other special functions in PhpWiki.  Here is a
5 brief description of how they work.
6
7 The basic syntax of a phpwiki: URL is
8   __phpwiki:__''pagename''__?__''query-args''
9
10 If ''pagename'' is omitted it defaults to the current page.
11
12 ''Query-args'' should be a set of parameters in standard
13 HTTP GET format.
14
15 The "action=''x''" parameter should almost always be given.  It can be one of
16 __browse__, __info__, __diff__, __search__, __edit__,
17 __zip__, __dumpserial__, __loadserial__,
18 __remove__, __lock__, __unlock__,
19 __login__, __logout__, or __save__.
20 The default action is __browse__.
21
22 Some of the actions accept other parameters.
23
24 ;__info__: Accepts __showpagesource__.
25 ;__search__: Accepts __searchterm__, and __searchtype__.
26 ;__edit__: Accepts __version__.
27 ;__remove__: Accepts __verify__.
28 ;__save__: Accepts __editversion__, __minor_edit__, and  __content__.
29
30
31 !! Writing Magic Links in Wiki Pages
32
33 A magic link looks like:
34
35   __[[__ ''text'' __|__ ''phpwiki-url'' __]__
36
37 The "''text'' __|__" is optional but usually recommended. 
38 If given it will provide the label for the link.
39
40 The ''pagename'' part is optional, too.  If omitted, the link will
41 refer to the current wiki-page.
42
43 !Some examples
44
45   [[ Edit the !SandBox | phpwiki:!SandBox?action=edit ] 
46 will generate a link which will take you directly to editing the SandBox, like so:
47 [ Edit the SandBox | phpwiki:SandBox?action=edit ].
48
49 Other possibilites:
50 * [ Diff the SandBox | phpwiki:SandBox?action=diff ],
51 * [ Lock the FrontPage | phpwiki:FrontPage?action=lock ],
52 * [ Get a Full Zip Dump | phpwiki:?action=zip&include=all ],
53 * [ Page titles containing 'wiki' | phpwiki:?action=search&searchterm=wiki ],
54
55 !! Writing Magic Forms in Wiki Pages
56
57 If one of the ''query-args'' has a value like
58   ''arg''__=__''opt-width''__(__''opt-dflt-val''__)__
59 the link will be rendered as a form, rather than as an anchor.
60
61 ''Opt-width'', if given specifies the size of the input area, while
62 ''opt-dflt-val'' specifies the default value for the input.
63 If ''text'' is given in the link, then a submit-button with that
64 label will be included in the form, otherwise the submit button
65 will be omitted.
66
67 Examples:
68
69   [[ Full Search | phpwiki:?action=search&searchtype=full&searchterm=() ] 
70 gives
71 [ Full Search | phpwiki:?action=search&searchtype=full&searchterm=() ] 
72
73 While
74   [[ phpwiki:?action=search&searchterm=12() ]
75 yields
76 [ phpwiki:?action=search&searchterm=12() ]
77
78 Other examples:
79 [ Browse Page | phpwiki:?action=browse&pagename=() ]
80