Jump to content

Module:AfC submission catcheck

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by WOSlinker (talk | contribs) at 13:40, 21 April 2013 (ignore html commented out cats). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local i = {}

function i.checkforcats(frame)
    local t = mw.title.getCurrentTitle()
    tc = t:getContent()
    if tc == nil then 
        return ""
    end
    tc = mw.ustring.gsub(tc,"%[%[Category:Articles created via the Article Wizard%]%]","")
    tc = mw.ustring.gsub(tc,"<!--.--->","")
    if mw.ustring.match(tc, "%[%[%s-[Cc]ategory:" ) == nil then
        return ""
    else
        return "[[Category:AfC submissions with categories]]"
    end
end
 
return i