乳腺增生结节吃什么药效果好| 新生儿五行缺什么查询| 亿字五行属什么| 什么得什么| 打牌老是输是什么原因| 担心是什么意思| 怀孕吃什么水果比较好| 寂灭是什么意思| 嗝气是什么原因| 为什么会流鼻血| 长期贫血会导致什么严重后果| mA是什么| 皮肤发烫是什么原因| 为什么会得子宫肌瘤| 心绞痛有什么症状| 瞒天过海是什么意思| 比音勒芬是什么档次| hpv52高危阳性是什么意思| 家是什么结构的字| 事宜愿为是什么意思| 绝倒是什么意思| 减肥晚餐吃什么好| 今年80岁属什么生肖| 阑尾炎痛起来什么感觉| 双脚踝浮肿是什么原因| juicy什么意思| 1971年是什么年| marni是什么品牌| 不安腿综合征吃什么药| pioneer是什么牌子| 电泳是什么意思| 饺子什么馅儿最好吃| 内脏吃多了有什么危害| 尿蛋白阳性什么意思| 圣旨是什么意思| 晚上七点到九点是什么时辰| 嘴唇起小水泡是什么原因| 尿结晶高是什么原因| 990金是什么金| 什么地方黄鳝最多| 水瓶女喜欢什么样的男生| 为什么胸闷一吃丹参滴丸就好| 女生胸疼是什么原因| 什么油好| 供观音菩萨有什么讲究| 烂漫是什么意思| 6月5号是什么星座| 7.31什么星座| 1月23号什么星座| 破窗效应是什么意思| 什么叫生酮饮食| 泛化是什么意思| 民政局局长什么级别| 周传雄得了什么病| 肌肉拉伤吃什么药| 公报私仇是什么生肖| 牛肉跟什么炒好吃| 刚愎自用什么意思| 翡翠和玉有什么不同| 性价比高什么意思| 为什么英文怎么说| 拉肚子吃什么食物好| poppy什么意思| 蚊子喜欢什么气味| 疏通血管吃什么药最好| 一个不一个好念什么| 红色加黄色等于什么颜色| 中国防御系统叫什么| 蛇舌草有什么功效| 刚生完宝宝的产妇吃什么好| 阴道清洁度三度什么意思| 早上睡不醒是什么原因| 群体是什么意思| 春秋鼎盛是什么意思| joan什么意思| poscer是什么牌子手表| 血块多是什么原因| 自律性是什么意思| 西湖龙井属于什么茶| 苋菜与什么食物相克| 百忙之中什么意思| 喝什么降火| 做雾化用什么药| 豆种翡翠属于什么档次| 大专跟本科有什么区别| 乌龟代表什么数字| 美国为什么有两块土地| 阁是什么意思| 胎盘2级是什么意思| 身体出汗多是什么原因| 人活着意义是什么| 非萎缩性胃炎是什么意思| 夏天中暑吃什么药| 诺诗兰属于什么档次| 得失是什么意思| 低密度脂蛋白偏高是什么意思| 经常干呕是什么原因| 筷子什么材质最好| 脱发缺乏什么维生素| 长期吸烟容易引起什么疾病| 尿的颜色有点红褐色是什么原因| 赘肉是什么意思| 牙齿发黄是什么原因导致的| 回肠荡气什么意思| 杨利伟什么军衔| 影射是什么意思| 人体最长的骨头是什么| 龙代表什么数字| au750是什么金属| 鸡精吃多了有什么危害| 脆皮是什么意思| 北京户口有什么用| 乳腺结节和乳腺增生有什么区别| 蛇的天敌是什么动物| 月经肚子疼是什么原因| 缩阳什么意思| 面藕是什么做的| 沉鱼落雁什么意思| 荆芥俗名叫什么| 颈椎病吃什么药最好| 白血球低是什么原因| 上眼皮突然肿了是什么原因| 手麻是什么病的预兆| 痛风检查什么项目| 紫藤什么时候开花| 脱靶是什么意思| 贫血是什么原因造成的| 青筋明显是什么原因| 尿频尿多是什么原因| 糖尿病可以吃什么肉| 为什么卧室要用木地板| 氯化钠是什么东西| 对线是什么意思| 女人来月经有血块是什么原因| 火车头是什么意思| 做肠镜检查需要提前做什么准备| 小便浑浊是什么原因| 夫妻分床睡意味着什么| 眼睛出血是什么原因| 怀孕初期会有什么症状| 内分泌失调是什么原因| 大脑镰钙化灶是什么意思| 铁锈红配什么颜色好看| 什么猫最好养| 嘿是什么意思| 党参长什么样图片| 鼻窦炎用什么药| 辣椒含有什么维生素| 为什么文化大革命| 大便出血是什么原因| 胸闷气短是什么原因造成的| 微量元素挂什么科| 脾虚湿气重喝什么茶| 太平天国为什么会失败| 吃什么能增强记忆力| 睡觉打呼噜什么原因| ccu是什么病房| 脖子上有肿块挂什么科| 邓紫棋和华晨宇什么关系| 睡觉总是做梦是什么原因| 皮下囊肿是什么原因引起的| 姨妈的老公叫什么| 什么是亲子鉴定| 新手摆地摊卖什么好| 9月13号是什么星座| 肛瘘是什么意思| 阴囊两侧瘙痒是什么原因| 腰胀是什么原因引起的| 次月是什么意思| 不含而立是什么意思| 胆囊炎的症状是什么| 带状疱疹用什么药膏| 老人喝什么牛奶比较好| 借鉴是什么意思| 爱母环是什么形状图片| 上什么下什么| 夏天床上铺什么凉快| 恭敬地看的词语是什么| 什么是软饮料| xpe是什么材料| 面瘫挂什么科室| 西洋参长什么样子图片| 只是当时已惘然是什么意思| 比劫是什么意思| 痛风该吃什么药好得快| 小候鸟是什么意思| 对药物过敏是什么症状| 看心脏病挂什么科| 男性粘液丝高什么原因| 太阳穴长痘痘什么原因| 肝实质弥漫性回声改变什么意思| 安全期是什么| 恐龙吃什么| 结节是什么东西| 肺静脉流的是什么血| 腿走路没劲发软是什么原因| 产妇吃什么水果| 什么方法| 孕妇吃什么水果好对胎儿好| 左边肚子疼是什么原因| 确认妊娠是什么意思啊| 中元节应该说什么| 腰酸是什么病的前兆| 巨人观是什么| 丙肝是什么病严重吗| 古来稀是什么意思| 70年出生属什么生肖| 婴儿第一次理发有什么讲究吗| 血小板减少吃什么| 脸上发痒是什么原因| seiko是什么牌子| 婴儿半夜哭闹是什么原因| 高锰酸钾加什么会爆炸| 唏嘘什么意思| 李子为什么不能多吃| 10月28号是什么星座| 胸闷憋气是什么原因| 雪燕适合什么人吃| 12月15日是什么星座| 芝兰是什么意思| 测幽门螺旋杆菌挂什么科| 渣是什么意思| 鹿沼土是什么土| 中耳炎吃什么药| 庚金是什么意思| 戒断反应什么意思| 继发性是什么意思| 什么入什么口| 狗肉和什么一起炖最佳| 吃瓜群众什么意思| 草朋刀是什么字| 鼠妇吃什么| 为什么身份证后面有个x| 颈椎用什么字母表示| 机车什么意思| 肾痛在什么位置痛| 低密度脂蛋白胆固醇是什么意思| 非经期少量出血是什么原因| nf是什么单位| 汗疱疹是什么原因引起| 为什么会耳鸣| 羊内腰和外腰分别是什么| 月经期喝什么好| 旺是什么意思| 内秀是什么性格的人| 为什么会长老年斑| 你喜欢吃什么用英语怎么说| 不为良相便为良医是什么意思| 冬瓜有什么功效和作用| maby什么意思| 吃西瓜有什么好处| 吃力不讨好是什么意思| 女人性冷淡吃什么药效果好| 长期喝茶有什么危害| 荻是什么意思| 什么补血快| 激素是什么| 梦见煮饺子是什么意思| 什么是甲醛| 双儿是什么意思| 湿疹是什么病的前兆| 为什么会打雷| 二进宫是什么意思| 百利甜酒兑什么最好喝| 百度Pojdi na vsebino

别克的环保英雄梦贵不贵?别克Velite 5 正式上市

Iz Wikipedije, proste enciklopedije
Documentation icon Dokumentacija modula[predogled] [uredi] [zgodovina] [osve?i]
百度 虽然北上资金在今年1月份累计净流入约351亿元,但随着1月29日全球多个成熟市场进入调整期,北上资金也从净流入转为净流出,且2月上旬资金累计净流出约112亿元。


This is a meta-module that provides various functions for making hatnotes. It implements the {{hatnote}} template, for use in hatnotes at the top of pages, and the {{format link}} template, which is used to format a wikilink for use in hatnotes. It also contains a number of helper functions for use in other Lua hatnote modules.

Use from wikitext

[uredi kodo]

The functions in this module cannot be used directly from #invoke, and must be used through templates instead. Please see Template:Hatnote and Template:Format link for documentation.

Use from other Lua modules

[uredi kodo]

To load this module from another Lua module, use the following code.

local mHatnote = require('Module:Hatnote')

You can then use the functions as documented below.

Hatnote

[uredi kodo]
mHatnote._hatnote(s, options)

Formats the string s as a hatnote. This encloses s in the tags <div class="hatnote">...</div>. Options are provided in the options table. Options include:

  • options.extraclasses - a string of extra classes to provide
  • options.selfref - if this is not nil or false, adds the class "selfref", used to denote self-references to Wikipedia (see Template:Selfref))

The CSS of the hatnote class is defined in MediaWiki:Common.css.

Example 1
mHatnote._hatnote('This is a hatnote.')

Produces: <div class="hatnote">This is a hatnote.</div>

Displays as:

Example 2
mHatnote._hatnote('This is a hatnote.', {extraclasses = 'boilerplate seealso', selfref = true})

Produces: <div class="hatnote boilerplate seealso selfref">This is a hatnote.</div>

Displayed as:

[uredi kodo]
mHatnote._formatLink(link, display)

Formats link as a wikilink for display in hatnote templates, with optional display value display. Categories and files are automatically escaped with the colon trick, and links to sections are automatically formatted as page § section, rather than the MediaWiki default of page#section.

Examples
mHatnote._formatLink('Lion') → [[Lion]] → Lion
mHatnote._formatLink('Lion#Etymology') → [[Lion#Etymology|Lion § Etymology]] → Lion § Etymology
mHatnote._formatLink('Kategorija:Ma?ke') → [[:Kategorija:Ma?ke]] → Kategorija:Ma?ke
mHatnote._formatLink('Lion#Etymology', 'Etymology of lion') → [[Lion#Etymology|Etymology of lion]] → Etymology of lion

Format pages

[uredi kodo]
mHatnote.formatPages(...)

Formats a list of pages using the _formatLink function, and returns the result as an array. For example, the code mHatnote.formatPages('Lion', 'Category:Lions', 'Lion#Etymology') would produce an array like {'[[Lion]]', '[[:Category:Lions]]', '[[Lion#Etymology|Lion § Etymology]]'}.

Format page tables

[uredi kodo]
mHatnote.formatPageTables(...)

Takes a list of page/display tables, formats them with the _formatLink function, and returns the result as an array. Each item in the list must be a table. The first value in the table is the link, and is required. The second value in the table is the display value, and is optional. For example, the code mHatnote.formatPages({'Lion', 'the Lion article'}, {'Category:Lions'}, {'Lion#Etymology', 'the etymology of lion'}) would produce an array like {'[[Lion|the Lion article]]', '[[:Category:Lions]]', '[[Lion#Etymology|the etymology of lion]]'}.

Find namespace id

[uredi kodo]
mHatnote.findNamespaceId(link, removeColon)

Finds the namespace id of the string link, which should be a valid page name, with or without the section name. This function will not work if the page name is enclosed with square brackets. When trying to parse the namespace name, colons are removed from the start of the link by default. This is helpful if users have specified colons when they are not strictly necessary. If you do not need to check for initial colons, set removeColon to false.

Examples
mHatnote.findNamespaceId('Lion') → 0
mHatnote.findNamespaceId('Category:Lions') → 14
mHatnote.findNamespaceId(':Category:Lions') → 14
mHatnote.findNamespaceId(':Category:Lions', false) → 0 (the namespace is detected as ":Category", rather than "Category")

Make wikitext error

[uredi kodo]
mHatnote.makeWikitextError(msg, helpLink, addTrackingCategory)

Formats the string msg as a red wikitext error message, with optional link to a help page helpLink. Normally this function also adds Kategorija:Hatnote templates with errors (0); however, if addTrackingCategory is not false after being passed through Module:Yesno, then the category is suppressed. This means that the category can be suppressed with addTrackingCategory values including "no", "n", 0, "false", and false.

Examples:

mHatnote.makeWikitextError('an error has occurred')Error: an error has occurred.
mHatnote.makeWikitextError('an error has occurred', 'Template:Example#Errors')Error: an error has occurred (help).

Examples

[uredi kodo]

For examples of how this module is used in other Lua modules, see the following (listed in order of complexity):

--------------------------------------------------------------------------------
--                              Module:Hatnote                                --
--                                                                            --
-- This module produces hatnote links and links to related articles. It       --
-- implements the {{hatnote}} and {{format link}} meta-templates and includes --
-- helper functions for other Lua hatnote modules.                            --
--------------------------------------------------------------------------------

local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg
local mArguments -- lazily initialise [[Modul:Arguments]]
local yesno -- lazily initialise [[Modul:Yesno]]
local formatLink -- lazily initialise [[Modul:Format link]] ._formatLink

local p = {}

--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------

local function getArgs(frame)
	-- Fetches the arguments from the parent frame. Whitespace is trimmed and
	-- blanks are removed.
	mArguments = require('Modul:Arguments')
	return mArguments.getArgs(frame, {parentOnly = true})
end

local function removeInitialColon(s)
	-- Removes the initial colon from a string, if present.
	return s:match('^:?(.*)')
end

function p.defaultClasses(inline)
	-- Provides the default hatnote classes as a space-separated string; useful
	-- for hatnote-manipulation modules like [[Module:Hatnote group]].
	return
		(inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' ..
		'navigation-not-searchable'
end

function p.disambiguate(page, disambiguator)
	-- Formats a page title with a disambiguation parenthetical,
	-- i.e. "Example" → "Example (razlo?itev)".
	checkType('disambiguate', 1, page, 'string')
	checkType('disambiguate', 2, disambiguator, 'string', true)
	disambiguator = disambiguator or 'razlo?itev'
	return mw.ustring.format('%s (%s)', page, disambiguator)
end

function p.findNamespaceId(link, removeColon)
	-- Finds the namespace id (namespace number) of a link or a pagename. This
	-- function will not work if the link is enclosed in double brackets. Colons
	-- are trimmed from the start of the link by default. To skip colon
	-- trimming, set the removeColon parameter to false.
	checkType('findNamespaceId', 1, link, 'string')
	checkType('findNamespaceId', 2, removeColon, 'boolean', true)
	if removeColon ~= false then
		link = removeInitialColon(link)
	end
	local namespace = link:match('^(.-):')
	if namespace then
		local nsTable = mw.site.namespaces[namespace]
		if nsTable then
			return nsTable.id
		end
	end
	return 0
end

function p.makeWikitextError(msg, helpLink, addTrackingCategory, title)
	-- Formats an error message to be returned to wikitext. If
	-- addTrackingCategory is not false after being returned from
	-- [[Module:Yesno]], and if we are not on a talk page, a tracking category
	-- is added.
	checkType('makeWikitextError', 1, msg, 'string')
	checkType('makeWikitextError', 2, helpLink, 'string', true)
	yesno = require('Module:Yesno')
	title = title or mw.title.getCurrentTitle()
	-- Make the help link text.
	local helpText
	if helpLink then
		helpText = ' ([[' .. helpLink .. '|pomo?]])'
	else
		helpText = ''
	end
	-- Make the category text.
	local category
	if not title.isTalkPage -- Don't categorise talk pages
		and title.namespace ~= 2 -- Don't categorise userspace
		and yesno(addTrackingCategory) ~= false -- Allow opting out
	then
		category = 'Hatnote predloge z napakami'
		category = mw.ustring.format(
			'[[%s:%s]]',
			mw.site.namespaces[14].name,
			category
		)
	else
		category = ''
	end
	return mw.ustring.format(
		'<strong class="error">Napaka: %s%s.</strong>%s',
		msg,
		helpText,
		category
	)
end

local curNs = mw.title.getCurrentTitle().namespace
p.missingTargetCat =
	--Default missing target category, exported for use in related modules
	((curNs ==  0) or (curNs == 14)) and
	'?lanki s hatnote predlogami, ki vodijo do neobstoje?e strani' or nil

function p.quote(title)
	--Wraps titles in quotation marks. If the title starts/ends with a quotation
	--mark, kerns that side as with {{-'}}
	local quotationMarks = {
		["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true
	}
	local quoteLeft, quoteRight = -- Test if start/end are quotation marks
		quotationMarks[string.sub(title,  1,  1)],
		quotationMarks[string.sub(title, -1, -1)]
	if quoteLeft or quoteRight then
		title = mw.html.create("span"):wikitext(title)
	end
	if quoteLeft  then title:css("padding-left",  "0.15em") end
	if quoteRight then title:css("padding-right", "0.15em") end
	return '?' .. tostring(title) .. '?'
end

--------------------------------------------------------------------------------
-- Hatnote
--
-- Produces standard hatnote text. Implements the {{hatnote}} template.
--------------------------------------------------------------------------------

function p.hatnote(frame)
	local args = getArgs(frame)
	local s = args[1]
	if not s then
		return p.makeWikitextError(
			'no text specified',
			'Predloga:Hatnote#Errors',
			args.category
		)
	end
	return p._hatnote(s, {
		extraclasses = args.extraclasses,
		selfref = args.selfref
	})
end

function p._hatnote(s, options)
	checkType('_hatnote', 1, s, 'string')
	checkType('_hatnote', 2, options, 'table', true)
	options = options or {}
	local inline = options.inline
	local hatnote = mw.html.create(inline == 1 and 'span' or 'div')
	local extraclasses
	if type(options.extraclasses) == 'string' then
		extraclasses = options.extraclasses
	end

	hatnote
		:attr('role', 'note')
		:addClass(p.defaultClasses(inline))
		:addClass(extraclasses)
		:addClass(options.selfref and 'selfref' or nil)
		:wikitext(s)

	return mw.getCurrentFrame():extensionTag{
		name = 'templatestyles', args = { src = 'Modul:Hatnote/styles.css' }
	} .. tostring(hatnote)
end

return p
蓝莓是什么颜色 低血压什么症状 酸汤鱼用什么鱼 肝内低密度影是什么意思 初中学历可以考什么证
虬是什么动物 沈腾和马丽是什么关系 天天做梦是什么原因 水仙是什么茶 手指经常抽筋是什么原因
宫颈筛查是什么意思 刚需是什么意思 疳积是什么病 什么是干槽症 雍正为什么不杀十阿哥
为什么乳头会有白色分泌物 19点是什么时辰 前额白发是什么原因 为什么会长生长纹 野生甲鱼吃什么
早上起床牙龈出血是什么原因hcv8jop9ns7r.cn 微创人流和无痛人流有什么区别hcv9jop7ns1r.cn 青字五行属什么hcv9jop5ns7r.cn 短装是什么意思hcv8jop1ns2r.cn 歆五行属什么travellingsim.com
什么人容易得小脑萎缩hcv7jop9ns1r.cn 尿道炎吃什么药好hcv8jop6ns1r.cn spa什么意思hcv8jop3ns6r.cn 关节响是什么原因hcv8jop0ns0r.cn 吃什么降血压hcv8jop8ns7r.cn
感冒吃什么好的快hcv8jop1ns0r.cn 心脏早搏什么意思hcv8jop3ns2r.cn 脚底发凉是什么原因hcv8jop7ns5r.cn 牒是什么意思liaochangning.com 乘务长是干什么的wuhaiwuya.com
木灵念什么hcv9jop4ns5r.cn 晚上磨牙是什么原因hcv7jop7ns2r.cn 安徽简称什么hcv9jop4ns0r.cn 一个月一个元念什么hcv8jop1ns1r.cn 阅兵什么意思hcv9jop3ns4r.cn
百度