Jump to content

Module:Article history

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 02:58, 14 October 2014 (create a rough outline of the module structure). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

-------------------------------------------------------------------------------
--                            Article history
--
-- This module allows editors to link to all the significant events in an
-- article's history, such as good article nominations and featured article
-- nominations. It also displays its current status or statuses, as well as
-- other information such as the date it was featured on the main page.
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
-- Action class
-- Action objects deal with a single action in the history of the article.
-------------------------------------------------------------------------------

local Action = {}
Action.__index = Action

-------------------------------------------------------------------------------
-- ImageRow
-- ImageRow objects represent a row with its own image and blurb.
-------------------------------------------------------------------------------

local ImageRow = {}
ImageRow.__index = ImageRow

-------------------------------------------------------------------------------
-- Status class
-- Status objects deal with possible current statuses of the article. Articles
-- can have more than one current status; for example, an article can be both a
-- good article and a former featured article.
-------------------------------------------------------------------------------

local Status = {}
Status.__index = Status

-------------------------------------------------------------------------------
-- Notice class
-- Notice objects contain notices about an article that aren't time-dependent
-- and aren't part of its current status, e.g. the topic area of a good
-- article, or the date the article was featured on DYK.
-------------------------------------------------------------------------------

local Notice = {}
Notice.__index = Notice

-------------------------------------------------------------------------------
-- ArticleHistory class
-- This class represents the whole template.
-------------------------------------------------------------------------------

local ArticleHistory = {}
ArticleHistory.__index = ArticleHistory

-------------------------------------------------------------------------------
-- Exports
-- These functions are called from Lua and from wikitext.
-------------------------------------------------------------------------------

local p = {}

function p._main(args)
end

function p.main(frame)
	local args = require('Module:Arguments').getArgs(frame, {
		wrappers = 'Template:Article history'
	})
	return p._main(args)
end

function p._exportClasses()
	return {
		Action = Action,
		Status = Status,
		ArticleHistory = ArticleHistory
	}
end

return p