Module:Volume

-- module to form Marvel Database:Volume Template local p = {} local list_of_series = mw.loadData( 'Module:Volume/Series' ) local h = require("Module:HF") local standart = require("Module:StandardizedName") local m_date = require("Module:Date") local design = require("Module:Design") local getArgs = require('Module:Arguments').getArgs

function p.main(frame) local args = getArgs (frame) local pagename = args['category'] or mw.title.getCurrentTitle.text local previous_volume = args['PreviousVol'] local next_volume = args['NextVol'] local relaunches = {} local issue_list = args['IssueList'] or '' local publisher = p.lua_get_publisher(args['publisher']) local name_info = standart.lua_get_title_volume_issue(pagename, 'Vol') local volume_type local volume_type_category local volume_format local volume_format_category local volume_status local volume_status_category local genres local genres_categories local main_volume local main_volume_category local list_of_canceled_issues local categories = {} local category = '' local dpl_string = '' local list = {} local first_by_date local last_by_date local next_issue local top_message = '' local total_issues = 0 local number_of_canceled_issues = 0 local display_title = pagename local images_category = pagename..'/Images' local output = {}

-- create list of all issues from category with DPL dpl_string = frame:preprocess( p.lua_dpl_list(pagename, _, false)..p.lua_dpl_list(pagename, 500, false) ) list_of_canceled_issues = mw.text.split( frame:preprocess(''), '@@@' ) list = p.lua_transform_dpl_string_into_list(dpl_string, args['exclude'], list_of_canceled_issues) -- add gallery of issues if h.isempty(issue_list) then issue_list = p.lua_create_issue_list(list, args) end -- add top message first_by_date, last_by_date, next_issue = p.lua_get_first_and_last_by_date(list) volume_type, volume_type_category = p.lua_get_volume_type(args['type']) volume_format, volume_format_category = p.lua_get_volume_format(args['format'], #list, last_by_date, pagename) volume_status, volume_status_category = p.lua_get_volume_status(args['status'], first_by_date, last_by_date) relaunches = p.lua_get_relaunches(list, args['relaunches']) genres, genres_categories = p.lua_get_genres(args['genres']) number_of_canceled_issues = p.lua_get_number_of_canceled_issues(list) total_issues = p.lua_get_number_of_issues(#list, number_of_canceled_issues) previous_volume, next_volume = p.lua_get_previous_and_next_volume(name_info, previous_volume, next_volume) main_volume, main_volume_category = p.lua_get_main_volume(args['main_volume'], volume_format) top_message = p.lua_top_message(pagename, first_by_date, last_by_date, next_issue, genres, main_volume,                                   volume_format, volume_status, volume_type, total_issues, relaunches, publisher,                                    previous_volume, next_volume, args)

-- add categories if h.lua_isexists('Category:'..pagename) == false and h.lua_PagesInCategory(pagename, 'pages') > 0 then table.insert(categories, 'Volume Category Needed') end if h.lua_isexists('Category:'..images_category) == false and h.lua_PagesInCategory(images_category, 'files') > 0 then table.insert(categories, 'Volume Images Category Needed') end --if h.isempty(args['type']) --   then table.insert(categories, 'Volume Type Needed') --end if h.isempty(args['genres']) then table.insert(categories, 'Volume Genre Needed') end --if h.isempty(args['featured']) --   then table.insert(categories, 'Volume Featured Needed') --end if h.isempty(args['volume_logo']) then table.insert(categories, 'Volume Logo Needed') end if h.isempty(args['format']) then table.insert(categories, 'Volume Format Needed') end table.insert(categories, 'Volumes') table.insert(categories, p.lua_volume_by_title(name_info.sortname.title) ) table.insert(categories, publisher) table.insert(categories, volume_format_category) categories = h.lua_concatTables(categories, main_volume_category) table.insert(categories, volume_type_category) table.insert(categories, volume_status_category) categories = h.lua_concatTables(categories, genres_categories) table.insert(categories, p.lua_volumes_by_number_of_issues(total_issues, canceled) ) table.insert(categories, p.lua_volume_debut(first_by_date, volume_status)) if relaunches ~= '' then table.insert(categories, 'Relaunched Volumes') end table.insert(categories, p.lua_volume_end(last_by_date, volume_status)) if not h.isempty(args['IssueList']) or         not h.isempty(args['VolumeLogo']) or        not h.isempty(args['Featured']) then table.insert(categories, 'Outdated Fields') end categories = h.lua_concatTables( categories, p.lua_get_comic_series(pagename, args['featured']) ) categories = h.lua_create_list_of_categories(categories, name_info.sortname.noissue)

-- add everything to page running_years = p.lua_get_running_years(first_by_date, last_by_date, volume_status, volume_format) display_title = '' table.insert(output, display_title) table.insert(output, top_message) table.insert(output, issue_list) table.insert(output, design.lua_add_section(args['SeeAlso'], 'See Also') ) table.insert(output, design.lua_add_section(args['Notes'], 'Notes') ) table.insert(output, ' ') table.insert(output, ' ')

return design.messagebox( { table.concat(output), padding = '10px' } ) end

function p.lua_get_number_of_pages_in_subcategory(pagename, subcategory, page_type, link_name) local category = pagename..'/'..subcategory local category_counter = h.lua_PagesInCategory(category, page_type) local output = nil if category_counter > 0 then if category_counter == 1 then output = ' '..link_name else output = ' '..link_name..'s'               end output = h.lua_link_to_category(category, category_counter..output) end return output end

function p.lua_get_volume_status(volume_status, first_by_date, last_by_date) local s = '' local first = first_by_date.sort_date local last = last_by_date.sort_date local current_date = tonumber( m_date.lua_date_converter('now', 'Ym') ) local date_of_last_solicit = tonumber( m_date.lua_date_converter('now + 4 months', 'Ym') ) -- +4 months because pages for new comics normally created shortly after publication of solicitations -- solicitations appear 2 months before the release date -- publication is 2 months after release local output = '' local category = ''

if not h.isempty(volume_status) then s = string.lower(volume_status) if s == 'active' then output = 'Active' category = 'Active Volumes' elseif s == 'finished' then output = 'Finished' category = 'Finished Volumes' elseif s == 'canceled' then output = 'Canceled' category = 'Canceled Volumes' else output = volume_status end elseif first >= current_date and first_by_date.released == false then output = 'Announced' category = 'Announced Volumes' elseif last < 999901 and ( (last_by_date.release_date ~= '' and not last_by_date.released) or not last_by_date.published ) --last >= date_of_last_solicit then output = 'Active' category = 'Active Volumes' elseif first_by_date.canceled then output = 'Canceled' category = 'Canceled Volumes' else output = 'Finished' category = 'Finished Volumes' end return output, category end

function p.lua_get_volume_format(volume_format, total_issues, last_by_date, pagename) local s = '' local last = last_by_date.sort_date local current_date = tonumber( m_date.lua_date_converter('now + 5 months', 'Ym') ) local output = '' local category = '' total_issues = tonumber(total_issues) if not h.isempty(volume_format) then s = string.lower(volume_format) if s == 'limited' or s == 'limited series' then output = 'Limited Series' category = output elseif s == 'one shot' or s == 'one-shot' then output = 'One Shot' category = 'One Shots' elseif s == 'ongoing' or s == 'ongoing series' then output = 'Ongoing Series' elseif s == 'reprint' then output = 'Reprint Series' category = 'Reprint Series' elseif s == 'annual' then if total_issues == 1 and last < 999901 and last < current_date then output = 'Annual' else output = 'Annual Series' end category = 'Annuals' elseif s == 'handbook' then if total_issues == 1 and last < 999901 and last < current_date then output = 'Handbook' else output = 'Handbook Series' end category = 'Handbooks' elseif s == 'tpb' or s == 'hc' then output = 'TPB Edition' category = 'Trade Paperbacks' else output = volume_format end elseif total_issues == 1 and last < 999901 and last < current_date then output = 'One Shot' category = 'One Shots' elseif total_issues <= 5 and last < 999901 and last < current_date then output = 'Limited Series' category = output else output = 'Ongoing Series' end -- the following variants override any previous value -- check if Annual if string.find(pagename, 'Annual', 1, true) ~= nil then if output == 'One Shot' then output = 'Annual' else output = 'Annual Series' end category = 'Annuals' end -- check if Handbook if string.find(pagename, 'Handbook', 1, true) ~= nil or      string.find(pagename, 'OHOTMU', 1, true) ~= nil or       string.find(pagename, 'OHOTUMU', 1, true) ~= nil then if output == 'One Shot' then output = 'Handbook' else output = 'Handbook Series' end category = 'Handbooks' end -- check if TPB if string.find(pagename, ' TPB ', 1, true) ~= nil or      string.find(pagename, ' HC ', 1, true) ~= nil then output = 'TPB Edition' category = 'Trade Paperbacks' end

return output, category end

function p.lua_get_volume_type(volume_type) local s   local category = '' local output = '' if not h.isempty(volume_type) then s = string.lower(volume_type) if s == 'solo' then category = 'Solo Volumes' output = 'Solo' elseif s == 'team' then category = 'Team Volumes' output = 'Team' elseif s == 'team-up' or s == 'team up' then category = 'Team-Up Volumes' output = 'Team-Up' elseif s == 'event' then output = 'Event' category = 'Event Volumes' elseif s == 'adaptation' then output = 'Adaptation' category = 'Adaptation Volumes' else output = volume_type end end return output, category end

function p.lua_get_main_volume(main_volume, volume_format) local categories = {} local output = '' if not h.isempty(main_volume) then output = p.lua_divide_list(main_volume) for i = 1,#output do               if volume_format == 'TPB Edition' then table.insert(categories, output[i]..'/TPB') elseif string.find(volume_format, 'Annual') ~= nil then table.insert(categories, output[i]..'/Annuals') else table.insert(categories, output[i]..'/Specials') end output[i] = h.Link(output[i]) end output = mw.text.listToText(output) end return output, categories end

function p.lua_divide_list(list, return_links) local link = '' local text = '' local s   local i    local output = {}

if not h.isempty(list) then if string.find(list, ';', 1, true) ~= nil then list = mw.text.split(list, ';') for i = 1,#list do                       s = mw.text.trim(list[i]) if return_links then link = h.lua_breaklink(s, 1) text = h.lua_breaklink(s, 2) s = h.Link(link, text) end table.insert(output, s)                   end elseif not h.lua_isLink(list) and h.lua_isexists(list) then list = mw.text.trim(list) if return_links then s = h.Link(list, list) else s = list end table.insert(output, s)                   else table.insert(output, mw.text.trim(list)) end end return output end

function p.lua_create_issue_list(list, args) local parts = {} local above = {} local below = {} local i   local j    local k    local s = {} local output = {} for i = 1,9 do       s = args['part'..i]        if not h.isempty(s) then table.insert(parts, tonumber(standart.lua_padded_issue(s))) end table.insert(above, args['part'..i..'_above'] or '') table.insert(below, args['part'..i..'_below'] or '') end if h.isempty(parts) then output = { p.lua_create_gallery(list, above[1], below[1]) } else if parts[#parts] < tonumber(list[#list].padded_issue) then table.insert(parts, tonumber(list[#list].padded_issue) ) end k = 1 for i = 1,#parts do               s = {} for j = k,#list do                   if tonumber(list[j].padded_issue) <= parts[i] then table.insert(s, list[j]) else k = j                           break end end table.insert(output, p.lua_create_gallery(s, above[i], below[i]) ) end end return table.concat(output) end

function p.lua_create_gallery(list, above, below) local s   local output = {} above = above or '' below = below or ''

for i = 1,#list do       s = p.lua_link_dates_storytitle(list[i]) table.insert(output, '\n'..list[i].image..'|'..s)   end output = table.concat(output) output = '' return above..output..below end

function p.lua_transform_dpl_string_into_list(dpl_string, exclude, list_of_canceled_issues) local list = {} local issue_info = {} local image = '' local storytitle = '' local release_date = '' local pagename = '' local canceled = false local sort_date = '' local month local year local link local s = '' local output = {} if not h.isempty(dpl_string) and dpl_string ~= 'no_resultsno_results' then dpl_string = string.gsub(dpl_string, 'no_results', '') list = mw.text.split(dpl_string, '@@@', true) if not h.isempty(exclude) then exclude = mw.text.split(exclude, ";", true) else exclude = nil end for i = 1, #list do               if not h.isempty(list[i]) then s = mw.text.split(list[i], '~', true) pagename = s[1] if exclude ~= nil and exclude[pagename] ~= nil then s = '' else canceled = h.inlist(list_of_canceled_issues, pagename) issue_info = standart.lua_get_title_volume_issue(pagename) year = s[2] month = m_date.get_month_name({s[3]}) or '' image = p.lua_cover(s[4], issue_info) if not h.isempty(s[5]) then release_date = m_date.lua_date_converter(s[5], 'F j, Y') else release_date = '' end storytitle = s[6] if h.isempty(year) then year = '' end link = m_date.lua_get_publication_category(year, month) sort_date = p.lua_get_sort_date(year, month) s ={['pagename'] = pagename, ['image'] = image, ['storytitle'] = storytitle, ['year'] = year, ['month'] = month, ['release_date'] = release_date, ['link'] = link, ['padded_issue'] = issue_info.padded_issue, ['canceled'] = canceled, ['sort_date'] = sort_date, }                               table.insert(output, s)                        end end end table.sort(output, p.lua_sort_by_issue) end return output end

function p.lua_dpl_list(pagename, offset) local template = '{Marvel Database:Comic Template}' local image = template..':Image, ' local year = template..':Year, ' local month = template..':Month, ' local release_date = template..':ReleaseDate, ' local story_title = template..':StoryTitle1' local secseparators = '%PAGE%~,~,,~,,~,,~,,@@@' local output = {}

table.insert(output, '')

return table.concat(output) end

function p.lua_sort_by_issue(a, b)   local issue1 = a.padded_issue local issue2 = b.padded_issue local output if h.isempty(issue1) or h.isempty(issue2) then output = false else if tonumber(issue1) ~= nil then if tonumber(issue2) ~= nil then output = tonumber(issue1) < tonumber(issue2) else output = true end elseif tonumber(issue2) ~= nil then output = false else output = issue1 < issue2 end end

return output end

function p.lua_sort_by_date(a, b)   if a.sort_date == b.sort_date then return p.lua_sort_by_issue(a, b)       else return a.sort_date < b.sort_date end end

function p.lua_get_sort_date(year, month) if h.isempty(year) then year = '9999' end month = m_date.get_month_number({month}) or '01'

return tonumber(year..month) end

function p.lua_get_first_and_last_by_date(list) local function is_released(release_date) local year local output = true if release_date ~= '' then year = string.match(release_date, '%d%d%d%d') if tonumber(year) >= 2020 then output = m_date.lua_date_comparison(release_date) end end return output end local list_sorted_by_date = {} local first_by_date local last_by_date = '' local next_issue = '' local j   local release_date local released local published local info if not h.isempty(list) then list_sorted_by_date = mw.clone(list) table.sort(list_sorted_by_date, p.lua_sort_by_date) first_by_date = list_sorted_by_date[1] info = m_date.lua_get_publication_date_info(first_by_date.year, first_by_date.month) if tonumber(info.year) >= 2020 then published = m_date.lua_date_comparison(info.month..' 1,'..info.year) else published = true end first_by_date.published = published first_by_date.released = is_released(first_by_date.release_date)

if #list_sorted_by_date == 1 then last_by_date = first_by_date else for i = #list_sorted_by_date,1,-1 do                       if list_sorted_by_date[i].sort_date < 999901 and not list_sorted_by_date[i].canceled then last_by_date = list_sorted_by_date[i] j = i                               break end end if last_by_date == '' then last_by_date = first_by_date else info = m_date.lua_get_publication_date_info(last_by_date.year, last_by_date.month) if tonumber(info.year) >= 2020 then published = m_date.lua_date_comparison(info.month..' 1,'..info.year) else published = true end last_by_date.published = published last_by_date.released = is_released(last_by_date.release_date) end if not last_by_date.released and not last_by_date.published then for i = j, 1, -1 do                               release_date = list_sorted_by_date[i].release_date if release_date ~= '' then released = is_released(release_date) if released == true then next_issue = list_sorted_by_date[i+1] end else info = m_date.lua_get_publication_date_info(last_by_date.year, last_by_date.month) if tonumber(info.year) >= 2020 then published = m_date.lua_date_comparison(info.month..' 1,'..info.year) else published = true end if published == true then next_issue = list_sorted_by_date[i+1] end end if next_issue ~= '' then break end end end end end return first_by_date, last_by_date, next_issue end

function p.lua_get_running_years(first_by_date, last_by_date, volume_status, volume_format) local first_year = first_by_date.year local last_year = last_by_date.year local output = '' if first_year ~=  and last_year ~=  then if volume_status == 'Canceled' then output = volume_status elseif volume_format == 'One Shot' then output = first_year elseif volume_status == 'Active' then output = first_year..'–...' elseif first_year == last_year then output = first_year else output = first_year..'–'..last_year end output = tostring( mw.html.create('span')               :css('font-size', '80%')                :css('font-style', 'italic')                :css('font-family', 'monospace')                :wikitext(' ('..output..')')             ) end return output end

-- checks if volume title is in list of known comics books series (for example, "Wolverine Comics Books", "Spider-Man Comics Books", etc.) function p.lua_get_comic_series(pagename, featured) local series local title local names = {} local link = '' local text = '' local output = {}

--table.insert(names, pagename) if not h.isempty(featured) then featured = p.lua_divide_list(featured) for i = 1,#featured do               if not h.isempty(featured[i]) then link = string.gsub(h.lua_breaklink(featured[i], 1), ' %(.-%)', '') text = string.gsub(h.lua_breaklink(featured[i], 2), ' %(.-%)', '') table.insert(names, link) --table.insert(names, text) end end end --series = list_of_series[pagename] --if series == nil --then for title, series in pairs(list_of_series) do               for i = 1, #names do                    if string.lower(names[i]) == string.lower(title) then table.insert(output, series..' Comic Books') end end end --end table.sort(output)

return output end

-- return "image", if not empty, otherwise check if main cover or textless cover exists, if not, then return 'No Image Cover.jpg' function p.lua_cover(image, issue_info) local cover = '' local textless = '' local output = ''

if not h.isempty(image) then output = string.gsub(image, '%+', '%%2B') else cover = issue_info.filename.all textless = cover..' Textless.jpg' cover = cover..'.jpg' if h.lua_isexists('File:'..cover) then output = cover elseif h.lua_isexists('File:'..textless) then output = textless else output = 'No Image Cover.jpg' end end return output end

function p.lua_storytitle(storytitle) local output = '' local tag = mw.html.create( 'span' ) :css( 'color', 'grey' ) :css( 'font-style', 'italic' ) if not h.isempty(storytitle) then storytitle = string.gsub(storytitle, '"', '')           output = ' '..tostring( tag:wikitext( '"'..storytitle..'"' ):done )    end

return output end

function p.lua_link(pagename) local output = '' local tag = mw.html.create( 'span' ) :css( 'font-weight', 'bold' ) if not h.isempty(pagename) then output = tag:wikitext( standart.lua_standardized_link(pagename, 'Comics') ):done output = tostring(output) end return output end

function p.lua_volume_debut(first_by_date, volume_status) local month = first_by_date.month local year = first_by_date.year local output = '' if volume_status ~= 'Canceled' then if year ~= '' then if month ~= '' then output = month..' '..year..' Volume Debut' else output = year..' Volume Debuts' end end end return output end

function p.lua_volume_end(last_by_date, volume_status) local month = last_by_date.month local year = last_by_date.year local output = '' if volume_status == 'Finished' then if year ~= '' then if month ~= '' then output = month..' '..year..' Volume End' else output = year..' Volume Ends' end end end return output end

function p.lua_link_dates_storytitle(issue_info) local publication_date = issue_info.link local release_date = issue_info.release_date local dates = '' local link = p.lua_link(issue_info.pagename) local storytitle = p.lua_storytitle(issue_info.storytitle) local s1   local s2    local output

if not h.isempty(publication_date) then publication_date = ' '..design.lua_span('Cover date: ').bold..publication_date else publication_date = '' end if release_date ~= '' then release_date = m_date.lua_get_link_to_release_week(release_date) release_date = ' '..design.lua_span('Release date: ').bold..release_date else release_date = '' end

if issue_info.canceled then dates = ' Canceled' else dates = release_date..publication_date end

output = storytitle..dates

if output ~= '' then output = tostring(mw.html.create('span')                       :css('font-size', '80%')                        :css('font-family', 'monospace')                        :wikitext(output)                        :done                    ) end

output = ' '..tostring(mw.html.create('div')                       :css('line-height', '90%')                        :wikitext(link..output)                        :done                    )..' '

return output end

- -- for Template:Volumes by Number of Issues function p.volumes_by_number_of_issues_category(frame) local pagename = mw.title.getCurrentTitle.text local previous_arrow = ' ' local next_arrow = ' ' local previous_category = '' local next_category = '' local first local last local category = '' local output = '' if pagename == 'One Shots' then category = h.lua_add_category('Volumes by Number of Issues', '001') previous_category = '' next_category = h.lua_link_to_category('Volumes With 2 to 9 Issues', '002-009') output = 'One Shots' elseif string.find(pagename, 'Volumes With') ~= nil then first, last = string.match(pagename, 'Volumes With (%d+) to (%d+) Issues') last = string.rep('0', 3-#tostring(last))..last if #first == 1 then first = '00'..first previous_category = 'One Shots' next_category = 'Volumes With 10 to 19 Issues' previous_category = h.lua_link_to_category(previous_category, 'One Shots') next_category = h.lua_link_to_category(next_category, '010-019') elseif pagename == 'Volumes With 10 to 19 Issues' then previous_category = 'Volumes With 2 to 9 Issues' next_category = 'Volumes With 20 to 29 Issues' previous_category = h.lua_link_to_category(previous_category, '002-009') next_category = h.lua_link_to_category(next_category, '020-029') first = '010' elseif first == '90' then previous_category = 'Volumes With 80 to 89 Issues' next_category = 'Volumes With 100 to 149 Issues' previous_category = h.lua_link_to_category(previous_category, '080-089') next_category = h.lua_link_to_category(next_category, '100-149') first = '090' elseif #first == 2 then first = tonumber(first) previous_category = 'Volumes With ' .. first-10 .. ' to ' .. first-1 .. ' Issues' next_category = 'Volumes With ' .. first+10 .. ' to ' .. first+19 .. ' Issues' previous_category = h.lua_link_to_category(previous_category, string.rep('0', 3-#tostring(first-10))..first-10 ..'-'.. string.rep('0', 3-#tostring(first-1))..first-1) next_category = h.lua_link_to_category(next_category, string.rep('0', 3-#tostring(first+10))..first+10 ..'-'.. string.rep('0', 3-#tostring(first+19))..first+19 ) first = '0'..first elseif first == '100' then previous_category = 'Volumes With 90 to 99 Issues' next_category = 'Volumes With 150 to 199 Issues' previous_category = h.lua_link_to_category(previous_category, '090-099') next_category = h.lua_link_to_category(next_category, '150-199') else first = tonumber(first) previous_category = 'Volumes With ' .. first-50 .. ' to ' .. first-1 .. ' Issues' next_category = 'Volumes With ' .. first+50 .. ' to ' .. first+99 .. ' Issues' previous_category = h.lua_link_to_category(previous_category, first-50 ..'-'.. first-1) next_category = h.lua_link_to_category(next_category, first+50 ..'-'.. first+99) end output = first..'-'..last category = h.lua_add_category('Volumes by Number of Issues', first) end output = tostring(mw.html.create('td')               :css('width', '40%')                :wikitext(output)                :done)

if previous_category ~= '' then previous_category = previous_arrow..previous_category end previous_category = tostring(mw.html.create('td')               :css('width', '30%')                :wikitext(previous_category)                :done) next_category = tostring(mw.html.create('td')               :css('width', '30%')                :wikitext(next_category..next_arrow)                :done)

output = tostring(mw.html.create('table')               :css('width', '100%')                :css('font-size', '18px')                :wikitext(previous_category..output..next_category)                :done) output = design.messagebox({output})..category return output end

- -- for Template:Volume Debut and Template:Volume End function p.volume_debut_or_end_category(frame) local pagename = mw.title.getCurrentTitle.text local s_type = '' local year local month local sort_name = pagename local message = 'A listing of all the comic volumes which ' local categories = {} local output = ''

if string.find(pagename, 'Debut') ~= nil then s_type = 'Debut' elseif string.find(pagename, 'End') ~= nil then s_type = 'End' end message = message..string.lower(s_type)..'ed in ' year = string.match(pagename, '(%d+) Volume '..s_type..'s')

if year ~= nil then table.insert(categories, 'Volume '..s_type..'s') table.insert(categories, year) output = message..h.lua_link_to_category(year)..'.' else month, year = string.match(pagename, '(.+) (%d+) Volume '..s_type) table.insert(categories, year..' Volume '..s_type..'s') table.insert(categories, year..', '..month) sort_name = ' '..m_date.get_month_number({month})..pagename output = message..h.lua_link_to_category(year..', '..month, month..', '..year)..'.' end output = design.messagebox({output}) categories = h.lua_create_list_of_categories(categories, sort_name)

return output..categories end

return p