Jump to content
MediaWiki

Extension:EasyTimeline

本頁使用了標題或全文手工轉換
From mediawiki.org
This page is a translated version of the page Extension:EasyTimeline and the translation is 54% complete.
MediaWiki扩展手册
EasyTimeline
发行状态: 稳定版
实现 标签
描述 添加可创建时间线的‎<timeline>标签
作者 Erik Zachte
MediaWiki >= 1.47.0
数据库更改
  • $wgTimelineRsvgCommand
  • $wgTimelineFontFile
  • $wgTimelineFileBackend
  • $wgTimelineFonts
  • $wgTimelineFontDirectory
  • $wgTimelinePloticusCommand
  • $wgTimelinePerlCommand
许可证 GNU General Public License 2.0 only
下載
CHANGELOG
示例 见下方
翻译EasyTimeline扩展
問題 开启的任务 · 报告错误
Help on Wikipedia:

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

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

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

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

圖表範例

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

  

代碼範例

参阅: Extension:EasyTimeline/syntax

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

<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 }}. 然后,可以使用魔术字插入当前日期。 For example {{#time: d/m/Y }} or {{CURRENTDAY2}}/{{CURRENTMONTH2}}/{{CURRENTYEAR}} will both yield the date in format dd/mm/yyyy.

参阅

安裝

系統需求

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

安裝

參見基本安裝指南

此扩展用于一个或多个维基媒体项目。 这可能意味着扩展足够稳定、运作足够良好,可以用在这样的高流量的网站上。 请在维基媒体的CommonSettings.phpInitialiseSettings.php配置文件中查找此扩展的名称以查看哪些网站安装了该扩展。 特定wiki上的已安装的扩展的完整列表位于Special:Version页面。
此扩展在以下wiki农场/托管网站和/或软件包中提供:

AltStyle によって変換されたページ (->オリジナル) /