professional-wiki/modern-timeline
Composer 安装命令:
composer require professional-wiki/modern-timeline
包简介
Adds a modern timeline visualization as Semantic MediaWiki result format
README 文档
README
The Modern Timeline extension provides a modern timeline visualization for Semantic MediaWiki as a result format.
It was created by Professional Wiki and funded by KDZ - Centre for Public Administration Research.
Example timeline
Platform requirements
- PHP 8.1 or later
- MediaWiki 1.43 or later (tested up to MediaWiki 1.45)
- Semantic MediaWiki 7.0 or later (tested up to SMW 7.0)
See the release notes for more information on the different versions of Modern Timeline.
Installation
The recommended way to install Modern Timeline is using Composer with MediaWiki's built-in support for Composer.
Note that the required extension Semantic MediaWiki must be installed first according to the installation instructions provided.
Step 1
Change to the base directory of your MediaWiki installation. If you do not have a "composer.local.json" file yet, create one and add the following content to it:
{
"require": {
"professional-wiki/modern-timeline": "~4.0"
}
}
If you already have a "composer.local.json" file add the following line to the end of the "require" section in your file:
"professional-wiki/modern-timeline": "~4.0"
Remember to add a comma to the end of the preceding line in this section.
Step 2
Run the following command in your shell:
php composer.phar update --no-dev
Note if you have Git installed on your system add the --prefer-source flag to the above command.
Step 3
Add the following line to the end of your "LocalSettings.php" file:
wfLoadExtension( 'ModernTimeline' );
Usage
See also live demos at the following website: ProWiki - Demo and Test Wiki - Category:Modern Timeline examples.
The first date printout is used as date for the timeline events:
{{#ask:
[[Modification date::+]]
|format=moderntimeline
|?Modification date
}}
If a second date printout is present it is used as end date and the event is displayed as a range:
{{#ask:
[[Start date::+]]
|format=moderntimeline
|?Start date
|?End date
}}
Display and behaviour of the timeline can be changed via several output parameters:
{{#ask:
[[Modification date::+]]
|format=moderntimeline
|?Modification date
|width=75%
|height=500px
|start at end=on
}}
Parameters
A full list of supported output parameters can be obtained in wiki via the smwdoc parser function:
{{#smwdoc: moderntimeline }}
You can also check the parameter documentation
PHP Configuration
The default value of all parameters can be changed by placing configuration in "LocalSettings.php". These configuration settings are available:
$wgModernTimelineWidth– Timeline width in %. Can also be specified in px, em and ex$wgModernTimelineHeight– Timeline height in pixels. Can also be specified in em and ex$wgModernTimelineBookmark– Make the timeline bookmarkable via the page URL$wgModernTimelineBackground– Background color for the timeline slides (CSS color values)$wgModernTimelineScaleFactor– Timeline width in screen widths at first presentation$wgModernTimelinePosition– Display the timeline navigation at the top or at the bottom$wgModernTimelineTickWidth– Optimal distance (in pixels) between ticks on the axis$wgModernTimelineStartSlide– The first slide to display when the timeline is loaded$wgModernTimelineStartAtEnd– Start with the last timeline slide$wgModernTimelineTransitionDuration– Slide transition in milliseconds$wgModernTimelineNavHeight– Height of the timeline navigation section in % or px$wgModernTimelineTemplate– Name of a template to show the slide area with$wgModernTimelineImageProperty– Semantic property of type Page. Needs to be queried as print request
Default values of these configuration settings can be found in "extension.json". Do not change "extension.json".
Example of changing one of the configuration settings:
$wgModernTimelineHeight = '500px';
Limitations
- The template parameter is not supported on "Special:Ask"
- The timeline style does not automatically match that of the wiki
- The timeline language does not automatically match that of the wiki
Contact Professional.Wiki for Professional MediaWiki development or Semantic MediaWiki hosting.
Contribution and support
If you want to contribute work to the project please subscribe to the developers mailing list and have a look at the contribution guideline.
- File an issue
- Submit a pull request
- Ask a question on the mailing list
Professional MediaWiki support is available via Professional Wiki.
License
GNU General Public License v2.0 or later (GPL-2.0-or-later).
Release notes
Version 4.0.0
Released on June 8th, 2026.
- Raised minimum Semantic MediaWiki version to 7.0
Version 3.0.0
Released on June 2nd, 2026.
- Raised minimum PHP version to 8.1
- Raised minimum MediaWiki version to 1.43
- Raised minimum Semantic MediaWiki version to 6.0
- Fixed compatibility with MediaWiki 1.44
- Translation updates from https://translatewiki.net
Version 2.0.0
Released on July 7th, 2025.
- Raised minimum PHP version to 8.0
- Raised minimum MediaWiki version to 1.39
- Upgraded to TimelineJS3 3.9.6
- Translation updates from https://translatewiki.net
Version 1.2.2
Released on November 9th, 2023.
- Fixed compatibility with MediaWiki 1.38 and above
- Translation updates from https://translatewiki.net
Version 1.2.1
Released on April 11th, 2022.
- Fixed fatal error in some cases where a Title becomes unavailable
Version 1.2.0
Released on March 29, 2020.
- Fixed error occurring when using the
templateparameter with MediaWiki 1.34 or later - Added
image propertyparameter (withimagealias) - Added
wgModernTimelineImagePropertyconfiguration parameter - Translation updates from https://translatewiki.net
Version 1.1.0
Released on August 28, 2019.
- Improved handling of large data sets
- Translation updates from https://translatewiki.net
Version 1.0.0
Released on August 16, 2019.
Initial release with a TimelineJS3 based result format featuring 12 customization parameters, template support and date range support.
Examples
professional-wiki/modern-timeline 适用场景与选型建议
professional-wiki/modern-timeline 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23.83k 次下载、GitHub Stars 达 18, 最近一次更新时间为 2019 年 08 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「timeline」 「wiki」 「mediawiki」 「Semantic MediaWiki」 「visualization」 「timelineJS3」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 professional-wiki/modern-timeline 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 professional-wiki/modern-timeline 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 professional-wiki/modern-timeline 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Texy converts plain text in easy to read Texy syntax into structurally valid (X)HTML. It supports adding of images, links, nested lists, tables and has full support for CSS. Texy supports hyphenation of long words (which reflects language rules), clickable emails and URL (emails are obfuscated again
Automatically logs-in users if they are already authenticated by a remote source. (e.g. environment variable REMOTE_USER)
An extension to Semantic MediaWiki allowing to build breadcrumb links from an attributive property filter
Helper functions for the MediaWiki ExtensionRegistry
Adds the EDTF data type to Wikibase
Add timelines to custom pages or infolist entries effortlessly. Plus, it teams up smoothly with Spatie Activitylog for easy tracking.
统计信息
- 总下载量: 23.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 26
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2019-08-05

