This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

巨集

在wiki頁面嵌入巨集,以引入系統功能。試著編輯最新更動系統資訊,就知道是怎麼回事了。

更多的標記資訊請參照說明/編輯頁面

1. 搜尋巨集

目前MoinMoin使用的新搜尋引擎,提供支援複雜型態的互動式搜尋,以及嵌入頁面的搜尋巨集。詳細說明請參照說明/搜尋本站

巨集

功能

範例

[[AdvancedSearch]]


於頁面中嵌入「進階搜尋」對話框

請見尋找頁面

[[TitleSearch]]


於頁面中嵌入「搜尋頁面標題」對話框

請見尋找頁面

[[FullSearch]]


於頁面中嵌入「全文檢索」對話框

請見尋找頁面

[[FullSearch()]]


列出內容包含此頁面標題(頁面名稱)的所有頁面,其作用與點選頁面標題連結相同。

請見CategoryCategory

[[FullSearch(text)]]


列出內容包含檢索詞的所有頁面

Search for powered:

  1. Accessibility/Documentation/GNOME2
  2. Accessibility/PythonPoweredAccessibility
  3. AiutoSuMacro
  4. Apps/Builder
  5. Apps/Builder/Features
  6. Apps/GTG/pubsub-server
  7. Apps/Games/Documentation
  8. Apps/Games/Features
  9. Attic/FootNotes
  10. Attic/GnomePowerManager/FAQ
  11. Attic/GtkLove/PatchTriaging/Issue6
  12. Attic/GtkLove/PatchTriaging/Issue7
  13. Attic/GtkLove/PatchTriaging/Issue8
  14. Attic/ScratchPad/TheAssistant
  15. BastienNocera/KernelWishlist
  16. BastienNocera/Ondav975w
  17. DaniloSegan
  18. Design/Playground/Games/Metadata
  19. Diversity/CoCWorkingGroup/Resources/CoCs/Review
  20. DocumentationProject/Planning/DeveloperDocs_2010_ideas
  21. Engagement/AnnualReport/2015/Hackfests
  22. Engagement/TeamMeetings/11-AUG-2015 (GUADEC BoF)
  23. Events/Brussels2006
  24. FoundationBoard/Minutes/20090703
  25. FoundationBoard/Minutes/20170207
  26. FoundationBoard/Minutes/20170214
  27. FoundationBoard/Minutes/20170221
  28. FoundationBoard/Minutes/20170228
  29. FoundationBoard/Minutes/20170307
  30. FoundationBoard/Minutes/20170314
  31. FoundationBoard/Minutes/20170328
  32. FoundationBoard/Minutes/20170404
  33. FoundationBoard/Minutes/20170411
  34. FoundationBoard/Minutes/20170418
  35. FoundationBoard/Minutes/20201109
  36. FoundationBoard/Minutes/20201216
  37. GUADEC/2006/PrintedContent/CoreAbst
  38. GUADEC2007/Booklet/sessionsAbst
  39. GnomeWeb/CmsRequirements
  40. GnomeWeb/CmsRequirements/DrupalEval
  41. GnomeWeb/CmsRequirements/MidgardEval
  42. GnomeWeb/CmsRequirements/PloneEval
  43. GnomeWeb/GuadecNotes
  44. Hackfests/IMContacts Social2011/Tasks/ContactsSearchHacking
  45. Hackfests/dotNET2014
  46. HjälpMedAnpassning
  47. Infrastructure/Archive/Apprentices
  48. Infrastructure/Archive/Servers/label
  49. Internships/2018/Projects/USB-Protection
  50. MarketingBrief2009
  51. Outreach/SummerOfCode/2013/Projects/SindhuS_ImplementingAdvancedGitOperationsInGitg
  52. OutreachProgramForWomen/2013/JuneSeptember
  53. OutreachProgramForWomen/Meetings/20130221
  54. Projects/GnomeShell/DesignerPlayground/ApplicationsUnnecessary
  55. Projects/Grilo
  56. Projects/HardwareTesting/Hardware
  57. Projects/Rygel/IOP
  58. Projects/Vala/Documentation
  59. ThreePointZero/LaunchParty/Philippines/Manila
  60. VikramDhillon/Sandbox/first_topic_page
  61. WhyWikiWorks
  62. КакОриентироваться
  63. ЧомуВікіПрацює
  64. フロントページ
  65. 帮助-宏
  66. 說明/巨集

[[FullSearchCached(text)]]


功能同FullSearch巨集,並將搜尋結果放入快取,下次執行時直接讀入快取資料。當您覺得速度比即時性(up-to-date)重要,就用它吧!

Search for powered:

  1. Accessibility/Documentation/GNOME2
  2. Accessibility/PythonPoweredAccessibility
  3. AiutoSuMacro
  4. Apps/Builder
  5. Apps/Builder/Features
  6. Apps/GTG/pubsub-server
  7. Apps/Games/Documentation
  8. Apps/Games/Features
  9. Attic/FootNotes
  10. Attic/GnomePowerManager/FAQ
  11. Attic/GtkLove/PatchTriaging/Issue6
  12. Attic/GtkLove/PatchTriaging/Issue7
  13. Attic/GtkLove/PatchTriaging/Issue8
  14. Attic/ScratchPad/TheAssistant
  15. BastienNocera/KernelWishlist
  16. BastienNocera/Ondav975w
  17. DaniloSegan
  18. Design/Playground/Games/Metadata
  19. Diversity/CoCWorkingGroup/Resources/CoCs/Review
  20. DocumentationProject/Planning/DeveloperDocs_2010_ideas
  21. Engagement/AnnualReport/2015/Hackfests
  22. Engagement/TeamMeetings/11-AUG-2015 (GUADEC BoF)
  23. Events/Brussels2006
  24. FoundationBoard/Minutes/20090703
  25. FoundationBoard/Minutes/20170207
  26. FoundationBoard/Minutes/20170214
  27. FoundationBoard/Minutes/20170221
  28. FoundationBoard/Minutes/20170228
  29. FoundationBoard/Minutes/20170307
  30. FoundationBoard/Minutes/20170314
  31. FoundationBoard/Minutes/20170328
  32. FoundationBoard/Minutes/20170404
  33. FoundationBoard/Minutes/20170411
  34. FoundationBoard/Minutes/20170418
  35. FoundationBoard/Minutes/20201109
  36. FoundationBoard/Minutes/20201216
  37. GUADEC/2006/PrintedContent/CoreAbst
  38. GUADEC2007/Booklet/sessionsAbst
  39. GnomeWeb/CmsRequirements
  40. GnomeWeb/CmsRequirements/DrupalEval
  41. GnomeWeb/CmsRequirements/MidgardEval
  42. GnomeWeb/CmsRequirements/PloneEval
  43. GnomeWeb/GuadecNotes
  44. Hackfests/IMContacts Social2011/Tasks/ContactsSearchHacking
  45. Hackfests/dotNET2014
  46. HjälpMedAnpassning
  47. Infrastructure/Archive/Apprentices
  48. Infrastructure/Archive/Servers/label
  49. Internships/2018/Projects/USB-Protection
  50. MarketingBrief2009
  51. Outreach/SummerOfCode/2013/Projects/SindhuS_ImplementingAdvancedGitOperationsInGitg
  52. OutreachProgramForWomen/2013/JuneSeptember
  53. OutreachProgramForWomen/Meetings/20130221
  54. Projects/GnomeShell/DesignerPlayground/ApplicationsUnnecessary
  55. Projects/Grilo
  56. Projects/HardwareTesting/Hardware
  57. Projects/Rygel/IOP
  58. Projects/Vala/Documentation
  59. ThreePointZero/LaunchParty/Philippines/Manila
  60. VikramDhillon/Sandbox/first_topic_page
  61. WhyWikiWorks
  62. КакОриентироваться
  63. ЧомуВікіПрацює
  64. フロントページ
  65. 帮助-宏
  66. 說明/巨集

[[GoTo]]


於頁面中嵌入「跳至此頁」對話框

請見尋找頁面

[[PageList(Help)]]


列出標題(名稱)包含檢索詞的所有頁面

請見說明/索引

2. 導覽

巨集

功能

範例

[[RecentChanges]]


列出最近更動過的頁面

請見最新更動

[[TitleIndex]]


列出所有頁面標題

請見標題索引

[[WordIndex]]


列出所有頁面標題中詞彙(如 WikiName 包含兩個詞彙 Wiki 和 Name)

請見詞彙索引

[[WantedPages]]


列出被連結但還不存在的頁面

請見未定義頁

[[OrphanedPages]]


列出沒有被其它頁面連結的頁面

請見孤立頁面

[[AbandonedPages]]


列出很久沒有變動的頁面

請見遺棄頁面

[[RandomPage]]


隨機嵌入一個頁面連結

Apps/Nemiver/ActivateLogging

[[RandomPage(#)]]


隨機嵌入指定數量的頁面連結

兩個隨機頁面:

[[TableOfContents([maxdepth])]]


顯示內容目錄,可限制顯示的層數。

見本頁頁首

[[Anchor(anchorname)]]


在指定位置插入錨點

#here

[[Navigation(children[,maxdepth])]]


列出所有子頁面

請見本頁頁首

[[Navigation(siblings[,maxdepth])]]


列出同屬於父頁面的頁面

See HelpOnMacros/MailTo

[[Navigation(slideshow)]]


嵌入簡報功能表

請見說明/簡報

[[Navigation(slides)]]


嵌入首頁/上頁/下頁/末頁連結

請見說明/簡報

[[AttachInfo]]


displays number of attachments for current page

See HelpOnActions/AttachFile

[[AttachInfo(page)]]


displays number of attachments for page

See HelpOnActions/AttachFile

[[AttachList]]


列出本頁附件

See HelpOnActions/AttachFile

[[AttachList(page)]]


列出指定頁面的附件

See HelpOnActions/AttachFile

3. 系統資訊

巨集

功能

範例

[[InterWiki]]


列出所有已知Wiki站際的站名(InterWiki names)

Wiki站際

[[SystemInfo]]


關於wiki系統、python直譯器及主機系統的資訊。

系統資訊

[[PageCount(exists)]]


顯示本站頁面數量。若加上參數exists,將只計算存在的面頁數量。

共26472頁

[[PageSize]]


列出所有頁面的容量

請見頁面大小

[[StatsChart(type)]]


顯示統計圖表 (目前項目有︰點擊次數、頁面大小及瀏覽器)

請見事件統計與其子頁面

[[SystemAdmin]]


給系統管理員的資訊

必須有管理權限

[[EditedSystemPages]]


列出修改過的系統頁面

  1. AideAuxDébutants
  2. BadContent
  3. FindSide
  4. ForSide
  5. FrontPage
  6. HomepageImWiki
  7. HomepageTemplate
  8. HomepageVorlage
  9. HulpTemplate
  10. LocalSpellingWords
  11. OrdListe
  12. OrdRegister
  13. PageD'Accueil
  14. SidStorlek
  15. SideStørrelse
  16. SiteNavigering
  17. StartSeite
  18. SyntaxReference
  19. SökSida
  20. TilfældigSide
  21. TitelIndex
  22. TitelListe
  23. TitelRegister
  24. VerwaisteSeiten
  25. WegWeiser
  26. WikiSandBox
  27. WortIndex
  28. ZufallsSeite
  29. ÖnskadeSidor
  30. ÖvergivnaSidor
  31. ØnskedeSider
  32. ШаблонКатегорій
  33. 類別模板

4. 其它

巨集

功能

範例

[[ImageLink(image,target[,width=width[,height=height]][,alt=alttag])]]


本巨集用來製作圖形連結。圖形參數可以用附件或URL;連結參數可為URL或wiki頁面;額外參數則用來調整圖形大小。若無連結參數,則連結將指向圖形本身。

See HelpOnMacros/ImageLink

[[Icon(image)]]


顯示系統圖示

請見說明/瀏覽本站

[[UserPreferences]]


嵌入「使用者設定」對話框

請見說明/使用者設定

[[UserPreferences(createonly)]]


嵌入「使用者註冊」對話框

[[BR]]


插入換行符號

1st line
2nd line

[[RandomQuote(pagename)]]


Select a random quote from the given page, or from FortuneCookies if ommitted

Hint: Search for multiple words, just like Google. See also HelpOnSearching.

[[Include(HelloWorld[,"heading"[,level]])]]


引入另一頁面內容

詳情請見HelpOnMacros/Include

[[FootNote(text)]]


加入腳注1。無巨集參數時,將於書寫處嵌入腳注列表。

請見底下範例

[[Date(timestamp)]]


依系統設定格式顯示日期。

2024-10-23

[[DateTime(timestamp)]]


依系統設定格式顯示日期時間2

2024-10-23 12:17:14

[[GetText(text)]]


讀取I18N文字(主要用於說明頁面)

"EditText"被翻譯為「EditText」

[[GetText2(,message,argument1,argument2,...)]]


loads I18N texts (mainly intended for use on Help pages or in generated output on wiki pages) and replaces %s in the message by the arguments. The first character of the argument is used as the separator (in this example: a comma). You can escape the separator by using a backslash.

"[[GetText2(,[You may not read %s],FooBar)]]" yields "[You may not read FooBar]"

[[TeudView]]


useful for intranet developer wikis, a means to view pydoc documentation, formatted via a XSLT stylesheet

See http://twistedmatrix.com/wiki/python/TeudProject

[[MailTo(email)]]


防止垃圾郵件的Email表示法

詳情請見 HelpOnMacros/MailTo

[[NewPage(PageTemplate,ButtonLabel,[ParentPage,@ME,@SELF] [,NameTemplate])]]


Allow the user to create (sub-) pages easily, using the page PageTemplateas the template for the new page and the string NameTemplate as a template for the name.3 @ME is used if you want the page created below the users homepage. @SELF is used to create a subpage below the page where it is called from.

[[GetVal(NeatSnippets,regards)]]


Retrieve dictionary entries from dict pages.

If you have a page called GermanDict which contains the entry Test, you should see the translation here:

 [[MonthCalendar(,,12)]]


Displays a Calendar and creates link for entries to each day on subpages

See HelpOnMacros/MonthCalendar

  1. 不可以wiki標記修飾腳注文字 (1)

  2. 參數「timestamp」可為空白(顯示當下日期時間),從1970年至今秒數(unix timestamp),或者w3C 時間格式(如2002-01-23T12:34:56)。請參考RFC822第五節。 (2)

  3. NameTemplate is formatted with time.strftime(), with the exception of %s which is replaced by the input into the edit box (which is only shown if necessary). If NameTemplate is not specified or empty, it defaults to %s. (3)

5. 動手寫巨集

Create a python file called MacroName.py located in your data/plugin/macro directory. Ensure it has a single method called execute(macro, arguments), which is the entry-point.

All Macro instances have a request member through which you can access the form parameters and other information related to user interaction.

execute() should use the formatter to construct valid markup for the current target format. In most cases this is HTML, so writing a macro which returns HTML will work in most cases but fail when formats like XML or text/plain are requested.

For example, your wiki page has the following line on it:

[[MacroName(arg1,arg2,arg3)]]

You could write a MacroName.py file like this:

   1 Dependencies = []
   2 def execute(macro, args):
   3     return macro.formatter.text("I got these args from a macro %s: %s" %
   4     (str(macro), args))


2024-10-23 12:17