View source for Module:Preview warning
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
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 = 'Something is wrong with this template' end
if frame:preprocess( "{{REVISIONID}}" ) == "" then return '<div class="hatnote" style="color:red"><strong>Warning:</strong> ' .. preview .. ' (this message is shown only in preview)</div>' end
end
return p
000
1:0
Templates used on this page:
- Template:Button (view source)
- Template:Linear-gradient (view source)
- Template:Module other (view source)
- Template:Module rating (view source)
- Template:Ombox (view source)
- Template:Sandbox other (view source)
- Module:Arguments (view source)
- Module:Effective protection level (view source)
- Module:Message box (view source)
- Module:Message box/configuration (view source)
- Module:Message box/ombox.css (view source)
- Module:Preview warning (view source)
- Module:Preview warning/doc (view source)
- Module:String (view source)
- Module:Yesno (view source)
Return to Module:Preview warning.