Module:Wikipedia ads/gallery

MyWikiBiz, Author Your Legacy — Sunday November 24, 2024
< Module:Wikipedia ads
Revision as of 08:00, 16 July 2021 by Zoran (talk | contribs) (Pywikibot 6.4.0)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This module creates a gallery of all Wikipedia ads. It is used through Template:Wikipedia ads/gallery.

Usage

{{Wikipedia ads/gallery}}



-- This module displays a gallery of all the Wikipedia ads, at full size.

local LIST_MODULE = 'Module:Wikipedia ads/list'
local ADS_MODULE = 'Module:Wikipedia ads'

local p = {}

function p.main()
	local ret = {}
	local list = require(LIST_MODULE)
	local mWikipediaAds = require(ADS_MODULE)
	for i, t in ipairs(list) do
		ret[#ret + 1] = mWikipediaAds._main{ad = t.id, margin = '20px auto'}
	end
	return table.concat(ret)
end

return p