View source for Module:SB
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local sb = {} -- functions package for HPB Scrapbooks
function sb.item_id2( frame )
local id = frame.args['volume'] .. '-' .. frame.args['page'] .. '-' .. frame.args['item']
return id
end
local function isempty(s)
return s == nil or s == ''
end
-- Create unique ID for the item, which consist of: Volume-Page-Item_on_page
-- ID example: 01-017-03
-- Call example: {{#invoke: SB | item_id | volume=1 | page=17 | item=3 }}
-- Values: volume=1..99, page=1..999, item=1..99
function sb.item_id( frame )
local vNum = string.format("%.2d", frame.args['volume'])
local iNum = string.format("%.2d", frame.args['item'])
local p_int, p_frac = math.modf(frame.args['page'])
local pNum = string.format("%.3d", p_int)
000
1:0
Templates used on this page:
Return to Module:SB.