Not logged in
Talk
Contributions
Log in
Navigation
Main page
Recent changes
Random page
Upload file
Module
Discussion
Edit
View history
Editing
Module:Yesno
From Body Communication
Jump to:
navigation
,
search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
-- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end
Summary:
Please note that all contributions to Body Communication are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (see
Body Communication:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Module other
(
view source
)
Template:Module rating
(
view source
)
Template:Ombox
(
view source
)
Template:Sandbox other
(
view source
)
Template:Template link
(
view source
)
Template:Tl
(
view source
)
Template:Used in system
(
view source
)
Module:Arguments
(
edit
)
Module:Effective protection level
(
edit
)
Module:High-use
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:No globals
(
edit
)
Module:String
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/Y
(
edit
)
Module:Yesno
(
edit
)
Module:Yesno/doc
(
edit
)
Tools
What links here
Related changes
Special pages
Page information