]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - locale/zh/pgsrc/Help%2FMagicPhpWikiURLs
Let us say this is PhpWiki 1.4.0
[SourceForge/phpwiki.git] / locale / zh / pgsrc / Help%2FMagicPhpWikiURLs
1 Date: Fri,  4 Feb 2011 16:58:00 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0)
3 X-Rcs-Id: $Id$
4 Content-Type: application/x-phpwiki;
5   pagename=Help%2FMagicPhpWikiURLs;
6   flags=PAGE_LOCKED;
7   markup=2;
8   charset=UTF-8
9 Content-Transfer-Encoding: binary
10
11 == About phpwiki: URLs
12
13 一種特別的 URL, 用來建立連結以執行管理和 PhpWiki 裡的其他特殊功能.
14 這裡是它們如何運作的簡短描述.
15
16 phpwiki 的基礎語法: URL 是
17
18 <pre>
19 **phpwiki:**''pagename''**?**''query-args''
20 </pre>
21
22 如果 _pagename_ 被忽略,那麼預設為目前頁面.
23
24 _Query-args_ 應該是以標準 HTTP GET 格式表示的一組參數.
25
26 "action=''x''" 參數應該都要被給定. 他可以是這些值的其中一個:
27 **browse**, **diff**, **edit**, **viewsource**,
28 **zip**, **dumpserial**, **loadserial**,
29 **remove**, **lock**, **unlock**,
30 **login**, **logout**, **setprefs** or **save**.
31 預設的動作是 **browse**.
32
33 部份動作接受其他參數.
34
35 **FullTextSearch**, **TitleSearch**:
36
37   接受 **s** 表示欲搜尋的字串, 而 **size** 表示輸入的長度.
38
39 **edit**:
40
41   接受 **version**.
42
43 **remove**:
44
45   接受 **verify**.
46
47 **save**:
48
49   接受 **editversion**, **minor_edit**, 和 **content**.
50
51 **setprefs**:
52
53   接受 **edit_area_width**, **edit_area_height**.
54
55 === Writing Magic Links in Wiki Pages
56
57 一個 magic 連結看起來會是:
58
59 <pre>
60 **~[** ''text'' **|** ''phpwiki-url'' **]**
61 </pre>
62
63 "''text'' *|*" 是可選的,但通常建議使用. 如果給了,他會為此連結提供標籤.
64
65 _phpwiki-url_ 就如同上面描述的一樣,是一個 *phpwiki:* URL.
66
67 ==== Some examples
68
69 {{{
70 [ Edit the SandBox | phpwiki:SandBox?action=edit ]
71 }}}
72 將會產生一個連結,而他將會直接引領你去編輯 SandBox, 像是:
73 [Edit the SandBox | phpwiki:SandBox?action=edit].
74
75 其他可能的用法:
76 * [ Diff the SandBox | phpwiki:SandBox?action=diff ],
77 * [ Lock the HomePage | phpwiki:HomePage?action=lock ],
78 * [ Get a Full Zip Dump | phpwiki:?action=zip&include=all ],
79 * Search for [ Page titles containing 'wiki' | phpwiki:?action=TitleSearch&s=wiki ]
80
81 === Writing Magic Forms in Wiki Pages
82
83 ''**Note**: 舊的 Magic forms 語法將不再支援.
84 他們需以 =<?plugin-form>= 代替.''
85
86 If the plugin is called using *<?plugin-form* instead of *<?plugin*
87 and the plugin supports searching, then it will be rendered as a form.
88
89 ''size'':
90
91   If given, specifies the size of the input area.
92
93 ''s'':
94
95   Specifies the default value for the input.
96
97 ==== Examples:
98
99 A search plugin invoked with *<?plugin* instead of *<?plugin-form*
100 simply inserts the search results of the plugin:
101
102 {{{
103 <<TitleSearch s=wiki noheader=true >>
104 }}}
105
106 Search results for Page titles containing 'wiki':
107
108 <<TitleSearch s=wiki noheader=true >>
109
110 {{{
111 <?plugin-form FullTextSearch ?>
112 }}}
113
114 gives
115
116 <?plugin-form FullTextSearch ?>
117
118 While
119
120 {{{
121 <?plugin-form TitleSearch formsize=12 ?>
122 }}}
123
124 yields
125
126 <?plugin-form TitleSearch formsize=12 ?>
127
128 <noinclude>
129 ----
130 [[PhpWikiDocumentation]]
131 </noinclude>