Module:Preview warning
Dokumentasyon nin Modyul[gibuhon]
You might want to gibuhon a documentation page for this Scribunto module. Editors can experiment in this module's sandbox (gibuhon | salmíng) and testcases (gibuhon) pages. Pakiulay na magdagdag nin mga kategorya sa subpahinang /doc . Subpages of this modyul. |
local p = {}
--[[
main
This function returns parameter 1 as a warning if the page containing it is being previewed.
Usage:
{{#invoke:Preview warning|main|warning_text}}
]]
function p.main(frame)
local preview = frame.args[1]:match('^%s*(.-)%s*$') or ''
if preview == '' then preview = 'Garo igwang salá sa plantilyang ini' end
if frame:preprocess( "{{REVISIONID}}" ) == "" then return '<div class="hatnote" style="color:red"><strong>Babala:</strong> ' .. pagpapahiling .. ' (this message is shown only in preview)</div>' end
end
return p