擴充功能:簡易時間軸

From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:EasyTimeline and the translation is 44% complete.
Other languages:
Deutsch • ‎English • ‎Türkçe • ‎français • ‎português do Brasil • ‎čeština • ‎العربية • ‎中文 • ‎日本語
MediaWiki擴充功能手冊
OOjs UI icon advanced.svg
EasyTimeline
发布状态: 稳定版
实现 标签
描述 Adds <timeline> tag for creating timelines
作者 Erik Zachte
数据庫更改
许可协议 僅限GNU通用公眾授權條款2.0
下载
CHANGELOG
例子 See below
  • $wgTimelineFile
  • $wgTimelineFontFile
  • $wgTimelineFileBackend
  • $wgTimelineEpochTimestamp
  • $wgTimelineFontDirectory
  • $wgTimelinePloticusCommand
  • $wgTimelinePerlCommand
翻譯EasyTimeline擴充功能如在translatewiki.net可用

检查使用和版本矩阵。

问题 尚未完成的工作 · 回報錯誤
其他語言: ar de es eu fr id it ja nl pt zh

"簡易時間線"擴展通過維基語法嵌入圖像。圖像可以是一維圖(水平圖或垂直圖),也可以是二維圖。

幫助頁面請參見裝置EasyTimeline(在您的維基上)。參見this page on EasyTimeline或者在test.wikipedia.org測試。

圖表擴展旨在替換此擴展

系統需求

该扩展需要在伺服器上安装以下程式:

圖表範例

Several examples of what is possible. For more extensive examples see

  • Simpler timelines:
Special:MyLanguage/GorbachevSpecial'colon'MyLanguage/ChernenkoSpecial:MyLanguage/AndropovSpecial:MyLanguage/BrezhnevSpecial:MyLanguage/KhrushchevSpecial:MyLanguage/StalinSpecial:MyLanguage/Lenin
  
Special'colon'MyLanguage/SiderianSpecial'colon'MyLanguage/RhyacianSpecial'colon'MyLanguage/OrosirianSpecial'colon'MyLanguage/StatherianSpecial'colon'MyLanguage/CalymmianSpecial'colon'MyLanguage/EctasianSpecial'colon'MyLanguage/StenianSpecial'colon'MyLanguage/TonianSpecial'colon'MyLanguage/CryogenianSpecial'colon'MyLanguage/EdiacaranSpecial'colon'MyLanguage/EoarcheanSpecial'colon'MyLanguage/PaleoarcheanSpecial'colon'MyLanguage/MesoarcheanSpecial'colon'MyLanguage/NeoarcheanSpecial'colon'MyLanguage/PaleoproterozoicSpecial'colon'MyLanguage/MesoproterozoicSpecial'colon'MyLanguage/NeoproterozoicSpecial'colon'MyLanguage/PaleozoicSpecial'colon'MyLanguage/MesozoicSpecial'colon'MyLanguage/CenozoicSpecial'colon'MyLanguage/HadeanSpecial'colon'MyLanguage/ArcheanSpecial'colon'MyLanguage/ProterozoicSpecial'colon'MyLanguage/Phanerozoic
CambrianSpecial'colon'MyLanguage/OrdovicianSpecial'colon'MyLanguage/SilurianSpecial'colon'MyLanguage/DevonianSpecial'colon'MyLanguage/CarboniferousSpecial'colon'MyLanguage/PermianSpecial'colon'MyLanguage/TriassicSpecial'colon'MyLanguage/JurassicSpecial'colon'MyLanguage/CretaceousSpecial'colon'MyLanguage/PaleogeneSpecial'colon'MyLanguage/NeogeneSpecial'colon'MyLanguage/QuaternarySpecial'colon'MyLanguage/PaleozoicSpecial'colon'MyLanguage/MesozoicSpecial'colon'MyLanguage/CenozoicSpecial'colon'MyLanguage/Phanerozoic
Cenozoic
Special'colon'MyLanguage/PaleoceneSpecial'colon'MyLanguage/EoceneSpecial'colon'MyLanguage/OligoceneSpecial'colon'MyLanguage/MioceneSpecial'colon'MyLanguage/PlioceneSpecial'colon'MyLanguage/PleistoceneSpecial'colon'MyLanguage/HoloceneSpecial'colon'MyLanguage/PaleogeneSpecial'colon'MyLanguage/NeogeneSpecial'colon'MyLanguage/QuaternarySpecial'colon'MyLanguage/Cenozoic

代碼範例

參見: Extension:EasyTimeline/syntax
Special:MyLanguage/GorbachevSpecial'colon'MyLanguage/ChernenkoSpecial:MyLanguage/AndropovSpecial:MyLanguage/BrezhnevSpecial:MyLanguage/Khrushchev

Special:MyLanguage/Lenin

脚本语法是相当直观的。 这是上面图片的脚本:苏联领导人。

<timeline>
# All measures are in pixels

ImageSize  = width:160 height:550
PlotArea   = left:50 right:0 bottom:10 top:10
AlignBars  = justify

DateFormat = yyyy
Period     = from:1917 till:1991
TimeAxis   = orientation:vertical
ScaleMajor = unit:year increment:5 start:1920

# there is no automatic collision detection,
# so shift texts up or down manually to avoid overlap

Define $dx = 25 # shift text to right side of bar

PlotData=
  bar:Leaders color:red width:25 mark:(line,white) align:left fontsize:S

  from:start till:1924 shift:($dx,15)   text:Vladimir~Ilyich~[[Special:MyLanguage/Lenin|Lenin]]
  from:1924  till:1953 shift:($dx,5)    text:[[Special:MyLanguage/Stalin|Josef~Stalin]]
  from:1953  till:1964 shift:($dx,5)    text:Nikita~[[Special:MyLanguage/Khrushchev|Khrushchev]]
  from:1964  till:1982 shift:($dx,5)    text:Leonid~[[Special:MyLanguage/Brezhnev|Brezhnev]]
  from:1982  till:1984 shift:($dx,-12)  text:Yuri~[[Special:MyLanguage/Andropov|Andropov]]
  from:1984  till:1985 shift:($dx,4)    text:Konstantin~[[Special:MyLanguage/Chernenko|Chernenko]] fontsize:XS
  from:1985  till:end  shift:($dx,10)   text:Mikhail~[[Special:MyLanguage/Gorbachev|Gorbachev]]
</timeline>

Double and single brackets can be used like on wikipedia, language prefix is possible, e.g. [[de:foo|more about foo]]. Single brackets for external links are also supported.

好時間軸須知

这里有两个好的网站,可以作为參考,如果用EasyTimeline(还没有图片,但可能会改变)逐字逐句地重新创建大部分的时间线,并且布局大致相似,那将是非常容易的,但我担心那将是 "没有完成"。

  • Hyperhistory e.g. click on button 'people' left, then on 'special lifelines', right.
  • I hope we will have a set like [1] in a years time (click on full size image for any map), possibly even with images. The main effort will be to gather all info without snatching everything from here (most of these maps are based exclusively on data from Britannica).

Unicode(統一碼)

簡易時間軸尚未完全支援Unicode。(現在只可以使用FreeSans.ttf字型)

Aug 2004: Minimal UTF-8 support has been added, meaning that EasyTimeline now recognizes UTF-8 encoded characters. However support for directionality and complex scripts is very lacking. The default font may not have glyphs for all characters. An alternate font can be specified via $wgTimelineFontFile

SVG轉PNG

To show texts correctly for RTL languages (like Arabic, Persian, Hebrew,...) you can use <timeline method="svg2png">timeline code here</timeline> instead of <timeline >timeline code here</timeline>. it shows timeline as png but the links will be disabled.

提示

对于第一次使用EasyTimeline的用户来说,EasyTimeline可能看起来一点都不简单。和所有的脚本语言一样,它需要一些时间来适应。此外,由于其庞大的语法描述可能有点令人困惑。幸运的是,脚本语言的许多元素都是可选的。


EasyTimeline中的 "Easy "传达了这样一个信息:一旦有了时间线,理解、增强或修正就不那么难了。同时翻译到另一个维基百科上使用,也是非常直接、簡單的。

Tips:

  • See some chart examples to find something you could pick and edit for your own stuff
  • Put each timeline on a separate Template page: this makes it easier to edit, faster to preview, possible to include it in several pages

使用目前日期

To use the current date make sure the table opens with {{#tag:timeline| and closes with }}. Then the current date can be inserted using magic words. For example {{#time: d/m/Y }} or {{CURRENTDAY2}}/{{CURRENTMONTH2}}/{{CURRENTYEAR}} will both yield the date in format dd/mm/yyyy.

參見

  • m:WikiTimeScale as a proposal for realizing timescales for wikipedia articles externally.

安裝

參見/安裝

外部連結