You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Module:Titelweergave

Uit EverybodyWiki Bios & Wiki
Ga naar:navigatie, zoeken

Documentatie voor deze module kan aangemaakt worden op de volgende pagina: Module:Titelweergave/doc

-- Module for DISPLAYTITLE stuff
-- Note: the DISPLAYTITLE invocation cannot happen in Lua
local p = {}

-- Returns a new page title where the (sub)pagename without parenthesized
-- suffix is surrounded by double quotes ('').
-- i.e. "Sinterklaas (film)" results in "''Sinterklaas'' (film)"
-- i.e. "User:Zwarte Piet/Kladblok/Sinterklaas (film)" results in 
--      "User:Zwarte Piet/Kladblok/''Sinterklaas'' (film)"
function p.cursief(frame)
    -- Voor welke pagina?
    local title = frame.args.pagina or frame.args[1]
	if ( not title or title == "" ) then
		title = mw.title.getCurrentTitle()
	else
		title = mw.title.new(title)
	end

    local namespace = title.namespace
    local base = title.baseText
    local subpage = title.subpageText

    local subpagei = string.gsub(subpage, "^([^%(]*)( %(.*%))$", "''%1''%2")
    if subpage == subpagei then
    	subpagei = "''"..subpage.."''"
    end
    local pagename
    if base == subpage then
		pagename = subpagei
	else
		pagename = base.."/"..subpagei
	end
    title = mw.title.makeTitle(namespace, pagename)
    local r = title.prefixedText
    return r
end

return p

Dit Module "Titelweergave" is uit Wikipedia. De lijst van zijn auteurs is te zien in zijn historische.