Extension:EasyTimeline
EasyTimeline 发行状态: 稳定版 |
|
---|---|
实现 | 标签 |
描述 | 添加可创建时间线的<timeline> 标签 |
作者 | Erik Zachte |
MediaWiki | >= 1.43 |
数据库更改 | 否 |
许可协议 | 僅限GNU通用公眾授權條款2.0 |
下載 | CHANGELOG |
示例 | 见下方 |
|
|
正在使用的公开wiki数 | 7,989 (Ranked 20th) |
翻译EasyTimeline扩展 | |
問題 | 开启的任务 · 报告错误 |
其他語言: |
EasyTimeline(简易时间线)扩展可以根据wikitext来生成嵌入图像。生成的图像可以是一维图(水平或垂直),也可以是二维图。
请参阅在维基上安装EasyTimeline的帮助页面。 另请参阅此页面上的EasyTimeline,或在test.wikipedia.org上试用。
请参阅使用本扩展提供的语法帮助页面。
圖表範例
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, 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
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 the 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 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.
參見
- Presentation about EasyTimeline at Wikimania 2005 (abstract, slides, speaker notes)
- w:Template:Simple Horizontal timeline An easier timeline to use on Wikipedia.
安裝
- == 系統需求 ==
This extension requires the following software to be installed on the server:
- Installation
See the installation instructions.
此扩展用于一个或多个维基媒体项目。 这可能意味着扩展足够稳定、运作足够良好,可以用在这样的高流量的网站上。 请在维基媒体的CommonSettings.php和InitialiseSettings.php配置文件中查找此扩展的名称以查看哪些网站安装了该扩展。 特定wiki上的已安装的扩展的完整列表位于Special:Version页面。 |
此扩展在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |
- Stable extensions/zh
- Tag extensions/zh
- GPL licensed extensions/zh
- Extensions in Wikimedia version control/zh
- ParserFirstCallInit extensions/zh
- All extensions/zh
- Pages using deprecated NoteTA template
- Graphical Timelines/zh
- Extensions used on Wikimedia/zh
- Extensions included in Fandom/zh
- Extensions included in Miraheze/zh
- Extensions included in ShoutWiki/zh
- Extensions included in WikiForge/zh