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