Бюрократы, Администраторы интерфейса, Администраторы (Semantic MediaWiki), Кураторы (Semantic MediaWiki), Editors (Semantic MediaWiki), Скрывающие, Администраторы, trusted
69 392
правки
(Новая страница: «local common = {} -- common functions package for common usage through Teopedia Library pages -- Return TRUE if string is empty or not defined (null). local func...») |
мНет описания правки |
||
Строка 10: | Строка 10: | ||
-- ID example: 1-017 | -- ID example: 1-017 | ||
-- Call examples: {{#invoke: Common | page_id | volume=1 | page=17 }} | -- Call examples: {{#invoke: Common | page_id | volume=1 | page=17 }} | ||
-- {{#invoke: Common | page_id | volume=1 | page=17 | -- {{#invoke: Common | page_id | volume=1 | page=17 | ||
-- | volume_digits=2 | page_digits=4 | -- | volume_digits=2 | page_digits=4 | ||
-- | page_number_type=roman | -- | page_number_type=roman | ||
-- }} | -- }} | ||
-- By default volume has 1 digit, page has 3 digits and page number in arabic | -- By default volume has 1 digit, page has 3 digits and page number in arabic | ||
Строка 23: | Строка 23: | ||
if not isempty(frame.args['volume_digits']) then | if not isempty(frame.args['volume_digits']) then | ||
local digitFormat = '%.'.. frame.args['volume_digits'] ..'d' | local digitFormat = '%.'.. frame.args['volume_digits'] ..'d' | ||
vNum = string.format(digitFormat, frame.args[' | vNum = string.format(digitFormat, frame.args['volume']) | ||
end | end | ||
if not isempty(frame.args['page_digits']) then | if not isempty(frame.args['page_digits']) then | ||
local digitFormat = '%.'.. frame.args['page_digits'] ..'d' | local digitFormat = '%.'.. frame.args['page_digits'] ..'d' | ||
pNum = string.format(digitFormat, frame.args[' | pNum = string.format(digitFormat, frame.args['page']) | ||
end | end | ||