Changes

Jump to navigation Jump to search
168 bytes added ,  12:20, 22 April 2021
no edit summary
Line 1: Line 1: −
* Library
+
local sb = {} -- functions package for HPB Scrapbooks
** mainpage|Main page
+
 
** Special:AllPages|All pages
+
function sb.item_id( frame )
** Special:Categories|All categories
+
local id = frame.args['volume'] .. '-' .. frame.args['page'] .. '-' .. frame.args['item']
** http://en.teopedia.org/w-lib/index.php?title=Special:CategoryTree&target=Service+categories&mode=all|Tree of pages
+
    return id
** helppage|help
+
end
* Popular
+
 
** Special:PopularPages|Pages
+
function sb.item_id2( frame )
** Special:MostLinkedCategories|Categories
+
local vNum = string.format("%.2d", frame.args['volume'])
** recentchanges-url|Recent
+
local iNum = string.format("%.2d", frame.args['item'])
** randompage-url|Random page
+
--print(vNum)
* TOOLBOX
+
local p_int, p_frac = math.modf(frame.args['page'])
* Links
+
local pNum = string.format("%.3d", p_int) 
** t-en-main:Theosophical sites|Sites
+
if p_frac > 0 then
** t-en-main:Theosophical forums|Forums
+
pNum = pNum .. '.' .. p_frac
** t-en-main:Internet shops|Shops
+
end
 +
 +
--local id = string.format("%.2d", frame.args['volume']) .. '-' .. pNum .. '-' .. iNum
 +
local id = vNum .. '--' .. pNum .. '--' .. iNum
 +
return id
 +
end
 +
 
 +
 
 +
return sb

Navigation menu