0byt3m1n1
Path:
/
data
/
applications
/
aps
/
phpwiki
/
1.4.0-0
/
standard
/
htdocs
/
locale
/
zh
/
pgsrc
/
[
Home
]
File: MagicPhpWikiURLs
Date: Fri, 10 Sep 2010 13:48:49 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC1) X-Rcs-Id: $Id: MagicPhpWikiURLs 7682 2010-09-10 12:03:36Z vargenau $ Content-Type: application/x-phpwiki; pagename=MagicPhpWikiURLs; flags=PAGE_LOCKED; markup=2; charset=UTF-8 Content-Transfer-Encoding: binary == About phpwiki: URLs 一種特別的 URL, 用來建立連結以執行管理和 PhpWiki 裡的其他特殊功能. 這裡是它們如何運作的簡短描述. phpwiki 的基礎語法: URL 是 <pre> __phpwiki:__''pagename''__?__''query-args'' </pre> 如果 _pagename_ 被忽略,那麼預設為目前頁面. _Query-args_ 應該是以標準 HTTP GET 格式表示的一組參數. "action=''x''" 參數應該都要被給定. 他可以是這些值的其中一個: __browse__, __diff__, __edit__, __viewsource__, __zip__, __dumpserial__, __loadserial__, __remove__, __lock__, __unlock__, __login__, __logout__, __setprefs__ or __save__. 預設的動作是 __browse__. 部份動作接受其他參數. __FullTextSearch__, __TitleSearch__: 接受 __s__ 表示欲搜尋的字串, 而 __size__ 表示輸入的長度. __edit__: 接受 __version__. __remove__: 接受 __verify__. __save__: 接受 __editversion__, __minor_edit__, 和 __content__. __setprefs__: 接受 __edit_area_width__, __edit_area_height__. === Writing Magic Links in Wiki Pages 一個 magic 連結看起來會是: <pre> __~[__ ''text'' __|__ ''phpwiki-url'' __]__ </pre> "''text'' *|*" 是可選的,但通常建議使用. 如果給了,他會為此連結提供標籤. _phpwiki-url_ 就如同上面描述的一樣,是一個 *phpwiki:* URL. ==== Some examples {{{ [ Edit the SandBox | phpwiki:SandBox?action=edit ] }}} 將會產生一個連結,而他將會直接引領你去編輯 SandBox, 像是: [Edit the SandBox | phpwiki:SandBox?action=edit]. 其他可能的用法: * [ Diff the SandBox | phpwiki:SandBox?action=diff ], * [ Lock the HomePage | phpwiki:HomePage?action=lock ], * [ Get a Full Zip Dump | phpwiki:?action=zip&include=all ], * Search for [ Page titles containing 'wiki' | phpwiki:?action=TitleSearch&s=wiki ] === Writing Magic Forms in Wiki Pages ''__Note__: 舊的 Magic forms 語法將不再支援. 他們需以 =<?plugin-form>= 代替.'' If the plugin is called using *<?plugin-form* instead of *<?plugin* and the plugin supports searching, then it will be rendered as a form. ''size'': If given, specifies the size of the input area. ''s'': Specifies the default value for the input. ==== Examples: A search plugin invoked with *<?plugin* instead of *<?plugin-form* simply inserts the search results of the plugin: {{{ <<TitleSearch s=wiki noheader=true >> }}} Search results for Page titles containing 'wiki': <<TitleSearch s=wiki noheader=true >> {{{ <?plugin-form FullTextSearch ?> }}} gives <?plugin-form FullTextSearch ?> While {{{ <?plugin-form TitleSearch formsize=12 ?> }}} yields <?plugin-form TitleSearch formsize=12 ?> ---- PhpWikiDocumentation