Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Humanipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Editing advice
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
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!
local getArgs = require('Module:Arguments').getArgs local p = {} -- Fetch expansions of Editing advice meta templates local function getRequestedAdvice(haystack, needle, pages) -- if a request is made for that advice if string.match(haystack, needle) then return mw.getCurrentFrame():expandTemplate{ title = 'Editing advice/meta/' .. needle, args = pages or {} } end return '' end -- Return concatenation of fetched template expansions local function compileRequestedAdvice(about, pages) return getRequestedAdvice(about, 'preview', pages) .. getRequestedAdvice(about, 'summary') .. getRequestedAdvice(about, 'sandbox') end --[[ Main function: iterates through provided params and uses what is discovered to call for and organise the requested output ]] function p._getAdvice(cleanargs) -- Create capturing vars for data local about = '' local pages = {} local section = {} local f = mw.getCurrentFrame() -- Iterate through provided params for key, value in pairs(cleanargs) do -- If the param specifies the advice requested if key == 'about' then -- store the value about = value -- If the param specifies the section heading option elseif key == 'section' then -- store the value section[1] = value else --[[ If neither of the above, these params must be pages so store the values as they are processed ]] pages[#pages + 1] = value end end -- Output concatenation of fetched strings return f:expandTemplate{ title = 'Editing advice/meta/start', args = section } .. compileRequestedAdvice(about, pages) .. f:expandTemplate{ title = 'Editing advice/meta/end' } end --Get and cleanup frame args and pass them to _getAdvice function p.getAdvice(frame) local args = getArgs(frame) return p._getAdvice(args) end return p
Summary:
Please note that all contributions to Humanipedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, 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 (see
Humanipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Important
(
edit
)
Template:Tlsc
(
edit
)
Module:Editing advice/doc
(
edit
)