书生是什么意思| 胃疼吃什么食物| 握手是什么意思| 咳嗽喝什么茶| 甘油三酯高不能吃什么| 焦虑症吃什么药好得快| 转氨酶偏高吃什么药| 2016年属猴是什么命| 9月28号是什么星座| 胃泌素17是什么检查| 伊拉克是什么人种| 红鸡蛋用什么染| 脉搏是什么| 补气血吃什么药效果好| 深圳属于什么方向| 牛肉炒什么菜| 皮肤脱皮是什么原因| 太平洋中间是什么| 指南针为什么不叫指北针| 脚底起水泡是什么原因| 皮皮虾吃什么| 内能与什么有关| 高挑是什么意思| 为什么吃不胖| 1972年属鼠的是什么命| 什么的绽放| 小苏打可以用什么代替| 喝醋有什么作用与功效| 地西泮又叫什么| 紫光檀是什么木| 水淀粉是什么粉| 应用心理学是什么| 禾加比读什么| 公积金取出来有什么影响| 小青柑是什么茶类| 补钙吃什么维生素| 一什么方式| 开指是什么意思| 鸡精和鸡粉有什么区别| 什么叫补充公积金| 9月3号是什么星座| 毛豆烧什么好吃| 预防保健科是做什么的| 突然暴瘦是什么原因| 冲喜什么意思| 摩羯是什么星座| 轮状胎盘是什么意思| 李亚男为什么选王祖蓝| 骨癌的前兆是什么症状| 什么是包皮| 荨麻疹可以涂什么药膏| 月经期间吃什么水果| 独守空房是什么意思| 洗牙喷砂是什么意思| 小米粥和什么搭配最好最养胃| 晚上睡觉口苦是什么原因| 什么布料| 空灵是什么意思| ifound是什么牌子| 火龙果是什么颜色| 乙肝病毒核心抗体阳性是什么意思| 吃什么补气养血最快| 胰腺疼吃什么药| 什么是过敏性咳嗽| 茶叶渣属于什么垃圾| 挂号特需是什么意思| 1985年属牛的是什么命| 灵官爷是什么神| 通便吃什么药最快| 惊厥是什么症状| 新陈代谢慢是什么原因| 红玫瑰的花语是什么| 6月16日是什么星座| 每天半夜两三点醒是什么原因| 江苏属于什么方向| 什么时间吃苹果最好| 反响是什么意思| 最里面的牙齿叫什么| 心脏缺血吃什么药最好| 疳是什么意思| 心率低有什么症状| 啼笑皆非的意思是什么| 性激素六项检查是什么| 染发有什么危害| 九浅一深是什么意思| 夫妻分床睡意味着什么| 小猫什么时候驱虫| 巨蟹座跟什么星座最配| 检查前列腺需要做什么检查| 什么花一年四季都开| 皮肤越抓越痒是什么原因| 金银花泡水喝有什么功效| 球是什么意思| 喝水有什么好处| 胃疼买什么药| 常吃猪油有什么好处和坏处| 打豆豆是什么意思| 脚为什么会肿| 飞机加什么油| 甲龙吃什么| 吹空调咳嗽是什么原因| 芦笋炒什么好吃| 无名指比食指长代表什么| 刺史是什么官职| 小孩子睡觉流口水是什么原因| 宝宝反复发烧是什么原因引起的| 癌变是什么意思| 4月10号是什么星座| 零七年属什么生肖| 1953年属蛇的是什么命| 什么辉煌四字词语| 农历六月十四是什么日子| 李世民是什么民族| 6月28号是什么星座| 无味是什么意思| 书香门第的书香指什么| 股骨头疼痛什么原因| 孕妇缺维生素D对胎儿有什么影响| 清热败火的败是什么意思| 倒走对身体有什么好处| 老是肚子疼是什么原因| 打疫苗挂什么科| 梅毒是什么病| 壁虎属于什么类动物| 三个句号代表什么意思| 用维生素e擦脸有什么好处和坏处| pussy是什么意思| c肽高说明什么| 鹿角有什么功效和作用| 9月10日是什么节日| 朱棣是朱元璋的什么人| 猫奴是什么意思| 吃什么能提升血小板| 移徙是什么意思| 什么命的人会丧偶| 暗送秋波什么意思| 什么最重要| 三生三世是什么意思| 精索炎吃什么药最好| 痛点是什么意思| 囫囵吞枣是什么意思| 生米煮成熟饭是什么意思| 香菇和什么不能一起吃| 胆结石是什么原因造成的| 最小的一位数是什么| 沐五行属性是什么| 排卵期一般是什么时候| 烊什么意思| 军字五行属什么| 艾灸有什么好处| 胃痉挛是什么| 伤官见官是什么意思| 什么血型不招蚊子| 酒花是什么| 什么是脂溢性脱发| 开脸是什么意思| 白发是什么原因引起的| lookbook是什么意思| 对唔嗨住什么意思| 再接再厉什么意思| 梦见摘果子是什么意思| 维生素b族有什么用| 窦性心律不齐是什么| 血氧是什么| 户名是什么| 脂肪肝可以吃什么水果| 高血压吃什么最好| 穷的生肖指什么生肖| 盂是什么意思| 宝宝大便有泡沫是什么原因| 1957年属什么生肖| 大连机场叫什么| 血管造影是什么检查| 茉莉什么时候开花| 三月是什么星座| 什么是碱性食物有哪些| 虚岁28岁属什么生肖| 胎先露是什么意思| 日加立念什么字| 饮料喝多了有什么危害| 光屏是什么| 美妞是什么意思| 蜂蜜不能和什么一起吃| 六月二十三是什么日子| 吃稀饭配什么菜好吃| 原始心管搏动是什么意思| 专科考研需要什么条件| 赢荡为什么传位嬴稷| 梦见好多猪肉是什么意思| 吃什么食物能提高免疫力| bdsm什么意思| 定向招生是什么意思| 老虎吃什么食物| 夏天怕热冬天怕冷是什么体质| 荣字五行属什么| 下巴脖子长痘痘是什么原因| 跳蛋是什么感觉| 降甘油三酯吃什么食物最好| 非甾体是什么意思| 面红耳赤是什么意思| 卡介苗预防什么病| 腿部青筋明显是什么原因| 腿凉是什么原因引起的| 有点尿就想尿什么原因导致的| 室性逸搏是什么意思| 为什么磨牙| 反流性咽喉炎吃什么药| 林伽是什么| 心脏支架不能吃什么| 辣木籽主治什么病| 03属什么| 白敬亭原名叫什么| fdg是什么意思| 姓傅的男孩取什么名字| 空亡是什么意思| 马车标志是什么品牌| 手为什么会抖| 快递已揽件是什么意思| 血燕是什么| 化疗后骨髓抑制是什么意思| 看近视眼挂什么科| 京东公司全称是什么| 梭子蟹什么季节吃最好| 女人补铁有什么好处| 铜是什么颜色的| 牙周炎有什么症状| 脾胃湿热吃什么中成药| 肠道菌群失调吃什么药| 固本培元什么意思| 腹泻吃什么水果| 手麻是什么原因引起的| 9月24号什么星座| 食禄痣是什么意思| 八面玲珑是什么数字| 1月份是什么星座的人| 5月14日什么星座| 海鲜过敏吃什么药| 脑梗的症状是什么| 肠胃不好喝什么奶粉好| 11月25日什么星座| 牙齿经常出血是什么原因| 太安鱼是什么鱼| 喝酒后胃疼吃什么药| 前列腺炎吃什么药最好| 为什么一直打嗝| 试金石是什么意思| 航班是什么意思| 四川有什么好吃的| 韭菜什么时候种最好| 什么症状要查心肌酶| 阴道什么形状| 渝北区有什么好玩的地方| 善莫大焉是什么意思| 白天看见蛇有什么预兆| 羡字五行属什么| 蓝灰色配什么颜色好看| 是什么意思啊| 维生素d3和d2有什么区别| 查乙肝五项挂什么科| 一般的意思是什么| 什么颜色显肤色白| 1981属什么生肖| 心率慢吃什么药| 晚上睡觉咬牙齿是什么原因| 百度Zum Inhalt springen

大咖云集!2017全球未来网络发展峰会在南京..

aus Wikipedia, der freien Enzyklop?die
Vorlagenprogrammierung Diskussionen Lua Test Unterseiten
Modul Deutsch English 百度 也就是说,经营户卖得好,市场方收入也高;经营户卖得不好,市场方也得承担风险。

Modul: Dokumentation

TemplateData – Module with auxilary functions for template documentation, especially by TemplateData.

Core functionality is improved presentation on documentation pages.

Improve template documentation page – MediaWiki disappointing

[Quelltext bearbeiten]

For presentation of template depiction in VisualEditor agreement was made to abandon all markup and clickable links, permitting all tooltips in all environments. Basically this is reasonable, albeit tooltips with markup and clickable links are supported as HTML application for decades now and JavaScript is present anyway when VisualEditor is used.

  • In consequence it was decided, that also presentation on template documentation views never ever is permitted to contain effective links or markup.
  • That involved, that on many template documentation pages two separated parameter documentation tables are needed and required to be maintained simultaneously: One plain text version for VisualEditor, and a useful one for complex circumstances, with links and markup and lists and tables. – BTW, VisualEditor has not only tooltips, but also a static GUI view, where the lack of deepening links in parameter description is painful.

This state is indefensible.

Improved presentation

[Quelltext bearbeiten]

In addition to the simple syntax supported by MediaWiki and presented in the VisualEditor, the following features can be added to the JSON code for the template documentation page. They affect the elements classified as InterfaceText, but are only useful for description fields.

Wikilinks (internal format)

  • Using double square brackets pages can be linked as common.
  • In VisualEditor, only link title is visible, as it is displayed otherwise.

External links (URL format)

  • Open URL are linked as usual by themselves. In VisualEditor they appear as normal text.
  • External links enclosed in simple square brackets are displayed normally on the template documentation page. In VisualEditor the title is omitted and the URL is displayed so that the users can c&p it and transfer it to the address field of the browser. There is no other way.

Apostrophs ' for italic and bold

  • They can be used to emphasize on the documentation page and are missing in VisualEditor (regular script).

HTML entities

  • The following entities can be used: < > & "   and all numeric formats.

HTML tags

  • HTML tags (and the MediaWiki elements that are not replaced in advance) are removed for the VisualEditor. Otherwise, they remain effective.
  • Attributes are often included in ", which conflicts with the JSON syntax. It is important to make sure that ' is used, which can be a problem with template transclusions.

<noexport></noexport>

  • The enclosed areas are not exported to the VisualEditor.
  • More complex wiki syntax and extensive explanations can be restricted to the documentation page.
  • Within a noexport area, the line structure of the source text is considered. Otherwise everything is running in a single line, as it would also be represented in the VisualEditor.

Templates

  • In particular when the template parameter JSON= is used, templates can be distributed anywhere in the JSON code. However, the expanded syntax might collide with the JSON syntax.

More effects

  • According to the state (required, suggested, optional, deprecated) the table rows are highlighted in light blue, white, gray and pale red.
  • When sorting by state, this importance is taken into account and not the alphabetical sequence of the keywords.
  • Each parameter can be addressed as a jump destination. The fragment is #templatedata:parameter-name.
  • Missing labels are highlighted as errors.
  • A maintenance category is triggered if errors occur.
  • If there are no parameters, the element params:{} is not required.

Eliminate disadvantages

[Quelltext bearbeiten]

Two aspects were found to be particularly disturbing in 2013–2017:

  1. Even if no parameters at all were defined, a table head is always displayed for a table without content. Even more, this is sortable.
    • A reduction was rejected with phab:T126150. A sortable table of the parameters would be always necessary, even if the table has no rows at all and consists only of the header row.
    • This ridiculous statement led to the development of this module in 2016.
  2. Even if the context does not permit that default values or even AutoValue specifications will be defined ever, a content-free six-line definition list is output for each individual parameter value.

The general comments show that MediaWiki only regards the presentation of TemplateData specifications in the VisualEditor as important. However, someone has to program and maintain the templates and someone needs to generate the template description and make it manageable beside the functionality in the VisualEditor form, but that is beyond ken.

  • Two years later the relatively easy task phab:T125333 has been solved by a community originated patch.

General workflow

[Quelltext bearbeiten]
  • An attempt is made to read the JSON object (string) from passed template parameters.
  • If this failed, the source code of the current and the documentation page is searched for <templatedata> elements.
  • Two representations are obtained from the JSON object input:
    1. A localized version, markup etc. stripped off, in JSON format.
    2. An HTML structure, basically similar to the MediaWiki representation, possibly with table of the parameters, with enhanced features.
  • The result of the template is a visible documentation with markup, followed by a hidden <templatedata> element. This is done for the export and corresponds to the MediaWiki guidelines.
    • If current page has been identified as documentation page the hidden <templatedata> is suppressed, and those pages do not appear separately in Special:PagesWithProp/templatedata.

Functions for templates

[Quelltext bearbeiten]
f
Improve TemplateData-presentation; used in Template:TemplateData
Parameters of template transclusion environment (all optional):
1
JSON string or <templatedata> object
JSON
JSON string
(precedes 1)
Transition from <templatedata> objects with pipe symbols needs special attention: Pipes are to be represented as {{!}}, on double curly brackets one should be encoded by HTML entity.
TOC
1 – Insert table of contents after general purpose descriptions; but before parameter list, if present
Example
lang
Language code according to ISO 639 etc.
lazy
1 – Presentation only, do not generate an effective data block
For general method descriptions.
debug
1 – developer mode
source
1 – show effective JSON source text (after template expansion) for debugging
Parameters of #invoke for particular project adaption (all optional):
lang
Language code according to ISO 639 etc.
debug
Development mode, if provided and not equal 0
cat
Title of a maintenance category on invalid parameter value etc.
Deprecated – use configuration module
docpageCreate
Pattern for creation of subpage names; %s/Doku
Deprecated – use configuration module
docpageDetect
Pattern for recognition of subpage names; /Doku$
Deprecated – use configuration module
msgDescMiss
Localisation: complaint text on missing description
Deprecated – use configuration module
Returns: HTML code; and/or error message, probably with class="error"
failsafe
Version management

The Failsafe interface is heading for version management of globally distributed Lua modules. It enables modules equipped with this interface to

  • ensure, that a library module required by a template or another module available as local copy does support certain functionality, or complain if not.
  • administrate global updating and linking of module codes via Wikidata.

The Failsafe interface is present both at template level and for direct Lua access.

The functions in detail are (not all supported yet completely by every library):

Parameter
Value Result current
nothing
false
local version ID ?2025-08-07?
Minimal version version ID required at least
date in ISO format

It will be compared whether the current local implementation matches this version or later.

  • empty, if minimal version not achieved
  • 2025-08-07 → ?2025-08-07?
  • 2025-08-07 → ??
wikidata version ID of global upstream
  • version ID at Wikidata
  • local, if not found there
?2025-08-07?
item ID of the Wikidata item
  • empty if not defined
Q46997995
~ Corresponding version ID locally and registered at Wikidata
  • empty, if up to date
  • version ID at Wikidata, if not equal
?2025-08-07?
@ Is the current (module) page linked correctly with Wikidata item?
  • empty, if linked to the item which is supposed
  • Iitem ID, if not
The return value is in template programming empty or under Lua false, otherwis a non-empty string as described.

Functions for Lua modules (API)

[Quelltext bearbeiten]

Some functions described above can be used by other modules:

local lucky, TemplateData = pcall( require, "Modul:TemplateData" )
if type( TemplateData ) == "table" then
    TemplateData = TemplateData.TemplateData()
else
    -- failure; TemplateData is the error message
    return "<span class='error'>" .. TemplateData .. "</span>"
end
TemplateData.failsafe(atleast)
  1. atleast
    optional
    nil or minimal version request or "wikidata"
Returns: string or false
TemplateData.getPlainJSON(adapt)
Reduce enhanced JSON information to MediaWiki JSON
  1. adapt
    string, with JSON (enhanced)
Returns: string, with JSON (MediaWiki )
TemplateData.test(adapt, arglist)
Simulation of template functionality
  1. adapt
    table, #invoke parameters
  2. arglist
    table, template parameters
Returns: string

Currently focussing on one template only:

Dependencies

[Quelltext bearbeiten]

Configuration

[Quelltext bearbeiten]

A local module Module:TemplateData/config, if present, facilitates adaptions to the local project.

A table is expected via mw.loadData. The following entries are optional components:

catProblem
Title of a maintenance category on invalid parameter value etc.
classNoNumTOC
Name of class for the table of contents; especially to suppress numbering.
nonumtoc
classTable
table with classes for the table of parameters.
{ "wikitable" }
cssParams
table with CSS assignments for formatting of single parameters
cssParWrap
table with CSS assignments for formatting of the entire parameter table
docpageCreate
Pattern for creation of subpage names; %s/Doku
%s/Doku
docpageDetect
Pattern for recognition of subpage names; /Doku$
/Doku$
help*********
Link targets for context sensitive help on details
helpBoolean
helpContent
helpDate
helpDefault
helpFile
helpFormat
Link target on help about wikitext transclusion layout
helpLine
helpNumber
helpPage
helpString
helpTemplate
helpURL
helpUser
msgDescMiss
Localisation: complaint text on missing description
permit
table with specification of properties for a single parameter; components:
boole
table with specification for boolean presentation
Two components true and false – each one table:
css
table with CSS for this explanation of the value
lead
true – show explanation for 0 or 1 respectively preceding the value
false – show explanation for 0 or 1 respectively following the value
show
explanation; string or false to suppress
css
table with specifications for rendering of the parameter table; components:
tablehead
table with CSS for table head
required
table with CSS for required
suggested
table with CSS for suggested
optional
table with CSS for optional
deprecated
table with CSS for deprecated
胆汁反流是什么原因 高碱性食物都有什么 身上起疙瘩是什么原因 明矾有什么作用 挥霍是什么意思
长期贫血会导致什么严重后果 客厅挂钟放在什么位置好 海南简称是什么 女人吃秋葵有什么好处 胎盘前壁是什么意思
大娘的老公叫什么 迁坟需要准备什么东西 白露是什么季节的节气 办理护照需要什么 妇科臭氧治疗是什么
ol是什么 九月二十五是什么星座 ph阳性是什么意思 马桶堵了用什么疏通 粥样动脉硬化是什么意思
一什么太阳hcv7jop6ns6r.cn 宥怎么读什么意思hebeidezhi.com 大便粘马桶是什么原因hcv9jop8ns0r.cn 结婚8年是什么婚hcv9jop0ns4r.cn 什么运动长高最快hcv8jop3ns4r.cn
黄花胶是什么鱼的胶hcv7jop6ns3r.cn 心肌酶高有什么症状hcv8jop4ns0r.cn 无忧是什么意思hcv8jop6ns9r.cn 处暑的含义是什么意思hcv8jop7ns3r.cn 做凉粉用什么淀粉最好hcv8jop7ns7r.cn
慢性咽炎吃什么药效果最好hcv8jop6ns0r.cn 36是什么罩杯hcv7jop9ns8r.cn 鼠标dpi是什么hcv8jop2ns8r.cn 糖异生是什么意思hcv9jop7ns5r.cn 心动过速吃什么药最好hcv8jop3ns2r.cn
牙痛吃什么好hcv9jop5ns0r.cn 如日中天是什么生肖weuuu.com lg手机是什么牌子hcv9jop5ns9r.cn 瓢虫吃什么hcv9jop3ns7r.cn 什么是瑜伽hcv8jop7ns1r.cn
百度