Extension:EasyTimeline

This page is a translated version of the page Extension:EasyTimeline and the translation is 55% complete.
MediaWiki扩展手册
EasyTimeline
发行状态: 稳定版
实现 标签
描述 添加可创建时间线的‎<timeline>标签
作者 Erik Zachte
MediaWiki >= 1.43
数据库更改
许可协议 僅限GNU通用公眾授權條款2.0
下載
CHANGELOG
示例 见下方
  • $wgTimelineRsvgCommand
  • $wgTimelineFontFile
  • $wgTimelineFileBackend
  • $wgTimelineFonts
  • $wgTimelineFontDirectory
  • $wgTimelinePloticusCommand
  • $wgTimelinePerlCommand
正在使用的公开wiki数 7,989 (Ranked 20th)
翻译EasyTimeline扩展
問題 开启的任务 · 报告错误
其他語言:

EasyTimeline(简易时间线)扩展可以根据wikitext来生成嵌入图像。生成的图像可以是一维图(水平或垂直),也可以是二维图。

请参阅在维基上安装EasyTimeline的帮助页面。 另请参阅此页面上的EasyTimeline,或在test.wikipedia.org上试用。

请参阅使用本扩展提供的语法帮助页面。

有一项长期努力旨在让Chart 的扩展来取代这一扩展。

圖表範例

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
www.mediawiki.org/..en.wikipedia.org/..stats.wikimedia.org/..stats.wikimedia.org/..stats.wikimedia.org/..stats.wikimedia.org/..stats.wikimedia.org/..stats.wikimedia.org/..stats.wikimedia.org/..stats.wikimedia.org/..stats.wikimedia.org/..


代碼範例

參見: 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, and language prefixes are possible, e.g., [[de:foo|more about foo]]. Single brackets for external links are also supported.

Unicode(統一碼)

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

Aug 2004: Minimal UTF-8 support has been added, meaning 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

要正确显示阅读方向为从右到左的语言文字(如阿拉伯语、波斯语、希伯来语等),你可以使用‎<timeline method="svg2png">时间线代码‎</timeline>,而不是‎<timeline>时间线代码‎</timeline>。这会使时间线按照png图片显示,但其中的链接将无法使用。

提示

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


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

Tips:

  • See some chart examples to find something you could pick and edit for your purposes
  • Put each timeline on a separate Template page: this makes it easier to edit, faster to preview, and 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.

參見

安裝

系統需求

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

安裝

參見基本安裝指南