擴充功能:EasyTimeline
![]() 发行状态: 穩定版 |
|
---|---|
实现 | 标签 |
描述 | 添加可创建时间线的<timeline> 标签 |
作者 | Erik Zachte |
MediaWiki | >= 1.41 |
数据库更改 | 否 |
许可协议 | 僅限GNU通用公眾授權條款2.0 |
下載 | CHANGELOG |
示例 | 见下方 |
|
|
正在使用的公开wiki数 | 7,989 (Ranked 20th) |
翻译EasyTimeline扩展 | |
問題 | 开启的任务 · 报告错误 |
其他語言: |
EasyTimeline(简易时间线)扩展可以根据wikitext来生成嵌入图像。生成的图像可以是一维图(水平或垂直),也可以是二维图。
幫助頁面請參見裝置EasyTimeline(在您的維基上)。 See also this page on EasyTimeline or play with it at test.wikipedia.org.
See the help page on using the syntax provided by this extension.
There is a long-term effort to get the Graph extension to replace this extension.
系統需求
该扩展需要在伺服器上安装以下程式:
圖表範例
Several examples of what is possible. For more extensive examples see
- WW II - Pacific Theatre - horizontal
- History of Computing - horizontal
- Tour-de-France Sieger - vertical
- Vocal and instrumental pitch ranges (a nice example of a diagram that is not a timeline at all) - horizontal
- Complete timeline of Macintosh models - horizontal
- Simpler timelines:
- :en:Template:Extinction events graphical timeline - horizontal, uses w:Template:Horizontal timeline
- :en:Talk:Invention_of_radio/Archive_1#Timeline.2C_Players - horizontal with arrows
- :en:Gaius_Marius#Timeline - vertical
- Population developement - horizontal
![]() |
![]() ![]() ![]() ![]() | |
![]() |
代碼範例

脚本语法是相当直观的。 这是上面图片的脚本:苏联领导人。
<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.
參見
- Presentation about EasyTimeline at Wikimania 2005 (abstract, slides, speaker notes)
- m:WikiTimeScale as a proposal for realizing timescales for wikipedia articles externally.
- w:Template:Simple Horizontal timeline An easier timeline to use on Wikipedia.
安裝
參見/安裝
外部連結
- SIMILE Widgets - DHTML-based AJAXy widget for visualizing time-based events
此扩展用于一个或多个维基媒体项目。 这可能意味着扩展足够稳定、运作足够良好,可以用在这样的高流量的网站上。 请在维基媒体的CommonSettings.php和InitialiseSettings.php配置文件中查找此扩展的名称以查看哪些网站安装了该扩展。 特定wiki上的已安装的扩展的完整列表位于Special:Version页面。 |
此扩展在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |