/Include /MailTo |
Contents
1. 宏命令
通过宏命令您可以在普通 wiki 页面中插入系统功能;使这种页面与众不同的唯一原因就是它们含有宏。如果你曾经编辑过类似 RecentChanges 或 SystemInfo 的页面,你就会看到宏是什么。
关于更多可能出现的 wiki 标记,请参见 HelpOnEditingZh 。
1.1. 用于查找的宏
宏名 |
描述 |
示例 |
[[TitleSearch]] |
查找页标题 |
参见 FindPage |
[[FullSearch]] |
查找页内容 |
参见 FindPage |
[[FullSearch()]] |
在所有的页面中查找当前页面的标题(就象点击页面标题的效果一样) |
参见页面 CategoryCategory |
[[FullSearch('text')]] |
在所有页面里查找字符串 "text" |
查找 powered: |
[[GoTo]] |
直接跳转到您输入的页面 |
参见 FindPage |
[[PageList(regex)]] |
标题可以匹配正则表达式 regxp 的页面的列表 |
参见 HelpIndex |
1.2. 用于浏览的宏
宏名 |
描述 |
示例 |
[[RecentChanges]] |
最近被编辑的页面的列表 |
|
[[TitleIndex]] |
所有页标题的索引 |
参见 TitleIndex |
[[WordIndex]] |
所有页标题中使用过的单词的索引 |
参见 WordIndex |
[[WantedPages]] |
所有在 Wiki 系统中被引用的但实际并不存在的页面的列表 |
参见 WantedPages |
[[OrphanedPages]] |
所有不被其他页面引用的页的列表 |
|
[[AbandonedPages]] |
列出保持不被改动状态最长的页面 |
|
[[RandomPage]] |
指向随机一个页面的链接 |
WikiSchulung/BasisEinführung/060 Wie finde ich mich zurecht? |
[[RandomPage(#)]] |
指向 "#" 个随机页面的链接 |
两个随机链接: |
[[TableOfContents([maxdepth])]] |
显示一个当前页面的目录,可以控制其最大深度 |
参见本页开头 |
[[Anchor(anchorname)]] |
在页面中插入定位标记(锚链) |
|
[[Navigation(children[,maxdepth])]] |
列出一个页面的所有子页面 |
参见本页的开头 |
[[Navigation(siblings[,maxdepth])]] |
列出所有兄弟页 |
参见 /MailToZh |
[[Navigation(slideshow)]] |
FuzzTransZh 创建一个切换幻灯模式和wiki模式的链接,和一个开始幻灯模式的链接 |
|
[[Navigation(slides)]] |
显示 第一个/前一个/下一个/最后 链接 |
1.3. 系统信息宏
宏名 |
描述 |
示例 |
[[InterWiki]] |
所有已知的 InterWiki 名的列表 |
|
[[SystemInfo]] |
关于当前 wiki 的信息,python 解释器和系统 |
|
[[PageCount]] |
当前页面总数 |
共 5354 页 |
[[PageSize]] |
所有页面的总大小 |
参见 PageSize |
[[StatsChart(type)]] |
显示统计图表(当前已定义类型:hitcounts(浏览次数), pagesize(页面大小), useragents(客户端类型)) |
参见 EventStats 及其子页面 |
[[SystemAdmin]] |
wiki 管理员的 Web 管理界面(在 1.0 版本中还未实现) |
参见 SystemInfo |
1.4. 其他宏
宏名 |
描述 |
示例 |
[[Icon(image)]] |
显示系统中所支持的小图标 |
|
[[UserPreferences]] |
显示用户首选项对话框 |
|
[[BR]] |
插入一个断行符 |
第一行 |
[[RandomQuote(pagename)]] |
从指定的页面随机引用一句话,如果省略 pagename 将从 FortuneCookies 中引用 |
Edit the FortuneCookies page to display randomly selected wisdom here. |
[[Include(HelloWorld[,"heading"[,level]])]] |
包含另一页的目录 |
详细使用方法参见 /IncludeZh |
[[FootNote(text)]] |
增加一个脚注(脚注中不能包含任何 wiki 标记),当省略参数 text 时,将在插入点显示所有已收集的脚注 |
示例参见 HelpOnPageCreationZh |
[[Date(timestamp)]] |
根据系统设置显示一个时间戳 |
2007-10-22 |
[[DateTime(timestamp)]] |
根据用户设置显示一个时间戳注1 |
2007-10-22 06:55:57 |
[[GetText(text)]] |
载入 I18N 文字 (主要用于帮助页面) |
"EditText" 将被转换为 "EditText" |
[[TeudView]] |
适用于内部网开发者 wiki ,可以察看通过 XSLT 样式表格式化的后的 pydoc 文档,详细用法参见 EfnetPythonWiki:TeudProject |
参见 EfnetPythonWiki:TeudViewer?module=MoinMoin.macro.TeudView |
[[MailTo(email)]] |
防止你的邮件地址被垃圾邮件机器人搜集到 |
详细用法参见 /MailToZh |
注1 "timestamp" 可以为空(代表当前时间),或者一个从1970年开始计算的秒数( unix 时间),或者一个符合 W3C 时间表示规范的字符串("2002-01-23T12:34:56")。
2. 示例显示
抱歉,因为篇幅关系,我们不能在这里提供所有宏命令的示例。下面是 [[SystemInfo]] 宏显示的信息:
/ImageLink /Include /MailTo |
3. Macros
Macros allow the insertion of system features into normal wiki pages; the only thing that makes those pages special is that they contain macros. If you edit pages like RecentChanges or SystemInfo, you'll see what that means.
For more information on the possible markup, see HelpOnEditing.
3.1. Search macros
3.2. Navigation
Macro |
Description |
Example |
[[RecentChanges]] |
a list of recently edited pages |
See RecentChanges |
[[TitleIndex]] |
an index of all page titles |
See TitleIndex |
[[WordIndex]] |
an index of all words in page titles |
See WordIndex |
[[WantedPages]] |
list links to non-existent pages |
See WantedPages |
[[OrphanedPages]] |
list pages no other page links to |
See OrphanedPages |
[[AbandonedPages]] |
list pages that were not edited for the longest time |
See AbandonedPages |
[[RandomPage]] |
a link to a random page |
|
[[RandomPage(#)]] |
links to a number of random pages |
Two random pages: |
[[TableOfContents([maxdepth])]] |
display a local table of contents, possibly limited to a maximal depth |
See above |
[[Anchor(anchorname)]] |
macro to insert anchors into a page |
|
[[Navigation(children[,maxdepth])]] |
macro to list all of a pages' children |
See start of this page |
[[Navigation(siblings[,maxdepth])]] |
quick navigation to siblings of a page |
See /MailTo |
[[Navigation(slideshow)]] |
creates a link to toggle between slide show and wiki mode, and a link to start the slide show |
See HelpOnSlideShows |
[[Navigation(slides)]] |
displays first/prev/next/last links |
See HelpOnSlideShows |
3.3. System information
Macro |
Description |
Example |
[[InterWiki]] |
a list of all known InterWiki names |
|
[[SystemInfo]] |
info on the wiki, the python interpreter and the host system |
|
[[PageCount]] |
current page count |
5354 pages |
[[PageSize]] |
list the sizes of all pages |
See PageSize |
[[StatsChart(type)]] |
shows statistical charts (currently defined types: hitcounts, pagesize, useragents) |
See EventStats and subpages |
[[SystemAdmin]] |
Web interface to wiki administration (not completed yet as of version 1.0) |
See SystemInfo |
3.4. Others
Macro |
Description |
Example |
[[Icon(image)]] |
display system icons |
See HelpOnNavigation |
[[UserPreferences]] |
display a user preferences dialog |
See UserPreferences |
[[BR]] |
insert a line break |
1st line |
[[RandomQuote(pagename)]] |
Select a random quote from the given page, or from FortuneCookies if ommitted |
Edit the FortuneCookies page to display randomly selected wisdom here. |
[[Include(HelloWorld[,"heading"[,level]])]] |
include contents of another page |
for details see /Include |
[[FootNote(text)]] |
Add a footnote (the text cannot contain any wiki markup), or explicitely display collected footnotes when no args are given |
See HelpOnPageCreation for an example |
[[Date(timestamp)]] |
display a timestamp according to system settings |
2007-10-22 |
[[DateTime(timestamp)]] |
display a timestamp注1 according to user settings |
2007-10-22 06:56:10 |
[[GetText(text)]] |
loads I18N texts (mainly intended for use on Help pages) |
"EditText" is translated to "EditText" |
[[TeudView]] |
useful for intranet developer wikis, a means to view pydoc documentation, formatted via a XSLT stylesheet, for details see EfnetPythonWiki:TeudProject |
See EfnetPythonWiki:TeudViewer?module=MoinMoin.macro.TeudView |
[[MailTo(email)]] |
protect your email address from spam bots |
for details see /MailTo |
注1 "timestamp" can be empty (current time), a number of seconds since 1970 (unix timestamp), or a W3C time specification ("2002-01-23T12:34:56").
4. Example Display
We don't show examples for all macros here, because that would make this page quite long. Here is is the replacement text for the [[SystemInfo]] macro: