Module:Edit summary
Appearance
![]() | This module is rated as alpha. It is ready for third-party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome. |
Implements {{EditSummary}}
Usage
to use on a template use:
<includeonly>{{{{{|safesubst:}}}#invoke:Edit summary|main|username={{{username|}}}|pagename={{{pagename|}}}|date={{{date|}}}|time={{{time|}}}|byte={{{byte|}}}|bytes={{{bytes|}}}|added={{{added|}}}|removed={{{removed|}}}|minor={{{minor}}}|}}|text={{{text|}}}}}</includeonly>
Parameters
username
- might be yours or someone's.
pagename
- the page where the edit summary is provided.
date
- date of the summary, {{date}} serves as default.
time
- time when the summary was provided
byte.
- 0 to 1 byte.
bytes
- more than 1 byte
added
- number(s) of added content to the page
removed.
- number(s) of removed content from the page
minor
- minor changes or live empty.
text
- the text provided at the summary, after the pagename.
You can know this at any history page.
How it looks like
02 June 2025
* (16:06, 02 June 2025 Codemini (talk | contribs) . . (950 bytes) (+ 950) . . ( Module:Edit summary ) (created new module)
See also
local p = {}
function p.main(frame)
args = frame.args
date = args.date or os.date('%d %B %Y')
time = args.time or ''
username = args.username
user = '[[User:' .. username .. '|]] ([[User talk:' .. username .. '|talk]] | [[Special:Contribs/' .. username .. '|contribs]])'
bytes = ''
if args.byte then
bytes = '('..args.byte..' byte)'
elseif args.bytes then
bytes = '('..args.bytes..' bytes)'
else
bytes = ''
end
add = ''
if args.added or args.plus then
add = '<span style="color: green;">(+ '..args.added..')</span>'
end
remove = ''
if args.removed or args.minus then
remove = '<span style="color: red;">(→ '..args.removed..')</span>'
end
text = '('..args.text..')'
minor = ''
if args.minor then
minor = 'm . . '
else minor = ''
end
page = args.pagename
return '' .. date .. '<br>* (' .. time .. ', ' .. date .. ' ' .. user ..' . . ' .. bytes .. ' ' .. add .. '' .. remove .. ' . . ' .. minor .. '' .. page .. '' .. text .. ''
end
return p