Sonic City (talk | contribs) Created page with "-- This module implements {{FA}}. local p = {} function p.main() -- Return the HTML for the page status indicator local indicatorHtml = mw.getCurrentFrame():extensionTag { name = "indicator", content = 'link=Sonic Wiki Zone:Featured Article|This is a Sonic Wiki Zone Featured Article', args = { name = "faImage" } } -- Check if the page is in the main namespace (NAMESPACENUMBER is 0) -..." |
Sonic City (talk | contribs) No edit summary |
||
Line 6: | Line 6: | ||
local indicatorHtml = mw.getCurrentFrame():extensionTag { | local indicatorHtml = mw.getCurrentFrame():extensionTag { | ||
name = "indicator", | name = "indicator", | ||
content = '[[File:FA Emblem.png|link=Sonic Wiki | content = '[[File:FA Emblem.png|link=The Sonic the Hedgehog Wiki:Featured Article|This is a Sonic the Hedgehog Wiki Featured Article]]', | ||
args = { | args = { | ||
name = "faImage" | name = "faImage" |
Latest revision as of 19:44, 21 December 2024
This module is used for {{FA}}. Please see that template page for documentation.
-- This module implements {{FA}}.
local p = {}
function p.main()
-- Return the HTML for the page status indicator
local indicatorHtml = mw.getCurrentFrame():extensionTag {
name = "indicator",
content = '[[File:FA Emblem.png|link=The Sonic the Hedgehog Wiki:Featured Article|This is a Sonic the Hedgehog Wiki Featured Article]]',
args = {
name = "faImage"
}
}
-- Check if the page is in the main namespace (NAMESPACENUMBER is 0)
-- For more information, see [https://www.mediawiki.org/wiki/Help:Namespaces].
local namespace = mw.title.getCurrentTitle().namespace
-- Initialize the result with the indicator HTML
local result = indicatorHtml
-- Only add the category if the namespace is the main one.
if namespace == 0 then
result = result .. '[[Category:Featured Article]] [[Category:Pages using Lua-based templates]]'
end
return result
end
return p