Wikipedia
testwiki
https://test.wikipedia.org/wiki/Main_Page
MediaWiki 1.45.0-wmf.8
first-letter
Media
Special
Talk
User
User talk
Wikipedia
Wikipedia talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Thread
Thread talk
Summary
Summary talk
Test namespace 1
Test namespace 1 talk
Test namespace 2
Test namespace 2 talk
Draft
Draft talk
Campaign
Campaign talk
TimedText
TimedText talk
Module
Module talk
SecurePoll
SecurePoll talk
CNBanner
CNBanner talk
Translations
Translations talk
Event
Event talk
Topic
Newsletter
Newsletter talk
Template:Transclude
10
35961
665127
280100
2021-12-31T16:00:55Z
en>GKFX
0
Update from sandbox.
665127
wikitext
text/x-wiki
{{#switch: {{NAMESPACE: {{{1}}} }}
|#default = {{FULLPAGENAME: {{{1}}} }} <!-- the namespace was specified eg "User:Foo" "Template:Foo", "Category:Foo" -->
|{{ns:0}} = <!-- we have either ":Foo" (mainspace) or "Foo" (a template) -->
{{#if: {{#invoke:string2|startswith|1={{{1|}}}|2=:}}
|{{PAGENAME: {{{1}}} }} <!-- leading colon, eg ":Foo", so we want the article -->
|Template:{{{1}}} <!-- no leading colon, eg "Foo", so we want the template -->
}}
}}<noinclude>
{{documentation}}
</noinclude>
ohqbl7x6dn6cmf5771xx1zokkwglyr5
665128
665127
2025-07-02T04:53:21Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Transclude]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665127
wikitext
text/x-wiki
{{#switch: {{NAMESPACE: {{{1}}} }}
|#default = {{FULLPAGENAME: {{{1}}} }} <!-- the namespace was specified eg "User:Foo" "Template:Foo", "Category:Foo" -->
|{{ns:0}} = <!-- we have either ":Foo" (mainspace) or "Foo" (a template) -->
{{#if: {{#invoke:string2|startswith|1={{{1|}}}|2=:}}
|{{PAGENAME: {{{1}}} }} <!-- leading colon, eg ":Foo", so we want the article -->
|Template:{{{1}}} <!-- no leading colon, eg "Foo", so we want the template -->
}}
}}<noinclude>
{{documentation}}
</noinclude>
ohqbl7x6dn6cmf5771xx1zokkwglyr5
Template:Center
10
45510
665100
629914
2025-03-27T08:18:08Z
en>MSGJ
0
use center class alone, per request
665100
wikitext
text/x-wiki
<div class="center" {{safesubst<noinclude />:#if: {{{style|}}} | style="{{{style}}}"}}>{{{1|[[Category:Pages using center with no arguments]]}}}</div>{{safesubst<noinclude />:#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using center with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Center]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | style }}<noinclude>
{{documentation}}
</noinclude>
ho0gjr8udacxqdzfdn1t0y3wvnpbco2
665101
665100
2025-07-02T04:33:34Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Center]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665100
wikitext
text/x-wiki
<div class="center" {{safesubst<noinclude />:#if: {{{style|}}} | style="{{{style}}}"}}>{{{1|[[Category:Pages using center with no arguments]]}}}</div>{{safesubst<noinclude />:#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using center with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Center]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | style }}<noinclude>
{{documentation}}
</noinclude>
ho0gjr8udacxqdzfdn1t0y3wvnpbco2
Template:Twinkle standard installation
10
49041
665129
573650
2025-02-09T16:46:38Z
en>Jonesey95
0
Undid revision [[Special:Diff/1274802529|1274802529]] by [[Special:Contributions/JustSomeoneNo|JustSomeoneNo]] ([[User talk:JustSomeoneNo|talk]]). staying on the template page is deliberate
665129
wikitext
text/x-wiki
{{Mbox
| image = [[File:Police man Twinkle Head.svg|50x40px|alt=Logo of Twinkle; Police Man|link=]]
| text = Any [[Template:Twinkle standard installation#"Breaking changes"|breaking changes]] to this template, including moving it or nominating it for deletion, '''must be communicated in advance''' to [[Wikipedia:Twinkle|Twinkle]]'s users and maintainers at [[Wikipedia talk:Twinkle]]. The standard installation of Twinkle relies on this template. Thank you.{{#if:{{{1|}}}|<br>
{{{1}}}}}}}<includeonly>{{#if:{{{nocat|}}}||{{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}}|[[Category:Templates used by Twinkle|{{PAGENAME}}]]}}}}</includeonly><noinclude>
{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude>
kjfxzo9plqi6sjht4sem406f05ee0tm
665130
665129
2025-07-02T04:53:22Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Twinkle_standard_installation]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665129
wikitext
text/x-wiki
{{Mbox
| image = [[File:Police man Twinkle Head.svg|50x40px|alt=Logo of Twinkle; Police Man|link=]]
| text = Any [[Template:Twinkle standard installation#"Breaking changes"|breaking changes]] to this template, including moving it or nominating it for deletion, '''must be communicated in advance''' to [[Wikipedia:Twinkle|Twinkle]]'s users and maintainers at [[Wikipedia talk:Twinkle]]. The standard installation of Twinkle relies on this template. Thank you.{{#if:{{{1|}}}|<br>
{{{1}}}}}}}<includeonly>{{#if:{{{nocat|}}}||{{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}}|[[Category:Templates used by Twinkle|{{PAGENAME}}]]}}}}</includeonly><noinclude>
{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude>
kjfxzo9plqi6sjht4sem406f05ee0tm
Template:Db-meta
10
71811
665073
618737
2025-01-30T04:37:51Z
en>FlightTime
0
Update lnk trgt(s)
665073
wikitext
text/x-wiki
{{#ifeq: {{{raw|}}} | yes<!--
If raw=yes, include a short deletion message with no message box-->
| <b>{{ucfirst:{{{1}}}}}.</b> <!--
-->{{#if: {{{2|}}} | <i>{{{2}}}</i>. }}<!--
-->{{#ifeq:{{{criterion}}}| NA
|
| <b>See [[Wikipedia:Criteria for speedy deletion#{{uc:{{{criterion}}}}}|CSD {{uc:{{{criterion}}}}}]].</b>
}}<!--
-->{{#if: {{{rationale|}}}
|  <span style="color:red; font-weight:bold;">{{{rationale}}}</span>
}}<!--
If raw != yes, then include the full deletion template with message box -->
|{{mbox
| class = mbox-db
| type = speedy
| image = none
| style = font-size:95%;
| text =
<b><i>This {{if empty|{{{pagetype_override|}}}|{{pagetype|defaultns=all}}}} {{#if:{{{bot|}}}|was tagged by [[User:{{{bot}}}|{{{bot}}}]], because it}} may meet Wikipedia's [[Wikipedia:Speedy deletion|criteria for speedy deletion]]</i>{{{1}}}.</b> {{#if:{{{2|}}}|<i>{{{2}}}</i>. }}{{#ifeq:{{{criterion}}}|NA||<b>See [[Wikipedia:Criteria for speedy deletion#{{uc:{{{criterion}}}}}|CSD {{uc:{{{criterion}}}}}]].</b>}}<span id="delete-reason" style="display:none">{{urlencode:{{#ifeq:{{{criterion}}}|NA||[[WP:CSD#{{uc:{{{criterion}}}}}|{{uc:{{{criterion}}}}}]]:}} {{{summary|}}}}}</span><span id="delete-criterion" style="display:none">{{uc:{{{criterion}}}}}</span>{{#if:{{{rationale|}}}| <span style="color:red; font-weight:bold;">{{{rationale}}}</span>}}
<p class="verbose">If this {{if empty|{{{pagetype_override|}}}|{{pagetype|defaultns=all}}}} does not meet the criteria for speedy deletion, {{#ifeq:{{{self}}}|yes|please remove this notice.<br /></p>|or you intend to fix it, please remove this notice, but '''do not remove this notice from {{#ifeq:{{NAMESPACE}}|File|files you have uploaded|pages that you have created yourself}}'''. If you {{#ifeq:{{NAMESPACE}}|File|uploaded this file|created this page}} and you disagree with the given reason for deletion, you can click the button below and leave a message explaining why you believe it should not be deleted. You can {{talk other|check back later to see|also [[{{TALKPAGENAME}}|visit the talk page]] to check}} if you have received a response to your message.
</p>
<!-- "Contest this speedy deletion" button -->
{{#tag: inputbox |
type=commenttitle
default=Contested deletion
preload=Template:Hangon preload {{#switch:{{uc:{{{criterion|NA}}}}}|G3|G10|G11|G12|G14|A1|A2|A3|A7|A9|A10|A11|R3|F1|F2|F3|F4|F5|F6|F7|F8|F9|F11|C1={{uc:{{{criterion}}}}}|#default=generic}}
hidden=yes
page={{#titleparts:{{TALKPAGENAME}}|255}}
buttonlabel=Contest this speedy deletion
break=no
editintro=Template:Hangon preload editintro
}}
<p class="verbose">Note that this {{pagetype|defaultns=all}} may be deleted at any time if it unquestionably meets the speedy deletion criteria, or if an explanation {{talk other|added below this notice|posted to the talk page}} is found to be insufficient.</p><!--
-->{{#ifeq:{{{help}}}|off||
<!--
-- Text for the warning message to substitute on user talk pages --
-->{{#if: {{{temp|}}}
|
:<small>'''''Nominator''': Please consider placing the [[Help:Template|template]]:''</small>
:<small><code>''<nowiki>{{subst:</nowiki>[[Template:{{{temp}}}|{{{temp}}}]]<nowiki>|</nowiki>{{FULLPAGENAME}}<nowiki>|header=1</nowiki>{{{temp2|}}}<nowiki>}} </nowiki>{{#ifeq:{{{sig|x}}}|x|<nowiki>~~~~</nowiki>}}''</code></small>
:''<small>on the talk page of the author.</small>''
<!--
-->}}}}<!--
Add notice about using the talk page, or a notice for administrators if the talk page exists -->
{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}||{{#ifexist:{{TALKPAGENAME}}|{{Hang on/notice3}}|<div class="verbose">{{Hang on/notice2}}</div>}}}}}}
<!--Space for other notes -->
{{#if:{{{notes|}}}|{{{notes}}}<br />}}<!--
-- Message for admins --
--><small><span class="sysop-show">''Administrators: check [[Special:Whatlinkshere/{{FULLPAGENAME}}|links]], [[{{TALKPAGENAME}}|talk]], [{{fullurl:{{FULLPAGENAME}}|action=history}} history] ([{{fullurl:{{FULLPAGENAME}}|diff=0}} last]), and [{{fullurl:Special:Log|page={{FULLPAGENAMEE}}}} logs] before [{{fullurl:{{FULLPAGENAME}}|wpReason={{urlencode:{{#ifeq:{{{criterion}}}|NA||[[WP:CSD#{{uc:{{{criterion}}}}}|{{uc:{{{criterion}}}}}]]:}} {{{summary|}}}}}&action=delete}} deletion]{{#if:{{{bot|}}}|, as this page was tagged by a [[Wikipedia:Bot policy|bot]]}}{{#if:{{{anote|}}}|{{{anote}}}|.}} {{#ifeq:{{{self}}}|yes||Consider [[google:{{urlencode:{{PAGENAME}}}}|checking Google]].}}''<br/></span>This page was [{{fullurl:{{FULLPAGENAME}}|diff=cur}} last edited] {{#if: {{REVISIONUSER}} | by [[{{ns:2}}:{{REVISIONUSER2}}|{{REVISIONUSER2}}]] <small>{{toolbar|1=[[Special:Contributions/{{REVISIONUSER2}}|contribs]]|2=[[Special:Log/{{REVISIONUSER2}}|logs]]}}</small> }} at {{#time:H:i, j F Y (e)|{{REVISIONTIMESTAMP}}}} ([{{fullurl:{{FULLPAGENAME}}|action=purge}} {{time ago|{{REVISIONTIMESTAMP}}}}])</small><!--
-->}}<!--
-- End main mbox code, start courtesy blanking notices and div blanking tag --
-->{{#if: {{{blanked|}}} | {{mbox|image=none|text= {{{blanked-text|This page has been [[Wikipedia:Deletion policy#Courtesy blanking|blanked as a courtesy]].}}}}} |}}{{#if: {{{pleaseblank|}}} | {{mbox|type=delete|text=<big>{{red|Please [[Wikipedia:Courtesy blanking|blank this page]] so that it only contains the deletion template.}}</big>}} |}}{{#if: {{{divblank|}}} | <div id="AttackPage" style="display:none"><!--do not close this div tag; it is there to ensure that any content remaining on the page does not display --> |}}
}}<!-- End if statement for "raw" parameter-->{{NOINDEX}}<noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
</noinclude>
0jt76h0dz3bowul7syerf4ascccjljw
665074
665073
2025-07-02T01:47:18Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-meta]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665073
wikitext
text/x-wiki
{{#ifeq: {{{raw|}}} | yes<!--
If raw=yes, include a short deletion message with no message box-->
| <b>{{ucfirst:{{{1}}}}}.</b> <!--
-->{{#if: {{{2|}}} | <i>{{{2}}}</i>. }}<!--
-->{{#ifeq:{{{criterion}}}| NA
|
| <b>See [[Wikipedia:Criteria for speedy deletion#{{uc:{{{criterion}}}}}|CSD {{uc:{{{criterion}}}}}]].</b>
}}<!--
-->{{#if: {{{rationale|}}}
|  <span style="color:red; font-weight:bold;">{{{rationale}}}</span>
}}<!--
If raw != yes, then include the full deletion template with message box -->
|{{mbox
| class = mbox-db
| type = speedy
| image = none
| style = font-size:95%;
| text =
<b><i>This {{if empty|{{{pagetype_override|}}}|{{pagetype|defaultns=all}}}} {{#if:{{{bot|}}}|was tagged by [[User:{{{bot}}}|{{{bot}}}]], because it}} may meet Wikipedia's [[Wikipedia:Speedy deletion|criteria for speedy deletion]]</i>{{{1}}}.</b> {{#if:{{{2|}}}|<i>{{{2}}}</i>. }}{{#ifeq:{{{criterion}}}|NA||<b>See [[Wikipedia:Criteria for speedy deletion#{{uc:{{{criterion}}}}}|CSD {{uc:{{{criterion}}}}}]].</b>}}<span id="delete-reason" style="display:none">{{urlencode:{{#ifeq:{{{criterion}}}|NA||[[WP:CSD#{{uc:{{{criterion}}}}}|{{uc:{{{criterion}}}}}]]:}} {{{summary|}}}}}</span><span id="delete-criterion" style="display:none">{{uc:{{{criterion}}}}}</span>{{#if:{{{rationale|}}}| <span style="color:red; font-weight:bold;">{{{rationale}}}</span>}}
<p class="verbose">If this {{if empty|{{{pagetype_override|}}}|{{pagetype|defaultns=all}}}} does not meet the criteria for speedy deletion, {{#ifeq:{{{self}}}|yes|please remove this notice.<br /></p>|or you intend to fix it, please remove this notice, but '''do not remove this notice from {{#ifeq:{{NAMESPACE}}|File|files you have uploaded|pages that you have created yourself}}'''. If you {{#ifeq:{{NAMESPACE}}|File|uploaded this file|created this page}} and you disagree with the given reason for deletion, you can click the button below and leave a message explaining why you believe it should not be deleted. You can {{talk other|check back later to see|also [[{{TALKPAGENAME}}|visit the talk page]] to check}} if you have received a response to your message.
</p>
<!-- "Contest this speedy deletion" button -->
{{#tag: inputbox |
type=commenttitle
default=Contested deletion
preload=Template:Hangon preload {{#switch:{{uc:{{{criterion|NA}}}}}|G3|G10|G11|G12|G14|A1|A2|A3|A7|A9|A10|A11|R3|F1|F2|F3|F4|F5|F6|F7|F8|F9|F11|C1={{uc:{{{criterion}}}}}|#default=generic}}
hidden=yes
page={{#titleparts:{{TALKPAGENAME}}|255}}
buttonlabel=Contest this speedy deletion
break=no
editintro=Template:Hangon preload editintro
}}
<p class="verbose">Note that this {{pagetype|defaultns=all}} may be deleted at any time if it unquestionably meets the speedy deletion criteria, or if an explanation {{talk other|added below this notice|posted to the talk page}} is found to be insufficient.</p><!--
-->{{#ifeq:{{{help}}}|off||
<!--
-- Text for the warning message to substitute on user talk pages --
-->{{#if: {{{temp|}}}
|
:<small>'''''Nominator''': Please consider placing the [[Help:Template|template]]:''</small>
:<small><code>''<nowiki>{{subst:</nowiki>[[Template:{{{temp}}}|{{{temp}}}]]<nowiki>|</nowiki>{{FULLPAGENAME}}<nowiki>|header=1</nowiki>{{{temp2|}}}<nowiki>}} </nowiki>{{#ifeq:{{{sig|x}}}|x|<nowiki>~~~~</nowiki>}}''</code></small>
:''<small>on the talk page of the author.</small>''
<!--
-->}}}}<!--
Add notice about using the talk page, or a notice for administrators if the talk page exists -->
{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}||{{#ifexist:{{TALKPAGENAME}}|{{Hang on/notice3}}|<div class="verbose">{{Hang on/notice2}}</div>}}}}}}
<!--Space for other notes -->
{{#if:{{{notes|}}}|{{{notes}}}<br />}}<!--
-- Message for admins --
--><small><span class="sysop-show">''Administrators: check [[Special:Whatlinkshere/{{FULLPAGENAME}}|links]], [[{{TALKPAGENAME}}|talk]], [{{fullurl:{{FULLPAGENAME}}|action=history}} history] ([{{fullurl:{{FULLPAGENAME}}|diff=0}} last]), and [{{fullurl:Special:Log|page={{FULLPAGENAMEE}}}} logs] before [{{fullurl:{{FULLPAGENAME}}|wpReason={{urlencode:{{#ifeq:{{{criterion}}}|NA||[[WP:CSD#{{uc:{{{criterion}}}}}|{{uc:{{{criterion}}}}}]]:}} {{{summary|}}}}}&action=delete}} deletion]{{#if:{{{bot|}}}|, as this page was tagged by a [[Wikipedia:Bot policy|bot]]}}{{#if:{{{anote|}}}|{{{anote}}}|.}} {{#ifeq:{{{self}}}|yes||Consider [[google:{{urlencode:{{PAGENAME}}}}|checking Google]].}}''<br/></span>This page was [{{fullurl:{{FULLPAGENAME}}|diff=cur}} last edited] {{#if: {{REVISIONUSER}} | by [[{{ns:2}}:{{REVISIONUSER2}}|{{REVISIONUSER2}}]] <small>{{toolbar|1=[[Special:Contributions/{{REVISIONUSER2}}|contribs]]|2=[[Special:Log/{{REVISIONUSER2}}|logs]]}}</small> }} at {{#time:H:i, j F Y (e)|{{REVISIONTIMESTAMP}}}} ([{{fullurl:{{FULLPAGENAME}}|action=purge}} {{time ago|{{REVISIONTIMESTAMP}}}}])</small><!--
-->}}<!--
-- End main mbox code, start courtesy blanking notices and div blanking tag --
-->{{#if: {{{blanked|}}} | {{mbox|image=none|text= {{{blanked-text|This page has been [[Wikipedia:Deletion policy#Courtesy blanking|blanked as a courtesy]].}}}}} |}}{{#if: {{{pleaseblank|}}} | {{mbox|type=delete|text=<big>{{red|Please [[Wikipedia:Courtesy blanking|blank this page]] so that it only contains the deletion template.}}</big>}} |}}{{#if: {{{divblank|}}} | <div id="AttackPage" style="display:none"><!--do not close this div tag; it is there to ensure that any content remaining on the page does not display --> |}}
}}<!-- End if statement for "raw" parameter-->{{NOINDEX}}<noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
</noinclude>
0jt76h0dz3bowul7syerf4ascccjljw
Module:Documentation
828
75579
665077
648624
2025-03-12T03:38:41Z
en>Paine Ellsworth
0
per edit request on talk page - make the doc environment behave correctly, giving the actual template name on the doc page rather than the name of the "doc" subpage
665077
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
local format = mw.ustring.format
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
return ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
end
p.message = message
local function makeWikilink(page, display)
if display then
return format('[[%s|%s]]', page, display)
else
return format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
-- 'documentation-toolbar'
return format(
'<span class="%s">(%s)</span>',
message('toolbar-class'),
table.concat(ret, ' | ')
)
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Entry points
----------------------------------------------------------------------------
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:wikitext(p._getModuleWikitext(args, env))
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
:tag('div')
-- 'documentation-container'
:addClass(message('container'))
:attr('role', 'complementary')
:attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil)
:attr('aria-label', args.heading == '' and 'Documentation' or nil)
:newline()
:tag('div')
-- 'documentation'
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
-- 'documentation-clear'
:addClass(message('clear'))
:done()
:newline()
:done()
:wikitext(p._endBox(args, env))
:done()
:wikitext(p.addTrackingCategories(env))
-- 'Module:Documentation/styles.css'
return mw.getCurrentFrame():extensionTag (
'templatestyles', '', {src=cfg['templatestyles']
}) .. tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title
-- objects and other namespace- or path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') or (subpage == message('doc-subpage') and mw.title.getCurrentTitle().namespace == env.docSpace) then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the
-- same as the subject namespace. However, pages in the Article, File,
-- MediaWiki or Category namespaces must have their /doc, /sandbox and
-- /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.canonicalUrl(
'Special:ComparePages',
{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Auxiliary templates
----------------------------------------------------------------------------
p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext')
function p._getModuleWikitext(args, env)
local currentTitle = mw.title.getCurrentTitle()
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
local moduleWikitext = package.loaded["Module:Module wikitext"]
if moduleWikitext then
return moduleWikitext.main()
end
end
function p.sandboxNotice(args, env)
--[=[
-- Generates a sandbox notice for display above sandbox pages.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]'
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page'
-- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page'
-- 'sandbox-notice-pagetype-other' --> 'sandbox page'
-- 'sandbox-notice-compare-link-display' --> 'diff'
-- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
-- 'module-sandbox-category' --> 'Module sandboxes'
-- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace'
--]=]
local title = env.title
local sandboxTitle = env.sandboxTitle
local templateTitle = env.templateTitle
local subjectSpace = env.subjectSpace
if not (subjectSpace and title and sandboxTitle and templateTitle
and mw.title.equals(title, sandboxTitle)) then
return nil
end
-- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text".
local omargs = {}
omargs.image = message('sandbox-notice-image')
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = '__EXPECTUNUSEDTEMPLATE__'
local pagetype, sandboxCat
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
sandboxCat = message('sandbox-category')
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
sandboxCat = message('module-sandbox-category')
else
pagetype = message('sandbox-notice-pagetype-other')
sandboxCat = message('other-sandbox-category')
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
if compareUrl then
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
else
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
end
-- Get the test cases page blurb if the page exists. This is something like
-- "See also the companion subpage for [[Template:Foo/testcases|test cases]]."
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.contentModel == "Scribunto" then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink})
end
end
-- Add the sandbox to the sandbox category.
omargs.text = text .. makeCategoryLink(sandboxCat)
-- 'documentation-clear'
return '<div class="' .. message('clear') .. '"></div>'
.. require('Module:Message box').main('ombox', omargs)
end
function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editProt = protectionLevels.edit and protectionLevels.edit[1]
local moveProt = protectionLevels.move and protectionLevels.move[1]
if editProt then
-- The page is edit-protected.
return require('Module:Protection banner')._main{
message('protection-reason-edit'), small = true
}
elseif moveProt and moveProt ~= 'autoconfirmed' then
-- The page is move-protected but not edit-protected. Exclude move
-- protection with the level "autoconfirmed", as this is equivalent to
-- no move protection at all.
return require('Module:Protection banner')._main{
action = 'move', small = true
}
else
return nil
end
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
return {
title = title,
docTitle = docTitle,
-- View, display, edit, and purge links if /doc exists.
viewLinkDisplay = message('view-link-display'),
editLinkDisplay = message('edit-link-display'),
historyLinkDisplay = message('history-link-display'),
purgeLinkDisplay = message('purge-link-display'),
preload = preload,
createLinkDisplay = message('create-link-display')
}
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create][purge] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local docTitle = data.docTitle
-- yes, we do intend to purge the template page on which the documentation appears
local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay)
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay)
local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay)
return "[" .. viewLink .. "] [" .. editLink .. "] [" .. historyLink .. "] [" .. purgeLink .. "]"
else
local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
return "[" .. createLink .. "] [" .. purgeLink .. "]"
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
else
-- 'documentation-heading'
data.headingClass = message('main-div-heading-class')
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
-- 'mw-editsection-like plainlinks'
data.linksClass = message('start-box-link-classes')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
-- 'documentation-startbox'
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:attr('id', 'documentation-heading')
:cssText(data.headingStyleText)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the link box.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
end
end
local box = mw.html.create('div')
-- 'documentation-metadata'
box:attr('role', 'note')
:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
:wikitext(text)
:done()
return '\n' .. tostring(box)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Help:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editDisplay = message('edit-link-display')
local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay)
local historyDisplay = message('history-link-display')
local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay)
return message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
return message('create-module-doc-blurb', {createLink})
.. '<br />'
end
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
return makeCategoryLink(message('strange-usage-category'))
end
return ''
end
return p
fttwrouvv52xj3xc0iv9fbm0og9nf2z
665078
665077
2025-07-02T01:47:19Z
Novem Linguae
49714
1 revision imported from [[:en:Module:Documentation]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665077
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
local format = mw.ustring.format
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
return ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
end
p.message = message
local function makeWikilink(page, display)
if display then
return format('[[%s|%s]]', page, display)
else
return format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
-- 'documentation-toolbar'
return format(
'<span class="%s">(%s)</span>',
message('toolbar-class'),
table.concat(ret, ' | ')
)
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Entry points
----------------------------------------------------------------------------
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:wikitext(p._getModuleWikitext(args, env))
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
:tag('div')
-- 'documentation-container'
:addClass(message('container'))
:attr('role', 'complementary')
:attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil)
:attr('aria-label', args.heading == '' and 'Documentation' or nil)
:newline()
:tag('div')
-- 'documentation'
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
-- 'documentation-clear'
:addClass(message('clear'))
:done()
:newline()
:done()
:wikitext(p._endBox(args, env))
:done()
:wikitext(p.addTrackingCategories(env))
-- 'Module:Documentation/styles.css'
return mw.getCurrentFrame():extensionTag (
'templatestyles', '', {src=cfg['templatestyles']
}) .. tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title
-- objects and other namespace- or path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') or (subpage == message('doc-subpage') and mw.title.getCurrentTitle().namespace == env.docSpace) then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the
-- same as the subject namespace. However, pages in the Article, File,
-- MediaWiki or Category namespaces must have their /doc, /sandbox and
-- /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.canonicalUrl(
'Special:ComparePages',
{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Auxiliary templates
----------------------------------------------------------------------------
p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext')
function p._getModuleWikitext(args, env)
local currentTitle = mw.title.getCurrentTitle()
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
local moduleWikitext = package.loaded["Module:Module wikitext"]
if moduleWikitext then
return moduleWikitext.main()
end
end
function p.sandboxNotice(args, env)
--[=[
-- Generates a sandbox notice for display above sandbox pages.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]'
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page'
-- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page'
-- 'sandbox-notice-pagetype-other' --> 'sandbox page'
-- 'sandbox-notice-compare-link-display' --> 'diff'
-- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
-- 'module-sandbox-category' --> 'Module sandboxes'
-- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace'
--]=]
local title = env.title
local sandboxTitle = env.sandboxTitle
local templateTitle = env.templateTitle
local subjectSpace = env.subjectSpace
if not (subjectSpace and title and sandboxTitle and templateTitle
and mw.title.equals(title, sandboxTitle)) then
return nil
end
-- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text".
local omargs = {}
omargs.image = message('sandbox-notice-image')
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = '__EXPECTUNUSEDTEMPLATE__'
local pagetype, sandboxCat
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
sandboxCat = message('sandbox-category')
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
sandboxCat = message('module-sandbox-category')
else
pagetype = message('sandbox-notice-pagetype-other')
sandboxCat = message('other-sandbox-category')
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
if compareUrl then
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
else
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
end
-- Get the test cases page blurb if the page exists. This is something like
-- "See also the companion subpage for [[Template:Foo/testcases|test cases]]."
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.contentModel == "Scribunto" then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink})
end
end
-- Add the sandbox to the sandbox category.
omargs.text = text .. makeCategoryLink(sandboxCat)
-- 'documentation-clear'
return '<div class="' .. message('clear') .. '"></div>'
.. require('Module:Message box').main('ombox', omargs)
end
function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editProt = protectionLevels.edit and protectionLevels.edit[1]
local moveProt = protectionLevels.move and protectionLevels.move[1]
if editProt then
-- The page is edit-protected.
return require('Module:Protection banner')._main{
message('protection-reason-edit'), small = true
}
elseif moveProt and moveProt ~= 'autoconfirmed' then
-- The page is move-protected but not edit-protected. Exclude move
-- protection with the level "autoconfirmed", as this is equivalent to
-- no move protection at all.
return require('Module:Protection banner')._main{
action = 'move', small = true
}
else
return nil
end
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
return {
title = title,
docTitle = docTitle,
-- View, display, edit, and purge links if /doc exists.
viewLinkDisplay = message('view-link-display'),
editLinkDisplay = message('edit-link-display'),
historyLinkDisplay = message('history-link-display'),
purgeLinkDisplay = message('purge-link-display'),
preload = preload,
createLinkDisplay = message('create-link-display')
}
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create][purge] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local docTitle = data.docTitle
-- yes, we do intend to purge the template page on which the documentation appears
local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay)
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay)
local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay)
return "[" .. viewLink .. "] [" .. editLink .. "] [" .. historyLink .. "] [" .. purgeLink .. "]"
else
local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
return "[" .. createLink .. "] [" .. purgeLink .. "]"
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
else
-- 'documentation-heading'
data.headingClass = message('main-div-heading-class')
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
-- 'mw-editsection-like plainlinks'
data.linksClass = message('start-box-link-classes')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
-- 'documentation-startbox'
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:attr('id', 'documentation-heading')
:cssText(data.headingStyleText)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the link box.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
end
end
local box = mw.html.create('div')
-- 'documentation-metadata'
box:attr('role', 'note')
:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
:wikitext(text)
:done()
return '\n' .. tostring(box)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Help:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editDisplay = message('edit-link-display')
local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay)
local historyDisplay = message('history-link-display')
local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay)
return message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
return message('create-module-doc-blurb', {createLink})
.. '<br />'
end
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
return makeCategoryLink(message('strange-usage-category'))
end
return ''
end
return p
fttwrouvv52xj3xc0iv9fbm0og9nf2z
Template:Module other
10
77521
665102
500212
2025-03-26T18:15:01Z
en>Awesome Aasim
0
665102
wikitext
text/x-wiki
{{#switch:
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"-->
| {{#ifeq:{{NAMESPACE}}|{{ns:Module}}
| module
| other
}}
}}
| module = {{{module|{{{1|}}}}}}
| other
| #default = {{{other|{{{2|}}}}}}
}}<!--End switch--><noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage, not here! -->
</noinclude>
i7wndwmrhldzbfap4eq8cegs6o7hwig
665103
665102
2025-07-02T04:33:35Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Module_other]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665102
wikitext
text/x-wiki
{{#switch:
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"-->
| {{#ifeq:{{NAMESPACE}}|{{ns:Module}}
| module
| other
}}
}}
| module = {{{module|{{{1|}}}}}}
| other
| #default = {{{other|{{{2|}}}}}}
}}<!--End switch--><noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage, not here! -->
</noinclude>
i7wndwmrhldzbfap4eq8cegs6o7hwig
Module:Protection banner
828
83264
665075
637553
2025-03-19T17:58:54Z
en>SilverLocust
0
fix for mobile and search issue, see talk page
665075
Scribunto
text/plain
-- This module implements {{pp-meta}} and its daughter templates such as
-- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}.
-- Initialise necessary modules.
require('strict')
local makeFileLink = require('Module:File link')._main
local effectiveProtectionLevel = require('Module:Effective protection level')._main
local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main
local yesno = require('Module:Yesno')
-- Lazily initialise modules and objects we don't always need.
local getArgs, makeMessageBox, lang
-- Set constants.
local CONFIG_MODULE = 'Module:Protection banner/config'
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function makeCategoryLink(cat, sort)
if cat then
return string.format(
'[[%s:%s|%s]]',
mw.site.namespaces[14].name,
cat,
sort
)
end
end
-- Validation function for the expiry and the protection date
local function validateDate(dateString, dateType)
if not lang then
lang = mw.language.getContentLanguage()
end
local success, result = pcall(lang.formatDate, lang, 'U', dateString)
if success then
result = tonumber(result)
if result then
return result
end
end
error(string.format(
'invalid %s: %s',
dateType,
tostring(dateString)
), 4)
end
local function makeFullUrl(page, query, display)
return string.format(
'[%s %s]',
tostring(mw.uri.fullUrl(page, query)),
display
)
end
-- Given a directed graph formatted as node -> table of direct successors,
-- get a table of all nodes reachable from a given node (though always
-- including the given node).
local function getReachableNodes(graph, start)
local toWalk, retval = {[start] = true}, {}
while true do
-- Can't use pairs() since we're adding and removing things as we're iterating
local k = next(toWalk) -- This always gets the "first" key
if k == nil then
return retval
end
toWalk[k] = nil
retval[k] = true
for _,v in ipairs(graph[k]) do
if not retval[v] then
toWalk[v] = true
end
end
end
end
--------------------------------------------------------------------------------
-- Protection class
--------------------------------------------------------------------------------
local Protection = {}
Protection.__index = Protection
Protection.supportedActions = {
edit = true,
move = true,
autoreview = true,
upload = true
}
Protection.bannerConfigFields = {
'text',
'explanation',
'tooltip',
'alt',
'link',
'image'
}
function Protection.new(args, cfg, title)
local obj = {}
obj._cfg = cfg
obj.title = title or mw.title.getCurrentTitle()
-- Set action
if not args.action then
obj.action = 'edit'
elseif Protection.supportedActions[args.action] then
obj.action = args.action
else
error(string.format(
'invalid action: %s',
tostring(args.action)
), 3)
end
-- Set level
obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title)
if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then
-- Users need to be autoconfirmed to move pages anyway, so treat
-- semi-move-protected pages as unprotected.
obj.level = '*'
end
-- Set expiry
local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title)
if effectiveExpiry == 'infinity' then
obj.expiry = 'indef'
elseif effectiveExpiry ~= 'unknown' then
obj.expiry = validateDate(effectiveExpiry, 'expiry date')
end
-- Set reason
if args[1] then
obj.reason = mw.ustring.lower(args[1])
if obj.reason:find('|') then
error('reasons cannot contain the pipe character ("|")', 3)
end
end
-- Set protection date
if args.date then
obj.protectionDate = validateDate(args.date, 'protection date')
end
-- Set banner config
do
obj.bannerConfig = {}
local configTables = {}
if cfg.banners[obj.action] then
configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason]
end
if cfg.defaultBanners[obj.action] then
configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level]
configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default
end
configTables[#configTables + 1] = cfg.masterBanner
for i, field in ipairs(Protection.bannerConfigFields) do
for j, t in ipairs(configTables) do
if t[field] then
obj.bannerConfig[field] = t[field]
break
end
end
end
end
return setmetatable(obj, Protection)
end
function Protection:isUserScript()
-- Whether the page is a user JavaScript or CSS page.
local title = self.title
return title.namespace == 2 and (
title.contentModel == 'javascript' or title.contentModel == 'css'
)
end
function Protection:isProtected()
return self.level ~= '*'
end
function Protection:shouldShowLock()
-- Whether we should output a banner/padlock
return self:isProtected() and not self:isUserScript()
end
-- Whether this page needs a protection category.
Protection.shouldHaveProtectionCategory = Protection.shouldShowLock
function Protection:isTemporary()
return type(self.expiry) == 'number'
end
function Protection:makeProtectionCategory()
if not self:shouldHaveProtectionCategory() then
return ''
end
local cfg = self._cfg
local title = self.title
-- Get the expiry key fragment.
local expiryFragment
if self.expiry == 'indef' then
expiryFragment = self.expiry
elseif type(self.expiry) == 'number' then
expiryFragment = 'temp'
end
-- Get the namespace key fragment.
local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace]
if not namespaceFragment and title.namespace % 2 == 1 then
namespaceFragment = 'talk'
end
-- Define the order that key fragments are tested in. This is done with an
-- array of tables containing the value to be tested, along with its
-- position in the cfg.protectionCategories table.
local order = {
{val = expiryFragment, keypos = 1},
{val = namespaceFragment, keypos = 2},
{val = self.reason, keypos = 3},
{val = self.level, keypos = 4},
{val = self.action, keypos = 5}
}
--[[
-- The old protection templates used an ad-hoc protection category system,
-- with some templates prioritising namespaces in their categories, and
-- others prioritising the protection reason. To emulate this in this module
-- we use the config table cfg.reasonsWithNamespacePriority to set the
-- reasons for which namespaces have priority over protection reason.
-- If we are dealing with one of those reasons, move the namespace table to
-- the end of the order table, i.e. give it highest priority. If not, the
-- reason should have highest priority, so move that to the end of the table
-- instead.
--]]
table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3))
--[[
-- Define the attempt order. Inactive subtables (subtables with nil "value"
-- fields) are moved to the end, where they will later be given the key
-- "all". This is to cut down on the number of table lookups in
-- cfg.protectionCategories, which grows exponentially with the number of
-- non-nil keys. We keep track of the number of active subtables with the
-- noActive parameter.
--]]
local noActive, attemptOrder
do
local active, inactive = {}, {}
for i, t in ipairs(order) do
if t.val then
active[#active + 1] = t
else
inactive[#inactive + 1] = t
end
end
noActive = #active
attemptOrder = active
for i, t in ipairs(inactive) do
attemptOrder[#attemptOrder + 1] = t
end
end
--[[
-- Check increasingly generic key combinations until we find a match. If a
-- specific category exists for the combination of key fragments we are
-- given, that match will be found first. If not, we keep trying different
-- key fragment combinations until we match using the key
-- "all-all-all-all-all".
--
-- To generate the keys, we index the key subtables using a binary matrix
-- with indexes i and j. j is only calculated up to the number of active
-- subtables. For example, if there were three active subtables, the matrix
-- would look like this, with 0 corresponding to the key fragment "all", and
-- 1 corresponding to other key fragments.
--
-- j 1 2 3
-- i
-- 1 1 1 1
-- 2 0 1 1
-- 3 1 0 1
-- 4 0 0 1
-- 5 1 1 0
-- 6 0 1 0
-- 7 1 0 0
-- 8 0 0 0
--
-- Values of j higher than the number of active subtables are set
-- to the string "all".
--
-- A key for cfg.protectionCategories is constructed for each value of i.
-- The position of the value in the key is determined by the keypos field in
-- each subtable.
--]]
local cats = cfg.protectionCategories
for i = 1, 2^noActive do
local key = {}
for j, t in ipairs(attemptOrder) do
if j > noActive then
key[t.keypos] = 'all'
else
local quotient = i / 2 ^ (j - 1)
quotient = math.ceil(quotient)
if quotient % 2 == 1 then
key[t.keypos] = t.val
else
key[t.keypos] = 'all'
end
end
end
key = table.concat(key, '|')
local attempt = cats[key]
if attempt then
return makeCategoryLink(attempt, title.text)
end
end
return ''
end
function Protection:isIncorrect()
local expiry = self.expiry
return not self:shouldHaveProtectionCategory()
or type(expiry) == 'number' and expiry < os.time()
end
function Protection:isTemplateProtectedNonTemplate()
local action, namespace = self.action, self.title.namespace
return self.level == 'templateeditor'
and (
(action ~= 'edit' and action ~= 'move')
or (namespace ~= 10 and namespace ~= 828)
)
end
function Protection:makeCategoryLinks()
local msg = self._cfg.msg
local ret = {self:makeProtectionCategory()}
if self:isIncorrect() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-incorrect'],
self.title.text
)
end
if self:isTemplateProtectedNonTemplate() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-template'],
self.title.text
)
end
return table.concat(ret)
end
--------------------------------------------------------------------------------
-- Blurb class
--------------------------------------------------------------------------------
local Blurb = {}
Blurb.__index = Blurb
Blurb.bannerTextFields = {
text = true,
explanation = true,
tooltip = true,
alt = true,
link = true
}
function Blurb.new(protectionObj, args, cfg)
return setmetatable({
_cfg = cfg,
_protectionObj = protectionObj,
_args = args
}, Blurb)
end
-- Private methods --
function Blurb:_formatDate(num)
-- Formats a Unix timestamp into dd Month, YYYY format.
lang = lang or mw.language.getContentLanguage()
local success, date = pcall(
lang.formatDate,
lang,
self._cfg.msg['expiry-date-format'] or 'j F Y',
'@' .. tostring(num)
)
if success then
return date
end
end
function Blurb:_getExpandedMessage(msgKey)
return self:_substituteParameters(self._cfg.msg[msgKey])
end
function Blurb:_substituteParameters(msg)
if not self._params then
local parameterFuncs = {}
parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter
parameterFuncs.EDITREQUEST = self._makeEditRequestParameter
parameterFuncs.EXPIRY = self._makeExpiryParameter
parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter
parameterFuncs.IMAGELINK = self._makeImageLinkParameter
parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter
parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter
parameterFuncs.PAGETYPE = self._makePagetypeParameter
parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter
parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter
parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter
parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter
parameterFuncs.TALKPAGE = self._makeTalkPageParameter
parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter
parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter
parameterFuncs.VANDAL = self._makeVandalTemplateParameter
self._params = setmetatable({}, {
__index = function (t, k)
local param
if parameterFuncs[k] then
param = parameterFuncs[k](self)
end
param = param or ''
t[k] = param
return param
end
})
end
msg = msg:gsub('${(%u+)}', self._params)
return msg
end
function Blurb:_makeCurrentVersionParameter()
-- A link to the page history or the move log, depending on the kind of
-- protection.
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'move' then
-- We need the move log link.
return makeFullUrl(
'Special:Log',
{type = 'move', page = pagename},
self:_getExpandedMessage('current-version-move-display')
)
else
-- We need the history link.
return makeFullUrl(
pagename,
{action = 'history'},
self:_getExpandedMessage('current-version-edit-display')
)
end
end
function Blurb:_makeEditRequestParameter()
local mEditRequest = require('Module:Submit an edit request')
local action = self._protectionObj.action
local level = self._protectionObj.level
-- Get the edit request type.
local requestType
if action == 'edit' then
if level == 'autoconfirmed' then
requestType = 'semi'
elseif level == 'extendedconfirmed' then
requestType = 'extended'
elseif level == 'templateeditor' then
requestType = 'template'
end
end
requestType = requestType or 'full'
-- Get the display value.
local display = self:_getExpandedMessage('edit-request-display')
return mEditRequest._link{type = requestType, display = display}
end
function Blurb:_makeExpiryParameter()
local expiry = self._protectionObj.expiry
if type(expiry) == 'number' then
return self:_formatDate(expiry)
else
return expiry
end
end
function Blurb:_makeExplanationBlurbParameter()
-- Cover special cases first.
if self._protectionObj.title.namespace == 8 then
-- MediaWiki namespace
return self:_getExpandedMessage('explanation-blurb-nounprotect')
end
-- Get explanation blurb table keys
local action = self._protectionObj.action
local level = self._protectionObj.level
local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject'
-- Find the message in the explanation blurb table and substitute any
-- parameters.
local explanations = self._cfg.explanationBlurbs
local msg
if explanations[action][level] and explanations[action][level][talkKey] then
msg = explanations[action][level][talkKey]
elseif explanations[action][level] and explanations[action][level].default then
msg = explanations[action][level].default
elseif explanations[action].default and explanations[action].default[talkKey] then
msg = explanations[action].default[talkKey]
elseif explanations[action].default and explanations[action].default.default then
msg = explanations[action].default.default
else
error(string.format(
'could not find explanation blurb for action "%s", level "%s" and talk key "%s"',
action,
level,
talkKey
), 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeImageLinkParameter()
local imageLinks = self._cfg.imageLinks
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if imageLinks[action][level] then
msg = imageLinks[action][level]
elseif imageLinks[action].default then
msg = imageLinks[action].default
else
msg = imageLinks.edit.default
end
return self:_substituteParameters(msg)
end
function Blurb:_makeIntroBlurbParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-blurb-expiry')
else
return self:_getExpandedMessage('intro-blurb-noexpiry')
end
end
function Blurb:_makeIntroFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-fragment-expiry')
else
return self:_getExpandedMessage('intro-fragment-noexpiry')
end
end
function Blurb:_makePagetypeParameter()
local pagetypes = self._cfg.pagetypes
return pagetypes[self._protectionObj.title.namespace]
or pagetypes.default
or error('no default pagetype defined', 8)
end
function Blurb:_makeProtectionBlurbParameter()
local protectionBlurbs = self._cfg.protectionBlurbs
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if protectionBlurbs[action][level] then
msg = protectionBlurbs[action][level]
elseif protectionBlurbs[action].default then
msg = protectionBlurbs[action].default
elseif protectionBlurbs.edit.default then
msg = protectionBlurbs.edit.default
else
error('no protection blurb defined for protectionBlurbs.edit.default', 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeProtectionDateParameter()
local protectionDate = self._protectionObj.protectionDate
if type(protectionDate) == 'number' then
return self:_formatDate(protectionDate)
else
return protectionDate
end
end
function Blurb:_makeProtectionLevelParameter()
local protectionLevels = self._cfg.protectionLevels
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if protectionLevels[action][level] then
msg = protectionLevels[action][level]
elseif protectionLevels[action].default then
msg = protectionLevels[action].default
elseif protectionLevels.edit.default then
msg = protectionLevels.edit.default
else
error('no protection level defined for protectionLevels.edit.default', 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeProtectionLogParameter()
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'autoreview' then
-- We need the pending changes log.
return makeFullUrl(
'Special:Log',
{type = 'stable', page = pagename},
self:_getExpandedMessage('pc-log-display')
)
else
-- We need the protection log.
return makeFullUrl(
'Special:Log',
{type = 'protect', page = pagename},
self:_getExpandedMessage('protection-log-display')
)
end
end
function Blurb:_makeTalkPageParameter()
return string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[self._protectionObj.title.namespace].talk.name,
self._protectionObj.title.text,
self._args.section or 'top',
self:_getExpandedMessage('talk-page-link-display')
)
end
function Blurb:_makeTooltipBlurbParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-blurb-expiry')
else
return self:_getExpandedMessage('tooltip-blurb-noexpiry')
end
end
function Blurb:_makeTooltipFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-fragment-expiry')
else
return self:_getExpandedMessage('tooltip-fragment-noexpiry')
end
end
function Blurb:_makeVandalTemplateParameter()
return mw.getCurrentFrame():expandTemplate{
title="vandal-m",
args={self._args.user or self._protectionObj.title.baseText}
}
end
-- Public methods --
function Blurb:makeBannerText(key)
-- Validate input.
if not key or not Blurb.bannerTextFields[key] then
error(string.format(
'"%s" is not a valid banner config field',
tostring(key)
), 2)
end
-- Generate the text.
local msg = self._protectionObj.bannerConfig[key]
if type(msg) == 'string' then
return self:_substituteParameters(msg)
elseif type(msg) == 'function' then
msg = msg(self._protectionObj, self._args)
if type(msg) ~= 'string' then
error(string.format(
'bad output from banner config function with key "%s"'
.. ' (expected string, got %s)',
tostring(key),
type(msg)
), 4)
end
return self:_substituteParameters(msg)
end
end
--------------------------------------------------------------------------------
-- BannerTemplate class
--------------------------------------------------------------------------------
local BannerTemplate = {}
BannerTemplate.__index = BannerTemplate
function BannerTemplate.new(protectionObj, cfg)
local obj = {}
obj._cfg = cfg
-- Set the image filename.
local imageFilename = protectionObj.bannerConfig.image
if imageFilename then
obj._imageFilename = imageFilename
else
-- If an image filename isn't specified explicitly in the banner config,
-- generate it from the protection status and the namespace.
local action = protectionObj.action
local level = protectionObj.level
local namespace = protectionObj.title.namespace
local reason = protectionObj.reason
-- Deal with special cases first.
if (
namespace == 10
or namespace == 828
or reason and obj._cfg.indefImageReasons[reason]
)
and action == 'edit'
and level == 'sysop'
and not protectionObj:isTemporary()
then
-- Fully protected modules and templates get the special red "indef"
-- padlock.
obj._imageFilename = obj._cfg.msg['image-filename-indef']
else
-- Deal with regular protection types.
local images = obj._cfg.images
if images[action] then
if images[action][level] then
obj._imageFilename = images[action][level]
elseif images[action].default then
obj._imageFilename = images[action].default
end
end
end
end
return setmetatable(obj, BannerTemplate)
end
function BannerTemplate:renderImage()
local filename = self._imageFilename
or self._cfg.msg['image-filename-default']
or 'Transparent.gif'
return makeFileLink{
file = filename,
size = (self.imageWidth or 20) .. 'px',
alt = self._imageAlt,
link = self._imageLink,
caption = self.imageCaption
}
end
--------------------------------------------------------------------------------
-- Banner class
--------------------------------------------------------------------------------
local Banner = setmetatable({}, BannerTemplate)
Banner.__index = Banner
function Banner.new(protectionObj, blurbObj, cfg)
local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.
obj.imageWidth = 40
obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip.
obj._reasonText = blurbObj:makeBannerText('text')
obj._explanationText = blurbObj:makeBannerText('explanation')
obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing.
return setmetatable(obj, Banner)
end
function Banner:__tostring()
-- Renders the banner.
makeMessageBox = makeMessageBox or require('Module:Message box').main
local reasonText = self._reasonText or error('no reason text set', 2)
local explanationText = self._explanationText
local mbargs = {
page = self._page,
type = 'protection',
image = self:renderImage(),
text = string.format(
"'''%s'''%s",
reasonText,
explanationText and '<br />' .. explanationText or ''
)
}
return makeMessageBox('mbox', mbargs)
end
--------------------------------------------------------------------------------
-- Padlock class
--------------------------------------------------------------------------------
local Padlock = setmetatable({}, BannerTemplate)
Padlock.__index = Padlock
function Padlock.new(protectionObj, blurbObj, cfg)
local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.
obj.imageWidth = 20
obj.imageCaption = blurbObj:makeBannerText('tooltip')
obj._imageAlt = blurbObj:makeBannerText('alt')
obj._imageLink = blurbObj:makeBannerText('link')
obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]
or cfg.padlockIndicatorNames.default
or 'pp-default'
return setmetatable(obj, Padlock)
end
function Padlock:__tostring()
local frame = mw.getCurrentFrame()
-- The nowiki tag helps prevent whitespace at the top of articles.
return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{
name = 'indicator',
args = {name = self._indicatorName},
content = self:renderImage()
}
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p = {}
function p._exportClasses()
-- This is used for testing purposes.
return {
Protection = Protection,
Blurb = Blurb,
BannerTemplate = BannerTemplate,
Banner = Banner,
Padlock = Padlock,
}
end
function p._main(args, cfg, title)
args = args or {}
cfg = cfg or require(CONFIG_MODULE)
local protectionObj = Protection.new(args, cfg, title)
local ret = {}
-- If a page's edit protection is equally or more restrictive than its
-- protection from some other action, then don't bother displaying anything
-- for the other action (except categories).
if not yesno(args.catonly) and (protectionObj.action == 'edit' or
args.demolevel or
not getReachableNodes(
cfg.hierarchy,
protectionObj.level
)[effectiveProtectionLevel('edit', protectionObj.title)])
then
-- Initialise the blurb object
local blurbObj = Blurb.new(protectionObj, args, cfg)
-- Render the banner
if protectionObj:shouldShowLock() then
ret[#ret + 1] = tostring(
(yesno(args.small) and Padlock or Banner)
.new(protectionObj, blurbObj, cfg)
)
end
end
-- Render the categories
if yesno(args.category) ~= false then
ret[#ret + 1] = protectionObj:makeCategoryLinks()
end
-- For arbitration enforcement, flagging [[WP:PIA]] pages to enable [[Special:AbuseFilter/1339]] to flag edits to them
if protectionObj.level == "extendedconfirmed" then
if require("Module:TableTools").inArray(protectionObj.title.talkPageTitle.categories, "Wikipedia pages subject to the extended confirmed restriction related to the Arab-Israeli conflict") then
ret[#ret + 1] = "<p class='PIA-flag' style='display:none; visibility:hidden;' title='This page is subject to the extended confirmed restriction related to the Arab-Israeli conflict.'></p>"
end
end
return table.concat(ret)
end
function p.main(frame, cfg)
cfg = cfg or require(CONFIG_MODULE)
-- Find default args, if any.
local parent = frame.getParent and frame:getParent()
local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')]
-- Find user args, and use the parent frame if we are being called from a
-- wrapper template.
getArgs = getArgs or require('Module:Arguments').getArgs
local userArgs = getArgs(frame, {
parentOnly = defaultArgs,
frameOnly = not defaultArgs
})
-- Build the args table. User-specified args overwrite default args.
local args = {}
for k, v in pairs(defaultArgs or {}) do
args[k] = v
end
for k, v in pairs(userArgs) do
args[k] = v
end
return p._main(args, cfg)
end
return p
2lyr6ebd580cvha7qta16zrremxkzxz
665076
665075
2025-07-02T01:47:18Z
Novem Linguae
49714
1 revision imported from [[:en:Module:Protection_banner]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665075
Scribunto
text/plain
-- This module implements {{pp-meta}} and its daughter templates such as
-- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}.
-- Initialise necessary modules.
require('strict')
local makeFileLink = require('Module:File link')._main
local effectiveProtectionLevel = require('Module:Effective protection level')._main
local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main
local yesno = require('Module:Yesno')
-- Lazily initialise modules and objects we don't always need.
local getArgs, makeMessageBox, lang
-- Set constants.
local CONFIG_MODULE = 'Module:Protection banner/config'
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function makeCategoryLink(cat, sort)
if cat then
return string.format(
'[[%s:%s|%s]]',
mw.site.namespaces[14].name,
cat,
sort
)
end
end
-- Validation function for the expiry and the protection date
local function validateDate(dateString, dateType)
if not lang then
lang = mw.language.getContentLanguage()
end
local success, result = pcall(lang.formatDate, lang, 'U', dateString)
if success then
result = tonumber(result)
if result then
return result
end
end
error(string.format(
'invalid %s: %s',
dateType,
tostring(dateString)
), 4)
end
local function makeFullUrl(page, query, display)
return string.format(
'[%s %s]',
tostring(mw.uri.fullUrl(page, query)),
display
)
end
-- Given a directed graph formatted as node -> table of direct successors,
-- get a table of all nodes reachable from a given node (though always
-- including the given node).
local function getReachableNodes(graph, start)
local toWalk, retval = {[start] = true}, {}
while true do
-- Can't use pairs() since we're adding and removing things as we're iterating
local k = next(toWalk) -- This always gets the "first" key
if k == nil then
return retval
end
toWalk[k] = nil
retval[k] = true
for _,v in ipairs(graph[k]) do
if not retval[v] then
toWalk[v] = true
end
end
end
end
--------------------------------------------------------------------------------
-- Protection class
--------------------------------------------------------------------------------
local Protection = {}
Protection.__index = Protection
Protection.supportedActions = {
edit = true,
move = true,
autoreview = true,
upload = true
}
Protection.bannerConfigFields = {
'text',
'explanation',
'tooltip',
'alt',
'link',
'image'
}
function Protection.new(args, cfg, title)
local obj = {}
obj._cfg = cfg
obj.title = title or mw.title.getCurrentTitle()
-- Set action
if not args.action then
obj.action = 'edit'
elseif Protection.supportedActions[args.action] then
obj.action = args.action
else
error(string.format(
'invalid action: %s',
tostring(args.action)
), 3)
end
-- Set level
obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title)
if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then
-- Users need to be autoconfirmed to move pages anyway, so treat
-- semi-move-protected pages as unprotected.
obj.level = '*'
end
-- Set expiry
local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title)
if effectiveExpiry == 'infinity' then
obj.expiry = 'indef'
elseif effectiveExpiry ~= 'unknown' then
obj.expiry = validateDate(effectiveExpiry, 'expiry date')
end
-- Set reason
if args[1] then
obj.reason = mw.ustring.lower(args[1])
if obj.reason:find('|') then
error('reasons cannot contain the pipe character ("|")', 3)
end
end
-- Set protection date
if args.date then
obj.protectionDate = validateDate(args.date, 'protection date')
end
-- Set banner config
do
obj.bannerConfig = {}
local configTables = {}
if cfg.banners[obj.action] then
configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason]
end
if cfg.defaultBanners[obj.action] then
configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level]
configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default
end
configTables[#configTables + 1] = cfg.masterBanner
for i, field in ipairs(Protection.bannerConfigFields) do
for j, t in ipairs(configTables) do
if t[field] then
obj.bannerConfig[field] = t[field]
break
end
end
end
end
return setmetatable(obj, Protection)
end
function Protection:isUserScript()
-- Whether the page is a user JavaScript or CSS page.
local title = self.title
return title.namespace == 2 and (
title.contentModel == 'javascript' or title.contentModel == 'css'
)
end
function Protection:isProtected()
return self.level ~= '*'
end
function Protection:shouldShowLock()
-- Whether we should output a banner/padlock
return self:isProtected() and not self:isUserScript()
end
-- Whether this page needs a protection category.
Protection.shouldHaveProtectionCategory = Protection.shouldShowLock
function Protection:isTemporary()
return type(self.expiry) == 'number'
end
function Protection:makeProtectionCategory()
if not self:shouldHaveProtectionCategory() then
return ''
end
local cfg = self._cfg
local title = self.title
-- Get the expiry key fragment.
local expiryFragment
if self.expiry == 'indef' then
expiryFragment = self.expiry
elseif type(self.expiry) == 'number' then
expiryFragment = 'temp'
end
-- Get the namespace key fragment.
local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace]
if not namespaceFragment and title.namespace % 2 == 1 then
namespaceFragment = 'talk'
end
-- Define the order that key fragments are tested in. This is done with an
-- array of tables containing the value to be tested, along with its
-- position in the cfg.protectionCategories table.
local order = {
{val = expiryFragment, keypos = 1},
{val = namespaceFragment, keypos = 2},
{val = self.reason, keypos = 3},
{val = self.level, keypos = 4},
{val = self.action, keypos = 5}
}
--[[
-- The old protection templates used an ad-hoc protection category system,
-- with some templates prioritising namespaces in their categories, and
-- others prioritising the protection reason. To emulate this in this module
-- we use the config table cfg.reasonsWithNamespacePriority to set the
-- reasons for which namespaces have priority over protection reason.
-- If we are dealing with one of those reasons, move the namespace table to
-- the end of the order table, i.e. give it highest priority. If not, the
-- reason should have highest priority, so move that to the end of the table
-- instead.
--]]
table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3))
--[[
-- Define the attempt order. Inactive subtables (subtables with nil "value"
-- fields) are moved to the end, where they will later be given the key
-- "all". This is to cut down on the number of table lookups in
-- cfg.protectionCategories, which grows exponentially with the number of
-- non-nil keys. We keep track of the number of active subtables with the
-- noActive parameter.
--]]
local noActive, attemptOrder
do
local active, inactive = {}, {}
for i, t in ipairs(order) do
if t.val then
active[#active + 1] = t
else
inactive[#inactive + 1] = t
end
end
noActive = #active
attemptOrder = active
for i, t in ipairs(inactive) do
attemptOrder[#attemptOrder + 1] = t
end
end
--[[
-- Check increasingly generic key combinations until we find a match. If a
-- specific category exists for the combination of key fragments we are
-- given, that match will be found first. If not, we keep trying different
-- key fragment combinations until we match using the key
-- "all-all-all-all-all".
--
-- To generate the keys, we index the key subtables using a binary matrix
-- with indexes i and j. j is only calculated up to the number of active
-- subtables. For example, if there were three active subtables, the matrix
-- would look like this, with 0 corresponding to the key fragment "all", and
-- 1 corresponding to other key fragments.
--
-- j 1 2 3
-- i
-- 1 1 1 1
-- 2 0 1 1
-- 3 1 0 1
-- 4 0 0 1
-- 5 1 1 0
-- 6 0 1 0
-- 7 1 0 0
-- 8 0 0 0
--
-- Values of j higher than the number of active subtables are set
-- to the string "all".
--
-- A key for cfg.protectionCategories is constructed for each value of i.
-- The position of the value in the key is determined by the keypos field in
-- each subtable.
--]]
local cats = cfg.protectionCategories
for i = 1, 2^noActive do
local key = {}
for j, t in ipairs(attemptOrder) do
if j > noActive then
key[t.keypos] = 'all'
else
local quotient = i / 2 ^ (j - 1)
quotient = math.ceil(quotient)
if quotient % 2 == 1 then
key[t.keypos] = t.val
else
key[t.keypos] = 'all'
end
end
end
key = table.concat(key, '|')
local attempt = cats[key]
if attempt then
return makeCategoryLink(attempt, title.text)
end
end
return ''
end
function Protection:isIncorrect()
local expiry = self.expiry
return not self:shouldHaveProtectionCategory()
or type(expiry) == 'number' and expiry < os.time()
end
function Protection:isTemplateProtectedNonTemplate()
local action, namespace = self.action, self.title.namespace
return self.level == 'templateeditor'
and (
(action ~= 'edit' and action ~= 'move')
or (namespace ~= 10 and namespace ~= 828)
)
end
function Protection:makeCategoryLinks()
local msg = self._cfg.msg
local ret = {self:makeProtectionCategory()}
if self:isIncorrect() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-incorrect'],
self.title.text
)
end
if self:isTemplateProtectedNonTemplate() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-template'],
self.title.text
)
end
return table.concat(ret)
end
--------------------------------------------------------------------------------
-- Blurb class
--------------------------------------------------------------------------------
local Blurb = {}
Blurb.__index = Blurb
Blurb.bannerTextFields = {
text = true,
explanation = true,
tooltip = true,
alt = true,
link = true
}
function Blurb.new(protectionObj, args, cfg)
return setmetatable({
_cfg = cfg,
_protectionObj = protectionObj,
_args = args
}, Blurb)
end
-- Private methods --
function Blurb:_formatDate(num)
-- Formats a Unix timestamp into dd Month, YYYY format.
lang = lang or mw.language.getContentLanguage()
local success, date = pcall(
lang.formatDate,
lang,
self._cfg.msg['expiry-date-format'] or 'j F Y',
'@' .. tostring(num)
)
if success then
return date
end
end
function Blurb:_getExpandedMessage(msgKey)
return self:_substituteParameters(self._cfg.msg[msgKey])
end
function Blurb:_substituteParameters(msg)
if not self._params then
local parameterFuncs = {}
parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter
parameterFuncs.EDITREQUEST = self._makeEditRequestParameter
parameterFuncs.EXPIRY = self._makeExpiryParameter
parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter
parameterFuncs.IMAGELINK = self._makeImageLinkParameter
parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter
parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter
parameterFuncs.PAGETYPE = self._makePagetypeParameter
parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter
parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter
parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter
parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter
parameterFuncs.TALKPAGE = self._makeTalkPageParameter
parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter
parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter
parameterFuncs.VANDAL = self._makeVandalTemplateParameter
self._params = setmetatable({}, {
__index = function (t, k)
local param
if parameterFuncs[k] then
param = parameterFuncs[k](self)
end
param = param or ''
t[k] = param
return param
end
})
end
msg = msg:gsub('${(%u+)}', self._params)
return msg
end
function Blurb:_makeCurrentVersionParameter()
-- A link to the page history or the move log, depending on the kind of
-- protection.
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'move' then
-- We need the move log link.
return makeFullUrl(
'Special:Log',
{type = 'move', page = pagename},
self:_getExpandedMessage('current-version-move-display')
)
else
-- We need the history link.
return makeFullUrl(
pagename,
{action = 'history'},
self:_getExpandedMessage('current-version-edit-display')
)
end
end
function Blurb:_makeEditRequestParameter()
local mEditRequest = require('Module:Submit an edit request')
local action = self._protectionObj.action
local level = self._protectionObj.level
-- Get the edit request type.
local requestType
if action == 'edit' then
if level == 'autoconfirmed' then
requestType = 'semi'
elseif level == 'extendedconfirmed' then
requestType = 'extended'
elseif level == 'templateeditor' then
requestType = 'template'
end
end
requestType = requestType or 'full'
-- Get the display value.
local display = self:_getExpandedMessage('edit-request-display')
return mEditRequest._link{type = requestType, display = display}
end
function Blurb:_makeExpiryParameter()
local expiry = self._protectionObj.expiry
if type(expiry) == 'number' then
return self:_formatDate(expiry)
else
return expiry
end
end
function Blurb:_makeExplanationBlurbParameter()
-- Cover special cases first.
if self._protectionObj.title.namespace == 8 then
-- MediaWiki namespace
return self:_getExpandedMessage('explanation-blurb-nounprotect')
end
-- Get explanation blurb table keys
local action = self._protectionObj.action
local level = self._protectionObj.level
local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject'
-- Find the message in the explanation blurb table and substitute any
-- parameters.
local explanations = self._cfg.explanationBlurbs
local msg
if explanations[action][level] and explanations[action][level][talkKey] then
msg = explanations[action][level][talkKey]
elseif explanations[action][level] and explanations[action][level].default then
msg = explanations[action][level].default
elseif explanations[action].default and explanations[action].default[talkKey] then
msg = explanations[action].default[talkKey]
elseif explanations[action].default and explanations[action].default.default then
msg = explanations[action].default.default
else
error(string.format(
'could not find explanation blurb for action "%s", level "%s" and talk key "%s"',
action,
level,
talkKey
), 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeImageLinkParameter()
local imageLinks = self._cfg.imageLinks
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if imageLinks[action][level] then
msg = imageLinks[action][level]
elseif imageLinks[action].default then
msg = imageLinks[action].default
else
msg = imageLinks.edit.default
end
return self:_substituteParameters(msg)
end
function Blurb:_makeIntroBlurbParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-blurb-expiry')
else
return self:_getExpandedMessage('intro-blurb-noexpiry')
end
end
function Blurb:_makeIntroFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-fragment-expiry')
else
return self:_getExpandedMessage('intro-fragment-noexpiry')
end
end
function Blurb:_makePagetypeParameter()
local pagetypes = self._cfg.pagetypes
return pagetypes[self._protectionObj.title.namespace]
or pagetypes.default
or error('no default pagetype defined', 8)
end
function Blurb:_makeProtectionBlurbParameter()
local protectionBlurbs = self._cfg.protectionBlurbs
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if protectionBlurbs[action][level] then
msg = protectionBlurbs[action][level]
elseif protectionBlurbs[action].default then
msg = protectionBlurbs[action].default
elseif protectionBlurbs.edit.default then
msg = protectionBlurbs.edit.default
else
error('no protection blurb defined for protectionBlurbs.edit.default', 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeProtectionDateParameter()
local protectionDate = self._protectionObj.protectionDate
if type(protectionDate) == 'number' then
return self:_formatDate(protectionDate)
else
return protectionDate
end
end
function Blurb:_makeProtectionLevelParameter()
local protectionLevels = self._cfg.protectionLevels
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if protectionLevels[action][level] then
msg = protectionLevels[action][level]
elseif protectionLevels[action].default then
msg = protectionLevels[action].default
elseif protectionLevels.edit.default then
msg = protectionLevels.edit.default
else
error('no protection level defined for protectionLevels.edit.default', 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeProtectionLogParameter()
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'autoreview' then
-- We need the pending changes log.
return makeFullUrl(
'Special:Log',
{type = 'stable', page = pagename},
self:_getExpandedMessage('pc-log-display')
)
else
-- We need the protection log.
return makeFullUrl(
'Special:Log',
{type = 'protect', page = pagename},
self:_getExpandedMessage('protection-log-display')
)
end
end
function Blurb:_makeTalkPageParameter()
return string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[self._protectionObj.title.namespace].talk.name,
self._protectionObj.title.text,
self._args.section or 'top',
self:_getExpandedMessage('talk-page-link-display')
)
end
function Blurb:_makeTooltipBlurbParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-blurb-expiry')
else
return self:_getExpandedMessage('tooltip-blurb-noexpiry')
end
end
function Blurb:_makeTooltipFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-fragment-expiry')
else
return self:_getExpandedMessage('tooltip-fragment-noexpiry')
end
end
function Blurb:_makeVandalTemplateParameter()
return mw.getCurrentFrame():expandTemplate{
title="vandal-m",
args={self._args.user or self._protectionObj.title.baseText}
}
end
-- Public methods --
function Blurb:makeBannerText(key)
-- Validate input.
if not key or not Blurb.bannerTextFields[key] then
error(string.format(
'"%s" is not a valid banner config field',
tostring(key)
), 2)
end
-- Generate the text.
local msg = self._protectionObj.bannerConfig[key]
if type(msg) == 'string' then
return self:_substituteParameters(msg)
elseif type(msg) == 'function' then
msg = msg(self._protectionObj, self._args)
if type(msg) ~= 'string' then
error(string.format(
'bad output from banner config function with key "%s"'
.. ' (expected string, got %s)',
tostring(key),
type(msg)
), 4)
end
return self:_substituteParameters(msg)
end
end
--------------------------------------------------------------------------------
-- BannerTemplate class
--------------------------------------------------------------------------------
local BannerTemplate = {}
BannerTemplate.__index = BannerTemplate
function BannerTemplate.new(protectionObj, cfg)
local obj = {}
obj._cfg = cfg
-- Set the image filename.
local imageFilename = protectionObj.bannerConfig.image
if imageFilename then
obj._imageFilename = imageFilename
else
-- If an image filename isn't specified explicitly in the banner config,
-- generate it from the protection status and the namespace.
local action = protectionObj.action
local level = protectionObj.level
local namespace = protectionObj.title.namespace
local reason = protectionObj.reason
-- Deal with special cases first.
if (
namespace == 10
or namespace == 828
or reason and obj._cfg.indefImageReasons[reason]
)
and action == 'edit'
and level == 'sysop'
and not protectionObj:isTemporary()
then
-- Fully protected modules and templates get the special red "indef"
-- padlock.
obj._imageFilename = obj._cfg.msg['image-filename-indef']
else
-- Deal with regular protection types.
local images = obj._cfg.images
if images[action] then
if images[action][level] then
obj._imageFilename = images[action][level]
elseif images[action].default then
obj._imageFilename = images[action].default
end
end
end
end
return setmetatable(obj, BannerTemplate)
end
function BannerTemplate:renderImage()
local filename = self._imageFilename
or self._cfg.msg['image-filename-default']
or 'Transparent.gif'
return makeFileLink{
file = filename,
size = (self.imageWidth or 20) .. 'px',
alt = self._imageAlt,
link = self._imageLink,
caption = self.imageCaption
}
end
--------------------------------------------------------------------------------
-- Banner class
--------------------------------------------------------------------------------
local Banner = setmetatable({}, BannerTemplate)
Banner.__index = Banner
function Banner.new(protectionObj, blurbObj, cfg)
local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.
obj.imageWidth = 40
obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip.
obj._reasonText = blurbObj:makeBannerText('text')
obj._explanationText = blurbObj:makeBannerText('explanation')
obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing.
return setmetatable(obj, Banner)
end
function Banner:__tostring()
-- Renders the banner.
makeMessageBox = makeMessageBox or require('Module:Message box').main
local reasonText = self._reasonText or error('no reason text set', 2)
local explanationText = self._explanationText
local mbargs = {
page = self._page,
type = 'protection',
image = self:renderImage(),
text = string.format(
"'''%s'''%s",
reasonText,
explanationText and '<br />' .. explanationText or ''
)
}
return makeMessageBox('mbox', mbargs)
end
--------------------------------------------------------------------------------
-- Padlock class
--------------------------------------------------------------------------------
local Padlock = setmetatable({}, BannerTemplate)
Padlock.__index = Padlock
function Padlock.new(protectionObj, blurbObj, cfg)
local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.
obj.imageWidth = 20
obj.imageCaption = blurbObj:makeBannerText('tooltip')
obj._imageAlt = blurbObj:makeBannerText('alt')
obj._imageLink = blurbObj:makeBannerText('link')
obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]
or cfg.padlockIndicatorNames.default
or 'pp-default'
return setmetatable(obj, Padlock)
end
function Padlock:__tostring()
local frame = mw.getCurrentFrame()
-- The nowiki tag helps prevent whitespace at the top of articles.
return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{
name = 'indicator',
args = {name = self._indicatorName},
content = self:renderImage()
}
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p = {}
function p._exportClasses()
-- This is used for testing purposes.
return {
Protection = Protection,
Blurb = Blurb,
BannerTemplate = BannerTemplate,
Banner = Banner,
Padlock = Padlock,
}
end
function p._main(args, cfg, title)
args = args or {}
cfg = cfg or require(CONFIG_MODULE)
local protectionObj = Protection.new(args, cfg, title)
local ret = {}
-- If a page's edit protection is equally or more restrictive than its
-- protection from some other action, then don't bother displaying anything
-- for the other action (except categories).
if not yesno(args.catonly) and (protectionObj.action == 'edit' or
args.demolevel or
not getReachableNodes(
cfg.hierarchy,
protectionObj.level
)[effectiveProtectionLevel('edit', protectionObj.title)])
then
-- Initialise the blurb object
local blurbObj = Blurb.new(protectionObj, args, cfg)
-- Render the banner
if protectionObj:shouldShowLock() then
ret[#ret + 1] = tostring(
(yesno(args.small) and Padlock or Banner)
.new(protectionObj, blurbObj, cfg)
)
end
end
-- Render the categories
if yesno(args.category) ~= false then
ret[#ret + 1] = protectionObj:makeCategoryLinks()
end
-- For arbitration enforcement, flagging [[WP:PIA]] pages to enable [[Special:AbuseFilter/1339]] to flag edits to them
if protectionObj.level == "extendedconfirmed" then
if require("Module:TableTools").inArray(protectionObj.title.talkPageTitle.categories, "Wikipedia pages subject to the extended confirmed restriction related to the Arab-Israeli conflict") then
ret[#ret + 1] = "<p class='PIA-flag' style='display:none; visibility:hidden;' title='This page is subject to the extended confirmed restriction related to the Arab-Israeli conflict.'></p>"
end
end
return table.concat(ret)
end
function p.main(frame, cfg)
cfg = cfg or require(CONFIG_MODULE)
-- Find default args, if any.
local parent = frame.getParent and frame:getParent()
local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')]
-- Find user args, and use the parent frame if we are being called from a
-- wrapper template.
getArgs = getArgs or require('Module:Arguments').getArgs
local userArgs = getArgs(frame, {
parentOnly = defaultArgs,
frameOnly = not defaultArgs
})
-- Build the args table. User-specified args overwrite default args.
local args = {}
for k, v in pairs(defaultArgs or {}) do
args[k] = v
end
for k, v in pairs(userArgs) do
args[k] = v
end
return p._main(args, cfg)
end
return p
2lyr6ebd580cvha7qta16zrremxkzxz
Template:Speedy deletion templates
10
86121
665081
629916
2025-01-14T23:54:13Z
en>ToThAc
0
665081
wikitext
text/x-wiki
{{Sidebar with collapsible lists
| name = Speedy deletion templates
| class = Speedy-deletion-templates
| templatestyles = Speedy deletion templates/styles.css
| title = [[Wikipedia:Criteria for speedy deletion|Speedy deletion templates]]
| expanded = {{{expanded|{{{selected|{{{1|}}}}}}}}}
| list1name = general
| list1title = General criteria
| list1 =
{{infobox|subbox=yes
|label1=[[WP:G1|G1]] |data1={{tl|db-g1}} {{tl|db-nonsense}}
|label2=[[WP:G2|G2]] |data2={{tl|db-g2}} {{tl|db-test}}
|label3=[[WP:G3|G3]] |data3={{tl|db-g3}} {{tl|db-vandalism}} {{tl|db-hoax}}
|label4=[[WP:G4|G4]] |data4={{tl|db-g4}} {{tl|db-repost}}
|label5=[[WP:G5|G5]] |data5={{tl|db-g5}} {{tl|db-banned}} {{tl|db-gs}}
|label6=[[WP:G6|G6]] |data6={{tl|db-g6}} {{tl|db-copypaste}} {{tl|db-error}} {{tl|db-move}} {{tl|db-moved}} {{tl|db-xfd}} {{tl|Db-afc-move}}
|label7=[[WP:G7|G7]] |data7={{tl|db-g7}} {{tl|db-author}}
|label8=[[WP:G8|G8]] |data8={{tl|db-g8}} {{tl|db-redirnone}} {{tl|db-subpage}} {{tl|db-talk}} {{tl|db-timedtext}}
|label10=[[WP:G10|G10]] |data10={{tl|db-g10}} {{tl|db-attack}} {{tl|db-negublp}}
|label11=[[WP:G11|G11]] |data11={{tl|db-g11}} {{tl|db-spam}} {{tl|db-spamuser}}
|label12=[[WP:G12|G12]] |data12={{tl|db-g12}} {{tl|db-copyvio}}
|label13=[[WP:G13|G13]] |data13={{tl|db-g13}} {{tl|db-afc}} {{tl|db-blankdraft}}
|label14=[[WP:G14|G14]] |data14={{tl|db-g14}} {{tl|db-disambig}}
}}
| list2name = articles
| list2title = Articles
| list2 =
{{infobox|subbox=yes
|label1=[[WP:A1|A1]] |data1={{tl|db-a1}} {{tl|db-nocontext}}
|label2=[[WP:A2|A2]] |data2={{tl|db-a2}} {{tl|db-foreign}}
|label3=[[WP:A3|A3]] |data3={{tl|db-a3}} {{tl|db-nocontent}} {{tl|db-empty}}
|label7=[[WP:A7|A7]] |data7={{tl|db-a7}} {{tl|db-person}} {{tl|db-band}} {{tl|db-club}} {{tl|db-inc}} {{tl|db-web}} {{tl|db-animal}} {{tl|db-event}}
|label9=[[WP:A9|A9]] |data9={{tl|db-a9}} {{tl|db-song}}
|label10=[[WP:A10|A10]] |data10={{tl|db-a10}} {{tl|db-same}}
|label11=[[WP:A11|A11]] |data11={{tl|db-a11}} {{tl|db-invented}}
}}
| list3name = redirects
| list3title = Redirects
| list3 =
{{infobox|subbox=yes
|label2=[[WP:R2|R2]] |data2={{tl|db-r2}} {{tl|db-rediruser}}
|label3=[[WP:R3|R3]] |data3={{tl|db-r3}} {{tl|db-redirtypo}}
|label4=[[WP:R4|R4]] |data4={{tl|db-r4}} {{tl|db-redircom}}
}}
| list4name = files
| list4title = Files
| list4 =
{{infobox|subbox=yes
|label1=[[Wikipedia:Criteria for speedy deletion#F1|F1]] |data1={{tl|db-f1}} {{tl|duplicate}}
|label2=[[WP:F2|F2]] |data2={{tl|db-f2}} {{tl|db-fpcfail}} {{tl|db-imagepage}}
|label3=[[WP:F3|F3]] |data3={{tl|db-f3}} {{tl|db-noncom}}
|label4=[[WP:F4|F4]] |data4={{tl|db-f4}} {{tl|di-no source}} {{tl|di-no license}} {{tl|di-no source no license}} {{tl|di-dw no source}} {{tl|di-dw no license}} {{tl|di-dw no source no license}}
|label5=[[WP:F5|F5]] |data5={{tl|db-f5}} {{tl|di-orphaned non-free use}}
|label6=[[WP:F6|F6]] |data6={{tl|db-f6}} {{tl|di-no non-free use rationale}} {{tl|di-missing article links}}
|label7=[[WP:F7|F7]] |data7={{tl|db-f7}} {{tl|di-replaceable non-free use}} {{tl|di-disputed non-free use rationale}}
|label8=[[WP:F8|F8]] |data8={{tl|db-f8}} {{tl|now Commons}}
|label9=[[WP:F9|F9]] |data9={{tl|db-f9}}
|label11=[[WP:F11|F11]] |data11={{tl|db-f11}} {{tl|di-no permission}} {{tl|db-no permission-VRT}}
|label20=! |data20={{tl|di-fails NFCC}}
}}
| list5name = categories
| list5title = Categories
| list5 =
{{infobox|subbox=yes
|label1=[[WP:C1|C1]] |data1={{tl|db-c1}} {{tl|db-catempty}}
|label4=[[WP:C4|C4]] |data4={{tl|db-c4}} {{tl|db-templatecat}}
}}
| list6name = templates
| list6title = Templates
| list6 = {{infobox|subbox=yes
| label1 = [[WP:T5|T5]] | data1 = {{tl|db-t5}}
}}
| list7name = user
| list7title = User pages
| list7 =
{{infobox|subbox=yes
|label1=[[WP:U1|U1]] |data1={{tl|db-u1}} {{tl|db-userreq}}
|label2=[[WP:U2|U2]] |data2={{tl|db-u2}} {{tl|db-nouser}}
|label5=[[WP:U5|U5]] |data5={{tl|db-u5}} {{tl|db-notwebhost}}
}}
| list8name = temporary
| list8title = Temporary
| list8 =
{{infobox|subbox=yes
|label1=[[WP:x3|X3]] |data1={{tl|db-x3}}
}}
| list9name = other
| list9title = Other
| list9 =
{{#invoke:infobox|infoboxTemplate|subbox=yes
|data1={{tl|db}} {{tl|db-multiple}}
}}
}}<noinclude>
{{Documentation}}
</noinclude>
9k7j90c2otra06w57jlvcj93ipxykad
665082
665081
2025-07-02T01:47:20Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Speedy_deletion_templates]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665081
wikitext
text/x-wiki
{{Sidebar with collapsible lists
| name = Speedy deletion templates
| class = Speedy-deletion-templates
| templatestyles = Speedy deletion templates/styles.css
| title = [[Wikipedia:Criteria for speedy deletion|Speedy deletion templates]]
| expanded = {{{expanded|{{{selected|{{{1|}}}}}}}}}
| list1name = general
| list1title = General criteria
| list1 =
{{infobox|subbox=yes
|label1=[[WP:G1|G1]] |data1={{tl|db-g1}} {{tl|db-nonsense}}
|label2=[[WP:G2|G2]] |data2={{tl|db-g2}} {{tl|db-test}}
|label3=[[WP:G3|G3]] |data3={{tl|db-g3}} {{tl|db-vandalism}} {{tl|db-hoax}}
|label4=[[WP:G4|G4]] |data4={{tl|db-g4}} {{tl|db-repost}}
|label5=[[WP:G5|G5]] |data5={{tl|db-g5}} {{tl|db-banned}} {{tl|db-gs}}
|label6=[[WP:G6|G6]] |data6={{tl|db-g6}} {{tl|db-copypaste}} {{tl|db-error}} {{tl|db-move}} {{tl|db-moved}} {{tl|db-xfd}} {{tl|Db-afc-move}}
|label7=[[WP:G7|G7]] |data7={{tl|db-g7}} {{tl|db-author}}
|label8=[[WP:G8|G8]] |data8={{tl|db-g8}} {{tl|db-redirnone}} {{tl|db-subpage}} {{tl|db-talk}} {{tl|db-timedtext}}
|label10=[[WP:G10|G10]] |data10={{tl|db-g10}} {{tl|db-attack}} {{tl|db-negublp}}
|label11=[[WP:G11|G11]] |data11={{tl|db-g11}} {{tl|db-spam}} {{tl|db-spamuser}}
|label12=[[WP:G12|G12]] |data12={{tl|db-g12}} {{tl|db-copyvio}}
|label13=[[WP:G13|G13]] |data13={{tl|db-g13}} {{tl|db-afc}} {{tl|db-blankdraft}}
|label14=[[WP:G14|G14]] |data14={{tl|db-g14}} {{tl|db-disambig}}
}}
| list2name = articles
| list2title = Articles
| list2 =
{{infobox|subbox=yes
|label1=[[WP:A1|A1]] |data1={{tl|db-a1}} {{tl|db-nocontext}}
|label2=[[WP:A2|A2]] |data2={{tl|db-a2}} {{tl|db-foreign}}
|label3=[[WP:A3|A3]] |data3={{tl|db-a3}} {{tl|db-nocontent}} {{tl|db-empty}}
|label7=[[WP:A7|A7]] |data7={{tl|db-a7}} {{tl|db-person}} {{tl|db-band}} {{tl|db-club}} {{tl|db-inc}} {{tl|db-web}} {{tl|db-animal}} {{tl|db-event}}
|label9=[[WP:A9|A9]] |data9={{tl|db-a9}} {{tl|db-song}}
|label10=[[WP:A10|A10]] |data10={{tl|db-a10}} {{tl|db-same}}
|label11=[[WP:A11|A11]] |data11={{tl|db-a11}} {{tl|db-invented}}
}}
| list3name = redirects
| list3title = Redirects
| list3 =
{{infobox|subbox=yes
|label2=[[WP:R2|R2]] |data2={{tl|db-r2}} {{tl|db-rediruser}}
|label3=[[WP:R3|R3]] |data3={{tl|db-r3}} {{tl|db-redirtypo}}
|label4=[[WP:R4|R4]] |data4={{tl|db-r4}} {{tl|db-redircom}}
}}
| list4name = files
| list4title = Files
| list4 =
{{infobox|subbox=yes
|label1=[[Wikipedia:Criteria for speedy deletion#F1|F1]] |data1={{tl|db-f1}} {{tl|duplicate}}
|label2=[[WP:F2|F2]] |data2={{tl|db-f2}} {{tl|db-fpcfail}} {{tl|db-imagepage}}
|label3=[[WP:F3|F3]] |data3={{tl|db-f3}} {{tl|db-noncom}}
|label4=[[WP:F4|F4]] |data4={{tl|db-f4}} {{tl|di-no source}} {{tl|di-no license}} {{tl|di-no source no license}} {{tl|di-dw no source}} {{tl|di-dw no license}} {{tl|di-dw no source no license}}
|label5=[[WP:F5|F5]] |data5={{tl|db-f5}} {{tl|di-orphaned non-free use}}
|label6=[[WP:F6|F6]] |data6={{tl|db-f6}} {{tl|di-no non-free use rationale}} {{tl|di-missing article links}}
|label7=[[WP:F7|F7]] |data7={{tl|db-f7}} {{tl|di-replaceable non-free use}} {{tl|di-disputed non-free use rationale}}
|label8=[[WP:F8|F8]] |data8={{tl|db-f8}} {{tl|now Commons}}
|label9=[[WP:F9|F9]] |data9={{tl|db-f9}}
|label11=[[WP:F11|F11]] |data11={{tl|db-f11}} {{tl|di-no permission}} {{tl|db-no permission-VRT}}
|label20=! |data20={{tl|di-fails NFCC}}
}}
| list5name = categories
| list5title = Categories
| list5 =
{{infobox|subbox=yes
|label1=[[WP:C1|C1]] |data1={{tl|db-c1}} {{tl|db-catempty}}
|label4=[[WP:C4|C4]] |data4={{tl|db-c4}} {{tl|db-templatecat}}
}}
| list6name = templates
| list6title = Templates
| list6 = {{infobox|subbox=yes
| label1 = [[WP:T5|T5]] | data1 = {{tl|db-t5}}
}}
| list7name = user
| list7title = User pages
| list7 =
{{infobox|subbox=yes
|label1=[[WP:U1|U1]] |data1={{tl|db-u1}} {{tl|db-userreq}}
|label2=[[WP:U2|U2]] |data2={{tl|db-u2}} {{tl|db-nouser}}
|label5=[[WP:U5|U5]] |data5={{tl|db-u5}} {{tl|db-notwebhost}}
}}
| list8name = temporary
| list8title = Temporary
| list8 =
{{infobox|subbox=yes
|label1=[[WP:x3|X3]] |data1={{tl|db-x3}}
}}
| list9name = other
| list9title = Other
| list9 =
{{#invoke:infobox|infoboxTemplate|subbox=yes
|data1={{tl|db}} {{tl|db-multiple}}
}}
}}<noinclude>
{{Documentation}}
</noinclude>
9k7j90c2otra06w57jlvcj93ipxykad
Template:Subinfobox bodystyle
10
86122
665121
585005
2025-02-03T02:27:15Z
en>Sohom Datta
0
per tp
665121
wikitext
text/x-wiki
background-color: transparent; color: var( --color-base, #202122 ); border-collapse:collapse; border-spacing:0px; border:none; width:100%; margin:0px; font-size:100%; clear:none; float:none<noinclude>
{{documentation}}
</noinclude>
nhoiopnnwq36g0vw6ahq0ejceihehw7
665122
665121
2025-07-02T04:53:21Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Subinfobox_bodystyle]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665121
wikitext
text/x-wiki
background-color: transparent; color: var( --color-base, #202122 ); border-collapse:collapse; border-spacing:0px; border:none; width:100%; margin:0px; font-size:100%; clear:none; float:none<noinclude>
{{documentation}}
</noinclude>
nhoiopnnwq36g0vw6ahq0ejceihehw7
Module:String2
828
88085
665111
637529
2025-02-19T12:24:59Z
en>Gonnym
0
fix
665111
Scribunto
text/plain
require ('strict');
local p = {}
p.trim = function(frame)
return mw.text.trim(frame.args[1] or "")
end
p.sentence = function (frame)
-- {{lc:}} is strip-marker safe, string.lower is not.
frame.args[1] = frame:callParserFunction('lc', frame.args[1])
return p.ucfirst(frame)
end
p.ucfirst = function (frame)
local s = frame.args[1];
if not s or '' == s or s:match ('^%s+$') then -- when <s> is nil, empty, or only whitespace
return s; -- abandon because nothing to do
end
s = mw.text.trim( frame.args[1] or "" )
local s1 = ""
local prefix_patterns_t = { -- sequence of prefix patterns
'^\127[^\127]*UNIQ%-%-%a+%-%x+%-QINU[^\127]*\127', -- stripmarker
'^([%*;:#]+)', -- various list markup
'^(\'\'\'*)', -- bold / italic markup
'^(%b<>)', -- html-like tags because some templates render these
'^(&%a+;)', -- html character entities because some templates render these
'^(&#%d+;)', -- html numeric (decimal) entities because some templates render these
'^(&#x%x+;)', -- html numeric (hexadecimal) entities because some templates render these
'^(%s+)', -- any whitespace characters
'^([%(%)%-%+%?%.%%!~!@%$%^&_={}/`,‘’„“”ʻ|\"\'\\]+)', -- miscellaneous punctuation
}
local prefixes_t = {}; -- list, bold/italic, and html-like markup, & whitespace saved here
local function prefix_strip (s) -- local function to strip prefixes from <s>
for _, pattern in ipairs (prefix_patterns_t) do -- spin through <prefix_patterns_t>
if s:match (pattern) then -- when there is a match
local prefix = s:match (pattern); -- get a copy of the matched prefix
table.insert (prefixes_t, prefix); -- save it
s = s:sub (prefix:len() + 1); -- remove the prefix from <s>
return s, true; -- return <s> without prefix and flag; force restart at top of sequence because misc punct removal can break stripmarker
end
end
return s; -- no prefix found; return <s> with nil flag
end
local prefix_removed; -- flag; boolean true as long as prefix_strip() finds and removes a prefix
repeat -- one by one remove list, bold/italic, html-like markup, whitespace, etc from start of <s>
s, prefix_removed = prefix_strip (s);
until (not prefix_removed); -- until <prefix_removed> is nil
s1 = table.concat (prefixes_t); -- recreate the prefix string for later reattachment
local first_text = mw.ustring.match (s, '^%[%[[^%]]+%]%]'); -- extract wikilink at start of string if present; TODO: this can be string.match()?
local upcased;
if first_text then
if first_text:match ('^%[%[[^|]+|[^%]]+%]%]') then -- if <first_text> is a piped link
upcased = mw.ustring.match (s, '^%[%[[^|]+|%W*(%w)'); -- get first letter character
upcased = mw.ustring.upper (upcased); -- upcase first letter character
s = mw.ustring.gsub (s, '^(%[%[[^|]+|%W*)%w', '%1' .. upcased); -- replace
else -- here when <first_text> is a wikilink but not a piped link
upcased = mw.ustring.match (s, '^%[%[%W*%w'); -- get '[[' and first letter
upcased = mw.ustring.upper (upcased); -- upcase first letter character
s = mw.ustring.gsub (s, '^%[%[%W*%w', upcased); -- replace; no capture needed here
end
elseif s:match ('^%[%S+%s+[^%]]+%]') then -- if <s> is a ext link of some sort; must have label text
upcased = mw.ustring.match (s, '^%[%S+%s+%W*(%w)'); -- get first letter character
upcased = mw.ustring.upper (upcased); -- upcase first letter character
s = mw.ustring.gsub (s, '^(%[%S+%s+%W*)%w', '%1' .. upcased); -- replace
elseif s:match ('^%[%S+%s*%]') then -- if <s> is a ext link without label text; nothing to do
return s1 .. s; -- reattach prefix string (if present) and done
else -- <s> is not a wikilink or ext link; assume plain text
upcased = mw.ustring.match (s, '^%W*%w'); -- get the first letter character
upcased = mw.ustring.upper (upcased); -- upcase first letter character
s = mw.ustring.gsub (s, '^%W*%w', upcased); -- replace; no capture needed here
end
return s1 .. s; -- reattach prefix string (if present) and done
end
p.title = function (frame)
-- http://grammar.yourdictionary.com/capitalization/rules-for-capitalization-in-titles.html
-- recommended by The U.S. Government Printing Office Style Manual:
-- "Capitalize all words in titles of publications and documents,
-- except a, an, the, at, by, for, in, of, on, to, up, and, as, but, or, and nor."
local alwayslower = {['a'] = 1, ['an'] = 1, ['the'] = 1,
['and'] = 1, ['but'] = 1, ['or'] = 1, ['for'] = 1,
['nor'] = 1, ['on'] = 1, ['in'] = 1, ['at'] = 1, ['to'] = 1,
['from'] = 1, ['by'] = 1, ['of'] = 1, ['up'] = 1 }
local res = ''
local s = mw.text.trim( frame.args[1] or "" )
local words = mw.text.split( s, " ")
for i, s in ipairs(words) do
-- {{lc:}} is strip-marker safe, string.lower is not.
s = frame:callParserFunction('lc', s)
if i == 1 or alwayslower[s] ~= 1 then
s = mw.getContentLanguage():ucfirst(s)
end
words[i] = s
end
return table.concat(words, " ")
end
-- findlast finds the last item in a list
-- the first unnamed parameter is the list
-- the second, optional unnamed parameter is the list separator (default = comma space)
-- returns the whole list if separator not found
p.findlast = function(frame)
local s = mw.text.trim( frame.args[1] or "" )
local sep = frame.args[2] or ""
if sep == "" then sep = ", " end
local pattern = ".*" .. sep .. "(.*)"
local a, b, last = s:find(pattern)
if a then
return last
else
return s
end
end
-- stripZeros finds the first number and strips leading zeros (apart from units)
-- e.g "0940" -> "940"; "Year: 0023" -> "Year: 23"; "00.12" -> "0.12"
p.stripZeros = function(frame)
local s = mw.text.trim(frame.args[1] or "")
local n = tonumber( string.match( s, "%d+" ) ) or ""
s = string.gsub( s, "%d+", n, 1 )
return s
end
-- nowiki ensures that a string of text is treated by the MediaWiki software as just a string
-- it takes an unnamed parameter and trims whitespace, then removes any wikicode
p.nowiki = function(frame)
local str = mw.text.trim(frame.args[1] or "")
return mw.text.nowiki(str)
end
-- split splits text at boundaries specified by separator
-- and returns the chunk for the index idx (starting at 1)
-- #invoke:String2 |split |text |separator |index |true/false
-- #invoke:String2 |split |txt=text |sep=separator |idx=index |plain=true/false
-- if plain is false/no/0 then separator is treated as a Lua pattern - defaults to plain=true
p.split = function(frame)
local args = frame.args
if not(args[1] or args.txt) then args = frame:getParent().args end
local txt = args[1] or args.txt or ""
if txt == "" then return nil end
local sep = (args[2] or args.sep or ""):gsub('"', '')
local idx = tonumber(args[3] or args.idx) or 1
local plain = (args[4] or args.plain or "true"):sub(1,1)
plain = (plain ~= "f" and plain ~= "n" and plain ~= "0")
local splittbl = mw.text.split( txt, sep, plain )
if idx < 0 then idx = #splittbl + idx + 1 end
return splittbl[idx]
end
-- val2percent scans through a string, passed as either the first unnamed parameter or |txt=
-- it converts each number it finds into a percentage and returns the resultant string.
p.val2percent = function(frame)
local args = frame.args
if not(args[1] or args.txt) then args = frame:getParent().args end
local txt = mw.text.trim(args[1] or args.txt or "")
if txt == "" then return nil end
local function v2p (x)
x = (tonumber(x) or 0) * 100
if x == math.floor(x) then x = math.floor(x) end
return x .. "%"
end
txt = txt:gsub("%d[%d%.]*", v2p) -- store just the string
return txt
end
-- one2a scans through a string, passed as either the first unnamed parameter or |txt=
-- it converts each occurrence of 'one ' into either 'a ' or 'an ' and returns the resultant string.
p.one2a = function(frame)
local args = frame.args
if not(args[1] or args.txt) then args = frame:getParent().args end
local txt = mw.text.trim(args[1] or args.txt or "")
if txt == "" then return nil end
txt = txt:gsub(" one ", " a "):gsub("^one", "a"):gsub("One ", "A "):gsub("a ([aeiou])", "an %1"):gsub("A ([aeiou])", "An %1")
return txt
end
-- findpagetext returns the position of a piece of text in a page
-- First positional parameter or |text is the search text
-- Optional parameter |title is the page title, defaults to current page
-- Optional parameter |plain is either true for plain search (default) or false for Lua pattern search
-- Optional parameter |nomatch is the return value when no match is found; default is nil
p._findpagetext = function(args)
-- process parameters
local nomatch = args.nomatch or ""
if nomatch == "" then nomatch = nil end
--
local text = mw.text.trim(args[1] or args.text or "")
if text == "" then return nil end
--
local title = args.title or ""
local titleobj
if title == "" then
titleobj = mw.title.getCurrentTitle()
else
titleobj = mw.title.new(title)
end
--
local plain = args.plain or ""
if plain:sub(1, 1) == "f" then plain = false else plain = true end
-- get the page content and look for 'text' - return position or nomatch
local content = titleobj and titleobj:getContent()
return content and mw.ustring.find(content, text, 1, plain) or nomatch
end
p.findpagetext = function(frame)
local args = frame.args
local pargs = frame:getParent().args
for k, v in pairs(pargs) do
args[k] = v
end
if not (args[1] or args.text) then return nil end
-- just the first value
return (p._findpagetext(args))
end
-- returns the decoded url. Inverse of parser function {{urlencode:val|TYPE}}
-- Type is:
-- QUERY decodes + to space (default)
-- PATH does no extra decoding
-- WIKI decodes _ to space
p._urldecode = function(url, type)
url = url or ""
type = (type == "PATH" or type == "WIKI") and type
return mw.uri.decode( url, type )
end
-- {{#invoke:String2|urldecode|url=url|type=type}}
p.urldecode = function(frame)
return mw.uri.decode( frame.args.url, frame.args.type )
end
-- what follows was merged from Module:StringFunc
-- helper functions
p._GetParameters = require('Module:GetParameters')
-- Argument list helper function, as per Module:String
p._getParameters = p._GetParameters.getParameters
-- Escape Pattern helper function so that all characters are treated as plain text, as per Module:String
function p._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
end
-- Helper Function to interpret boolean strings, as per Module:String
p._getBoolean = p._GetParameters.getBoolean
--[[
Strip
This function Strips characters from string
Usage:
{{#invoke:String2|strip|source_string|characters_to_strip|plain_flag}}
Parameters
source: The string to strip
chars: The pattern or list of characters to strip from string, replaced with ''
plain: A flag indicating that the chars should be understood as plain text. defaults to true.
Leading and trailing whitespace is also automatically stripped from the string.
]]
function p.strip( frame )
local new_args = p._getParameters( frame.args, {'source', 'chars', 'plain'} )
local source_str = new_args['source'] or ''
local chars = new_args['chars'] or '' or 'characters'
source_str = mw.text.trim(source_str)
if source_str == '' or chars == '' then
return source_str
end
local l_plain = p._getBoolean( new_args['plain'] or true )
if l_plain then
chars = p._escapePattern( chars )
end
local result
result = mw.ustring.gsub(source_str, "["..chars.."]", '')
return result
end
--[[
Match any
Returns the index of the first given pattern to match the input. Patterns must be consecutively numbered.
Returns the empty string if nothing matches for use in {{#if:}}
Usage:
{{#invoke:String2|matchAll|source=123 abc|456|abc}} returns '2'.
Parameters:
source: the string to search
plain: A flag indicating that the patterns should be understood as plain text. defaults to true.
1, 2, 3, ...: the patterns to search for
]]
function p.matchAny(frame)
local source_str = frame.args['source'] or error('The source parameter is mandatory.')
local l_plain = p._getBoolean( frame.args['plain'] or true )
for i = 1, math.huge do
local pattern = frame.args[i]
if not pattern then return '' end
if mw.ustring.find(source_str, pattern, 1, l_plain) then
return tostring(i)
end
end
end
--[[--------------------------< H Y P H E N _ T O _ D A S H >--------------------------------------------------
Converts a hyphen to a dash under certain conditions. The hyphen must separate
like items; unlike items are returned unmodified. These forms are modified:
letter - letter (A - B)
digit - digit (4-5)
digit separator digit - digit separator digit (4.1-4.5 or 4-1-4-5)
letterdigit - letterdigit (A1-A5) (an optional separator between letter and
digit is supported – a.1-a.5 or a-1-a-5)
digitletter - digitletter (5a - 5d) (an optional separator between letter and
digit is supported – 5.a-5.d or 5-a-5-d)
any other forms are returned unmodified.
str may be a comma- or semicolon-separated list
]]
function p.hyphen_to_dash( str, spacing )
if (str == nil or str == '') then
return str
end
local accept
str = mw.text.decode(str, true ) -- replace html entities with their characters; semicolon mucks up the text.split
local out = {}
local list = mw.text.split (str, '%s*[,;]%s*') -- split str at comma or semicolon separators if there are any
for _, item in ipairs (list) do -- for each item in the list
item = mw.text.trim(item) -- trim whitespace
item, accept = item:gsub ('^%(%((.+)%)%)$', '%1')
if accept == 0 and mw.ustring.match (item, '^%w*[%.%-]?%w+%s*[%-–—]%s*%w*[%.%-]?%w+$') then -- if a hyphenated range or has endash or emdash separators
if item:match ('^%a+[%.%-]?%d+%s*%-%s*%a+[%.%-]?%d+$') or -- letterdigit hyphen letterdigit (optional separator between letter and digit)
item:match ('^%d+[%.%-]?%a+%s*%-%s*%d+[%.%-]?%a+$') or -- digitletter hyphen digitletter (optional separator between digit and letter)
item:match ('^%d+[%.%-]%d+%s*%-%s*%d+[%.%-]%d+$') or -- digit separator digit hyphen digit separator digit
item:match ('^%d+%s*%-%s*%d+$') or -- digit hyphen digit
item:match ('^%a+%s*%-%s*%a+$') then -- letter hyphen letter
item = item:gsub ('(%w*[%.%-]?%w+)%s*%-%s*(%w*[%.%-]?%w+)', '%1–%2') -- replace hyphen, remove extraneous space characters
else
item = mw.ustring.gsub (item, '%s*[–—]%s*', '–') -- for endash or emdash separated ranges, replace em with en, remove extraneous whitespace
end
end
table.insert (out, item) -- add the (possibly modified) item to the output table
end
local temp_str = table.concat (out, ',' .. spacing) -- concatenate the output table into a comma separated string
temp_str, accept = temp_str:gsub ('^%(%((.+)%)%)$', '%1') -- remove accept-this-as-written markup when it wraps all of concatenated out
if accept ~= 0 then
temp_str = str:gsub ('^%(%((.+)%)%)$', '%1') -- when global markup removed, return original str; do it this way to suppress boolean second return value
end
return temp_str
end
function p.hyphen2dash( frame )
local str = frame.args[1] or ''
local spacing = frame.args[2] or ' ' -- space is part of the standard separator for normal spacing (but in conjunction with templates r/rp/ran we may need a narrower spacing
return p.hyphen_to_dash(str, spacing)
end
-- Similar to [[Module:String#endswith]]
function p.startswith(frame)
return (frame.args[1]:sub(1, frame.args[2]:len()) == frame.args[2]) and 'yes' or ''
end
-- Implements [[Template:Isnumeric]]
function p.isnumeric(frame)
local s = frame.args[1] or frame:getParent().args[1]
local boolean = (frame.args.boolean or frame:getParent().args.boolean) == 'true'
if type(s) == 'string' and mw.getContentLanguage():parseFormattedNumber( s ) then
return boolean and 1 or s
end
return boolean and 0 or ''
end
-- Checks if a value in a group of numbers is not an interger.
-- Allows usage of an |empty= parameter to allow empty values to be skipped.
function p.isInteger(frame)
local values = frame.args or frame:getParent().args
local allow_empty = frame.args.empty or frame:getParent().args.empty
for _, value in ipairs(values) do
-- Trim spaces
value = value and value:gsub("^%s*(.-)%s*$", "%1")
if value == "" or value == nil then
if not allow_empty then
return false -- Empty values are not allowed
end
else
value = tonumber(value)
if not (type(value) == "number" and value == math.floor(value)) then
return false
end
end
end
return true
end
-- Returns an error found in a string.
function p.getError(frame)
local text = frame.args[1] or frame:getParent().args[1]
local error_message = text:match('(<strong class="error">.-</strong>)')
return error_message or nil
end
return p
8jl034otxz47vwg2szaa5x536gkylpd
665112
665111
2025-07-02T04:53:09Z
Novem Linguae
49714
1 revision imported from [[:en:Module:String2]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665111
Scribunto
text/plain
require ('strict');
local p = {}
p.trim = function(frame)
return mw.text.trim(frame.args[1] or "")
end
p.sentence = function (frame)
-- {{lc:}} is strip-marker safe, string.lower is not.
frame.args[1] = frame:callParserFunction('lc', frame.args[1])
return p.ucfirst(frame)
end
p.ucfirst = function (frame)
local s = frame.args[1];
if not s or '' == s or s:match ('^%s+$') then -- when <s> is nil, empty, or only whitespace
return s; -- abandon because nothing to do
end
s = mw.text.trim( frame.args[1] or "" )
local s1 = ""
local prefix_patterns_t = { -- sequence of prefix patterns
'^\127[^\127]*UNIQ%-%-%a+%-%x+%-QINU[^\127]*\127', -- stripmarker
'^([%*;:#]+)', -- various list markup
'^(\'\'\'*)', -- bold / italic markup
'^(%b<>)', -- html-like tags because some templates render these
'^(&%a+;)', -- html character entities because some templates render these
'^(&#%d+;)', -- html numeric (decimal) entities because some templates render these
'^(&#x%x+;)', -- html numeric (hexadecimal) entities because some templates render these
'^(%s+)', -- any whitespace characters
'^([%(%)%-%+%?%.%%!~!@%$%^&_={}/`,‘’„“”ʻ|\"\'\\]+)', -- miscellaneous punctuation
}
local prefixes_t = {}; -- list, bold/italic, and html-like markup, & whitespace saved here
local function prefix_strip (s) -- local function to strip prefixes from <s>
for _, pattern in ipairs (prefix_patterns_t) do -- spin through <prefix_patterns_t>
if s:match (pattern) then -- when there is a match
local prefix = s:match (pattern); -- get a copy of the matched prefix
table.insert (prefixes_t, prefix); -- save it
s = s:sub (prefix:len() + 1); -- remove the prefix from <s>
return s, true; -- return <s> without prefix and flag; force restart at top of sequence because misc punct removal can break stripmarker
end
end
return s; -- no prefix found; return <s> with nil flag
end
local prefix_removed; -- flag; boolean true as long as prefix_strip() finds and removes a prefix
repeat -- one by one remove list, bold/italic, html-like markup, whitespace, etc from start of <s>
s, prefix_removed = prefix_strip (s);
until (not prefix_removed); -- until <prefix_removed> is nil
s1 = table.concat (prefixes_t); -- recreate the prefix string for later reattachment
local first_text = mw.ustring.match (s, '^%[%[[^%]]+%]%]'); -- extract wikilink at start of string if present; TODO: this can be string.match()?
local upcased;
if first_text then
if first_text:match ('^%[%[[^|]+|[^%]]+%]%]') then -- if <first_text> is a piped link
upcased = mw.ustring.match (s, '^%[%[[^|]+|%W*(%w)'); -- get first letter character
upcased = mw.ustring.upper (upcased); -- upcase first letter character
s = mw.ustring.gsub (s, '^(%[%[[^|]+|%W*)%w', '%1' .. upcased); -- replace
else -- here when <first_text> is a wikilink but not a piped link
upcased = mw.ustring.match (s, '^%[%[%W*%w'); -- get '[[' and first letter
upcased = mw.ustring.upper (upcased); -- upcase first letter character
s = mw.ustring.gsub (s, '^%[%[%W*%w', upcased); -- replace; no capture needed here
end
elseif s:match ('^%[%S+%s+[^%]]+%]') then -- if <s> is a ext link of some sort; must have label text
upcased = mw.ustring.match (s, '^%[%S+%s+%W*(%w)'); -- get first letter character
upcased = mw.ustring.upper (upcased); -- upcase first letter character
s = mw.ustring.gsub (s, '^(%[%S+%s+%W*)%w', '%1' .. upcased); -- replace
elseif s:match ('^%[%S+%s*%]') then -- if <s> is a ext link without label text; nothing to do
return s1 .. s; -- reattach prefix string (if present) and done
else -- <s> is not a wikilink or ext link; assume plain text
upcased = mw.ustring.match (s, '^%W*%w'); -- get the first letter character
upcased = mw.ustring.upper (upcased); -- upcase first letter character
s = mw.ustring.gsub (s, '^%W*%w', upcased); -- replace; no capture needed here
end
return s1 .. s; -- reattach prefix string (if present) and done
end
p.title = function (frame)
-- http://grammar.yourdictionary.com/capitalization/rules-for-capitalization-in-titles.html
-- recommended by The U.S. Government Printing Office Style Manual:
-- "Capitalize all words in titles of publications and documents,
-- except a, an, the, at, by, for, in, of, on, to, up, and, as, but, or, and nor."
local alwayslower = {['a'] = 1, ['an'] = 1, ['the'] = 1,
['and'] = 1, ['but'] = 1, ['or'] = 1, ['for'] = 1,
['nor'] = 1, ['on'] = 1, ['in'] = 1, ['at'] = 1, ['to'] = 1,
['from'] = 1, ['by'] = 1, ['of'] = 1, ['up'] = 1 }
local res = ''
local s = mw.text.trim( frame.args[1] or "" )
local words = mw.text.split( s, " ")
for i, s in ipairs(words) do
-- {{lc:}} is strip-marker safe, string.lower is not.
s = frame:callParserFunction('lc', s)
if i == 1 or alwayslower[s] ~= 1 then
s = mw.getContentLanguage():ucfirst(s)
end
words[i] = s
end
return table.concat(words, " ")
end
-- findlast finds the last item in a list
-- the first unnamed parameter is the list
-- the second, optional unnamed parameter is the list separator (default = comma space)
-- returns the whole list if separator not found
p.findlast = function(frame)
local s = mw.text.trim( frame.args[1] or "" )
local sep = frame.args[2] or ""
if sep == "" then sep = ", " end
local pattern = ".*" .. sep .. "(.*)"
local a, b, last = s:find(pattern)
if a then
return last
else
return s
end
end
-- stripZeros finds the first number and strips leading zeros (apart from units)
-- e.g "0940" -> "940"; "Year: 0023" -> "Year: 23"; "00.12" -> "0.12"
p.stripZeros = function(frame)
local s = mw.text.trim(frame.args[1] or "")
local n = tonumber( string.match( s, "%d+" ) ) or ""
s = string.gsub( s, "%d+", n, 1 )
return s
end
-- nowiki ensures that a string of text is treated by the MediaWiki software as just a string
-- it takes an unnamed parameter and trims whitespace, then removes any wikicode
p.nowiki = function(frame)
local str = mw.text.trim(frame.args[1] or "")
return mw.text.nowiki(str)
end
-- split splits text at boundaries specified by separator
-- and returns the chunk for the index idx (starting at 1)
-- #invoke:String2 |split |text |separator |index |true/false
-- #invoke:String2 |split |txt=text |sep=separator |idx=index |plain=true/false
-- if plain is false/no/0 then separator is treated as a Lua pattern - defaults to plain=true
p.split = function(frame)
local args = frame.args
if not(args[1] or args.txt) then args = frame:getParent().args end
local txt = args[1] or args.txt or ""
if txt == "" then return nil end
local sep = (args[2] or args.sep or ""):gsub('"', '')
local idx = tonumber(args[3] or args.idx) or 1
local plain = (args[4] or args.plain or "true"):sub(1,1)
plain = (plain ~= "f" and plain ~= "n" and plain ~= "0")
local splittbl = mw.text.split( txt, sep, plain )
if idx < 0 then idx = #splittbl + idx + 1 end
return splittbl[idx]
end
-- val2percent scans through a string, passed as either the first unnamed parameter or |txt=
-- it converts each number it finds into a percentage and returns the resultant string.
p.val2percent = function(frame)
local args = frame.args
if not(args[1] or args.txt) then args = frame:getParent().args end
local txt = mw.text.trim(args[1] or args.txt or "")
if txt == "" then return nil end
local function v2p (x)
x = (tonumber(x) or 0) * 100
if x == math.floor(x) then x = math.floor(x) end
return x .. "%"
end
txt = txt:gsub("%d[%d%.]*", v2p) -- store just the string
return txt
end
-- one2a scans through a string, passed as either the first unnamed parameter or |txt=
-- it converts each occurrence of 'one ' into either 'a ' or 'an ' and returns the resultant string.
p.one2a = function(frame)
local args = frame.args
if not(args[1] or args.txt) then args = frame:getParent().args end
local txt = mw.text.trim(args[1] or args.txt or "")
if txt == "" then return nil end
txt = txt:gsub(" one ", " a "):gsub("^one", "a"):gsub("One ", "A "):gsub("a ([aeiou])", "an %1"):gsub("A ([aeiou])", "An %1")
return txt
end
-- findpagetext returns the position of a piece of text in a page
-- First positional parameter or |text is the search text
-- Optional parameter |title is the page title, defaults to current page
-- Optional parameter |plain is either true for plain search (default) or false for Lua pattern search
-- Optional parameter |nomatch is the return value when no match is found; default is nil
p._findpagetext = function(args)
-- process parameters
local nomatch = args.nomatch or ""
if nomatch == "" then nomatch = nil end
--
local text = mw.text.trim(args[1] or args.text or "")
if text == "" then return nil end
--
local title = args.title or ""
local titleobj
if title == "" then
titleobj = mw.title.getCurrentTitle()
else
titleobj = mw.title.new(title)
end
--
local plain = args.plain or ""
if plain:sub(1, 1) == "f" then plain = false else plain = true end
-- get the page content and look for 'text' - return position or nomatch
local content = titleobj and titleobj:getContent()
return content and mw.ustring.find(content, text, 1, plain) or nomatch
end
p.findpagetext = function(frame)
local args = frame.args
local pargs = frame:getParent().args
for k, v in pairs(pargs) do
args[k] = v
end
if not (args[1] or args.text) then return nil end
-- just the first value
return (p._findpagetext(args))
end
-- returns the decoded url. Inverse of parser function {{urlencode:val|TYPE}}
-- Type is:
-- QUERY decodes + to space (default)
-- PATH does no extra decoding
-- WIKI decodes _ to space
p._urldecode = function(url, type)
url = url or ""
type = (type == "PATH" or type == "WIKI") and type
return mw.uri.decode( url, type )
end
-- {{#invoke:String2|urldecode|url=url|type=type}}
p.urldecode = function(frame)
return mw.uri.decode( frame.args.url, frame.args.type )
end
-- what follows was merged from Module:StringFunc
-- helper functions
p._GetParameters = require('Module:GetParameters')
-- Argument list helper function, as per Module:String
p._getParameters = p._GetParameters.getParameters
-- Escape Pattern helper function so that all characters are treated as plain text, as per Module:String
function p._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
end
-- Helper Function to interpret boolean strings, as per Module:String
p._getBoolean = p._GetParameters.getBoolean
--[[
Strip
This function Strips characters from string
Usage:
{{#invoke:String2|strip|source_string|characters_to_strip|plain_flag}}
Parameters
source: The string to strip
chars: The pattern or list of characters to strip from string, replaced with ''
plain: A flag indicating that the chars should be understood as plain text. defaults to true.
Leading and trailing whitespace is also automatically stripped from the string.
]]
function p.strip( frame )
local new_args = p._getParameters( frame.args, {'source', 'chars', 'plain'} )
local source_str = new_args['source'] or ''
local chars = new_args['chars'] or '' or 'characters'
source_str = mw.text.trim(source_str)
if source_str == '' or chars == '' then
return source_str
end
local l_plain = p._getBoolean( new_args['plain'] or true )
if l_plain then
chars = p._escapePattern( chars )
end
local result
result = mw.ustring.gsub(source_str, "["..chars.."]", '')
return result
end
--[[
Match any
Returns the index of the first given pattern to match the input. Patterns must be consecutively numbered.
Returns the empty string if nothing matches for use in {{#if:}}
Usage:
{{#invoke:String2|matchAll|source=123 abc|456|abc}} returns '2'.
Parameters:
source: the string to search
plain: A flag indicating that the patterns should be understood as plain text. defaults to true.
1, 2, 3, ...: the patterns to search for
]]
function p.matchAny(frame)
local source_str = frame.args['source'] or error('The source parameter is mandatory.')
local l_plain = p._getBoolean( frame.args['plain'] or true )
for i = 1, math.huge do
local pattern = frame.args[i]
if not pattern then return '' end
if mw.ustring.find(source_str, pattern, 1, l_plain) then
return tostring(i)
end
end
end
--[[--------------------------< H Y P H E N _ T O _ D A S H >--------------------------------------------------
Converts a hyphen to a dash under certain conditions. The hyphen must separate
like items; unlike items are returned unmodified. These forms are modified:
letter - letter (A - B)
digit - digit (4-5)
digit separator digit - digit separator digit (4.1-4.5 or 4-1-4-5)
letterdigit - letterdigit (A1-A5) (an optional separator between letter and
digit is supported – a.1-a.5 or a-1-a-5)
digitletter - digitletter (5a - 5d) (an optional separator between letter and
digit is supported – 5.a-5.d or 5-a-5-d)
any other forms are returned unmodified.
str may be a comma- or semicolon-separated list
]]
function p.hyphen_to_dash( str, spacing )
if (str == nil or str == '') then
return str
end
local accept
str = mw.text.decode(str, true ) -- replace html entities with their characters; semicolon mucks up the text.split
local out = {}
local list = mw.text.split (str, '%s*[,;]%s*') -- split str at comma or semicolon separators if there are any
for _, item in ipairs (list) do -- for each item in the list
item = mw.text.trim(item) -- trim whitespace
item, accept = item:gsub ('^%(%((.+)%)%)$', '%1')
if accept == 0 and mw.ustring.match (item, '^%w*[%.%-]?%w+%s*[%-–—]%s*%w*[%.%-]?%w+$') then -- if a hyphenated range or has endash or emdash separators
if item:match ('^%a+[%.%-]?%d+%s*%-%s*%a+[%.%-]?%d+$') or -- letterdigit hyphen letterdigit (optional separator between letter and digit)
item:match ('^%d+[%.%-]?%a+%s*%-%s*%d+[%.%-]?%a+$') or -- digitletter hyphen digitletter (optional separator between digit and letter)
item:match ('^%d+[%.%-]%d+%s*%-%s*%d+[%.%-]%d+$') or -- digit separator digit hyphen digit separator digit
item:match ('^%d+%s*%-%s*%d+$') or -- digit hyphen digit
item:match ('^%a+%s*%-%s*%a+$') then -- letter hyphen letter
item = item:gsub ('(%w*[%.%-]?%w+)%s*%-%s*(%w*[%.%-]?%w+)', '%1–%2') -- replace hyphen, remove extraneous space characters
else
item = mw.ustring.gsub (item, '%s*[–—]%s*', '–') -- for endash or emdash separated ranges, replace em with en, remove extraneous whitespace
end
end
table.insert (out, item) -- add the (possibly modified) item to the output table
end
local temp_str = table.concat (out, ',' .. spacing) -- concatenate the output table into a comma separated string
temp_str, accept = temp_str:gsub ('^%(%((.+)%)%)$', '%1') -- remove accept-this-as-written markup when it wraps all of concatenated out
if accept ~= 0 then
temp_str = str:gsub ('^%(%((.+)%)%)$', '%1') -- when global markup removed, return original str; do it this way to suppress boolean second return value
end
return temp_str
end
function p.hyphen2dash( frame )
local str = frame.args[1] or ''
local spacing = frame.args[2] or ' ' -- space is part of the standard separator for normal spacing (but in conjunction with templates r/rp/ran we may need a narrower spacing
return p.hyphen_to_dash(str, spacing)
end
-- Similar to [[Module:String#endswith]]
function p.startswith(frame)
return (frame.args[1]:sub(1, frame.args[2]:len()) == frame.args[2]) and 'yes' or ''
end
-- Implements [[Template:Isnumeric]]
function p.isnumeric(frame)
local s = frame.args[1] or frame:getParent().args[1]
local boolean = (frame.args.boolean or frame:getParent().args.boolean) == 'true'
if type(s) == 'string' and mw.getContentLanguage():parseFormattedNumber( s ) then
return boolean and 1 or s
end
return boolean and 0 or ''
end
-- Checks if a value in a group of numbers is not an interger.
-- Allows usage of an |empty= parameter to allow empty values to be skipped.
function p.isInteger(frame)
local values = frame.args or frame:getParent().args
local allow_empty = frame.args.empty or frame:getParent().args.empty
for _, value in ipairs(values) do
-- Trim spaces
value = value and value:gsub("^%s*(.-)%s*$", "%1")
if value == "" or value == nil then
if not allow_empty then
return false -- Empty values are not allowed
end
else
value = tonumber(value)
if not (type(value) == "number" and value == math.floor(value)) then
return false
end
end
end
return true
end
-- Returns an error found in a string.
function p.getError(frame)
local text = frame.args[1] or frame:getParent().args[1]
local error_message = text:match('(<strong class="error">.-</strong>)')
return error_message or nil
end
return p
8jl034otxz47vwg2szaa5x536gkylpd
User:Zilant17
2
99878
665049
637129
2025-07-01T18:41:44Z
Zilanttest24june01
69264
665049
wikitext
text/x-wiki
Mention test: [[User:Zilant17]] 18:41, 1 July 2025 (UTC)
rfx3o9mldu99r3pxbxiagbk5m521i58
Apples
0
101423
665057
664933
2025-07-01T21:41:45Z
~2025-109911
69368
665057
wikitext
text/x-wiki
An '''apple''' is a round, edible fruit produced by an apple tree, a deciduous tree typically growing to 5–12 m (16–39 ft) tall, with a dense, twiggy crown. The leaves are alternately arranged, simple, 2.5–15 cm (1–6 in) long, with serrated margins and slightly downy surfaces. Blossoms appear, with the fruiting bodies maturing in late summer or autumn. The centre of the fruit contains five carpels arranged in a five-pointed star, with each carpel containing one or two seeds.
Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples were first introduced to Australia in 1788 by English settlers at the Sydney Botanical Gardens. The most popular varieties of apples in the 21st century are Red Delicious, Granny Smith, Golden Delicious, and Fuji.
The apple tree is believed to have originated in the region of the Caucasus, between the Black and Caspian seas. It is thought to have been domesticated in Ceeeentral Asia, where its wild ancestors are still found.
The earliest evidence of apple cultivation dates back to 6500 BC.
when people living in the region of the Caucasus were growing apples.
Apples were brought to Europe by the Romans, who introduced the fruit to England and [[Germany]].
The first recorded mention of apples in England was in a 9th-century text, and by the 11th century, apple trees were being grown in monasteries. Apples were brought to North America by European colonists in the 17th century.
Today, apples are grown in all temperate regions of the world. The top apple-producing countries are China, the [[United States]], Turkey, [[Italy]], and India.
4ogthhkr0ozrnmtfrk7kwtph5pn22xs
665058
665057
2025-07-01T21:44:29Z
~2025-110932
69369
665058
wikitext
text/x-wiki
An '''apple''' is a round, edible fruit produced by an apple tree, a deciduous tree typically growing to 5–12 m (16–39 ft) tall, with a dense, twiggy crown. The leaves are alternately arranged, simple, 2.5–15 cm (1–6 in) long, with serrated margins and slightly downy surfaces. Blossoms appear in late spring, with the fruiting bodies maturing in late summer or autumn. The centre of the fruit contains five carpels arranged in a five-pointed star, with each carpel containing one or two seeds.
Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples were first introduced to Australia in 1788 by English settlers at the Sydney Botanical Gardens. The most popular varieties of apples in the 21st century are Red Delicious, Granny Smith, Golden Delicious, and Fuji.
The apple tree is believed to have originated in the region of the Caucasus, between the Black and Caspian seas. It is thought to have been domesticated in Ceeeentral Asia, where its wild ancestors are still found.
The earliest evidence of apple cultivation dates back to 6500 BC.
when people living in the region of the Caucasus were growing apples.
Apples were brought to Europe by the Romans, who introduced the fruit to England and [[Germany]].
The first recorded mention of apples in England was in a 9th-century text, and by the 11th century, apple trees were being grown in monasteries. Apples were brought to North America by European colonists in the 17th century.
Today, apples are grown in all temperate regions of the world. The top apple-producing countries are China, the [[United States]], Turkey, [[Italy]], and India.
mei3fc5zx4bg0u6j5sgi7d8vk7saxwc
665059
665058
2025-07-01T21:48:27Z
~2025-110932
69369
665059
wikitext
text/x-wiki
An '''apple''' is a round, edible fruit produced by an apple tree, a deciduous tree typically growing to 5–12 m (16–39 ft) tall, with a dense, twiggy crown. The leaves are alternately arranged, simple, 2.5–15 cm (1–6 in) long, with serrated margins and slightly downy surfaces. Blossoms appear, with the fruiting bodies maturing in late summer or autumn. The centre of the fruit contains five carpels arranged in a five-pointed star, with each carpel containing one or two seeds.
Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples were first introduced to Australia in 1788 by English settlers at the Sydney Botanical Gardens. The most popular varieties of apples in the 21st century are Red Delicious, Granny Smith, Golden Delicious, and Fuji.
The apple tree is believed to have originated in the region of the Caucasus, between the Black and Caspian seas. It is thought to have been domesticated in Ceeeentral Asia, where its wild ancestors are still found.
The earliest evidence of apple cultivation dates back to 6500 BC.
when people living in the region of the Caucasus were growing apples.
Apples were brought to Europe by the Romans, who introduced the fruit to England and [[Germany]].
The first recorded mention of apples in England was in a 9th-century text, and by the 11th century, apple trees were being grown in monasteries. Apples were brought to North America by European colonists in the 17th century.
Today, apples are grown in all temperate regions of the world. The top apple-producing countries are China, the [[United States]], Turkey, [[Italy]], and India.
4ogthhkr0ozrnmtfrk7kwtph5pn22xs
665060
665059
2025-07-01T21:49:32Z
~2025-110521
69370
665060
wikitext
text/x-wiki
An '''apple''' is a round, edible fruit produced by an apple tree, a deciduous tree typically growing to 5–12 m (16–39 ft) tall, with a dense, twiggy crown. The leaves are alternately arranged, simple, 2.5–15 cm (1–6 in) long, with serrated margins and slightly downy surfaces. Blossoms appear in late spring, with the fruiting bodies maturing in late summer or autumn. The centre of the fruit contains five carpels arranged in a five-pointed star, with each carpel containing one or two seeds.
Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples were first introduced to Australia in 1788 by English settlers at the Sydney Botanical Gardens. The most popular varieties of apples in the 21st century are Red Delicious, Granny Smith, Golden Delicious, and Fuji.
The apple tree is believed to have originated in the region of the Caucasus, between the Black and Caspian seas. It is thought to have been domesticated in Ceeeentral Asia, where its wild ancestors are still found.
The earliest evidence of apple cultivation dates back to 6500 BC.
when people living in the region of the Caucasus were growing apples.
Apples were brought to Europe by the Romans, who introduced the fruit to England and [[Germany]].
The first recorded mention of apples in England was in a 9th-century text, and by the 11th century, apple trees were being grown in monasteries. Apples were brought to North America by European colonists in the 17th century.
Today, apples are grown in all temperate regions of the world. The top apple-producing countries are China, the [[United States]], Turkey, [[Italy]], and India.
mei3fc5zx4bg0u6j5sgi7d8vk7saxwc
665061
665060
2025-07-01T22:38:21Z
~2025-111172
69372
665061
wikitext
text/x-wiki
An '''apple''' is a round, edible fruit produced by an apple tree, a deciduous tree typically growing to 5–12 m (16–39 ft) tall, with a dense, twiggy crown. The leaves are alternately arranged, simple, 2.5–15 cm (1–6 in) long, with serrated margins and slightly downy surfaces. Blossoms appear, with the fruiting bodies maturing in late summer or autumn. The centre of the fruit contains five carpels arranged in a five-pointed star, with each carpel containing one or two seeds.
Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples were first introduced to Australia in 1788 by English settlers at the Sydney Botanical Gardens. The most popular varieties of apples in the 21st century are Red Delicious, Granny Smith, Golden Delicious, and Fuji.
The apple tree is believed to have originated in the region of the Caucasus, between the Black and Caspian seas. It is thought to have been domesticated in Ceeeentral Asia, where its wild ancestors are still found.
The earliest evidence of apple cultivation dates back to 6500 BC.
when people living in the region of the Caucasus were growing apples.
Apples were brought to Europe by the Romans, who introduced the fruit to England and [[Germany]].
The first recorded mention of apples in England was in a 9th-century text, and by the 11th century, apple trees were being grown in monasteries. Apples were brought to North America by European colonists in the 17th century.
Today, apples are grown in all temperate regions of the world. The top apple-producing countries are China, the [[United States]], Turkey, [[Italy]], and India.
4ogthhkr0ozrnmtfrk7kwtph5pn22xs
665062
665061
2025-07-01T22:38:41Z
~2025-111172
69372
665062
wikitext
text/x-wiki
An '''apple''' is a round, edible fruit produced by an apple tree, a deciduous tree typically growing to 5–12 m (16–39 ft) tall, with a dense, twiggy crown. The leaves are alternately arranged, simple, 2.5–15 cm (1–6 in) long, with serrated margins and slightly downy surfaces. Blossoms appear in late spring, with the fruiting bodies maturing in late summer or autumn. The centre of the fruit contains five carpels arranged in a five-pointed star, with each carpel containing one or two seeds.
Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples were first introduced to Australia in 1788 by English settlers at the Sydney Botanical Gardens. The most popular varieties of apples in the 21st century are Red Delicious, Granny Smith, Golden Delicious, and Fuji.
The apple tree is believed to have originated in the region of the Caucasus, between the Black and Caspian seas. It is thought to have been domesticated in Ceeeentral Asia, where its wild ancestors are still found.
The earliest evidence of apple cultivation dates back to 6500 BC.
when people living in the region of the Caucasus were growing apples.
Apples were brought to Europe by the Romans, who introduced the fruit to England and [[Germany]].
The first recorded mention of apples in England was in a 9th-century text, and by the 11th century, apple trees were being grown in monasteries. Apples were brought to North America by European colonists in the 17th century.
Today, apples are grown in all temperate regions of the world. The top apple-producing countries are China, the [[United States]], Turkey, [[Italy]], and India.
mei3fc5zx4bg0u6j5sgi7d8vk7saxwc
MavetunaZialnt30 2
0
101596
665053
663575
2025-07-01T19:10:49Z
Testvinca24sep01
55233
665053
wikitext
text/x-wiki
[[File:Lilac Flower&Leaves, SC, Vic, 13.10.2007.jpg|thumb|test image]]
{{Date}} - Date template example
{{#function:Z11022|128}}
Test for a mentor Zilant 17 update
__NEWSECTIONLINK__
[[Category:Test123]]
scso0e0tzvppvqldbvoj4lojtp6eunl
Template:Speedy deletion navbox
10
101827
665131
418683
2025-01-28T01:00:16Z
en>Voorts
0
update post-page move
665131
wikitext
text/x-wiki
{{Navbox
| name = Speedy deletion navbox
| title = [[Wikipedia:Speedy deletion|Speedy deletion]]
| image =
| above =
| state = autocollapse
| listclass = hlist
| group1 = Policies
| list1 =
* [[Wikipedia:Speedy deletion|Speedy deletion]]
* [[Wikipedia:Deletion policy|Deletion policy]]
| group2 = Guidelines
| list2 =
* [[Wikipedia:Deletion process|Deletion process]]
* [[Wikipedia:Deletion guidelines for administrators|Deletion guidelines for administrators]]
* [[Wikipedia:Page blanking|Page blanking]]
| group3 = Information pages
| list3 =
* [[Wikipedia:Criteria for speedy deletion/Overturned speedy deletions|Overturned speedy deletions]]
* [[Wikipedia:Criteria for speedy deletion/Deletion templates|List of db-x templates]]
| group4 = Essays
| list4 =
* [[Wikipedia:Field guide to proper speedy deletion|Field guide to proper speedy deletion]]
* [[Wikipedia:Why I Hate Speedy Deleters|Why I hate speedy deleters]]
* [[Wikipedia:Don't assume negative notability|Don't assume negative notability]]
* [[Wikipedia:What to do if your article gets tagged for speedy deletion|What to do if your article gets tagged for speedy deletion]]
* [[Wikipedia:Why was the page I created deleted?|Why was the page I created deleted?]]
* [[Wikipedia:How to save an article proposed for deletion|How to save an article proposed for deletion]]
| group5 = Individual criteria
| list5 =
* G1: [[Wikipedia:Patent nonsense|Patent nonsense]]
* G3: [[Wikipedia:Vandalism|Vandalism]], [[WP:Do not create hoaxes|Hoaxes]]
* G9: [[Wikipedia:Office actions|Office actions]]
* G10: [[Wikipedia:Attack pages|Attack pages]]
* G11: [[Wikipedia:Spam|Spam]]
* G12: [[Wikipedia:Copyright violations|Copyright violations]]
* A7/A9/A11: [[Wikipedia:Credible claim of significance|Credible claim of significance]]
* A11: [[Wikipedia:Wikipedia is not for things made up one day|Obviously invented]]
| list6 ={{navbox|child
| title = [[:Category:Candidates for speedy deletion|Speedy deletion candidates]]
| listclass = hlist
| state = collapsed
|list1 =
* [[:Category:Candidates for speedy deletion as nonsense pages|G1]]
* [[:Category:Candidates for speedy deletion as test pages|G2]]
* G3 ([[:Category:Candidates for speedy deletion as vandalism|vandalism]], [[:Category:Candidates for speedy deletion as hoaxes|hoaxes]])
* [[:Category:Candidates for speedy deletion as pages previously deleted via deletion discussion|G4]]
* G5 ([[:Category:Candidates for speedy deletion as having been created by blocked or banned users|blocked/banned]], [[:Category:Candidates for speedy deletion as having been created in violation of general sanctions|GS]])
* [[:Category:Candidates for technical speedy deletion|G6]]
* [[:Category:Candidates for speedy deletion as dependent on a non-existent page|G8]] ([[:Category:Candidates for speedy deletion as broken redirects|broken redirects]])
* [[:Category:Candidates for speedy deletion as attack pages|G10]]
* [[:Category:Candidates for speedy deletion as spam|G11]]
* [[:Category:Candidates for speedy deletion as copyright violations|G12/F9]]
* [[:Category:Candidates for speedy deletion as abandoned drafts or AfC submissions|G13]]
* [[:Category:Candidates for speedy deletion as unnecessary disambiguation pages|G14]]
* [[:Category:Candidates for speedy deletion as lacking context|A1]]
* [[:Category:Candidates for speedy deletion as existing on foreign Wikimedia projects|A2]]
* [[:Category:Candidates for speedy deletion as importance or significance not asserted|A7]]
* [[:Category:Candidates for speedy deletion as duplicate articles|A10]]
* [[:Category:Candidates for speedy deletion as obviously invented|A11]]
* [[:Category:Candidates for speedy deletion as inappropriate cross-namespace redirects|R2]]
* [[:Category:Candidates for speedy deletion as implausible redirects|R3]]
* [[:Category:Candidates for speedy deletion as file redirects shadowing Wikimedia Commons files|R4]]
* [[:Category:Candidates for speedy deletion as redundant files|F1]]
* [[:Category:Candidates for speedy deletion as missing files|F2]]
* [[:Category:Candidates for speedy deletion as files with unacceptable licenses|F3]]
* F4 ([[:Category:Wikipedia files with unknown source|unknown source]], [[:Category:Wikipedia files with unknown copyright status|unknown status]])
* [[:Category:Candidates for speedy deletion as orphaned non-free use files|F5]]
* [[:Category:All Wikipedia files with no non-free use rationale|F6]]
* [[:Category:Candidates for speedy deletion as files with clearly invalid fair-use claims|F7]]
* F8 ([[:Category:Wikipedia files with the same name on Wikimedia Commons|same name]], [[:Category:Wikipedia files with a different name on Wikimedia Commons|different name]])
* [[:Category:Wikipedia files missing permission|F11]]
* [[:Category:Candidates for speedy deletion as empty categories|C1]]
* [[:Category:Candidates for speedy deletion as unused maintenance categories|C4]]
* [[:Category:Candidates for speedy deletion as userpage or subpage of a nonexistent user|U2]]
* [[:Category:Candidates for speedy deletion as blatant NOTWEBHOST violations|U5]]
* [[:Category:Candidates for speedy deletion for unspecified reason|Unspecified reason]]
* [[:Category:Candidates for history merging|History merges]]
* [[:Category:Candidates for speedy deletion as empty articles|Empty articles]]
* [[:Category:Candidates for speedy deletion by user|By user]]
* [[:Category:Speedy deletion candidates with talk pages|Possibly contested]]
}}
| list7 = {{navbox|child
| title = [[Wikipedia:Template messages/Deletion#Speedy deletion|Templates]]
| listclass = hlist
| state = collapsed
| group1 = General
| list1 = {{navbox|child
| group1 = [[WP:G1|G1]]
| list1 = Tag: {{tl|db-nonsense}} Warning: {{tl|db-nonsense-notice}}
| group2 = [[WP:G2|G2]]
| list2 = Tag: {{tl|db-test}} Warning: {{tl|db-test-notice}}
| group3 = [[WP:G3|G3]]
| list3 = Tags: {{tl|db-vandalism}} {{tl|db-hoax}} Warnings: {{tl|db-vandalism-notice}}
| group4 = [[WP:G4|G4]]
| list4 = Tag: {{tl|db-repost}} Warning: {{tl|db-repost-notice}}
| group5 = [[WP:G5|G5]]
| list5 = Tag: {{tl|db-banned}}
| group6 = [[WP:G6|G6]]
| list6 = Tags: {{tl|db-maintenance}} {{tl|db-move}} {{tl|db-copypaste}} {{tl|db-xfd}} Warnings: {{tl|db-copypaste-notice}}
| group7 = [[WP:G7|G7]]
| list7 = Tag: {{tl|db-author}}
| group8 = [[WP:G8|G8]]
| list8 = Tags: {{tl|db-g8}} {{tl|db-talk}} {{tl|db-subpage}} {{tl|db-redirnone}} {{tl|db-templatecat}}
| group9 = [[WP:G10|G10]]
| list9 = Tags: {{tl|db-attack}} {{tl|db-blp}} Warnings: {{tl|db-attack-notice}} {{tl|db-attackorg-notice}} {{tl|db-negublp-notice}}
| group10 = [[WP:G11|G11]]
| list10 = Tag: {{tl|db-spam}} Warnings: {{tl|db-spam-notice}} {{tl|spam-warn}} {{tl|spam-warn-userpage}}
| group11 = [[WP:G12|G12]]
| list11 = Tag: {{tl|db-copyvio}} Warnings: {{tl|db-copyvio-notice}} {{tl|nothanks-gfdl}}
| group12 = [[WP:G13|G13]]
| list12 = Tag: {{tl|db-afc}} Warnings: {{tl|db-afc-notice}}
| group13 = [[WP:G14|G14]]
| list13 = Tag: {{tl|db-disambig}} Warnings: {{tl|db-disambig-notice}}
}}
| group2 = Articles
| list2 = {{navbox|child
| group1 = [[WP:A1|A1]]
| list1 = Tag: {{tl|db-nocontext}} Warning: {{tl|db-nocontext-notice}}
| group2 = [[WP:A2|A2]]
| list2 = Tag: {{tl|db-foreign}} Warning: {{tl|db-foreign-notice}}
| group3 = [[WP:A3|A3]]
| list3 = Tag: {{tl|db-nocontent}} Warning: {{tl|db-nocontent-notice}}
| group4 = [[WP:A7|A7]]
| list4 = Tags: {{tl|db-a7}} {{tl|db-person}} {{tl|db-band}} {{tl|db-club}} {{tl|db-inc}} {{tl|db-web}} {{tl|db-animal}} {{tl|db-event}} Warnings: {{tl|db-notability-notice}} {{tl|db-bio-notice}} {{tl|db-band-notice}} {{tl|db-club-notice}} {{tl|db-inc-notice}} {{tl|db-web-notice}} {{tl|db-animal-notice}} {{tl|db-event-notice}} {{tl|nn-warn-deletion}} {{tl|bio-warn-deletion}}
| group5 = [[WP:A9|A9]]
| list5 = Tag: {{tl|db-song}} Warnings: {{tl|db-a9-notice}} {{tl|db-song-notice}}
| group6 = [[WP:A10|A10]]
| list6 = Tag: {{tl|db-same}} Warning: {{tl|db-a10-notice}}
| group7 = [[WP:A11|A11]]
| list7 = Tag: {{tl|db-madeup}} Warning: {{tl|db-madeup-notice}}
}}
| group3 = Redirects
| list3 = {{navbox|child
| group1 = [[WP:R2|R2]]
| list1 = Tag: {{tl|db-rediruser}} Warning: {{tl|db-rediruser-notice}}
| group2 = [[WP:R3|R3]]
| list2 = Tag: {{tl|db-redirtypo}} Warning: {{tl|db-redirtypo-notice}}
| group3 = [[WP:R4|R4]]
| list3 = Tag: {{tl|db-redircom}} Warning: {{tl|db-redircom-notice}}
}}
| group4 = Files
| list4 = {{navbox|child
| group1 = [[WP:CSD#F1|F1]]
| list1 = Tags: {{tl|db-f1}} {{tl|duplicate}} Warning: {{tl|db-redundantimage-notice}}
| group2 = [[WP:F2|F2]]
| list2 = Tags: {{tl|db-f2}} {{tl|db-fpcfail}} {{tl|db-imagepage}} Warning: {{tl|db-noimage-notice}}
| group3 = [[WP:F3|F3]]
| list3 = Tag: {{tl|db-noncom}} Warning: {{tl|db-noncom-notice}}
| group4 = [[WP:F4|F4]]
| list4 = Tags: {{tl|di-no source}} {{tl|di-no license}} {{tl|di-no source no license}} {{tl|di-dw no source}} {{tl|di-dw no license}} {{tl|di-dw no source no license}} Warnings: {{tl|di-no source-notice}} {{tl|di-no license-notice}} {{tl|di-no source no license-notice}} {{tl|di-dw no source-notice}} {{tl|di-dw no license-notice}} {{tl|di-dw no source no license-notice}}
| group5 = [[WP:F5|F5]]
| list5 = Tag: {{tl|db-f5}} {{tl|di-orphaned fair use}} Warning: {{tl|di-orphaned fair use-notice}}
| group6 = [[WP:F6|F6]]
| list6 = Tags: {{tl|di-no fair use rationale}} {{tl|di-missing article links}} Warning: {{tl|di-no fair use rationale-notice}}
| group7 = [[WP:F7|F7]]
| list7 = Tags: {{tl|db-f7}} {{tl|di-replaceable fair use}} {{tl|di-disputed fair use rationale}} Warning: {{tl|uw-csd-f7}} {{tl|di-replaceable fair use-notice}}
| group8 = [[WP:F8|F8]]
| list8 = Tag: {{tl|Now Commons}}
| group9 = [[WP:F9|F9]]
| list9 = Tag: {{tl|db-filecopyvio}} Warning: {{tl|db-imgcopyvio-notice}}
| group11 = [[WP:F11|F11]]
| list11 = Tag: {{tl|di-no permission}} Warning: {{tl|di-no permission-notice}}
| group12 = !
| list12 = Tag: {{tl|di-fails NFCC}} Warning: {{tl|di-disputed fair use rationale-notice}}
}}
| group5 = Categories
| list5 = {{navbox|child
| group1 = [[WP:C1|C1]]
| list1 = Tags: {{tl|c1}} Warning: {{tl|db-catempty-notice}}
| group2 = [[WP:C4|C4]]
| list2 = Tag: {{tl|db-c4}}
}}
| group6 = Templates
| list6 = {{navbox|child|
| group1 = [[WP:T5|T5]]
| list1 = Tag: {{tl|db-t5}}
}}
| group7 = User pages
| list7 = {{navbox|child
| group1 = [[WP:U1|U1]]
| list1 = Tag: {{tl|db-userreq}}
| group2 = [[WP:U2|U2]]
| list2 = Tag: {{tl|db-nouser}}
| group4 = [[WP:U5|U5]]
| list4 = Tag: {{tl|db-notwebhost}} Warning: {{tl|db-notwebhost-notice}}
}}
| group8 = Other
| list8 = Tags: {{tl|db}} {{tl|db-multiple}} Warnings: {{tl|db-reason-notice}} {{tl|db-notice-multiple}} {{tl|CSD-warn}}
}}
}}<noinclude>
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
sp545c2narjrqwcdrg03bzc8u9qaisq
665132
665131
2025-07-02T04:53:22Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Speedy_deletion_navbox]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665131
wikitext
text/x-wiki
{{Navbox
| name = Speedy deletion navbox
| title = [[Wikipedia:Speedy deletion|Speedy deletion]]
| image =
| above =
| state = autocollapse
| listclass = hlist
| group1 = Policies
| list1 =
* [[Wikipedia:Speedy deletion|Speedy deletion]]
* [[Wikipedia:Deletion policy|Deletion policy]]
| group2 = Guidelines
| list2 =
* [[Wikipedia:Deletion process|Deletion process]]
* [[Wikipedia:Deletion guidelines for administrators|Deletion guidelines for administrators]]
* [[Wikipedia:Page blanking|Page blanking]]
| group3 = Information pages
| list3 =
* [[Wikipedia:Criteria for speedy deletion/Overturned speedy deletions|Overturned speedy deletions]]
* [[Wikipedia:Criteria for speedy deletion/Deletion templates|List of db-x templates]]
| group4 = Essays
| list4 =
* [[Wikipedia:Field guide to proper speedy deletion|Field guide to proper speedy deletion]]
* [[Wikipedia:Why I Hate Speedy Deleters|Why I hate speedy deleters]]
* [[Wikipedia:Don't assume negative notability|Don't assume negative notability]]
* [[Wikipedia:What to do if your article gets tagged for speedy deletion|What to do if your article gets tagged for speedy deletion]]
* [[Wikipedia:Why was the page I created deleted?|Why was the page I created deleted?]]
* [[Wikipedia:How to save an article proposed for deletion|How to save an article proposed for deletion]]
| group5 = Individual criteria
| list5 =
* G1: [[Wikipedia:Patent nonsense|Patent nonsense]]
* G3: [[Wikipedia:Vandalism|Vandalism]], [[WP:Do not create hoaxes|Hoaxes]]
* G9: [[Wikipedia:Office actions|Office actions]]
* G10: [[Wikipedia:Attack pages|Attack pages]]
* G11: [[Wikipedia:Spam|Spam]]
* G12: [[Wikipedia:Copyright violations|Copyright violations]]
* A7/A9/A11: [[Wikipedia:Credible claim of significance|Credible claim of significance]]
* A11: [[Wikipedia:Wikipedia is not for things made up one day|Obviously invented]]
| list6 ={{navbox|child
| title = [[:Category:Candidates for speedy deletion|Speedy deletion candidates]]
| listclass = hlist
| state = collapsed
|list1 =
* [[:Category:Candidates for speedy deletion as nonsense pages|G1]]
* [[:Category:Candidates for speedy deletion as test pages|G2]]
* G3 ([[:Category:Candidates for speedy deletion as vandalism|vandalism]], [[:Category:Candidates for speedy deletion as hoaxes|hoaxes]])
* [[:Category:Candidates for speedy deletion as pages previously deleted via deletion discussion|G4]]
* G5 ([[:Category:Candidates for speedy deletion as having been created by blocked or banned users|blocked/banned]], [[:Category:Candidates for speedy deletion as having been created in violation of general sanctions|GS]])
* [[:Category:Candidates for technical speedy deletion|G6]]
* [[:Category:Candidates for speedy deletion as dependent on a non-existent page|G8]] ([[:Category:Candidates for speedy deletion as broken redirects|broken redirects]])
* [[:Category:Candidates for speedy deletion as attack pages|G10]]
* [[:Category:Candidates for speedy deletion as spam|G11]]
* [[:Category:Candidates for speedy deletion as copyright violations|G12/F9]]
* [[:Category:Candidates for speedy deletion as abandoned drafts or AfC submissions|G13]]
* [[:Category:Candidates for speedy deletion as unnecessary disambiguation pages|G14]]
* [[:Category:Candidates for speedy deletion as lacking context|A1]]
* [[:Category:Candidates for speedy deletion as existing on foreign Wikimedia projects|A2]]
* [[:Category:Candidates for speedy deletion as importance or significance not asserted|A7]]
* [[:Category:Candidates for speedy deletion as duplicate articles|A10]]
* [[:Category:Candidates for speedy deletion as obviously invented|A11]]
* [[:Category:Candidates for speedy deletion as inappropriate cross-namespace redirects|R2]]
* [[:Category:Candidates for speedy deletion as implausible redirects|R3]]
* [[:Category:Candidates for speedy deletion as file redirects shadowing Wikimedia Commons files|R4]]
* [[:Category:Candidates for speedy deletion as redundant files|F1]]
* [[:Category:Candidates for speedy deletion as missing files|F2]]
* [[:Category:Candidates for speedy deletion as files with unacceptable licenses|F3]]
* F4 ([[:Category:Wikipedia files with unknown source|unknown source]], [[:Category:Wikipedia files with unknown copyright status|unknown status]])
* [[:Category:Candidates for speedy deletion as orphaned non-free use files|F5]]
* [[:Category:All Wikipedia files with no non-free use rationale|F6]]
* [[:Category:Candidates for speedy deletion as files with clearly invalid fair-use claims|F7]]
* F8 ([[:Category:Wikipedia files with the same name on Wikimedia Commons|same name]], [[:Category:Wikipedia files with a different name on Wikimedia Commons|different name]])
* [[:Category:Wikipedia files missing permission|F11]]
* [[:Category:Candidates for speedy deletion as empty categories|C1]]
* [[:Category:Candidates for speedy deletion as unused maintenance categories|C4]]
* [[:Category:Candidates for speedy deletion as userpage or subpage of a nonexistent user|U2]]
* [[:Category:Candidates for speedy deletion as blatant NOTWEBHOST violations|U5]]
* [[:Category:Candidates for speedy deletion for unspecified reason|Unspecified reason]]
* [[:Category:Candidates for history merging|History merges]]
* [[:Category:Candidates for speedy deletion as empty articles|Empty articles]]
* [[:Category:Candidates for speedy deletion by user|By user]]
* [[:Category:Speedy deletion candidates with talk pages|Possibly contested]]
}}
| list7 = {{navbox|child
| title = [[Wikipedia:Template messages/Deletion#Speedy deletion|Templates]]
| listclass = hlist
| state = collapsed
| group1 = General
| list1 = {{navbox|child
| group1 = [[WP:G1|G1]]
| list1 = Tag: {{tl|db-nonsense}} Warning: {{tl|db-nonsense-notice}}
| group2 = [[WP:G2|G2]]
| list2 = Tag: {{tl|db-test}} Warning: {{tl|db-test-notice}}
| group3 = [[WP:G3|G3]]
| list3 = Tags: {{tl|db-vandalism}} {{tl|db-hoax}} Warnings: {{tl|db-vandalism-notice}}
| group4 = [[WP:G4|G4]]
| list4 = Tag: {{tl|db-repost}} Warning: {{tl|db-repost-notice}}
| group5 = [[WP:G5|G5]]
| list5 = Tag: {{tl|db-banned}}
| group6 = [[WP:G6|G6]]
| list6 = Tags: {{tl|db-maintenance}} {{tl|db-move}} {{tl|db-copypaste}} {{tl|db-xfd}} Warnings: {{tl|db-copypaste-notice}}
| group7 = [[WP:G7|G7]]
| list7 = Tag: {{tl|db-author}}
| group8 = [[WP:G8|G8]]
| list8 = Tags: {{tl|db-g8}} {{tl|db-talk}} {{tl|db-subpage}} {{tl|db-redirnone}} {{tl|db-templatecat}}
| group9 = [[WP:G10|G10]]
| list9 = Tags: {{tl|db-attack}} {{tl|db-blp}} Warnings: {{tl|db-attack-notice}} {{tl|db-attackorg-notice}} {{tl|db-negublp-notice}}
| group10 = [[WP:G11|G11]]
| list10 = Tag: {{tl|db-spam}} Warnings: {{tl|db-spam-notice}} {{tl|spam-warn}} {{tl|spam-warn-userpage}}
| group11 = [[WP:G12|G12]]
| list11 = Tag: {{tl|db-copyvio}} Warnings: {{tl|db-copyvio-notice}} {{tl|nothanks-gfdl}}
| group12 = [[WP:G13|G13]]
| list12 = Tag: {{tl|db-afc}} Warnings: {{tl|db-afc-notice}}
| group13 = [[WP:G14|G14]]
| list13 = Tag: {{tl|db-disambig}} Warnings: {{tl|db-disambig-notice}}
}}
| group2 = Articles
| list2 = {{navbox|child
| group1 = [[WP:A1|A1]]
| list1 = Tag: {{tl|db-nocontext}} Warning: {{tl|db-nocontext-notice}}
| group2 = [[WP:A2|A2]]
| list2 = Tag: {{tl|db-foreign}} Warning: {{tl|db-foreign-notice}}
| group3 = [[WP:A3|A3]]
| list3 = Tag: {{tl|db-nocontent}} Warning: {{tl|db-nocontent-notice}}
| group4 = [[WP:A7|A7]]
| list4 = Tags: {{tl|db-a7}} {{tl|db-person}} {{tl|db-band}} {{tl|db-club}} {{tl|db-inc}} {{tl|db-web}} {{tl|db-animal}} {{tl|db-event}} Warnings: {{tl|db-notability-notice}} {{tl|db-bio-notice}} {{tl|db-band-notice}} {{tl|db-club-notice}} {{tl|db-inc-notice}} {{tl|db-web-notice}} {{tl|db-animal-notice}} {{tl|db-event-notice}} {{tl|nn-warn-deletion}} {{tl|bio-warn-deletion}}
| group5 = [[WP:A9|A9]]
| list5 = Tag: {{tl|db-song}} Warnings: {{tl|db-a9-notice}} {{tl|db-song-notice}}
| group6 = [[WP:A10|A10]]
| list6 = Tag: {{tl|db-same}} Warning: {{tl|db-a10-notice}}
| group7 = [[WP:A11|A11]]
| list7 = Tag: {{tl|db-madeup}} Warning: {{tl|db-madeup-notice}}
}}
| group3 = Redirects
| list3 = {{navbox|child
| group1 = [[WP:R2|R2]]
| list1 = Tag: {{tl|db-rediruser}} Warning: {{tl|db-rediruser-notice}}
| group2 = [[WP:R3|R3]]
| list2 = Tag: {{tl|db-redirtypo}} Warning: {{tl|db-redirtypo-notice}}
| group3 = [[WP:R4|R4]]
| list3 = Tag: {{tl|db-redircom}} Warning: {{tl|db-redircom-notice}}
}}
| group4 = Files
| list4 = {{navbox|child
| group1 = [[WP:CSD#F1|F1]]
| list1 = Tags: {{tl|db-f1}} {{tl|duplicate}} Warning: {{tl|db-redundantimage-notice}}
| group2 = [[WP:F2|F2]]
| list2 = Tags: {{tl|db-f2}} {{tl|db-fpcfail}} {{tl|db-imagepage}} Warning: {{tl|db-noimage-notice}}
| group3 = [[WP:F3|F3]]
| list3 = Tag: {{tl|db-noncom}} Warning: {{tl|db-noncom-notice}}
| group4 = [[WP:F4|F4]]
| list4 = Tags: {{tl|di-no source}} {{tl|di-no license}} {{tl|di-no source no license}} {{tl|di-dw no source}} {{tl|di-dw no license}} {{tl|di-dw no source no license}} Warnings: {{tl|di-no source-notice}} {{tl|di-no license-notice}} {{tl|di-no source no license-notice}} {{tl|di-dw no source-notice}} {{tl|di-dw no license-notice}} {{tl|di-dw no source no license-notice}}
| group5 = [[WP:F5|F5]]
| list5 = Tag: {{tl|db-f5}} {{tl|di-orphaned fair use}} Warning: {{tl|di-orphaned fair use-notice}}
| group6 = [[WP:F6|F6]]
| list6 = Tags: {{tl|di-no fair use rationale}} {{tl|di-missing article links}} Warning: {{tl|di-no fair use rationale-notice}}
| group7 = [[WP:F7|F7]]
| list7 = Tags: {{tl|db-f7}} {{tl|di-replaceable fair use}} {{tl|di-disputed fair use rationale}} Warning: {{tl|uw-csd-f7}} {{tl|di-replaceable fair use-notice}}
| group8 = [[WP:F8|F8]]
| list8 = Tag: {{tl|Now Commons}}
| group9 = [[WP:F9|F9]]
| list9 = Tag: {{tl|db-filecopyvio}} Warning: {{tl|db-imgcopyvio-notice}}
| group11 = [[WP:F11|F11]]
| list11 = Tag: {{tl|di-no permission}} Warning: {{tl|di-no permission-notice}}
| group12 = !
| list12 = Tag: {{tl|di-fails NFCC}} Warning: {{tl|di-disputed fair use rationale-notice}}
}}
| group5 = Categories
| list5 = {{navbox|child
| group1 = [[WP:C1|C1]]
| list1 = Tags: {{tl|c1}} Warning: {{tl|db-catempty-notice}}
| group2 = [[WP:C4|C4]]
| list2 = Tag: {{tl|db-c4}}
}}
| group6 = Templates
| list6 = {{navbox|child|
| group1 = [[WP:T5|T5]]
| list1 = Tag: {{tl|db-t5}}
}}
| group7 = User pages
| list7 = {{navbox|child
| group1 = [[WP:U1|U1]]
| list1 = Tag: {{tl|db-userreq}}
| group2 = [[WP:U2|U2]]
| list2 = Tag: {{tl|db-nouser}}
| group4 = [[WP:U5|U5]]
| list4 = Tag: {{tl|db-notwebhost}} Warning: {{tl|db-notwebhost-notice}}
}}
| group8 = Other
| list8 = Tags: {{tl|db}} {{tl|db-multiple}} Warnings: {{tl|db-reason-notice}} {{tl|db-notice-multiple}} {{tl|CSD-warn}}
}}
}}<noinclude>
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
sp545c2narjrqwcdrg03bzc8u9qaisq
Template:Speedy deletion notices
10
101828
665133
585007
2025-02-18T22:49:21Z
en>Warudo
0
Added [[TM:db-t5-notice]]
665133
wikitext
text/x-wiki
{{Sidebar with collapsible lists
| name = Speedy deletion notices
| templatestyles = Speedy deletion notices/styles.css
| class = speedy-deletion-notices
| title = [[Wikipedia:Criteria for speedy deletion|Speedy deletion notices]]
| expanded = {{{expanded|{{{selected|{{{1|}}}}}}}}}
| list1name = general
| list1title = General criteria
| list1 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:G1|G1]] |data1={{tl|db-nonsense-notice}}
|label2=[[WP:G2|G2]] |data2={{tl|db-test-notice}}
|label3=[[WP:G3|G3]] |data3={{tl|db-vandalism-notice}} {{tl|db-hoax-notice}}
|label4=[[WP:G4|G4]] |data4={{tl|db-repost-notice}}
|label5=[[WP:G5|G5]] |data5={{tl|db-gs-notice}}
|label6=[[WP:G6|G6]] |data6={{tl|db-copypaste-notice}}
|label8=[[WP:G8|G8]] |data8={{tl|db-talk-notice}}
|label10=[[WP:G10|G10]] |data10={{tl|db-attack-notice}} {{tl|db-negublp-notice}}
|label11=[[WP:G11|G11]] |data11={{tl|db-spam-notice}} {{tl|db-spamuser-notice}}
|label12=[[WP:G12|G12]] |data12={{tl|db-copyvio-notice}} {{tl|nothanks-gfdl}}
|label13=[[WP:G13|G13]] |data13={{tl|db-draft-notice}}
|label14=[[WP:G14|G14]] |data14={{tl|db-disambig-notice}}
}}
| list2name = articles
| list2title = Articles
| list2 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:A1|A1]] |data1={{tl|db-nocontext-notice}}
|label2=[[WP:A2|A2]] |data2={{tl|db-foreign-notice}}
|label3=[[WP:A3|A3]] |data3={{tl|db-nocontent-notice}}
|label7=[[WP:A7|A7]] |data7={{tl|db-notability-notice}} {{tl|db-bio-notice}} {{tl|db-band-notice}} {{tl|db-club-notice}} {{tl|db-inc-notice}} {{tl|db-web-notice}} {{tl|db-animal-notice}} {{tl|db-event-notice}}
|label9=[[WP:A9|A9]] |data9={{tl|db-a9-notice}}
|label10=[[WP:A10|A10]] |data10={{tl|db-a10-notice}}
|label11=[[WP:A11|A11]] |data11={{tl|db-invented-notice}}
}}
| list3name = redirects
| list3title = Redirects
| list3 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label2=[[WP:R2|R2]] |data2={{tl|db-rediruser-notice}}
|label3=[[WP:R3|R3]] |data3={{tl|db-redirtypo-notice}}
|label4=[[WP:R4|R4]] |data4={{tl|db-redircom-notice}}
}}
| list4name = files
| list4title = Files
| list4 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[Wikipedia:Criteria for speedy deletion#F1|F1]] |data1={{tl|db-redundantimage-notice}}
|label2=[[WP:F2|F2]] |data2={{tl|db-noimage-notice}}
|label3=[[WP:F3|F3]] |data3={{tl|db-noncom-notice}}
|label4=[[WP:F4|F4]] |data4={{tl|di-no source-notice}} {{tl|di-no license-notice}} {{tl|di-no source no license-notice}} {{tl|di-dw no source-notice}} {{tl|di-dw no license-notice}} {{tl|di-dw no source no license-notice}}
|label5=[[WP:F5|F5]] |data5={{tl|di-orphaned non-free use-notice}}
|label6=[[WP:F6|F6]] |data6={{tl|di-no non-free use rationale-notice}}
|label7=[[WP:F7|F7]] |data7={{tl|db-badfairuse-notice}} {{tl|di-replaceable non-free use-notice}} {{tl|di-disputed non-free use rationale-notice}}
|label9=[[WP:F9|F9]] |data9={{tl|db-imgcopyvio-notice}}
|label11=[[WP:F11|F11]] |data11={{tl|di-no permission-notice}}
}}
| list5name = categories
| list5title = Categories
| list5 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:C1|C1]] |data1={{tl|db-catempty-notice}}
}}
| list6name = templates
| list6title = Templates
| list6 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:T5|T5]] |data1={{tl|db-t5-notice}}
}}
| list7name = user
| list7title = User pages
| list7 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label5=[[WP:U5|U5]] |data5={{tl|db-notwebhost-notice}}
}}
| list8name = other
| list8title = Other
| list8 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|data1={{tl|db-reason-notice}} {{tl|db-notice-multiple}} {{tl|CSD-warn}}
}}
}}<noinclude>
{{documentation|Template:Speedy deletion templates/doc}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
9tj4062vm6r18pci3m2vrzgkr2slq2n
665134
665133
2025-07-02T04:53:23Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Speedy_deletion_notices]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665133
wikitext
text/x-wiki
{{Sidebar with collapsible lists
| name = Speedy deletion notices
| templatestyles = Speedy deletion notices/styles.css
| class = speedy-deletion-notices
| title = [[Wikipedia:Criteria for speedy deletion|Speedy deletion notices]]
| expanded = {{{expanded|{{{selected|{{{1|}}}}}}}}}
| list1name = general
| list1title = General criteria
| list1 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:G1|G1]] |data1={{tl|db-nonsense-notice}}
|label2=[[WP:G2|G2]] |data2={{tl|db-test-notice}}
|label3=[[WP:G3|G3]] |data3={{tl|db-vandalism-notice}} {{tl|db-hoax-notice}}
|label4=[[WP:G4|G4]] |data4={{tl|db-repost-notice}}
|label5=[[WP:G5|G5]] |data5={{tl|db-gs-notice}}
|label6=[[WP:G6|G6]] |data6={{tl|db-copypaste-notice}}
|label8=[[WP:G8|G8]] |data8={{tl|db-talk-notice}}
|label10=[[WP:G10|G10]] |data10={{tl|db-attack-notice}} {{tl|db-negublp-notice}}
|label11=[[WP:G11|G11]] |data11={{tl|db-spam-notice}} {{tl|db-spamuser-notice}}
|label12=[[WP:G12|G12]] |data12={{tl|db-copyvio-notice}} {{tl|nothanks-gfdl}}
|label13=[[WP:G13|G13]] |data13={{tl|db-draft-notice}}
|label14=[[WP:G14|G14]] |data14={{tl|db-disambig-notice}}
}}
| list2name = articles
| list2title = Articles
| list2 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:A1|A1]] |data1={{tl|db-nocontext-notice}}
|label2=[[WP:A2|A2]] |data2={{tl|db-foreign-notice}}
|label3=[[WP:A3|A3]] |data3={{tl|db-nocontent-notice}}
|label7=[[WP:A7|A7]] |data7={{tl|db-notability-notice}} {{tl|db-bio-notice}} {{tl|db-band-notice}} {{tl|db-club-notice}} {{tl|db-inc-notice}} {{tl|db-web-notice}} {{tl|db-animal-notice}} {{tl|db-event-notice}}
|label9=[[WP:A9|A9]] |data9={{tl|db-a9-notice}}
|label10=[[WP:A10|A10]] |data10={{tl|db-a10-notice}}
|label11=[[WP:A11|A11]] |data11={{tl|db-invented-notice}}
}}
| list3name = redirects
| list3title = Redirects
| list3 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label2=[[WP:R2|R2]] |data2={{tl|db-rediruser-notice}}
|label3=[[WP:R3|R3]] |data3={{tl|db-redirtypo-notice}}
|label4=[[WP:R4|R4]] |data4={{tl|db-redircom-notice}}
}}
| list4name = files
| list4title = Files
| list4 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[Wikipedia:Criteria for speedy deletion#F1|F1]] |data1={{tl|db-redundantimage-notice}}
|label2=[[WP:F2|F2]] |data2={{tl|db-noimage-notice}}
|label3=[[WP:F3|F3]] |data3={{tl|db-noncom-notice}}
|label4=[[WP:F4|F4]] |data4={{tl|di-no source-notice}} {{tl|di-no license-notice}} {{tl|di-no source no license-notice}} {{tl|di-dw no source-notice}} {{tl|di-dw no license-notice}} {{tl|di-dw no source no license-notice}}
|label5=[[WP:F5|F5]] |data5={{tl|di-orphaned non-free use-notice}}
|label6=[[WP:F6|F6]] |data6={{tl|di-no non-free use rationale-notice}}
|label7=[[WP:F7|F7]] |data7={{tl|db-badfairuse-notice}} {{tl|di-replaceable non-free use-notice}} {{tl|di-disputed non-free use rationale-notice}}
|label9=[[WP:F9|F9]] |data9={{tl|db-imgcopyvio-notice}}
|label11=[[WP:F11|F11]] |data11={{tl|di-no permission-notice}}
}}
| list5name = categories
| list5title = Categories
| list5 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:C1|C1]] |data1={{tl|db-catempty-notice}}
}}
| list6name = templates
| list6title = Templates
| list6 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:T5|T5]] |data1={{tl|db-t5-notice}}
}}
| list7name = user
| list7title = User pages
| list7 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label5=[[WP:U5|U5]] |data5={{tl|db-notwebhost-notice}}
}}
| list8name = other
| list8title = Other
| list8 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|data1={{tl|db-reason-notice}} {{tl|db-notice-multiple}} {{tl|CSD-warn}}
}}
}}<noinclude>
{{documentation|Template:Speedy deletion templates/doc}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
9tj4062vm6r18pci3m2vrzgkr2slq2n
Wikipedia:Sandbox
4
107092
665055
664729
2025-07-01T21:00:10Z
Cewbot
33876
Clear the sandbox. If you want to keep it longer, please test it in [[Special:MyPage/Sandbox|personal sandbox]], you can also check the revision history of the sandbox.
665055
wikitext
text/x-wiki
<noinclude>{{Sandbox}}</noinclude>
== Please start your testing below this line ==
9v37rcaxoiwjar8n3q9n7dcsjdvcyin
Denis Albert Bardou
0
113322
665051
657098
2025-07-01T18:55:24Z
Zilanttest24june01
69264
/* growthexperiments-addlink-summary-summary:2|0|0 */
665051
wikitext
text/x-wiki
{{Sections|date=June 2020}}
{{Infobox person
| name = Denis Albert Bardou
| image = <!-- filename only, no "File:" or "Image:" prefix, and no enclosing [[brackets]] -->
| caption =
| birth_date = {{birth date|1841|2|15}}
| birth_place = [[Paris]], [[France]]
| death_date = {{death date and age|1893|3|14|1841|2|15}}
| death_place = [[Paris]], [[France]]
| nationality = French
| occupation = [[Scientific equipment optician]]
| years_active = 1865-1893
| known_for = Telescopes and other precision optical instruments
| notable_works =
}}
'''Denis Albert Bardou''' (15 February 1841 – 14 March 1893)<ref>{{cite web|url=https://francearchives.fr/es/facomponent/73d6cd392269eca0542cb3f1aadf995481692d90|title=Inventaire après décès de Denis Albert Bardou...|language=fr|website=FranceArchives|access-date=6 May 2018}}{{Dead link|date=May 2025 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> was a French manufacturer of precision optical instruments.
He was born in Paris, the son of Pierrre Gabriel Bardou, optician, and Gertrude Aglaé Anna Guichard. Denis Albert's grandfather had founded the Maison Bardou in 1819, an optical company in Paris, which had then passed to his father. In 1865, Denis Albert assumed control of the family business.<ref>[http://www2.culture.gouv.fr/public/mistral/leonore_fr Légion d’honneur file, Denis Albert Bardou, cote LH/114/21.]</ref> The company was located at his residence at 55, rue de Chabrol.
The company manufactured and sold astronomical [[telescope]]s, spyglasses, [[binoculars]], [[microscopes]] and [[opera glasses]]. The telescopes included both [[Equatorial mount|equatorial]] and [[Altazimuth mount|azimuthal models]] with silvered glass mirrors (10, 16, 20 cm).<ref>{{Cite web |url=http://www.narit.or.th/en/files/2016JAHHvol19/2016JAHH...19..106T.pdf |title=William Tobin. "Evolution of the Foucault-Secretan Reflecting Telescope.” ''Journal of Astronomical History and Heritage'', 19(2), 106–184 (2016). |access-date=2020-07-06 |archive-date=2018-05-07 |archive-url=https://web.archive.org/web/20180507003406/http://www.narit.or.th/en/files/2016JAHHvol19/2016JAHH...19..106T.pdf |url-status=dead }}</ref> Between 1867 and 1891 the Bardou company won numerous awards at expositions of [[Le Havre]], [[Philadelphia]], and Paris, including a gold medal at the [[Exposition Universelle (1889)|Exposition Universelle in Paris in 1889]]. It furnished optical instruments to the [[Ministry of the Armed Forces (France)|French Ministère de la Guerre]], [[Ministère de la Marine]] and to foreign governments.<ref>[http://www2.culture.gouv.fr/public/mistral/leonore_fr Légion d’honneur file, Denis Albert Bardou, cote LH/114/21.]</ref>
Bardou became a member of the [[Société astronomique de France]] in 1888 (only one year after it was established).<ref>[http://adsabs.harvard.edu/full/1902BSAFR..16..567 Bulletin de la Societe Astronomique de France et Revue Mensuelle d'Astronomie, de Meteorologie et de Physique du Globe, 1902, vol. 16, pp. 567.]</ref> Advertisements for his company's telescopes appeared frequently in the pages of the [[L'Astronomie (magazine)|society's bulletin]].
The Maison Bardou and its fellow Paris-based competitors the [[Secretan (company)|Secrétan]] and [[Raymond Augustin Mailhat|Mailhat]] companies were among the leading French precision optics manufacturers of the early twentieth century. Bardou telescopes and optical products were widely exported to Europe, the [[United States]] and even further afield.
Bardou died on 14 March 1893 in his home in Paris.<ref>[http://archives.paris.fr/s/4/etat-civil-actes/resultats/? Archives de Paris, État civil de Paris, Actes d'état civil, Paris-10e arrondissement, 1893 Décès, V4E 8913, entry 1170]{{Dead link|date=July 2019 |bot=InternetArchiveBot |fix-attempted=yes }}.</ref>
In 1896, Jules Vial, an engineer, became the successor to the Maison Bardou. He continued [[manufacturing]] telescopes under the name “Bardou” or “Bardou-Vial” for at least the next 15 years. By 1899, the company had moved to 59, rue Caulaincourt, Paris.<ref>[https://archive.org/details/BardouVialInstrumentsDOptique1899ExtractsExplanation J. Vial. ''Instruments d'optique Maison Bardou'' (La Rochelle: Imprimerie Nouvelle Noel Texier, 1899).]</ref>
==Notable telescopes==
Besides manufacturing small telescopes, Bardou also built large ones upon request.
* When Camille Flammarion built his [[Camille Flammarion Observatory|observatory in Juvisy-sur-Orge]] in 1883, he commissioned Bardou to construct the large [[equatorial mount]] [[refracting telescope]] of 240 mm [[diameter]] and 3600 mm [[focal length]].<ref>Colette Aymard et Laurence-Anne Mayeur, [https://insitu.revues.org/13211 « L’observatoire de Juvisy-sur-Orge, l’« univers d’un chercheur » à sauvegarder »], In Situ [online], 29 | 2016, published 13 July 2016, consulted 16 June 2017.</ref>
* In 1889, the Société Astronomique de France commissioned Bardou to build an equatorial mount refractor with a 108 mm diameter for the [[Observatory of the rue Serpente]] atop its new headquarters in the [[6th arrondissement of Paris]].<ref name="Astronomie2005">Marie-Claude Paskoff. Observer à Paris avec la SAF hier et aujourd’hui. ''[[L'Astronomie (magazine)|l’Astronomie]]'', vol. 119, décembre 2005, p. 641.</ref>
<gallery caption="" widths="180px" heights="120px" >
Camille Flammarion at the eyepiece of his 9½-inch Bardou refractor at his Juvisy observatory.jpg| [[Camille Flammarion]] at the eyepiece of his 9½-inch Bardou refractor at his [[Camille Flammarion Observatory|Juvisy observatory]]
Telescopio bardou.jpg|Bardou telescope that Camille Flammarion donated to the Sociedad Científica Camille Flammarion of [[Jaén, Spain]]
</gallery>
==References==
{{Reflist}}
{{Authority control}}
{{DEFAULTSORT:Bardou, Denis Albert}}
[[Category:Telescope manufacturers]]
[[Category:1841 births]]
[[Category:1893 deaths]]
<noinclude>
<small>This page was moved from [[:en:Denis Albert Bardou]]. Its edit history can be viewed at [[Denis Albert Bardou/edithistory]]</small></noinclude>
if5vpmjj8csklxq39fvcuo1nxd1tynn
Houston Police Department
0
114398
665054
617355
2025-07-01T19:45:47Z
Zilant1
30833
/* growthexperiments-addlink-summary-summary:1|0|2 */
665054
wikitext
text/x-wiki
{{Infobox law enforcement agency
| agencyname = Houston Police Department
| nativename =
| nativenamea =
| nativenamer =
| commonname =
| abbreviation = H.P.D.
| fictional =
| patch = Houston Police Department patch.JPG
| patchcaption =
| logo =
| logocaption =
| badge = TX - Houston Police Badge.png
| badgecaption =
| flag =
| flagcaption =
| imagesize =
| motto = ''Order through law, justice with mercy''
| mottotranslated =
| mission =
| formedyear = 1841
| formedmonthday =
| preceding1 =
| dissolved =
| superseding =
| employees =
| volunteers =
| budget = $934 m (2020)<ref name=HPDBUDGET>{{cite web|url=https://www.houstontx.gov/budget/20budadopt/index.html|title=Adopted Budget for Fiscal Year 2020|publisher=[[Houston City Government, Finance Department]] |accessdate=7 June 2020}}</ref>
| nongovernment =
| country = United States
| countryabbr = USA
| divtype = State
| divname = Texas
| divdab =
| subdivtype = City
| subdivname = Houston
| subdivdab =
| map = Harris County Houston.svg
| mapcaption =
| sizearea = {{convert|601.7|sqmi|km2|sigfig=3}}
| sizepopulation = 2,099,451 (2010)
| legaljuris =
| governingbody =
| governingbodyscnd =
| constitution1 =
| police = yes
| local = yes
| military =
| provost =
| gendarmerie =
| religious =
| speciality =
| secret =
| overviewtype =
| overviewbody =
| headquarters = [[1200 Travis]]<br />[[Downtown Houston]]
| hqlocmap =
| hqlocleft =
| hqloctop =
| hqlocmappoptitle =
| sworntype = [[Police officer]]
| sworn = 5,318 (2012)<ref>{{cite web|url=https://www.fbi.gov/about-us/cjis/ucr/crime-in-the-u.s/2012/crime-in-the-u.s.-2012/police_employee_data/browse-by/city-agency |title=FBI — City agency |website=Fbi.gov |date= |accessdate=2016-05-25}}</ref>
| unsworntype =
| unsworn =
| electeetype =
| minister1name =[[Sylvester Turner]]
| minister1pfo = [[Mayor of Houston]]
| chief1name = '''[[Art Acevedo|Hubert Arturo "Art" Acevedo]]'''
| chief1position = [[Chief of Police]] [[File:4 Gold Stars.svg|center|25px]]
| chief2name = M. D. Slinkard
| chief2position = '''Executive Assistant Chief of Investigative and Support Operations''' [[File:3 Gold Stars.svg|20px]]
| chief3name = T. R. Finner
| chief3position = '''Executive Assistant Chief of Field Operations''' [[File:3 Gold Stars.svg|20px]]
| unittype =
| unitname =
| officetype =
| officename =
| provideragency =
| uniformedas =
| stationtype =
| stations =
| aircraft1type = Helicopter
| aircraft1 = 16 (5 on patrol)
| website = [http://www.houstonpolice.org/ houstonpolice.org]
| footnotes =
| reference =
}}
The '''Houston Police Department''' ('''HPD''') is the primary law enforcement agency serving the City of [[Houston]], [[Texas]], [[United States]] and some surrounding areas. With approximately 5,300 officers and 1,200 civilian support personnel it is the fifth-largest municipal police department, serving the fourth-largest city in the United States. Its headquarters are at [[1200 Travis]] in [[Downtown Houston]]. Test123.
HPD's jurisdiction often overlaps with several other law enforcement agencies, among them the [[Harris County Sheriff's Office]] and the Harris County Constable Precincts. HPD is the largest municipal police department in Texas.
According to the HPD's website, "The mission of the Houston Police Department is to enhance the quality of life in the City of Houston by working cooperatively with the public and within the framework of the U.S. Constitution to enforce the laws, preserve the peace, reduce fear and provide for a safe environment."<ref>{{cite web|url=http://www.houstonpolice.org |title=Houston Police Department |website=Houstonpolice.org |date= |accessdate=2016-05-25}}</ref>
{{Asof|2016}} the chief of police is Hubert Arturo "Art" Acevedo.<ref>{{Cite web |url=http://www.khou.com/mb/news/local/new-hpd-chief-to-be-sworn-in-wednesday/359212808 |title=Archived copy |access-date=2020-07-07 |archive-date=2017-05-10 |archive-url=https://web.archive.org/web/20170510070843/http://www.khou.com/mb/news/local/new-hpd-chief-to-be-sworn-in-wednesday/359212808 |url-status=dead }}</ref><ref>http://www.policelawblog.com/files/2012-acevedo-case.pdf</ref>
==History==
{{Main|History of the Houston Police Department}}
===Beginnings===
[[File:1952 Houston Police Patrol Car (side).jpg|thumb|left|A 1952 patrol car that was used by the HPD. It is now on display at the Houston Police Museum in Downtown Houston]]
Houston was founded by brothers [[Augustus Chapman Allen|Augustus]] and [[John Kirby Allen]] in 1836 and incorporated as a city the next year, 1837. As the city quickly grew, so did the need for a cohesive law enforcement agency. The '''Houston Police Department''' was founded in 1841. The first HPD [[badge]] issued bore the number "1."
The early part of the 20th century was a time of enormous growth for both Houston and for the Houston Police Department. Due to growing traffic concerns in downtown Houston, the HPD purchased its first automobile in 1910 and created its first traffic squad during that same year. Eleven years later, in 1921, the HPD installed the city's first [[traffic light]]. This traffic light was manually operated until 1927, when automatic traffic lights were installed.
As Houston became a larger metropolis throughout the 1930s and 1940s, the HPD found itself growing and acquiring more technology to keep up with the city's fast pace. The first homicide division was established in 1930. During that same year, the HPD purchased newer weapons to arm their officers: standard issue .44 caliber revolvers and two [[Thompson submachine gun]]s. In 1939, the department proudly presented its first police academy class. The Houston Police Officers Association (HPOA) was created in 1945. This organization later became the Houston Police Officers Union.<ref>{{cite web|url=http://www.hpou.org/history/history_1920.cfm |title=Archived copy |accessdate=June 4, 2007 |url-status=dead |archiveurl=https://web.archive.org/web/20070817211513/http://www.hpou.org/history/history_1920.cfm |archivedate=August 17, 2007 }}</ref> The first [[African Americans|African American]] woman police officer on the force, [[Margie Duty]], joined the HPD in 1953, starting in the Juvenile Division.<ref name=":0">{{Cite web|url=https://tshaonline.org/handbook/online/articles/fdu76|title=Duty, Margie Annette Hawkins|last=Duncan|first=Robert J.|date=13 June 2013|website=Handbook of Texas Online|publisher=Texas State Historical Association|access-date=9 November 2017}}</ref>
Throughout the turbulent 1960s and 1970s, the HPD also experienced its own highs and lows. The HPD [[bomb squad]] was created in 1965. Informally, it is known to have existed since 1956 as Sgt. 'Army' Armstrong, was a one-man Bomb Squad, responding to any explosive related event. The next year, 1967, saw massive riots at [[Texas Southern University]]. During the riots, one officer was killed and nearly 500 students were arrested. It was as a result of these riots that the still-active Community Relations Division was created within the HPD. In 1970, the Helicopter Patrol Division was created with three leased helicopters. That year also marked the department's first purchase of bulletproof vests for their officers. The HPD's first Special Weapons and Tactical Squad ([[SWAT]]) was formed in 1975.
===Modern times===
In 1982, the Houston Police Department appointed its first African-American chief of police, [[Lee P. Brown]], who succeeded B.K.Johnson. Brown served as chief from 1982 to 1990 and later became the City of Houston's first African-American mayor in 1998. While Brown was considered a successful chief, he also earned the unflattering moniker "Out of Town Brown" for his many lengthy trips away from Houston during his tenure.<ref>[http://www.chron.com/content/chronicle/aol-metropolitan/98/09/09/brown-india_2-0.html]{{dead link|date=May 2016}}</ref>
Brown's appointment was controversial from the start. Traditional HPD officers frowned upon Brown because he was an outsider from [[Atlanta, Georgia]] where he was the police commissioner; to become the police chief in Houston, an officer has to advance through the rank and file although the "[[good old boy]]" culture was prevalent.
The HPD paved a new road again in 1990 when Mayor [[Kathy Whitmire]] appointed [[Elizabeth Watson (police officer)|Elizabeth Watson]] as the first female chief of police. Elizabeth Watson served from 1990 to 1992 and was followed by [[Sam Nuchia]], who served as police chief from 1992 to 1997. In 1997, [[Clarence Bradford|Clarence O. Bradford]] was appointed as chief. In 2002, Bradford was indicted and later acquitted of perjury charges, stemming from an incident in which he allegedly lied under oath about cursing fellow officers.<ref>{{cite web |url=http://www.news8austin.com/content/top%5Fstories/?ArID=59045 |title=TWC News - Austin |website=News8austin.com |date= |accessdate=2016-05-25 |archive-date=2007-09-30 |archive-url=https://web.archive.org/web/20070930165449/http://www.news8austin.com/content/top_stories/?ArID=59045 |url-status=dead }}</ref> Since late 2007, Bradford was the Democratic nominee for Harris County District Attorney where he will be facing a Republican opponent (either Kelly Siegler or Patricia Lykos; the incumbent, Charles A. 'Chuck' Rosenthal, resigned prior to withdrawing his candidacy due to an e-mail scandal). Bradford faced Patricia Lykos and lost the election; he later campaigned in 2009 for a Houston City Council at-large council seat vacated by Ronald C. Green, who ran for controller. Bradford's city council seat tenure as of 2015 is term limited under the City of Houston charter where he was listed as a viable candidate for Mayor of the City of Houston since the incumbent, Annise Parker, was in her final term. In 2016, Sylvester Turner was elected Houston's mayor after defeating Adrian Garcia, former Houston Police Officer and Harris County Sheriff, and others. It was Garcia, a relatively late entry into the race, who missed out on potential endorsements from multiple police agency officer's unions and associations in Harris County that had already endorsed Turner before Garcia, who was by most accounts a popular and well-respected County Sheriff and community leader, entered the race. (Garcia later campaigned for TX Congressional District 29 in the Democrat primary and lost to incumbent Gene Green; Garcia's successor on the Houston City Council, Ed Gonzalez, did campaign for Harris County Sheriff and won in the 2016 election season defeating Ron Hickman, who was appointed by Harris County Commissioners Court to serve out Garcia's unexpired term.) Likely, many of these police agency associations, as well as other major endorsers, such as The Houston Chronicle, who had already declared their support for Turner, would have likely backed Adrian Garcia. This, as much as anything else, probably cost Garcia the election. Sylvester Turner became Mayor of Houston in January 2016.
Under Mayor Turner, Houston Police Department has seen a mass exodus of officers, due in large part to ongoing conflict between the Mayor's office and the Houston Police Department's Pension Fund Management. In early 2017, changes were made to the police officers pension fund, which resulted in many long-serving officers to lose part of their contributions, which are being funneled back into the aggregate fund in order to bolster the fund's holdings. Multiple controversies over this and other issues related to the pension, retirement rank and calculations of pension amounts have resulted in a substantial number of police officers retiring from HPD before the new pension policies went into effect. A substantial number of officers are continuing to retire or resign, causing the number of police officers who are actually and actively working in some capacity as licensed peace officers to be in drastic decline. Among those divisions hardest hit includes the Patrol Divisions. While Houston Police Department spokespersons repeatedly declined to provide solid or specific numbers of patrol officers actively "working the streets," current officers in multiple areas (Patrol Districts) frequently complain about a lack of manpower, inadequate and slow-to-respond back-up units, and citizens join these officers in reporting increasingly poor response times and inadequate police presence on active scenes. These officers worry about increased safety concerns and fears related to greater danger to the officers because of the lack of manpower, especially during the night shift. Sometimes, officers working the overnight shift must contend with only one or two units covering an entire "beat," areas which are subdivisions of Districts. It is now routine, for example, for officers covering a beat to have units who are assigned two or three beats away called away from their beats to respond to calls for assistance or extra manpower. This not only impacts response time to a fellow officer who is calling for urgent help, but it then leaves other beats with reduced and often no coverage for their own beats while they are responding to an officer in another beat. These situations are now commonplace in many Police Districts. A recent estimate given by a high-ranking supervisor for HPD was that there are approximately 3,500 sworn officers (the total umber of actively employed, licensed peace officers in all Divisions and administrative positions) currently serving as Houston Police Officers. By comparison, this is roughly equal to the number of sworn HPD officers employed 25 – 30 years ago. While the Mayor's Office and newly appointed Houston Police Chief Arturo "Art" Acevedo's (Formerly Chief of Police for Austin, Texas) Office maintain that they are "filling the gaps," at the current rate of attrition (officers leaving HPD via retirement and resignation) compared to the number of new officers graduating from the HPD Academy (the "classroom" portion of which lasts approximately six months and the "practical" portion of which lasts another six months), even with multiple classes overlapping (approximately 4 classes of 50 cadets each) it will take more than a decade, using the most "optimistic" projections, just to return The Houston Police Department to the often-promoted number of 5,000 police officers. When one is reminded of that other often-quoted statistic that Houston is the "fastest growing city in the nation" (actually, recent reports from the US Census Bureau show Houston dropping to number two last year, thanks in large part to the current oil bust<ref>{{cite news|last1=Kriel|first1=Lomi|title=Harris County drops to No. 2 nationally in population growth, according to Census data|agency=The Houston Chronicle|date=23 March 2017}}</ref>) and that as the fourth largest city in the United States (provided that Houston has not already overtaken Chicago's population, which by some estimates it has), simply bringing Houston's police force back to 5,000 officers after 10 more years of substantial growth (Houston added an estimated 85,000+ individuals during 2016), Houston could potentially add 1 to 1.5 million people during the next decade of growth. By comparison, the Chicago Police Department has approximately 12,000+ sworn officers.<ref>{{cite web|title=2010 Statistics Report|website=Chicago Police Department}}</ref> These numbers are similar on both their Wikipedia page as well as the Chicago Police Department's website. So in comparison between these two cities with virtually identical populations, Chicago has four times the number of police officers and shows a negative growth trend (their population is declining over the last several years) while Houston, with 3,000 sworn officers, has the number two growth trend of any city in the nation.
Since 1992, the Houston City Marshal's division, Houston Airport Police, and Houston Park Police were absorbed into HPD. In early 2004, during Mayor Bill White's first term in office, HPD absorbed the Neighborhood Protection division from the City of Houston Planning Department, which was renamed the Neighborhood Protection Corps in 2005. [[Annise Parker]], Mayor White's successor, moved the Neighborhood Protection Corps into the Department of Neighborhoods when the new city division was established in August 2011 - the NPC was renamed as the Inspections and Public Service division of the Department of Neighborhoods.
====Crime laboratory====
In November 2002, the CBS local TV station KHOU began broadcasting a multi-part investigation into the accuracy of the HPD Crime Lab's findings. Particularly of interest to the reporters were criminal cases that involved DNA analysis and serological (body fluid) testing. Night after night journalists David Raziq, Anna Werner and Chris Henao presented case after case in which the lab's work was dangerously sloppy or just plain wrong and may have been sending the innocent to prison while letting the guilty go free. As a result of those broadcasts, at the end of the week the Houston Police Department declared they would have a team of independent scientists audit the lab and its procedures. However, the audit's findings were so troublesome that one month later, in mid- December, HPD closed the DNA section of the laboratory. Not only did the audit bolster KHOU's report but also found that samples were contaminated and the lab's files were very poorly maintained. The audit revealed that a section of the lab's roof was leaking into sample-containment areas, lab technicians were seriously undereducated or unqualified for their jobs, samples had been incorrectly tagged, and samples had been contaminated through improper handling. Worse, many people had been convicted and sent to prison based upon the evidence contained in the crime lab. ''[[The New York Times]]'' asked the question, "Worst Crime Lab in the Country?" in a March 2003 article.<ref>{{cite web|author=Adam Liptak |url=http://www.truthinjustice.org/suttonDNA.htm |title=Worst Crime Lab in the Country? |website=Truthinjustice.org |date=2003-03-11 |accessdate=2016-05-25 |url-status=dead |archiveurl=https://web.archive.org/web/20160528134831/http://truthinjustice.org/suttonDNA.htm |archivedate=2016-05-28 }}</ref>
Beginning in early 2003, the HPD Crime Lab began cooperating with outside DNA testing facilities to review criminal cases involving cases or convictions associated with Crime Lab evidence. However this again came as a result of some prompting investigatory work done by the TV station KHOU. Not long after their first broadcasts, reporters David Raziq, Anna Werner and Chris Henao got an e-mail from a local mother. She was desperate. She told them that her son, Josiah Sutton, had been tried for rape in 1999 and found guilty based upon HPD Crime Lab testing. He was sentenced to 25 years in prison. So KHOU began to take an intensive look at the Sutton case. Raziq and Werner analyzed the HPD lab's DNA report with the help of DNA expert Bill Thompson of the University of California-Irvine. They found terrible and obvious mistakes in the report that the lab should have known about. When the reporters presented this new information to the local jurists who had helped convict Sutton, they were mortified. Not long after that broadcast, the HPD agreed to an immediate retest of the DNA evidence in the Sutton case. Those tests showed the DNA collected in the case did not belong to Sutton. He was released from prison in March 2003 and given a full pardon in 2004.
As a result of the scandal, nine Crime Lab technicians were disciplined with suspensions and one analyst was terminated. However, that analyst was fully reinstated to her previous position in January 2004, less than one month after her December 2003 termination. Many HPD supervisors and Houston residents called for more stringent disciplinary actions against the Crime Lab employees. However, the city panel responsible for disciplining the lab technicians repeatedly resisted these arguments and instead reduced the employees' punishments {{Citation needed|date=June 2007}}. Irma Rios was hired in 2003 as Lab Director, replacing Interim Lab Director Frank Fitzpatrick.
In May 2005, the Houston Police Department announced that with much effort and coordination on their part, they had received national accreditation through the [[American Society of Crime Lab Directors]] (ASCLD). The ASCLD stated that the lab had met or exceeded standards for accreditation in all areas except DNA.<ref name="Bromwich">{{cite web|last=Bromwich|first=Michael R.|title=Final Report of the Independent Investigator for the Houston Police Department Crime Laboratory and Property Room|url=http://www.hpdlabinvestigation.org/reports/070613report.pdf|accessdate=1 December 2011}}</ref> Through independent research and testing, it was determined in January 2006 that of 1,100 samples reviewed, 40% of DNA samples and 23% of blood evidence samples had serious problems.<ref>{{cite web|url=http://www.foxnews.com/story/0,2933,180645,00.html |title=Houston Crime Lab Under Fire Again |publisher=[[Fox News]] |date=2006-01-05 |accessdate=2016-05-25}}</ref> On June 11, 2007, the HPD crime lab reported its DNA section had gained full accreditation from ASCLD.<ref name="Bromwich"/>
In the October 6, 2007 The ''[[Houston Chronicle]]'' published allegations of Employees cheating on an open-book proficiency test.<ref>{{cite web|author= |url=http://www.chron.com/disp/story.mpl/front/5192096.html |title=HPD's crime lab faces proficiency-test inquiry - Houston Chronicle |website=Chron.com |date=2007-10-05 |accessdate=2016-05-25}}</ref>
====Safe Clear====
The Safe Clear program was implemented by Mayor Bill White on January 1, 2005 as a joint venture between the City of Houston and the Houston Police Department.<ref>{{cite web|url=http://www.houstontx.gov/safeclear/ |title=SAFEClear - Home Page |website=Houstontx.gov |date= |accessdate=2016-05-25}}</ref> The intention of the program was to decrease the freeway accidents and traffic jams that occurred due to stalled drivers. Select tow truck companies across the city were authorized to tow a stalled vehicle as soon as possible after being notified by an HPD officer. Persons having their vehicle towed were provided with a Motorist's Bill of Rights and were required to pay a sum to the City of Houston after the towing had taken place.
The program was initially very unpopular among Houston residents. Frequent complaints were that the program unfairly punished lower-income motorists by enforcing a high towing fee and that the program could potentially damage vehicles that required special tow trucks and equipment to be safely towed away. Other complaints were that stranded motorists did not have an option to choose their own garage. The city and the HPD addressed these concerns with program improvements that provided funds to pay for short tows that removed stalled vehicles from the freeway and then allowed drivers to choose their own garage and tow companies once they were safely off the freeway.<ref>{{cite web|url=http://www.houstontx.gov/safeclear/chron-20050609.html |title=Archived copy |accessdate=February 22, 2009 |url-status=dead |archiveurl=https://web.archive.org/web/20071012005920/http://www.houstontx.gov/safeclear/chron-20050609.html |archivedate=October 12, 2007 }}</ref>
Studies released in February 2006 indicate that Safe Clear has been successful during its fledgling year. There were 1,533 fewer freeway accidents in 2005, a decrease of 10.4% since Safe Clear's implementation.<ref>{{cite web|url=http://www.houstontx.gov/safeclear/oneyear/safeclear-oneyear.pdf |title=Archived copy |accessdate=February 22, 2009 |url-status=dead |archiveurl=https://web.archive.org/web/20080829172911/http://www.houstontx.gov/safeclear/oneyear/safeclear-oneyear.pdf |archivedate=August 29, 2008 }}</ref>
====Red light cameras====
In December 2004, Chief Hurtt (when he was the former chief of Oxnard, CA) stated that when the city of Oxnard installed their red light cameras, it has claimed that [[red light running]] decreased dramatically although Houston was in the process of favoring red light camera enforcement.<ref>{{cite web|author= |url=http://www.chron.com/disp/story.mpl/topstory/2540464.html |title=Hurtt calls for cameras to catch traffic violators - Houston Chronicle |website=Chron.com |date=2004-04-30 |accessdate=2016-05-25}}</ref>
The history of red light camera enforcement goes back to the 78th Texas Legislature{{When|date=January 2014}} where this measure was voted down although a transportation bill authored by a member of the Texas House of Representatives had an inclusion of red light camera enforcement. In December 2004, the Houston City Council unanimously voted for red light camera enforcement although Texas State Representative Gary Elkins (R-TX) introduced legislation to deter Houston from amending its city charter for the red light camera rule to be enforced. This measure failed in the Texas Senate although in 2005, four intersections in downtown Houston were used as testbeds for red light camera equipment. After a contract was approved, the enforcement went online September 1, 2006 to which those running a red light (there are 50 locations<ref>{{cite web|url=http://www.chron.com/mm/ymap/lightcams/ |title=Archived copy |accessdate=September 4, 2010 |url-status=dead |archiveurl=https://web.archive.org/web/20070809182331/http://www.chron.com/mm/ymap/lightcams/ |archivedate=August 9, 2007 }}</ref>) are fined a $75 civil fine as opposed to a $225 moving violation which goes against the vehicle operator.<ref name="chron.com">[http://www.chron.com/CDA/archives/archive.mpl?id=2004_3828692 Red-light ordinance faces fight in Austin / Lawmaker has filed a bill to kill the camera plan; privacy, fairness cited as concerns] 12/24/2004 HOUSTON CHRONICLE, Section B, Page 01 metfront, 3 STAR Edition</ref>
There are fifty intersections with red light cameras in the city with cameras (twenty intersections were added where dual cameras were installed). A majority of them are located at a thoroughfare at a freeway intersection - primarily in the Galleria and southwest Houston. During a Houston City Council meeting on 6.11.08, council member James Rodriguez suggested the installation of an additional 200 cameras.<ref name="chron.com"/>
A voter referendum during the 2010 Texas gubernatorial elections to eliminate red-light cameras passed. The referendum that passed in November 2010 was later invalidated by U.S. District Judge Lynn Hughes June 17, 2011 citing that the referendum violated the city charter despite the contract with American Traffic Solutions, which provided the camera equipment. The cameras were expected to be reactivated after midnight on July 24, 2011; plans were underway to have this judicial ruling heard by the [[United States Court of Appeals for the Fifth Circuit]].<ref>{{cite news | title = Citations to start going out for red light runners | date = 2011-07-21 | url = http://abclocal.go.com/ktrk/story?section=news/local&id=8263722 | work = KTRK-TV | accessdate = 2011-07-22 | archive-url = https://web.archive.org/web/20120731115303/http://abclocal.go.com/ktrk/story?section=news%2Flocal&id=8263722 | archive-date = 2012-07-31 | url-status = dead }} {{Webarchive|url=https://web.archive.org/web/20120731115303/http://abclocal.go.com/ktrk/story?section=news%2Flocal&id=8263722 |date=2012-07-31 }}</ref><ref>{{cite news | first = James | last = Pinkerton | title = Houston | date = 2011-07-22 | publisher = Houston Chronicle | url = http://www.chron.com/disp/story.mpl/metropolitan/7663772.html | work = Chron.com | accessdate = 2011-07-22}}</ref>
====Mobility Response Team====
On July 2, 2007, Mayor [[Bill White (Texas politician)|Bill White]] started a new program called the "Mobility Response Team".
Staffed by traffic enforcement officers patrol within the [[Interstate 610 (Texas)|loop]] clearing traffic problems. They report [[traffic light]] outages, issue parking citations, help clear and direct traffic around minor accidents, or traffic jams during special events in the area. The duties will only involve [[street|surface streets]] and not the freeways and will be using [[Scooter (motorcycle)|scooters]] and police cruisers fitted with yellow flashing lights rather than the typical red and blue lights.
This was part of the mayor's plan to improve mobility in city and is the first of its kind in the United States. The city's mobility response team cost $1.8 million a year to operate.<ref>{{cite web|author= |url=http://www.chron.com/disp/story.mpl/metropolitan/4946881.html |title=Civilian officers on scooters will fight Inner Loop gridlock - Houston Chronicle |website=Chron.com |date=2007-07-06 |accessdate=2016-05-25}}</ref>
====Overtime and "Hot Spot" patrol concentration====
Hurtt spent around $24 million on overtime pay through 2010. That money would continue to bolster an understaffed force as police commanders try to increase their ranks.<ref name="HPD Page 1, 3">[http://www.chron.com/CDA/archives/archive.mpl?id=2007_4435845 HPD'S WAR ON CRIME GOES INTO OVERTIME / City promises 564 more officers, $24 million for OT] 10/03/2007 Houston Chronicle, Section A, Page 1, 3 STAR Edition</ref>
The overtime that is planned would be about equal to 500,000 police hours of which would help bolster various departments including, vice, Westside patrol and traffic enforcement, among other areas including a new 60-member crime reduction unit that will serve as a citywide tactical squad.<ref name="HPD Page 1, 3"/>
The police chief said the effort will put more officers to work immediately in troubled areas of the city such as [[Third Ward, Houston|Third Ward]] and [[Acres Homes, Houston|Acres Homes]], where the bodies of seven women have been found in the past two years.<ref>Hassan, Anita and Jennifer Leahy. "[http://www.chron.com/CDA/archives/archive.mpl?id=2007_4437387 Acres Homes search to focus on dumped bodies cases]." ''[[Houston Chronicle]]''. Saturday October 6, 2007. B2. Retrieved on August 29, 2009.</ref>
The crime rate, particularly for violent offenses, since the latter part of 2005, when an influx of hurricane evacuees increased the city's population by more than 100,000, and incidents spiked in certain neighborhoods.<ref>Stiles, Matt and Kevin Moran. "[http://www.chron.com/CDA/archives/archive.mpl?id=2007_4435845 HPD'S WAR ON CRIME GOES INTO OVERTIME / City promises 564 more officers, $24 million for OT]." ''[[Houston Chronicle]]''. Wednesday October 3, 2007. A1. Retrieved on August 29, 2009.</ref>
===Use of violence by the police===
In 2013 Jo DePrang of the ''[[Texas Observer]]'' wrote that "According to citizens, community activists, a veteran Houston police officer and even the president of the local police union, the scenario of multiple officers beating an unarmed suspect happens nearly every day."<ref name=DePrang>{{cite web|author=DePrang, Jo|url=https://www.texasobserver.org/horror-every-day-police-brutality-houston-goes-unpunished/|title=The Horror Every Day: Police Brutality In Houston Goes Unpunished|work=[[Texas Observer]]|date=2013-09-04|accessdate=2020-06-01}}</ref> From circa 2007-2013<!--"six years"--> there were 588 times observers reported what they deemed inappropriate "use of force", and the internal affairs division dismissed 584 of them, with the other four being pursued.<ref name=DePrang/>
====Pecan Park raid====
{{main|Pecan Park raid}}
===Helicopter crash===
In the morning of May 2, 2020, HPD's helicopter crashed in an apartment complex in north Houston, killing officer Jason Knox and injuring another.
<ref>
{{cite web
|url=https://www.click2houston.com/news/local/2020/05/03/here-is-what-we-know-about-the-fox-the-houston-police-department-helicopter-that-crashed/?outputType=amp/
|title=HPD helicopter crashes in north Houston injuring 2 officers
|date=2020-05-02
|website=www.click2houston.com
|publisher=KPRC-TV
|access-date=2020-05-04
|quote=}}</ref>
==Organization==
[[File:HoustonPoliceDeptHQ.JPG|thumb|right|[[1200 Travis]], HPD headquarters in [[Downtown Houston]]]]
[[File:Houston Police arresting young man.jpg|thumb|HPD officers arrest a young male on 1200 Main Street in downtown Houston]]
[[File:CentralPoliceStationHouston.JPG|thumb|Houston Police Department Central Division]]
[[File:AldineStorefrontHoustonTX.JPG|thumb|right|An HPD patrol car parked outside the Aldine Storefront in [[Greenspoint, Houston|Greenspoint]]]]
[[File:HoustonPDSouthwestCenter.JPG|thumb|Houston Police Department Southwest Division]]
[[File:WestsidePoliceStationHoustonTX.JPG|thumb|Houston Police Department Westside Division and Municipal Courts]]
[[File:FondrenPoliceStation.JPG|thumb|Fondren Division (former station)]]
The Houston Police Department is headed by a [[chief of police]] appointed by the mayor and confirmed by the city council. This position is aided by two executive assistant chiefs, ten assistant chiefs, 44 captains, approximately 220 lieutenants and 900 sergeants. HPD headquarters, [[1200 Travis]], is in [[Downtown Houston]]. The current Chief of Police is Hubert "Art" Acevedo.
HPD divides the city into 13 patrol divisions. Each division is divided into one or more districts and each district is divided further into one or more [[patrol|beats]]. Stations are operated and staffed 24 hours a day. HPD also operates 29 [[store front]] locations throughout the city. These store fronts are not staffed 24 hours a day, and generally open at either 7:00 or 8:00 AM, and close at 5:00 PM. {{Citation needed|date=April 2010}} Downtown Houston is patrolled by the Downtown Division, and the [[Houston Airport System]] facilities have their own divisions.<ref name="houstontx1">{{cite web|url=http://www.houstontx.gov/police/pdfs/hpd_beat_map.pdf |title=Archived copy |accessdate=October 23, 2011 |url-status=dead |archiveurl=https://web.archive.org/web/20111008231956/http://www.houstontx.gov/police/pdfs/hpd_beat_map.pdf |archivedate=October 8, 2011 }}</ref>
A map of all stations and store front locations can be found at the HPD web site.<ref name="houstontx1"/>
===Organizational chart===
<ref>{{cite web|url=http://www.houstontx.gov/police/contact/images/org_chart.pdf |title=Archived copy |accessdate=January 13, 2012 |url-status=dead |archiveurl=https://web.archive.org/web/20120131002038/http://www.houstontx.gov/police/contact/images/org_chart.pdf |archivedate=January 31, 2012 }}</ref>
Office of the Chief of Police
*Office of Public Affairs
*Office of Legal Services
*Office of Budget & Finance
*Professional Standards Command
**Inspections Division
**Internal Affairs Division/Central Intake Office
*Crime Analysis and Command Center Division
*Office of Planning
*Strategic Operations
**Homeland Security Command
***Night Command/Security Operations
***Air Support Division
***Airport Division - IAH (District 21 - [[George Bush International Airport|George Bush Intercontinental Airport]])
***Airport Division - Hobby (District 23 - [[Hobby Airport|William P. Hobby Airport]] and [[Ellington Field]])
***Criminal Intelligence Division
***Special Operations Division (based in the northeast section of the [[George R. Brown Convention Center]])
****Mounted Patrol Detail
****Special Response Group
****Bicycle Administration and Training Unit
***Tactical Operations Division
****SWAT Detail
****Dive Team
****Patrol Canine "Doggie" Detail
****Marine Unit
****Bomb Squad
****Hostage Negotiation Team
***Professional Development Command
***Psychological Services
***Training Division
****Administration
****Certification
****Cadet Training
****Field Training Administration Office
****In-Service Training
****Firearms Training/Qualification Range
****Defensive Tactics
****Drivers Training
***Employee Services Division
****Honor Guard
****Family Assistance Unit
****Police Chaplain
***Recruiting Division
**Staff Services Command
***Emergency Communications Division
***Jail Division
****Central Jail
****Southeast Jail
****Special Projects Unit
***Records Division
***Property Division
*Investigative Operations
**Office of Technology Services
**Special Investigations Command
***Auto Theft Division
***Gang Division
****Crime Reduction Unit
***Major Offenders Division
***Narcotics Division
***Vehicular Crimes Division
****Crash Investigations Unit
****Hit and Run Investigations Unit
****Auto Dealers Unit
***Vice Division
**Criminal Investigations Command
***Burglary & Theft Division
****Financial Crimes Unit
****Alarm Detail
****Pawn Detail
****Metal Theft Detail
***Homicide Division
****Murder Squads
****Major Assaults
***Juvenile Division
****Intake
****General Investigations
****[[Sex offender registries in the United States|Sex Offender Registration]]
****Missing Persons
***Robbery Division
***Special Victims Division
****Family Violence Unit
****Child Abuse Unit
****Child Sexual Abuse Unit
****Adult Sex Crimes Unit
****Internet Crimes Against Children Task Force
*Field Operations
**Mental Health Division
***General Investigations
***Crisis Intervention Response Team
***Homeless Outreach Team
***Boarding Homes Enforcement Detail
***Training
**North Patrol Command
***Central Division (District 1 except 1A10's beat and District 2)
***[[Downtown Houston|Downtown]] Division (1A10's beat)
***North Division (Districts 3 and 6)
***Northwest Division (Districts 4 and 5)
**East Patrol Command
***Eastside Division (District 11)
***[[Kingwood, Houston, Texas|Kingwood]] Division (District 24)
***Northeast Division (Districts 7, 8 and 9)
***Traffic Enforcement Division
****Traffic Enforcement Unit
****DWI Task Force
****Truck Enforcement Unit
****Solo Motorcycle Detail
****Mobility Response Team
****Highway Interdiction Unit
**South Patrol Command
***[[Clear Lake (region)|Clear Lake]] Division (District 12)[[File:Houston Police Department Clear Lake Station 2014.jpg|thumb|Clear Lake Station]]
***Southeast Division (District 13 and 14)
***South Central Division (District 10)
***Southwest Division (Districts 15 and 16)
**West Patrol Command
***Midwest Division (District 18)
***South Gessner Division (District 17)
***Westside Division (Districts 19 and 20)
==Facilities==
{{expand section|date=March 2012}}
The Houston Police Department administrative offices and investigative offices are at [[1200 Travis]] in [[Downtown Houston]]. The 61 Riesner site houses the HPD central patrol office, the municipal jail, and the transportation department. The 33 Artesia facility houses the communication and maintenance facilities.<ref name="Apodaca">Apocada, Gene. "[http://abclocal.go.com/ktrk/story?section=news/local&id=5945002 HPD to make major changes] {{Webarchive|url=https://web.archive.org/web/20140429195210/http://abclocal.go.com/ktrk/story?section=news%2Flocal&id=5945002|date=2014-04-29}}." ''[[KTRK-TV]]''. Friday February 8, 2008. Retrieved on April 9, 2010.</ref> In December 2013 the city announced that it has plans to build a new headquarters for HPD and the city courts.<ref>Morris, Mike. "[http://www.houstonchronicle.com/news/houston-texas/houston/article/City-plans-hugely-important-new-justice-complex-5094942.php City plans 'hugely important' new justice complex]." ''[[Houston Chronicle]]''. December 26, 2013. Retrieved on April 30, 2014.</ref>
===Substations and storefronts===
{{expand section|date=January 2012}}
By the end of 1989 the police department had established 19 storefronts and planned to open 10 additional storefronts in 1990.<ref>Hillkirk, John and Gary Jacobson. ''Grit, Guts, and Genius: True Tales of Megasuccess : Who Made Them Happen And How They Did It''. [[Houghton Mifflin]], 1990. [https://books.google.com/books?id=YSoPAQAAMAAJ&q=%22Link+Valley%22&dq=%22Link+Valley%22&hl=en&sa=X&ei=zrMJT9j3BY-Ftgf11qzWAg&ved=0CEkQ6AEwBA 123]. Retrieved from [[Google Books]] on January 8, 2012. {{ISBN|0-395-56189-2}}, {{ISBN|978-0-395-56189-8}}. "By late 1989, the Houston Police Department had established nineteen storefronts, with ten more scheduled to open in 1990."</ref>
==Patrol vehicles==
As of 2015, the department uses a large number of [[Ford Crown Victoria Police Interceptor]]s as their main fleet of patrol vehicles which was first ordered in 1996 replacing the Chevrolet Caprice 9C1 (used between 1988 and in patrol service until 2004 (replacing the Ford LTD Crown Victoria squads to 1987 along with M-bodied Mopars (primarily the Plymouth Gran Fury (both R and M platform) last used in 1989)). They have [[Ford Crown Victoria Police Interceptor]] models from dating from 1999 to 2011. Since Ford no longer produces the "crown Vic" (procurement of the Crown Vic ended in April 2011 when the orders were filled), The department has chosen to phase in the Chevy Tahoe PPV and Ford Police Interceptor Utility(Explorer) as the successor to the [[Ford Crown Victoria Police Interceptor]]. The department is continuing to test new Chevy Caprice PPV models and Ford Taurus Interceptors (including the fifth-generation Explorer) as well - the test mules as of 2015 have been integrated into the mainstream vehicle fleet. It also uses pickup trucks from the [[Big Three (automobile manufacturers)|Big Three]], such as the [[Chevrolet Colorado]], [[Ford F150]], and [[Dodge Ram]] for their Truck Enforcement Unit. There is also a small fleet of [[Dodge Charger]]s and [[Chevrolet Camaro]]s, which are mainly used as "stealth traffic patrol vehicles" (which is part of the Traffic Enforcement division). The stealth vehicles are plain white police cars with a slicktop roof and gray, reflective "HOUSTON POLICE" graphics on the side as well as on the front bumper, and hidden emergency lights that are driven by uniformed officers. The [[Ford Crown Victoria Police Interceptor]] is also used in this manner - as of late 2011 the stealth patrol vehicles are now painted black. The stealth squads have been supplemented with 14 Ford Taurus Police Interceptors in early 2014 (painted black). Solo (motorcycle) officers use [[Harley-Davidson]] motorcycles. The patrol vehicle livery, painted white with blue lettered graphics dating back to 1999 (which replaced the Columbia Blue livery last used in 1998 and retired a decade later), is being phased out for a black and white color scheme where 100 vehicles are painted from $60,000 earmarked from asset forfeiture funds (under HPD policy the previous livery is still used in service until official retirement). HPD squads are usually retired when the vehicle reaches 100,000 miles (they are not reassigned to reserve or secondary duty as with the Austin or San Antonio PD after 80,000 miles) - some squads dating over 10 model years old which are no longer used for patrol duty are usually reassigned either as bait squads (HPD will park an unmanned squad in a high crime area or illegal dumping site) or the Mobility Response Division - the older HPD fleet used by Mobility Response have been retired and replaced with Ford F150 extended cab pickup trucks from the Truck Enforcement Unit.{{Citation needed|date=January 2014}} Around 2016 the Houston Chronicle revealed that some of the older squads are still in service but the breakdown rate has increased - a 100,000 mile marked squad (or 120,000 mile unmarked vehicle) has the life expectancy of an automobile with 300,000 miles with regular maintenance. At the time HPD ordered 50 new Ford Police Interceptor Utilities for the command staff but not the mainstream vehicle fleet (the department has procured newer vehicles but the budget crunch has taken in a few new orders whilst the older squads are still operational. A budget crunch in major Texas cities is partly to blame where municipal budgets are usually slashed including priority spending for first responders. Most modern HPD Patrol cars today are Blue and white saying " HOUSTON POLICE" on the side.Newer models use a mixture of black and white paint now with 911 EMERGENCY listed on the rear side of the car or truck.
==Air support==
The Houston Police Helicopter Division celebrated its 40th anniversary in 2010. The unit was formed with three leased [[Schweizer 269B]] helicopters and has flown almost exclusively Schweizer or [[McDonnell Douglas]] helicopters. With 16 helicopters, the division is the second largest air support unit in the United States after the [[Los Angeles Police Department]]. In 2008 the department acquired new MD500E helicopters. The department also has Schweizer 300 helicopters for training.
The helicopter division patrols about a {{convert|700|sqmi|km2|adj=on}} area. HPD has two helicopters in the air for up to 21 hours a day. All pilots and tactical flight officers are sworn Houston police officers.
==Weapons==
{{unreferenced section|date=March 2012}}
Most Houston police officers now carry [[SIG Sauer P229]], [[SIG Sauer P226]], [[SIG Sauer P220]], Glock 22, Glock 23 or the Smith & Wesson M&P40 [[.40 S&W|.40 (S&W)]] caliber semi-automatic handguns. They are also armed with [[Taser|X26 Tasers]]. Tenured officers whose handguns are "[[Grandfather clause|grandfathered]] in" are still allowed to carry their weapons after the mandated .40 (S&W) requirement. This allows some officers to still carry .38 Special, .357 Magnum, .44 Magnum, and .45 Colt revolvers. Chief [[Charles McClelland]] while chief, carried a [[M1911 pistol#Civilian models|Colt 1911 Mk. IV Government Model]] as his sidearm.{{Citation needed|date=January 2014}} Officers are also allowed to carry an [[AR-15]] rifle, [[Mini14|Ruger Mini-14]] rifle, [[Remington 870]] shotgun, [[Benelli M1|Benelli M1 Super 90]] shotgun and a [[Benelli M2|M2 Super 90]] shotgun. The SWAT unit uses several kinds of automatic weapons, and was the first local law enforcement agency in the United States to adopt the [[FN P90]]. Current Chief Art Acevedo carries a [[Smith & Wesson M&P]] and it is also the standard sidearm of the [[Austin, Texas]] Police department from which he came.
As of November 2013, HPD has allowed officers to carry pistols chambered in .45ACP. The Glock 21, Sig Sauer 227, and Smith & Wesson M&P 45 are approved sidearms for uniformed officers. Plainclothes officers may carry the Glock 30 and Smith & Wesson M&P 45c. Also in 2013, HPD has begun to issue the Taser X2 in place of the Taser X26.
As of September 2015, [[M1911 pistol]]s in 9mm, .40 S&W, and .45 ACP are authorized for uniformed officers as well as 9mm and .45 ACP versions of all previously authorized pistols. Plainclothes officers are now authorized to carry the Glock 43 or Smith & Wesson M&P Shield as their primary weapon.
As of January 2016, the Sig P320 in 9mm, .40 S&W, and .45 ACP is approved for uniformed officers to carry. Also, EOTech electronic optical sights have been removed from the list of red dot sights that are allowed on patrol rifles. However, Aimpoint electronic optical sights are still allowed.
Officers graduating from Cadet Class 231 or later are only authorized to carry the Sig Sauer P320, the Glock 17, or the Smith & Wesson M&P in 9mm as their primary weapon while in uniform.
==The Academy, field training, and mentor program==
[[File:HoustonPoliceAcademyMorrison.JPG|thumb|Houston Police Academy L.D. Morrison, Sr. Memorial Center]]
{{Unreferenced section|date=July 2009}}
The Houston Police Department operates a non-residential, Monday through Friday police academy from which all cadets must graduate in order to become Houston police officers.
Cadet classes last approximately six months and consist of the basic peace officer course as required by the Texas Commission of Law Enforcement (TCOLE) and HPD specific instruction. In the past, HPD has held lateral classes for officers from other agencies to become HPD officers. Lateral classes are for Police Officers who are looking to switch over to a different jurisdiction and to get credit for their experience in the field.<ref name="hpdcareer.com">{{cite web|url=http://www.hpdcareer.com/academy.html |title=Academy |website=Hpdcareer.com |date= |accessdate=2016-05-25}}</ref>
Cadets are required to pass HPD instruction in academics, firearms, driving, physical training, and defensive tactics.
Probationary police officers (PPOs) select which available training station they will go to based on their Academy class rankings.
The following patrol stations are considered training stations:
*Clear Lake
*Central
*Eastside
*Midwest
*North
*Northeast
*South Central
*Southeast
*Southwest/South Gessner
*Westside
*Northwest
The following patrol stations are not considered training stations:
*Airport
*Kingwood
After graduation he/she is placed on a six months probation period where they will be working on a Field Training Program.<ref name="hpdcareer.com"/>
The Field Training Program consists of six phases and last about 12–16 weeks.<ref name="hpdcareer.com"/> The Field Training occurs in the following sequence:
*Phase 1 – Three weeks of training on day shift.
*Phase 2 – Three weeks of training on evening or night shift.
*Phase 3 – Three weeks of training on evening or night shift.
*Phase 4 – Two weeks of evaluation with one week of evaluation on evening shift and one week on night shift.
*Phase 5 – Remedial training.
*Phase 6 – Re-evaluation.
PPOs that successfully complete Phase 4 are not required to continue onto Phase 5 and 6. PPOs that are required to continue onto Phase 5 are given remedial training in the category or categories that they are deemed deficient in. If a PPO fails Phase 6, they are disqualified from becoming a police officer, and must reapply to the department. Phase 6 is required to ensure that they have corrected the deficiency.
After completing the Field Training Program, PPOs are partnered with mentor officers for approximately 4 months.Their first assignment after completing Field Training is a Patrol Officer.<ref name="hpdcareer.com"/> The Mentor Program is not a graded or pass/fail program. Instead, it is designed to give PPOs additional guidance before they are allowed to patrol on their own after their probationary period.
The probationary period for PPOs last for one year from the date that they were hired on as cadets. At their one-year anniversary, officers become civil service protected.
Officers select their permanent assignments based on Academy class rank. Officers must serve in their permanent assignment for at least one year before they can transfer to another division.
New sergeants and lieutenants receive leadership in-service training colloquially known as going to "Sergeant School" and "Lieutenant School", respectively.
Newly promoted sergeants must undergo a separate field training program. They are trained for 3 weeks on one shift and then another 3 weeks on another shift. They are then evaluated for 1 week on one shift and then for another week on another shift. This training is designed to ensure that they can perform effectively as new supervisors.
New sergeants pick available training and permanent assignments based on their ranking on their promotion list.
==Multilingual services==
Demand for use of [[Vietnamese language|Vietnamese]]-speaking officers increased in the 1980s as the city's Vietnamese population increased. By 1997, according to Sergeant Bill Weaver, in addition to English and Spanish, HPD had officers who had fluency in [[Arabic language|Arabic]], [[Chinese language|Chinese]], [[French language|French]], [[German language|German]], [[Italian language|Italian]], [[Japanese language|Japanese]], [[Korean language|Korean]], [[Portuguese language|Portuguese]], and Vietnamese. HPD has a dispatch system tracking officers speaking languages other than English and Spanish.<ref>Hanson, Eric. "No failure to communicate with the police / HPD's multilingual officers discover language talents often useful, necessary." ''[[Houston Chronicle]]''. Monday, September 29, 1997. p. 13 Metfront. Available from [[NewsBank]], Record Number HSC09291441397. Available online from the [[Houston Public Library]] with a library card.</ref>
==Ranks==
These are the current ranks of the Houston Police Department:
{| class="wikitable"
|-
!Rank
!Insignia
|-
| align="center"|Chief
|align="center" |[[File:4 Gold Stars.svg|108px]]
|-
| align="center"|Executive Assistant Chief
|align="center" |[[File:3 Gold Stars.svg|81px]]
|-
| align="center"|Assistant Chief
|align="center" |[[File:2 Gold Stars.svg|54px]]
|-
| align="center"|Commander
|align="center" |[[File:1 Gold Star.svg|27px]]
|-
| align="center"|Lieutenant
|align="center" |[[File:US-O1 insignia.svg|10px]]
|-
| align="center"|Sergeant
|align="center" |[[File:TX - Houston Police Sergeant.png|35px]]
|-
| align="center"|Senior Police Officer
|align="center" |[[File:TX - Houston Police Senior Police Officer.png|35px]]
|- style="text-align:center;"
||Police Officer
||N/A
|}
Those with the rank of sergeant or above are supervisors and are issued gold badges whereas officers are issued silver badges.
Lieutenants and above may also be referred to as commanders. For example, they hold position titles including "shift commander", "night commander", "division commander", etc. They are also exempt employees under the [[Fair Labor Standards Act]] due to their managerial responsibilities.
After 12 years of HPD service and obtaining a [[TCLEOSE|TCOLE]] Master Peace Officer certification, an officer becomes a senior officer.<ref name="autogenerated1">{{cite web|url=http://www.hpou.org/meetandconfer/contract.pdf |title=Archived copy |accessdate=January 13, 2012 |url-status=dead |archiveurl=https://web.archive.org/web/20120802234053/http://www.hpou.org/meetandconfer/contract.pdf |archivedate=August 2, 2012 }}</ref> This rank was created in 2001.<ref>{{cite web|url=http://www.hpou.org/badgeandgun/index.cfm?fuseaction%3Dview_news%26NewsID%3D303 |title=Archived copy |accessdate=January 1, 2015 |url-status=dead |archiveurl=https://web.archive.org/web/20150101214241/http://www.hpou.org/badgeandgun/index.cfm?fuseaction=view_news&NewsID=303 |archivedate=January 1, 2015 }}</ref>
Promotion to sergeant through captain all occur via a civil service formula that factors into account performance on the written examination for the respective rank, assessment score, years of service, and level of higher education or 4 years of military service. Officers are eligible to take the sergeant's promotion exam after 5 years of service. Sergeants and lieutenants are eligible to take the promotion exam of the next higher rank after 2 years of service in their current rank. Candidates for lieutenant must hold at least 65 college hours or an associate degree. Candidates for the rank of commander must hold at least a bachelor's degree.<ref name="autogenerated1"/>
Assistant chiefs and executive assistant chiefs are appointed by the chief with the approval of the mayor. Such individuals must hold at least a master's degree and have 5 years of HPD service.<ref name="autogenerated1"/>
It is not required to move through every rank below to achieve a higher rank. For example, many officers promote directly to sergeant without ever being senior officers. Also, many assistant chiefs are promoted directly from the rank of lieutenant. Councilman C.O. Bradford was promoted to assistant chief from the rank of sergeant.<ref>{{cite web|url=http://www.chron.com/news/article/Bradford-retiring-cites-wife-s-pregnancy-With-2123578.php?forceWeb=1 |title=Bradford retiring, cites wife's pregnancy With audio - Houston Chronicle |website=Chron.com |date=2003-07-18 |accessdate=2016-05-25}}</ref> Jack Heard was promoted to chief from the rank of sergeant.<ref>{{cite web|author= |url=http://m.chron.com/news/houston-texas/article/Jack-Heard-former-HPD-chief-dies-at-87-1920762.php |title=Jack Heard, former HPD chief, dies at 87 - Houston Chronicle |website=M.chron.com |date=2005-04-17 |accessdate=2016-05-25}}</ref> It is entirely possible to become chief as an outsider such as in the case of Lee Brown, who went on to become mayor, and Harold Hurtt.
Defunct ranks include detective, commissioner, captain, inspector, and deputy chief. In the mid 1980s, all active duty detectives were reclassified to sergeants.<ref name="hpou.org">{{cite web|url=http://www.hpou.org/badgeandgun/index.cfm?fuseaction%3Dview_news%26NewsID%3D962 |title=Archived copy |accessdate=January 1, 2015 |url-status=dead |archiveurl=https://web.archive.org/web/20150101201025/http://www.hpou.org/badgeandgun/index.cfm?fuseaction=view_news&NewsID=962 |archivedate=January 1, 2015 }}</ref> Originally, officers could choose to promote to detective (investigator) or sergeant (supervisor) which were both immediately below lieutenant.<ref name="ReferenceA">{{cite web|url=http://www.hpou.org/badgeandgun/index.cfm?fuseaction%3Dview_news%26NewsID%3D1030 |title=Archived copy |accessdate=January 1, 2015 |url-status=dead |archiveurl=https://web.archive.org/web/20150101201426/http://www.hpou.org/badgeandgun/index.cfm?fuseaction=view_news&NewsID=1030 |archivedate=January 1, 2015 }}</ref>
Currently, the title of "Detective" more accurately refers to certain investigators. Eligibility requirements include:
*holding the rank of officer, senior officer, or sergeant
*being assigned to a qualifying investigative division
*carrying a significant case load as determined by a supervisor
*having at least 4 years of Department seniority
*having at least 1 year of cumulative HPD investigative experience
*having completed the Basic Investigator's course and one additional investigative course
Per policy, when an investigator from the concerned investigative division arrives to a patrol scene, the investigator shall take charge of the investigation.
In 2018, the rank of captain was converted to commander with a change of rank insignia from double gold bars to one gold star.
George Seber was promoted to assistant chief in either 1953 or 1954<ref name="digital.houstonlibrary.org">{{cite web |url=http://digital.houstonlibrary.org/oral-history/george-seber_OH161.php |title=Houston Public Library Digital Archives |website=Digital.houstonlibrary.org |date= |accessdate=2016-05-25 |archive-date=2016-03-04 |archive-url=https://web.archive.org/web/20160304043225/http://digital.houstonlibrary.org/oral-history/george-seber_OH161.php |url-status=dead }}</ref> and was second in command of the department.<ref name="ReferenceA"/> However, that rank ended when he left in 1969.<ref name="digital.houstonlibrary.org"/><ref name="ReferenceB">{{cite web|url=http://www.hpou.org/badgeandgun/index.cfm?fuseaction%3Dview_news%26NewsID%3D1031 |title=Archived copy |accessdate=January 1, 2015 |url-status=dead |archiveurl=https://web.archive.org/web/20150101200204/http://www.hpou.org/badgeandgun/index.cfm?fuseaction=view_news&NewsID=1031 |archivedate=January 1, 2015 }}</ref> Inspectors were then the second highest ranking<ref name="ReferenceA"/> and Chief Pappy Bond converted that rank to deputy chief.<ref name="ReferenceB"/> After the rank of assistant chief was re-instituted in the mid 1970s,<ref name="hpou.org"/> the deputy chief rank was third highest for a time. Circa 1990, the rank of deputy chief was abolished. In 1998, the executive assistant chief rank was created,<ref>{{cite web|url=http://www.hpou.org/about/history-1990.cfm |title=Archived copy |accessdate=January 1, 2015 |url-status=dead |archiveurl=https://web.archive.org/web/20150101201640/http://www.hpou.org/about/history-1990.cfm |archivedate=January 1, 2015 }}</ref> making it the second highest rank.
Supervisors may also be appointed under certain circumstances to act in the next higher rank during an absence from duty of their supervisor. For example, a patrol sergeant might be appointed as the acting lieutenant (shift commander) if there would be no other lieutenants on duty within that division. Per policy, officers cannot be appointed as acting sergeants (supervisors).
==Fallen officers==
Since the establishment of the Houston Police Department, 115 officers have died in the line of duty. The following list also contains officers from the Houston Airport Police Department and the Houston City Marshal's Office, which were merged into HPD.{{When|date=January 2014}}<ref>{{cite web|url=http://odmp.org/agency/1727-houston-police-department-texas |title=Houston Police Department, Texas, Fallen Officers |website=Odmp.org |date= |accessdate=2016-05-25}}</ref><ref>{{cite web|url=http://odmp.org/agency/1724-houston-airport-police-department-texas |title=Houston Airport Police Department, Texas, Fallen Officers |website=Odmp.org |date= |accessdate=2016-05-25}}</ref><ref>{{cite web|url=http://odmp.org/agency/1725-houston-city-marshals-office-texas |title=Houston City Marshal's Office, Texas, Fallen Officers |website=Odmp.org |date= |accessdate=2016-05-25}}</ref>
[[File:Houston Police Department memorial.jpg|thumb|right|[[Houston Police Officer's Memorial]]]]
The causes of death are as follows:
{| class="wikitable"
|-
! Cause of death
! Number of deaths
|-
| Assault
| <center>1</center>
|-
| Automobile accident
| <center>10</center>
|-
| Fire
| <center>1</center>
|-
| Gunfire
| <center>70</center>
|-
| Gunfire (Accidental)
| <center>2</center>
|-
| Heart attack
| <center>2</center>
|-
| Motorcycle accident
| <center>9</center>
|-
| Stabbed
| <center>2</center>
|-
| Struck by vehicle
| <center>5</center>
|-
| Vehicle pursuit
| <center>1</center>
|-
| Vehicular assault
| <center>11</center>
|-
| Helicopter crash
| <center>1</center>
|}
The [[Houston Police Officer's Memorial]], designed by Texas artist [[Jesús Moroles]], opened in 1990 to honor the duty and sacrifices of the department.
==Demographics==
Breakdown of the makeup of the rank and file of HPD:<ref>{{cite web|url=http://www.ojp.usdoj.gov/bjs/pub/pdf/lemas00.pdf |title=Archived copy |accessdate=April 11, 2007 |url-status=dead |archiveurl=https://web.archive.org/web/20070604214227/http://www.ojp.usdoj.gov/bjs/pub/pdf/lemas00.pdf <!-- Bot retrieved archive --> |archivedate=June 4, 2007 }}</ref>
*Male: 88%
*Female: 12%
*White: 37%
*African-American/Black: 42%
*Hispanic: 18%
*Asian: 3%
==Misconduct==
<!-- Oldest at top to latest at bottom (chronological order). Only incidents that have had some sort of finding of misconduct. See BLP -->
===Joe Campos Torres===
{{Main|Joe Campos Torres}}
In May 1977, Joe Campos Torres (1954 - May 5, 1977) was a 23-year-old Vietnam veteran who was arrested for disorderly conduct at a bar in Houston's predominantly Hispanic East End neighborhood. Six Houston police officers took Torres to a spot called "The Hole" next to Buffalo Bayou and beat him.The officers then took Torres to the city jail, where they were ordered to take him to the hospital. Instead of taking Torres to the hospital like they were told, the officers brought him back to the banks of Buffalo Bayou, where he was pushed into the water. Torres' body was found two days later.<ref>{{cite news | title = Nation: End of the Rope | date = Apr 17, 1978 | url = http://www.time.com/time/magazine/article/0,9171,916056-1,00.html | work = Time Magazine | accessdate = 2011-02-23 | archive-date = 2011-06-29 | archive-url = https://web.archive.org/web/20110629003234/http://www.time.com/time/magazine/article/0,9171,916056-1,00.html | url-status = dead }} {{Webarchive|url=https://web.archive.org/web/20110629003234/http://www.time.com/time/magazine/article/0,9171,916056-1,00.html |date=2011-06-29 }}</ref>
===Chad Holley Beating===
{{Main|Chad Holley}}
'''Chad Holley''' was an [[Elsik High School]] [[Tenth grade#United States|sophomore]] at the time of his arrest in March 2010, as an alleged burglary suspect, which was preceded by, what some say,<ref>{{cite news | first = Mandy | last = Oaklander | title = Chad Holley's Police Beating Is Subject of an Angry NAACP Town Hall Meeting | date = Feb 9, 2011 <!-- @ 12:01PM --> | url = http://blogs.houstonpress.com/hairballs/2011/02/city_officials_answer_to_an_an.php | work = Houston Press | accessdate = 2011-02-15 | archive-date = 2011-02-14 | archive-url = https://web.archive.org/web/20110214001643/http://blogs.houstonpress.com/hairballs/2011/02/city_officials_answer_to_an_an.php | url-status = dead }} {{Webarchive|url=https://web.archive.org/web/20110214001643/http://blogs.houstonpress.com/hairballs/2011/02/city_officials_answer_to_an_an.php |date=2011-02-14 }}</ref> was an abuse by HPD. He was eventually found guilty and sentenced to probation until he turned 18.<ref>{{cite news | first = Jessica | last = Willey | title = Jury reaches verdict in Chad Holley's trial | date = October 26, 2010 | url = http://abclocal.go.com/ktrk/story?section=news/local&id=7745853 | work = Houston Chronicle | accessdate = 2011-02-18 | archive-url = https://web.archive.org/web/20110207010625/http://abclocal.go.com/ktrk/story?section=news%2Flocal&id=7745853 | archive-date = February 7, 2011 | url-status = dead }} {{Webarchive|url=https://web.archive.org/web/20110207010625/http://abclocal.go.com/ktrk/story?section=news%2Flocal&id=7745853 |date=February 7, 2011 }}</ref> The incident also resulted in 12 officers disciplined, fired, or charged. All appealed the decisions.<ref>{{cite news|title = 4 charged, 7 fired, 12 disciplined in HPD | date = June 23, 2010<!--, 10:51PM -->| url = http://www.chron.com/disp/story.mpl/metropolitan/7076065.html | work = Houston Chronicle | accessdate = 2011-02-15}}</ref>
Officer Andrew Blomberg, the first of four officers to go on trial, has been acquitted of charges of "Official Oppression".<ref>{{cite news | title = Not guilty verdict in case against ex-Houston officer Andrew Blomberg | date = 2012-05-16 | url = http://abclocal.go.com/ktrk/story?section=news/local&id=8663598 | work = KTRK-TV | accessdate = 2012-05-16 | archive-url = https://web.archive.org/web/20120520081906/http://abclocal.go.com/ktrk/story?section=news%2Flocal&id=8663598 | archive-date = 2012-05-20 | url-status = dead }} {{Webarchive|url=https://web.archive.org/web/20120520081906/http://abclocal.go.com/ktrk/story?section=news%2Flocal&id=8663598 |date=2012-05-20 }}</ref>
===Tracie Bell===
In September 2010, Officer Tracie Bell was sentenced to sixteen years in prison for stealing over $100,000 from American Red Cross funds earmarked for survivors of hurricanes Katrina and Rita. Bell and another officer contracted with the charity to run a basketball camp for young people displaced by the storms. They inflated the number of persons they claimed attended in order to gain additional funds.<ref>{{cite web|url=http://druzifer.livejournal.com/393235.html |archive-url=https://archive.is/20140107103720/http://druzifer.livejournal.com/393235.html |url-status=dead |archive-date=2014-01-07 |title=FORMER COP...CONVICTED THIEF GETS 16 YEAR PRISON TERM - dm.news |website=Druzifer.livejournal.com |date=2010-09-24 |accessdate=2016-05-25 }}</ref>
===Ruben Trejo===
In April 2011, Sergeant Ruben Trejo crashed his private vehicle into a school bus while driving to work. Tests showed he had twice the legal limit of alcohol in his blood. Sergeant Trejo was fired.<ref>HPD punishes 7 officers for conduct in wreck, by James Pinkerton, September 20, 2011, Houston Chronicle</ref><ref>Houston cop injured in crash with schoolbus, by khou.com staff, April 13, 2011</ref>
===Rape kits===
In August 2011, press reports indicated that the department held more than 7,000 rape kits that had never been tested. Some of these kits dated back twenty years.<ref>HPD rape case backlog is far worse than feared; Crime lab finds another 3,000-plus untested rape kits;'Disgraceful,' activist says after HPD inventory, by Anita Hassan, 9 August 2011, Houston Chronicle</ref>
===Abraham Joseph===
In October 2012, Officer Abraham Joseph was sentenced to life in prison for raping a handcuffed woman in the back of his police car. During the sentencing phase of the trial, two other women came forward to claim the policeman also raped them.<ref>Jurors sentence ex-HPD cop to life in prison for raping waitress, by Kevin Reece, 8 October 2012, KHOU 11 News</ref>
=== Shooting of a double amputee ===
In June 2013, a grand jury refused to indict Officer Matthew Marin after he shot and killed Brian C. Claunch on 22 September 2012. Claunch, who was mentally ill and confined to a wheelchair threatened a police officer with a ballpoint pen. Marin then killed him.<ref>No charges against HPD officer who killed double amputee in a wheelchair, by James Pinkerton, Houston Chronicle June 13, 2013</ref>
===Darrin DeWayne Thomas===
In August 2013, Officer Darrin DeWayne Thomas pleaded guilty to the theft of $700. Thomas was caught in an October 2010 sting operation where he thought he had been left with the money unobserved. He was sentenced to two years of probation and agreed to surrender his Texas peace officer's license. After he finishes his period of probation, he will have no criminal record.<ref>Former HPD officer pleads guilty in a theft sting, by Brian Rogers, August 9, 2013, Houston Chronicle</ref>
=== Adan Jimenez Carranza ===
In October 2013, Officer Adan Jimenez Carranza plead guilty to "attempted sexual assault" for raping a woman in the back of his patrol car after investigating a minor traffic accident. He was sentenced to ten years in prison and twenty years on the state's sex offender registry. Carranza could be eligible for parole in six months.<ref>Former HPD cop pleads guilty in rape case, by Brian Rogers, Houston Chronicle, 15 October 2013</ref>{{update inline|date=February 2016}}
=== Gerald Goines ===
In late February 2020, the Harris County District Attorney ask local courts to appoint lawyers to represent sixty-nine people who had been convicted based on the testimony of Officer Gerald Goines. Goines had made false statements to obtain a warrant the resulted in two deaths in January 2019. This misconduct through into doubt a number of legal actions based upon his testimony.<ref>{{cite news |last1=Barned-Smith |first1=St. John |title=69 convicted solely on disgraced ex-Houston cop's 'evidence' could see new trials, DA says |url=https://www.houstonchronicle.com/news/houston-texas/houston/article/DA-Goines-conviction-prison-HPD-cop-Pecan-Park-15085554.php |accessdate=29 February 2020 |publisher=Houston Chronicle |date=26 February 2020}}</ref>
==Education==
Breakdown of the types of academic degrees held by HPD members:<ref>{{cite web|url=http://www.hpou.org/badgeandgun/index.cfm?fuseaction%3Dview_news%26NewsID%3D570 |title=Archived copy |accessdate=July 14, 2009 |url-status=dead |archiveurl=https://web.archive.org/web/20110726160539/http://www.hpou.org/badgeandgun/index.cfm?fuseaction=view_news&NewsID=570 |archivedate=July 26, 2011 }}</ref>
*Associate degree: 311
*Bachelor's Degree: 1750
*Master's Degree: 575
*Doctorate Degree: 46
*Total number of members with a degree: 2,682
==HPD Big awards==
*Chief of Police Commendation: may be presented to any department employee who demonstrated a high degree of professional excellence or initiative through the success of initiating, developing, or implementing difficult projects, programs, or investigations. The performance shall not have involved personal hazard to the individual.
*Medal of Valor: may be presented to officers who judiciously performed voluntary acts of conspicuous gallantry and extraordinary heroism above and beyond the call of duty, knowing that taking such action presented a clear threat to their lives.
*Lifesaving Award: may be presented to any classified or civilian employee when a person would more than likely have died or suffered permanent brain damage if not for the employee's actions. The act must clearly indicate the employee did at least one of the following: (a) rendered exceptional first aid or (b) made a successful rescue (e.g. from a burning building or vehicle, or from drowning).
*Blue Heart Award: may be presented to officers who received life-threatening injuries while acting judiciously and in the line of duty. Officers may be eligible to receive the Blue Heart Award in conjunction with another award such as the Meritorious Service Award or the Lifesaving Award. Injuries due to negligence or minor injuries not requiring hospitalization are not eligible.
*Meritorious Service Award: may be presented to officers who have distinguished themselves by one of the following: (a) conduct during a criminal investigation or law enforcement action while demonstrating a high level of courage or (b) actions resulting in the apprehension of a felon under dangerous or unusual circumstances.
*Award of Excellence: may be presented to classified or civilian employees who have distinguished themselves on or off duty by outstanding service to HPD or the community. Employees must have demonstrated a high degree of dedication and professionalism in an endeavor that does not meet any other award criteria.
*Hostile Engagement Award: may be presented to officers who acted judiciously in the line of duty and performed acts upholding the high standards of the law enforcement profession while engaging in hostile confrontations with suspects wielding deadly weapons. Individuals who sustained non-life-threatening or minor injuries resulting from an assault by a deadly weapon are also eligible.
*Humanitarian Service Award: may be presented to any individual (employee or not) who demonstrated a voluntary act of donating time, physical effort, financial support, or special talent promoting the safety, health, education, or welfare of citizens. The individual is not eligible if there was any personal gain, financial compensation, special services, or privileges in exchange for the act.
*Public Service Award: may be presented to any individual outside the department who voluntarily acted in circumstances requiring unusual courage or heroism while assisting a police officer or other citizen. Those who do not meet the above criteria, but provided a measure of assistance, shall be sent a letter and a Certificate of Appreciation (no citation page) signed by the Chief of Police.
*Chief of Police Unit Citation: may be presented to two or more employees who performed an act or a series of acts over a period of time that demonstrated exceptional bravery or outstanding service to the department or the community. Their combined efforts as a functioning team must have resulted in the attainment of a departmental goal(s) and increased the department's effectiveness and efficiency.
==Radio Unit Identifiers==
===Numeric-only Identifiers===
* 5xx Mayor's Protection Detail
* 12xx Criminal Intelligence Division
* 16xx Tactical Operations Division
* 17xx Major Offenders
* 19xx Robbery
* 20xx Dignitary Protection Details
* 26xx Narcotics
* 30xx Vice
* 35xx Special Victims
* 36xx City Wreckers/Transportation
* 47xx Juvenile
===Alphanumeric Identifiers===
* x-Y-xx Special Operations Patrol (Downtown, Parks, Special Events)
* x-Y-xx-T Special Operations Patrol (Downtown and Parks) Power Shift
* 10-Y-xx Special Operations Patrol - Memorial Park
* 20-Y-xx Special Operations Patrol - Hermann Park
* 24-P-xx Lake Houston Patrol
* 3x-x-xx Special Event Details
* 4x-x-xx Special Event Details
* 30-T-xx Traffic Enforcement Special Details
* 40-T-xx Traffic Enforcement Special Details
* 60-T-xx Traffic STEP Enforcement
* 66-M-xx Crisis Intervention Response Team
* 70-Z-xx Vehiclar Crimes Division
* 71-Z-xx Truck Enforcement Unit
* 73-I-xx Canine - IAH Airport
* 73-K-xx Canine - Patrol
* 75-Z-xx Mobility Response Team ("Scooters")
* 79-T-xx Truck STEP Enforcement
* 86-M-xx City Marshals - Municipal Court
* 90-x-xx Patrol Division Tactical Units
* 91-x-xx Investigative First Responders
* 92-x-xx Patrol Division Tactical Units
* 96-Z-xx DWI Task Force
* 97-Z-xx Radar Task Force
* 99-Z-xx Motorcycles
==See also==
{{Portal|Texas}}
* [[List of law enforcement agencies in Texas]]
* ''[[Houston Blue]]'' - A book about the police department
* [[Crime in Houston]]
{{Clear}}
==References==
{{Reflist|30em}}
== External links ==
{{Commons category}}
* [http://www.houstontx.gov/police/ Official website] of the Houston Police Department
* [https://hpou.org/ Official website] of the Houston Police Officers' Union
{{Houston Police Department}}
{{Houston, Texas}}
{{Texas police departments}}
[[Category:Houston Police Department| ]]
<noinclude>
<small>This page was moved from [[:en:Houston Police Department]]. Its edit history can be viewed at [[Houston Police Department/edithistory]]</small></noinclude>
ssxyi86ibwm62qyx3acrwacsezrz9ha
Apollo–Soyuz
0
114599
665050
652200
2025-07-01T18:53:20Z
Zilanttest24june01
69264
665050
wikitext
text/x-wiki
{{short description|First joint U.S.–Soviet space flight}}
{{Use American English|date=March 2019}}
{{Use dmy dates|date=June 2020}}
{{Infobox spaceflight
| name = Apollo–Soyuz
| image = Apollo-Soyuz-Test-Program-artist-rendering.jpg
| image_caption = A 1973 artist's conception of the docking of the two spacecraft
| image_alt = Painting of crew, spacecraft, and launch rockets
| mission_type = Cooperative/scientific
| operator = [[NASA]]
| COSPAR_ID = {{Unbulleted list|Soyuz: {{COSPAR|1975-065A}}|Apollo: }}
| SATCAT = {{Unbulleted list|Soyuz: 8030|Apollo: 8032}}
| mission_duration = {{Unbulleted list|Soyuz: 5 d 22 h 30 m|Apollo: 9 d 01 h 28 m}}
| orbits_completed = {{Unbulleted list|Soyuz: 96|Apollo: 148}}
| spacecraft = {{Unbulleted list|[[Soyuz 7K-TM]] No. 75|[[Apollo Command/Service Module|Apollo CSM]]-111|Docking Module}}
| manufacturer = <!--company or companies who built the satellite-->
| launch_mass = {{Unbulleted list|Soyuz: {{Convert|6790|kg|abbr=on}}|Apollo: {{Convert|14768|kg|abbr=on}}|Docking Module: {{Convert|2012|kg|abbr=on}}}}
| dimensions = <!--body dimensions and solar array span-->
| crew_members = {{Unbulleted list|'''Apollo'''|[[Thomas P. Stafford]]|[[Vance D. Brand]]|[[Deke Slayton|Donald K. Slayton]]|'''Soyuz'''|[[Alexei Leonov]]|[[Valeri Kubasov]]}}
| launch_date = {{Unbulleted list|Soyuz: {{start date|1975|07|15|12|20|00|7=Z}}|Apollo: {{start date|1975|07|15|19|50|00|7=Z}}}}
| launch_rocket = {{Unbulleted list|Soyuz: [[Soyuz-U]]|Apollo: [[Saturn IB]] (SA-210)}}
| launch_site = {{Unbulleted list|Soyuz: [[Baikonur Cosmodrome|Baikonour]] [[Gagarin's Start|Site 1/5]]|Apollo: [[Kennedy Space Center|Kennedy]] [[Kennedy Space Center Launch Complex 39B|LC-39B]]}}
| landing_date = {{Unbulleted list|Soyuz: {{end date|1975|07|21|10|50|00|7=Z}}|Apollo: {{end date|1975|07|24|21|18|00|7=Z}}}}
| landing_site = {{Unbulleted list|Soyuz: {{Coord|50|40|N|67|1|E|name=Apollo–Soyuz Test Project landing|type:landmark}}|Apollo: {{Coord|21|52|N|162|45|W|name=Apollo–Soyuz Test Project landing|type:landmark}}}}
| recovery_by = {{Unbulleted list|Soyuz: [[Soviet Armed Forces]]|Apollo: {{USS|New Orleans|LPH-11|6}}}}
| orbit_epoch = <!--the date at which the orbit parameters were correct-->
| orbit_reference = [[Geocentric orbit]]
| orbit_regime = [[Low Earth orbit]]
| orbit_periapsis = 217 km
| orbit_apoapsis = 231 km
| orbit_inclination = 51.75°
| orbit_period = 88.91 minutes
| apsis = gee
| docking = {{Infobox spaceflight/Dock
| docking_target = <!-- Soyuz 19 -->
| docking_type = dock
| docking_date = First: {{start date|1975|07|17|16|19|09|7=Z}}
| undocking_date = Last: {{end date|1975|07|19|15|26|12|7=Z}}
| time_docked = 47 hours and 7 minutes
}}
| insignia = [[File:Apollo-Soyuz Test Project patch.svg|110px]] [[File:ASTPpatch.svg|100px]]
| insignia_caption = Official emblems of Apollo–Soyuz used by [[NASA]] and the [[Academy of Sciences of the Soviet Union]] respectively
| crew_photo = Portrait of ASTP crews - restoration.jpg
| crew_photo_caption =
| programme = '''[[Apollo program]]'''
| previous_mission = [[Apollo 17]]
| programme2 = '''[[Soyuz programme]]'''
| previous_mission2 = [[Soyuz 18]]
| next_mission2 = [[Soyuz 20]]
}}
'''Apollo–Soyuz''' was the first international [[Space exploration|space mission]], carried out jointly by the [[United States]] and the [[Soviet Union]] in July 1975. Millions of people around the world watched on television as a United States [[Apollo command and service module|Apollo]] module [[Docking and berthing of spacecraft|docked]] with a Soviet Union [[Soyuz (spacecraft)|Soyuz]] capsule. The project, and its memorable handshake in space, was a symbol of [[détente]] between the two superpowers. It is generally considered to mark the end of the [[Space Race]], which had begun in 1957 with the launch of [[Sputnik 1]].<ref>{{cite book|url=https://books.google.com/books?id=K751AwAAQBAJ&pg=PT747|title=Encyclopedia of United States National Security|ISBN=978-0-7619-2927-7|publisher=[[SAGE Publications]] |editor-first=Richard J.|editor-last=Samuels|editor-link=Richard J. Samuels|edition=1st|date=December 21, 2005|page=669|quote=Most observers felt that the U.S. moon landing ended the space race with a decisive American victory. […] The formal end of the space race occurred with the 1975 joint Apollo–Soyuz mission, in which U.S. and Soviet spacecraft docked, or joined, in orbit while their crews visited one another's craft and performed joint scientific experiments.}}</ref>
The mission was officially known as the '''Apollo–Soyuz Test Project''' ('''ASTP'''; , and commonly referred to in the [[Soviet Union]] as '''Soyuz–Apollo'''; the Soviets officially designated the mission as '''Soyuz 19'''). In contrast, the US vehicle was unnumbered, as it was left over from the [[canceled Apollo missions]]; it was the last testing Apollo module to fly. Test123.
The three United States and two Soviet Union astronauts performed both joint and separate scientific experiments, including an arranged [[Solar eclipse|eclipse of the Sun]] by the Apollo module to allow instruments on the Soyuz to take photographs of the [[Stellar corona|solar corona]]. The pre-flight work provided useful engineering experience for later joint American–Russian space flights, such as the [[Shuttle–Mir program|Shuttle–''Mir'' program]] and the [[International Space Station]].
Apollo–Soyuz was the last crewed United States spaceflight for nearly six years until [[STS-1|the first launch]] of the [[Space Shuttle]] in April 1981, and the last crewed US spaceflight in a [[space capsule]] until [[Crew Dragon Demo-2]] in May 2020.
== Historical background ==
[[File:Nixon Kosygin May 1972.jpg|thumb|left|[[President of the United States|U.S. President]] Richard Nixon and [[Premier of the Soviet Union|Soviet Premier]] [[Alexei Kosygin]] (seated) sign an agreement in Moscow paving the way for the Apollo–Soyuz mission, May 1972.]]
The purpose and catalyst of Apollo–Soyuz was the policy of [[détente]] between the two [[Cold War]] superpowers, the United States and the Soviet Union. Prior to this mission, tensions remained high between the two world superpowers while the United States was engaged in the [[Vietnam War]]. Meanwhile, the Soviet press was highly critical of the Apollo space missions, printing "the armed intrusion of the United States and Saigon puppets into Laos is a shameless trampling underfoot of international law" over a photograph of the [[Apollo 14]] launch in 1971.<ref name="Space Sciences 1976">Committee on Aeronautical and Space Sciences, Soviet Space Programs, 1971–75. Washington: U.S. Govt. Print. Off., 1976. </ref> Although Soviet leader [[Nikita Khrushchev]] made the Soviet Union's policy of détente official in his 1956 doctrine of peaceful coexistence at the [[20th Congress of the Communist Party of the Soviet Union]], the two nations seemed to be in perpetual conflict.
After [[John Glenn]]'s 1962 [[Mercury-Atlas 6|orbital flight]], an exchange of letters between President [[John F. Kennedy]] and Soviet Premier [[Nikita Khrushchev]] led to a series of discussions led by NASA Deputy Administrator [[Hugh Latimer Dryden|Hugh Dryden]] and Soviet scientist [[Anatoly Blagonravov]]. Their 1962 talks led to the [[Dryden-Blagonravov agreement]], which was formalized in October of that year, the same time the two countries were in the midst of the [[Cuban Missile Crisis]]. The agreement was formally announced at the United Nations on December 5, 1962. It called for cooperation on the exchange of data from weather satellites, a study of the [[Earth's magnetic field]], and joint tracking of the NASA [[Project Echo|Echo II balloon satellite]].<ref>{{cite web|title=The First Dryden-Blagonravov Agreement - 1962|url=https://www.hq.nasa.gov/office/pao/History/SP-4209/ch2-3.htm|website=NASA History Series|publisher=NASA|access-date=14 March 2019|archive-date=1 August 2020|archive-url=https://web.archive.org/web/20200801185734/https://www.hq.nasa.gov/office/pao/History/SP-4209/ch2-3.htm}} </ref> Unfortunately, as the competition between the two nation's crewed space programs heated up, efforts to further cooperation at that point came to an end.
Due to tense relations, space cooperation between the United States and the Soviet Union was unlikely in the early 1970s. On 7 June 1971, the USSR had launched the first piloted orbital space station, [[Salyut 1]]. Meanwhile, the United States had launched the [[Apollo 14]] mission several months prior, the third space mission to land humans on the Moon. Each side gave the other little coverage of their achievements.<ref name="Space Sciences 1976"/>
Both sides had severe criticisms of the other side's engineering. Soviet spacecraft were designed with automation in mind; the [[Lunokhod 1]] and [[Luna 16]] were both uncrewed probes, and each [[Soyuz (spacecraft)|Soyuz spacecraft]] had been designed to minimize risk due to human error by having fewer manual controls with which human operators would have to contend during flight. By contrast, the Apollo spacecraft was designed to be operated by humans and required highly trained astronauts in order to operate. The Soviet Union criticized the Apollo spacecraft as being "extremely complex and dangerous".<ref name="Space Sciences 1976"/>
The Americans also had their own concerns about Soviet spacecraft. [[Christopher C. Kraft Jr.|Christopher C. Kraft]], director of the [[Johnson Space Center]], criticized the design of the Soyuz: "We in [[NASA]] rely on redundant components — if an instrument fails during flight, our crews switch to another in an attempt to continue the mission. Each Soyuz component, however, is designed for a specific function; if one fails, the cosmonauts land as soon as possible. The Apollo vehicle also relied on astronaut piloting to a much greater extent than did the Soyuz machine".<ref>{{cite book|last1=Ezell |first1=Edward|last2=Ezell|first2=Linda|title=The Partnership: A History of the Apollo–Soyuz Test Project|date=1978|chapter=Foreword|chapter-url=http://www.hq.nasa.gov/pao/History/SP-4209/forwrd.htm |publisher=NASA|location=Washington, D.C.|url=http://www.hq.nasa.gov/pao/History/SP-4209/toc.htm}} </ref> American and Soviet engineers settled their differences for a possible docking of American and Soviet spacecraft in meetings between June and December 1971 in Houston and Moscow, including Bill Creasy's design of the [[Androgynous Peripheral Attach System]] (APAS) between the two ships that would allow either to be active or passive during docking.<ref name="Battaglia">Debbora Battaglia, "Arresting Hospitality: the Case of the 'Handshake in Space'," Journal of the Royal Anthropological Institute vol. 18 issue 1 June 2012. pp. S76-S89</ref>
With the close of the Vietnam War, relations between the United States and the USSR began to improve, as did the prognosis for a potential cooperative space mission.<ref name="Space Sciences 1976"/> Apollo–Soyuz was made possible by the thaw in these relations, and the project itself endeavored to amplify and solidify the improving relations between the United States and the Soviet Union. According to Soviet leader [[Leonid Brezhnev]], "The Soviet and American spacemen will go up into outer space for the first major joint scientific experiment in the history of mankind. They know that from outer space our planet looks even more beautiful. It is big enough for us to live peacefully on it, but it is too small to be threatened by nuclear war".<ref name="Space Sciences 1976"/> Thus, both sides recognized ASTP as a political act of peace.<ref name="Battaglia"/>
In October 1970, [[Soviet Academy of Sciences]] president [[Mstislav Keldysh]] responded to [[NASA Administrator]] [[Thomas O. Paine]]'s letter proposing a cooperative space mission, and there was subsequently a meeting to discuss technical details. At a meeting in January 1971, U.S. President [[Richard Nixon]]'s Foreign Policy Adviser [[Henry Kissinger]] enthusiastically espoused plans for the mission, and expressed these views to NASA administrator [[George Low]]: "As long as you stick to space, do anything you want to do. You are free to commit—in fact, I want you to tell your counterparts in Moscow that the President has sent you on this mission."<ref>{{cite book|last1=Ezell|first1=Edward|last2=Ezell|first2=Linda|title=The Partnership: A History of the Apollo–Soyuz Test Project|date=1978|chapter=Chapter 5. Proposal for a Test Flight|chapter-url=http://www.hq.nasa.gov/pao/History/SP-4209/ch5-1.htm|publisher=NASA|location=Washington, D.C.|url=http://www.hq.nasa.gov/pao/History/SP-4209/toc.htm}} </ref> By April 1972, both the United States and the USSR signed an [[Agreement Concerning Cooperation in the Exploration and Use of Outer Space for Peaceful Purposes]],<ref name="Jennifer Ross-Nazzal 2010, pp. 29–34">Jennifer Ross-Nazzal,"Détente on Earth and in Space: The Apollo–Soyuz Test Project", ''Organization of American Historians Magazine of History'', September 2010, Volume 24, Issue 3, pp. 29–34.</ref> committing both the USSR and the United States to the launch of the Apollo–Soyuz Test Project in 1975.<ref>Agreement Concerning Cooperation in the Exploration and Use of Outer Space for Peaceful Purposes: Moscow, 24 May 1972. Moscow: NASA, 1972.</ref>
ASTP was particularly significant for the USSR's policy of keeping the details of their space program secret from the Soviet people and the world at large, especially Americans. The ASTP was the first Soviet space mission to be televised in a live fashion during the launch, while in space, and during the landing.<ref name="Space Sciences 1976"/> Soyuz 19 was also the first Soviet spacecraft to which a foreign flight crew had access before flight; the Apollo crew were permitted to inspect it and the launch and crew training site, which was an unprecedented sharing of information with Americans about any Soviet space program.
Not all reactions to ASTP were positive. Many Americans feared {{Citation needed|date=May 2019}} that ASTP was giving the USSR too much credit in their space program, putting them on equal footing with the sophisticated space exploration efforts of NASA. More feared that the apparent peaceful cooperation between the USSR and the United States would lull people into believing there was no conflict at all between the two superpowers.<ref name="Space Sciences 1976"/> Soliciting appropriations from the [[United States Congress]] proved to be quite difficult{{Citation needed|date=May 2019}}, which was not a problem in the Soviet Union{{Citation needed|date=May 2019}}, and the dedication to space exploration demonstrated by the Soviet Union rejected these criticisms{{Citation needed|date=May 2019}}. Some Soviet publicists called American critics of the mission "demagogues who stand against scientific cooperation with the [[Soviet Union|USSR]]".<ref name="Space Sciences 1976"/> In general, tensions between the United States and the USSR had softened, and the project set a precedent for future cooperative projects in space.<ref name="Jennifer Ross-Nazzal 2010, pp. 29–34"/>
== Apollo crew ==
[[File:Portrait of the American ASTP prime crewmen.jpg|thumb|right|Left to right: Slayton, Brand, Stafford]]
[[File:ASTP patch.png|thumb|right|American crew insignia for the Apollo/Soyuz mission]]
{{Spaceflight crew
|terminology = Astronaut
|position1 = Commander
|crew1_up = {{flagicon|USA}} [[Thomas P. Stafford]]
|flights1_up = Fourth and last
|position2 = Command Module Pilot
|crew2_up = {{flagicon|USA}} [[Vance D. Brand]]
|flights2_up = First
|position3 = Docking Module Pilot
|crew3_up = {{flagicon|USA}} [[Deke Slayton|Donald K. "Deke" Slayton]]
|flights3_up = Only
}}
=== Backup crew ===
{{Spaceflight crew
|terminology = Astronaut
|position1 = Commander
|crew1_up = {{flagicon|USA}} [[Alan Bean]]
|position2 = Command Module Pilot
|crew2_up = {{flagicon|USA}} [[Ronald Evans (astronaut)|Ronald E. Evans]]
|position3 = Docking Module Pilot
|crew3_up = {{flagicon|USA}} [[Jack Lousma|Jack R. Lousma]]
}}
=== Crew notes ===
It was American astronaut [[Deke Slayton|Donald "Deke" Slayton]]'s only space flight. He was chosen as one of the original [[Mercury Seven]] astronauts in April 1959, but had been grounded until 1972 for medical reasons.{{citation_needed|date=July 2019}}
[[Jack Swigert]] had originally been assigned as the command module pilot for the ASTP prime crew, but prior to the official announcement he was removed as punishment for his involvement in the [[Apollo 15 postal covers incident]].<ref>{{cite book|title=Deke! U.S. Manned Space: From Mercury to the Shuttle|last1=Slayton|first1=Donald|authorlink1=Deke Slayton|last2=Cassutt|first2=Michael|authorlink2=Michael Cassutt |year=1994|publisher=Forge|location=[[New York City|New York]]|isbn=0-312-85503-6|lccn=94-2463|oclc=29845663|pages=[https://archive.org/details/dekeusmannedspac00slay/page/278 278–279]|url-access=registration |url=https://archive.org/details/dekeusmannedspac00slay/page/278}}</ref>
;Support crew
:[[Karol J. Bobko]], [[Robert Crippen]], [[Robert F. Overmyer]], [[Richard H. Truly]]
;Flight directors
:Pete Frank (Orange team), Neil Hutchinson (Silver team), [[Don Puddy]] (Crimson team), Frank Littleton (Amber team)
== Soyuz crew ==
[[File:Alexey Leonov and Valeriy Kubasov 1974.jpg|thumb|right|Leonov (left) and Kubasov]]
{{Spaceflight crew
|terminology = Cosmonaut
|position1 = Commander
|crew1_up = {{flagicon|Soviet Union}} [[Alexei Leonov]]
|flights1_up = Second and last
|position2 = Flight Engineer
|crew2_up = {{flagicon|Soviet Union}} [[Valeri Kubasov]]
|flights2_up = Second
}}
=== Crew note ===
It was the last space mission for Soviet cosmonaut [[Alexei Leonov]], who had become the first person to [[spacewalk|walk in space]] during the March 1965, [[Voskhod 2]] mission.
=== Backup crew ===
{{Spaceflight crew
|terminology = Cosmonaut
|position1 = Commander
|crew1_up = {{flagicon|Soviet Union}} [[Anatoly Filipchenko]]
|position2 = Flight Engineer
|crew2_up = {{flagicon|Soviet Union}} [[Nikolai Rukavishnikov]]
}}
== Mission summary ==
=== Background ===
[[File:Apollo-Soyuz Test Project Saturn IB launch.jpg|thumb|upright|A [[Saturn IB]] launch vehicle lifts the American ASTP crew into orbit.]]
[[File:Soyuz Spacecraft in Orbit - GPN-2002-000155.jpg|thumb|Soyuz as seen from Apollo CM]]
The ASTP entailed the docking of an American [[Apollo command and service module]] (CSM) with a Soviet [[Soyuz 7K-TM]] spacecraft. Although the Soyuz was given a mission designation number (Soyuz 19) as part of the ongoing [[Soyuz programme]], its radio call sign was simply "Soyuz" for the duration of the joint mission. The Apollo mission was not a numbered mission of the [[Apollo program]], and similarly bore the call sign "Apollo". Despite this, the press and NASA have referred to the mission as "Apollo 18", but this should not be confused with the [[Canceled Apollo missions|canceled lunar mission]].<ref>{{cite web|url=https://history.nasa.gov/apollo/soyuz.html|title=Apollo–Soyuz|work=nasa.gov}} </ref><ref>{{cite web|url=http://heasarc.gsfc.nasa.gov/docs/journal/missions6.html |title=HEASARC Missions|work=nasa.gov}} </ref><ref>http://www.jsc.nasa.gov/history/oral_histories/StaffordTP/TPS_BIO.pdf </ref><ref>http://www.jsc.nasa.gov/history/oral_histories/BrandVD/BrandVD_Bio.pdf </ref><ref name="kennedy19850429">{{Cite news |last=Kennedy |first=J. Michael |date=1985-04-29 |title=Shuttle Flight Is Lind's First Mission : Astronaut's 19-Year Wait for Space Trip Ends Today |language=en-US |work=Los Angeles Times |url=https://www.latimes.com/archives/la-xpm-1985-04-29-mn-12831-story.html |access-date=2020-07-07}}</ref>
The Apollo spacecraft was launched with a docking module specially designed to enable the two spacecraft to dock with each other, used only once for this mission. The [[Saturn IB]] launch vehicle and [[Apollo command and service module|CSM]] were surplus material. Like the [[Apollo Lunar Module]], the docking module [[Transposition, docking, and extraction|had to be retrieved]] from the [[S-IVB]] upper-stage of the Saturn rocket after launch. The docking module was designed as both an airlock — as the Apollo was pressurized at about {{convert|5|psi}} using [[Oxygen|pure oxygen]], while the Soyuz used a [[nitrogen]]/[[oxygen]] atmosphere at [[Atmospheric pressure|sea level pressure]] (about {{convert|15|psi}}) — and an adapter, since the surplus Apollo hardware used for the ASTP mission was not equipped with the [[Androgynous Peripheral Attach System|APAS]] docking collar jointly developed by NASA and the [[Academy of Sciences of the Soviet Union]] for the mission. One end of the docking module was attached to the Apollo using the same "probe-and-[[drogue]]" docking mechanism used on the Lunar Module and the [[Skylab]] space station, while its other end had the APAS docking collar, which Soyuz 19 carried in place of the standard Soyuz/Salyut system of the time. The APAS collar fitted onto Soyuz 19 was releasable, allowing the two spacecraft to separate in case of malfunction.
The Apollo flew with a three-man crew on board: [[Thomas P. Stafford|Tom Stafford]], [[Vance D. Brand|Vance Brand]], and [[Deke Slayton]]. Stafford had already flown into space three times, including within eight [[Nautical mile|nautical miles]] of the lunar surface as Commander of [[Apollo 10]], and was the first [[general officer]] to fly into space. He was a [[brigadier general (United States)|brigadier general]] in the [[United States Air Force]] at the time of the flight; he would retire with three stars in 1979. Slayton was one of the original [[Mercury Seven]] astronauts selected in 1959, but an irregular heartbeat grounded him until 1972. He became head of NASA's astronaut office and, after a lengthy medical program, selected himself for this mission. At the time, Slayton was the oldest person to fly in space and the one with the longest gap between selection as an astronaut and first flight into space. Brand, meanwhile, had trained with the Apollo spacecraft during his time as a backup [[Apollo 15]] command module pilot, and had served two stints as a backup Skylab commander. The closest he had come to flying prior to ASTP was as commander for the [[Skylab Rescue]] mission mustered to potentially retrieve the crew of [[Skylab 3]] due to a fuel leak on that mission's Apollo CSM.
The Soyuz flew with two men: [[Alexei Leonov]] and [[Valeri Kubasov]]. Leonov became the first man to [[spacewalk|walk in space]] on [[Voskhod 2]] in March 1965. Kubasov, who flew on [[Soyuz 6]] in 1969, ran some of the earliest [[space manufacturing]] experiments. Both were to have flown on the ill-fated [[Soyuz 11]] in 1971 (Leonov as commander, Kubasov as the flight engineer), but were grounded because Kubasov was suspected of having [[tuberculosis]]. The two-man crew on the Soyuz was a result of the modifications needed to allow the cosmonauts to wear the [[Sokol space suit]] during launch, docking, and reentry.
The ASTP-class [[Soyuz 7K-TM]] spacecraft used was a variation of the post-Soyuz 11 two-man design, with the batteries replaced by [[solar panel]]s enabling "solo" flights (missions not docking to one of the [[Salyut]] space stations). It was designed to operate, during the docking phase, at a reduced nitrogen/oxygen pressure of {{convert|10.2|psi}}, allowing easier transfers between the Apollo and Soyuz. Six ASTP-class Soyuz spacecraft were built in total, including the one used. Before the actual mission, two craft were launched uncrewed as Kosmos satellites. The third was launched as the crewed [[Soyuz 16]] flight as a rehearsal in order to test the APAS docking mechanism. Another craft was used fully fueled as a "hot backup" at the launch site – later it was disassembled. And the sixth craft was available as a "cold" backup; it was later used on the [[Soyuz 22|last "solo" Soyuz flight]] in 1976, but with the APAS docking adapter replaced by the [[MKF-6 (multispectral camera)|MKF-6]] multispectral camera.
=== Launch and mission ===
The Soyuz and Apollo flights launched within seven-and-a-half hours of each other on 15 July, and docked on 17 July 1975. Three hours later, the two mission commanders, Stafford and Leonov, exchanged the first international handshake in space through the open hatch of the Soyuz. NASA had calculated that the historic handshake would have taken place over the British seaside resort of [[Bognor Regis]],<ref>{{cite web |url=http://www.somewhere.org.uk/broadcast/pilgrims/phil/blast.htm|title=Blast-off to Bognor|last=Jones|first=Phillip|access-date=4 May 2011}}</ref> but a delay resulted in its occurrence being over the city of [[Metz]] in France.<ref>{{cite web|url=https://history.nasa.gov/SP-4209/ch11-3.htm|title=The Partnership: A History of the Apollo–Soyuz Test Project|author1=Edward Clinton Ezell|author2=Linda Neuman Ezell |year=1978|publisher=NASA|access-date=4 May 2011|archiveurl=https://web.archive.org/web/20110524064713/https://history.nasa.gov/SP-4209/ch11-3.htm|archivedate=May 24, 2011|url-status=live}} </ref> During the first crew exchange, the crews were read a statement from Soviet Premier [[Leonid Brezhnev]], and received a phone call from [[President of the United States|U.S. President]] [[Gerald Ford]].
While the two ships were docked, the three Americans and two Soviets conducted joint scientific experiments, exchanged flags and gifts (including tree seeds which were later planted in the two countries), signed certificates, visited each other's ships, ate together, and conversed in each other's languages. (Because of Stafford's pronounced drawl when speaking Russian, Leonov later joked that there were three languages spoken on the mission: Russian, English, and "Oklahomski".) There were also docking and redocking maneuvers, during which the two spacecraft reversed roles and the Soyuz became the "active" ship.
American scientists developed four of the experiments performed during the mission. Embryologist [[Jane M. Oppenheimer|Jane Oppenheimer]] analyzed the effects of weightlessness on fish eggs at various stages of development.<ref>{{cite web|url=https://www.nytimes.com/1996/03/23/us/jane-oppenheimer-dies-at-84-expert-on-embryos-and-space.html|title=Jane Oppenheimer Dies at 84; Expert on Embryos and Space|first=Wolfgang |last=Saxon|date=March 23, 1996|publisher=|via=NYTimes.com}}</ref>
After 44 hours together, the two ships separated, and maneuvered to use the Apollo to create an artificial [[solar eclipse]] to allow the crew of the Soyuz to take photographs of the [[Stellar corona|solar corona]]. Another brief docking was made before the ships went their separate ways. The Soviets remained in space for two more days, and the Americans for five, during which the Apollo crew also conducted Earth observation experiments.
<gallery mode="packed">
File:Soyuz 19 (Apollo Soyuz Test Project) spacecraft.jpg|Soyuz 19 as seen from the Apollo
File:Apollo Soyuz Test Project Mission Control.jpg|Mission control center in Houston during ASTP
File:ASTP handshake - cropped.jpg|The historic handshake between Stafford and Leonov
File:President Ford talks to ASTP crew.jpg|U.S. President [[Gerald Ford]] speaks to the Soviet and American crews on 18 July 1975
File:Astronaut Donald K. Slayton and cosmonaut Aleksey A. Leonov in the Soyuz Orbital Module.jpg|Deke Slayton (right) with Leonov in the Soyuz spacecraft
File:Apollo-Soyuz Test Project Commemorative Plaque.jpg|The astronauts and cosmonauts assembled this commemorative plaque in orbit as a symbol of the international cooperation.
</gallery>
=== Re-entry and aftermath ===
The mission was considered a great success, both technically and as a public-relations exercise for both nations. The only serious problem was during reentry and [[splashdown]] of the Apollo craft, during which the crew were accidentally exposed to toxic [[hydrazine]] and [[nitrogen tetroxide]] fumes, caused by unignited [[reaction control system]] (RCS) [[hypergolic propellant]]s venting from the spacecraft and reentering a cabin air intake. The RCS was inadvertently left on during descent, and the toxic fumes were sucked into the spacecraft as it drew in outside air. Brand briefly lost consciousness, while Stafford retrieved emergency oxygen masks, put one on Brand, and gave one to Slayton. The three astronauts were hospitalized for two weeks in [[Honolulu]].<ref>{{cite journal|author1=Ezell, Edward Clinton |author2=Ezell, Linda Neuman|year=1978|title=The Partnership: A History of the Apollo–Soyuz Test Project|journal=NASA History Series|issue=NASA Special Publication-4209|publisher=NASA |url=https://history.nasa.gov/SP-4209/ch11-9.htm|access-date=2009-03-17|archiveurl=https://web.archive.org/web/20070823124845/https://history.nasa.gov/SP-4209/ch11-9.htm|archivedate=2007-08-23}} </ref> Brand took responsibility for the mishap; because of high noise levels in the cabin during reentry, he believes he was unable to hear Stafford call off one item of the reentry checklist, the closure of two switches which would have automatically shut off the RCS and initiated drogue parachute deployment. These procedures were manually performed later than usual, allowing the ingestion of the propellant fumes through the ventilation system.<ref>[https://news.google.com/newspapers?id=RBgsAAAAIBAJ&sjid=kMgEAAAAIBAJ&dq=apollo%20gas&pg=993%2C1384026 "Brand Takes Blame For Apollo Gas Leak"], ''Florence, AL – Times Daily newspaper'', Aug. 10, 1975</ref>
The ASTP was the final flight of an Apollo spacecraft. Immediately after the launch of the Apollo spacecraft, preparations began to convert [[Kennedy Space Center Launch Complex 39B|LC-39B]] and the [[Vehicle Assembly Building]] at [[Kennedy Space Center]] for use by the [[Space Shuttle]], the United States' next crewed spacecraft program. Launch [[Kennedy Space Center Launch Complex 39A|LC-39A]] had already been closed after the launch of [[Skylab]].
== Legacy ==
=== Technical ===
[[File:S74-24913.jpg|thumb|Apollo–Soyuz painting]]
A derivative (but mechanically incompatible) docking collar, [[Androgynous Peripheral Attach System|APAS-89]] was launched as part of the [[Kristall]] module of the Soviet [[Mir]] space station. Originally intended as the docking port for the (defunct) [[Buran (spacecraft)|Buran]] Soviet space shuttle, the APAS-89 unit was used for the next Russian-American docking mission, [[STS-71]], twenty years later as part of the [[Shuttle–Mir program]] (though not before the docking port was tested by the last APAS-equipped Soyuz, [[Soyuz TM-16]], in 1993).
The American [[Space Shuttle]] continued to use the same APAS-89 docking hardware through the end of the [[Space Shuttle program]] to dock to Mir and then the [[International Space Station]], the latter through the [[Pressurized Mating Adapter]]s (PMAs).
The PMAs are equipped with the later [[Androgynous Peripheral Attach System|APAS-95]] adapters, which differ from the APAS-89 adapters in that they are no longer androgynous; while compatible with the APAS-89 docking collars, they are not capable of acting as the "active" partner in docking.
The first PMA, PMA-1, remains in use as the interface connecting the Russian-built, NASA-owned [[Zarya]] module to the [[US Orbital Segment|US segment of the ISS]], and so the APAS continues in use to this day.
=== Political ===
Apollo–Soyuz was the first joint US-Soviet space mission. At the time it was thought that space would become either more international or competitive as a result, however instead it became both. The mission became symbolic of each country's goals of scientific cooperation, while their individual news reports downplayed the technical prowess of the other. Soviet press implied that it was leading the [[United States]] in space flight, tying it to [[Marxism|Marxist]] ideology, while the United States reported that the Soyuz was technically primitive.<ref>{{cite report |url=https://www.princeton.edu/~ota/disk2/1985/8533/8533.PDF|pages=80–81|publisher=US Congress, Office of Technology Assessment|title=U.S.-Soviet Cooperation in Space|date=July 1985|access-date=13 June 2018}} </ref> High-profile space cooperation declined after the successful mission and became entangled in [[Linkage (policy)|linkage politics]], however it set a precedent of cooperation that continued in the [[Shuttle–Mir Program]].<ref name=cnn>{{cite web|url=https://edition.cnn.com/2015/07/15/world/space-handshake-anniversary/index.html|title=How historic handshake in space brought superpowers closer |author=Kellie Morgan|publisher=CNN|date=15 July 2015|access-date=13 June 2018}}</ref><ref>{{cite book|url=https://books.google.com/books?id=K_B_VvVp0SIC&pg=PA181|author=James Moltz|title=The Politics of Space Security: Strategic Restraint and the Pursuit of National Interests|page=181|publisher=Stanford University Press|isbn=978-0-8047-7858-9}}</ref>
=== Cultural ===
The American and Soviet commanders, Stafford and Leonov, became lasting friends. Leonov was the godfather of Stafford's younger children.<ref name=cnn/><ref name=ns>{{cite web|publisher=New Scientist |title=Apollo–Soyuz: A cold war handshake in space, 40 years on|date=17 July 2015|url=https://www.newscientist.com/article/dn27910-apollosoyuz-a-cold-war-handshake-in-space-40-years-on/|access-date=13 June 2018}}</ref> Stafford gave a eulogy at Leonov's funeral in October 2019.<ref>{{cite web|publisher=MSN|title=Russia bids farewell to first man who walked in space|date=15 October 2019|url=https://www.msn.com/en-us/news/world/russia-bids-farewell-to-first-man-who-walked-in-space/ar-AAIOaK1}}</ref>
A [[minor planet]], [[2228 Soyuz-Apollo]], discovered in 1977 by Soviet astronomer [[Nikolai Chernykh]], is named after the mission.<ref>{{cite book|last=Schmadel|first=Lutz D.|title=Dictionary of Minor Planet Names|page=181|edition=5th|year=2003|publisher=Springer Verlag|location=New York|url=https://books.google.com/books?q=2222+Lermontov+ST1|isbn=3-540-00238-3}}</ref>
== Spacecraft locations ==
The [[Apollo command and service module|Apollo Command Module]] from the mission is on display at the [[California Science Center]] in Los Angeles. The descent module of Soyuz 19 is on display at the [[RKK Energiya museum]] in [[Korolyov, Moscow Oblast]], [[Russia]].
[[File:Apollo-Soyuz display at the RKK Energia Museum.jpg|thumb|Apollo–Soyuz display at the RKK Energia Museum in Korolyov, Moscow Oblast, Russia]]
A display at the [[National Air and Space Museum]] in Washington, D.C. shows the docked Apollo/Soyuz configuration with the restored Apollo Command and Service Module used for testing prior to the mission, the back-up Docking Module, and a model of the Soyuz spacecraft. An identical Soyuz model is exhibited at the [[Kennedy Space Center Visitor Complex]]. A full-size mockup of the two docked spacecraft is located at the [[Cosmosphere]] in [[Hutchinson, Kansas|Hutchinson]], [[Kansas]].
{{wide image|Apollo-soyuz.jpg|800px|The Apollo–Soyuz display in the National Air and Space Museum}}
== Commemorations ==
[[File:The Soviet Union 1975 CPA 4478 souvenir sheet (Apollo Soyuz space test project (Russo-American cooperation). Mission Control Center, Korolyov. Two crews, zodiac. Soyuz-Apollo flight scheme. Emblem) 1200dpi.jpg|thumb|right|Soyuz–Apollo, Issue of 1975, USSR]]
[[File:The United States 1975 Sn 1569-1570 horizontal se-tenant pair (Apollo Soyuz space test project (Russo-American cooperation)).jpg|thumb|left|[[U.S. space exploration history on U.S. stamps|Apollo–Soyuz, Issue of 1975, USA]]]]
The [[United States Postal Service]] issued the [[U.S. space exploration history on U.S. stamps|Apollo–Soyuz commemorative stamps]], honoring the United States–Soviet link up in space, on 15 July 1975, the day of the launch.
The remaining crew's most recent reunion was on 16 July 2010, when Leonov, Kubasov, Stafford, and Brand met at an [[Omega SA|Omega]] timepiece store in [[New York City]]. All except Leonov participated in a public roundtable that evening. Omega had produced several watches to be used on the mission.<ref>[http://www.space.com/news/historic-Apollo–Soyuz-crew-anniversary-100716.html First International Space Crew Reunites for Mission's 35th Anniversary]{{Dead link|date=September 2022 |bot=InternetArchiveBot |fix-attempted=yes }}. Space.com. Retrieved on 2012-08-04.</ref>
[[File:Apollo-Soyuz Test Project Flown Silver Robbins Medallion.jpg|250px|thumb|center|Apollo–Soyuz medallion]]
{{clear}}
=== Monument ===
In the wake of the mission, a large Soyuz–Apollo monument was constructed outside [[RKA Mission Control Center|TsUP]] (the Soviet, later Russian space control center) in [[Moscow]]. It consisted of a metal scale model of Earth overarched by an arc terminating in the joined Soyuz–Apollo spacecraft. It was damaged when a vehicle collided with it in the late 1990s,{{citation needed|date=March 2014}} and was removed for repairs.
=== Mission Control Center===
The mission control room that hosted the Americans in [[Korolyov, Moscow Oblast|Korolyov, Russia]] was preserved as a memorial to the Soyuz–Apollo mission.<ref name=ns/>
== Program cost ==
{{Missing information|section|how much the Soviet Union spent on Soyuz 19|date=April 2017}}
The United States spent US$245 million on Apollo–Soyuz, or $1 billion in 2010 inflation-adjusted dollars.<ref name="lafleur20100308">{{cite news|url=http://www.thespacereview.com/article/1579/1|title=Costs of US piloted programs|work=The Space Review|date=March 8, 2010|access-date=February 18, 2012|author=Lafleur, Claude}}</ref>
== In media ==
{{unreferenced section|date=November 2017}}
* In the non-canonical ''[[Superman (comic book)|Superman]]'' #300 comic book, the Apollo–Soyuz astronauts and cosmonauts are the first to spot an [[unidentified flying object]] ([[Clark Kent|Kal-El]]'s spacecraft) approaching Earth, then the United States and the USSR race to the capsule to take it in their nation.
* The 2009 film ''[[Night at the Museum: Battle of the Smithsonian]]'' features the Apollo–Soyuz display conserved at the [[National Air and Space Museum]].
* In 2013, Apollo–Soyuz was discussed in [[Pilot (The Americans)|the pilot episode]] of the FX show ''[[The Americans]]'', with Stafford being portrayed by an extra.
* The 2017 film ''[[Valerian and the City of a Thousand Planets]]'' features the Apollo–Soyuz in its opening credits, accompanied by [[David Bowie]]'s "[[Space Oddity]]".
== See also ==
{{Portal|Spaceflight}}
* [[Interkosmos]], a [[Soviet Union|Soviet]] space program from 1967 to 1994, designed to give foreign nations access to space missions.
* [[List of spaceflight-related accidents and incidents]]
== References ==
{{Reflist|30em}}
== External links ==
{{Commons category|Apollo-Soyuz Test Project}}
* [http://www.zarya.info/Diaries/Soyuz/ASTP/ASTPMission.php ASTP Chronology] {{Webarchive|url=https://web.archive.org/web/20130616010952/http://www.zarya.info/Diaries/Soyuz/ASTP/ASTPMission.php |date=16 June 2013 }}
* [https://www.nasa.gov/mission_pages/Apollo–Soyuz Apollo–Soyuz]{{Dead link|date=August 2022 |bot=InternetArchiveBot |fix-attempted=yes }}
* [https://web.archive.org/web/20090725172011/http://www-pao.ksc.nasa.gov/kscpao/history/astp/astp.html ASTP NASA site archived]
* [http://www.hq.nasa.gov/office/pao/History/apollo/soyuz.html Apollo–Soyuz] {{Webarchive|url=https://web.archive.org/web/20210225184511/http://www.hq.nasa.gov/office/pao/History/apollo/soyuz.html |date=25 February 2021 }}
* [http://www.hq.nasa.gov/office/pao/History/SP-4209/toc.htm The Partnership: A History of the Apollo–Soyuz Test Project] {{Webarchive|url=https://web.archive.org/web/20110123000956/http://www.hq.nasa.gov/office/pao/History/SP-4209/toc.htm |date=23 January 2011 }} – official NASA history of the mission
* [https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19750067869_1975067869.pdf International rendezvous and docking mission (Apollo–Soyuz/Salyut) 1971] – NASA report (PDF format)
* [https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19730025080_1973025080.pdf Apollo/Soyuz test project operational data book. Volume 2: ASTP mass properties data book] – NASA report (PDF format)
* [https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19750065564_1975065564.pdf Apollo–Soyuz test project operation handbook command service docking modules systems operating procedures] – NASA flight operations manual (PDF Format)
* [https://history.nasa.gov/series95.html NASA History Series Publications] (many of which are on-line)
* [http://epizodsspace.airbase.ru/bibl/soyuz-i-apollon/05.html «Apollo–Soyuz»] – tell Soviet scientists, engineers and astronauts – participants of the joint work of American specialists, Politizdat 1976, with a circulation of 100 000 copies.
;Media
*
*
*
*
*
*
*
*
*
* (several types of media formats are available)
* (several types of media formats are available)
[[Category:Apollo–Soyuz Test Project| ]]
[[Category:1975 in international relations]]
[[Category:1975 in the Soviet Union]]
[[Category:Crewed Soyuz missions]]
[[Category:Soviet Union–United States relations]]
[[Category:Spacecraft launched in 1975]]
[[Category:Spacecraft which reentered in 1975]]
[[Category:July 1975 events]]
[[Category:Spacecraft launched by Soyuz-U rockets]]
[[Category:Spacecraft launched by Saturn rockets]]
[[Category:Alexei Leonov]]
[[Category:Thomas P. Stafford]]
[[Category:Deke Slayton]]
<noinclude>
<small>This page was moved from [[:en:Apollo–Soyuz]]. Its edit history can be viewed at [[Apollo–Soyuz/edithistory]]</small></noinclude>
kty1b02yfperwh61tgyoey3csj09q9n
Escola Bahiana de Medicina e Saúde Pública
0
114693
665064
611510
2025-07-01T23:25:08Z
Testvinca24sep01
55233
665064
wikitext
text/x-wiki
{{Multiple issues|
{{more footnotes|date=November 2013}}
{{one source|date=November 2013}}
{{Primary sources|date=November 2013}}
{{Advert|date=November 2013}}
}}
{{Infobox university
|name = Escola Bahiana de Medicina e Saúde Pública
| image =
|established = 1952
|type = Private, non-profit
|director = Maria Luisa Carvalho Soliani
|city = [[Salvador, Bahia|Salvador]]
|country = [[Brazil]]
|website= http://www.bahiana.edu.br
}}
The '''Escola Bahiana de Medicina e Saúde Pública''' (''Bahian School of Medicine and Public Health'', known simply as '''Bahiana''') is a private and non-profit higher education school of [[Medical Sciences|medical sciences]] and health, established in 1952 in [[Salvador, Bahia]], [[Brazil]].<ref name=Times>{{cite web|title=Escola Bahiana de Medicina e Saúde Pública - official website |url=http://www.bahiana.edu.br|accessdate=6 April 2013}}</ref> It is one of the most important educational institutions of [[Northeastern Brazil]] and has been recognized for its achievements in research and large contribution to public health – with more than 600,000 free care procedures performed in 2012.
Bahiana currently offers seven undergraduate courses and post-graduate programs in several fields of health sciences. The school is maintained by the Fundação Bahiana para Desenvolvimento das Ciências (''Bahian Foundation for Science Development'').
== History ==
After noticing the health care needs of Bahian society in the beginning of the 1950s, a group of doctors, academics, public managers and religious leaders from Salvador ideated a new institution. At that time, the only medical school in the state was the Faculdade de Medicina da Bahia, which graduated 130 professionals per year.
Facing such a situation, Antônio Simões da Silva Freitas, Orlando de Castro Lima, Jorge Valente, Aristides Novis Filho, Adelaido Ribeiro, Antônio Souza Lima Machado, Colombo Moreira Spínola, Urcício Santiago, André Negreiros Falcão, Francisco Pinheiro Lima Junior, Manoel Aquino Barbosa and René Alfredo Guimarães created the Escola Bahiana de Medicina e Saúde Pública. Test123
On May 31, 1952, they signed the minutes that established the Fundação Bahiana para Desenvolvimento das Ciências, whose mission was to support and provide funds for the new school - that would be located at the same building of the Santa Izabel Hospital, in Nazaré's district.
The first group of teachers was chosen on January 1953. Admission exams were taken on April 14 of the same year. Later that month, Aristides Novis Filho gave the first lessons for the Medicine course. The first class graduated in 1958.
During the following decades, Bahiana expanded its activities to provide public health care assistance. In the 70’s, an area of 6,500 m² was bought in Brotas neighborhood. Years later, the building of the former Santa Terezinha Preventorium was bought to place Bahiana’s first health care centre, the Ambulatório Docente-Assistencial da Bahiana (ADAB). In 1998, a new building situated near ADAB was built to become Bahiana’s second campus: the Brotas Academic Unit.
In 1999, Bahiana opened the Cabula Academic Unit, located in a vaste green space in the district of Cabula.
It is dedicated to some free of charge health services.<ref>{{Cite news|url=http://www.correio24horas.com.br/detalhe/saude/noticia/servicos-de-odontologia-sao-oferecidos-de-graca-em-salvador-veja-opcoes/?cHash=85c4ac5f67a6f316da6769088fca1dff|title=Serviços de Odontologia são oferecidos de graça em Salvador; veja opções|last=|first=|date=|work=|language=Portuguese|access-date=2017-01-10|via=|archive-date=2017-01-10|archive-url=https://web.archive.org/web/20170110162340/http://www.correio24horas.com.br/detalhe/saude/noticia/servicos-de-odontologia-sao-oferecidos-de-graca-em-salvador-veja-opcoes/?cHash=85c4ac5f67a6f316da6769088fca1dff|url-status=dead}} {{Webarchive|url=https://web.archive.org/web/20170110162340/http://www.correio24horas.com.br/detalhe/saude/noticia/servicos-de-odontologia-sao-oferecidos-de-graca-em-salvador-veja-opcoes/?cHash=85c4ac5f67a6f316da6769088fca1dff |date=2017-01-10 }}</ref>
== Academic units ==
Bahiana’s academic activities are held in two units, located in the districts of Brotas and Cabula.
=== Brotas ===
At the Brotas Academic Unit, there are held undergraduate and postgraduate programs activities. Near it, it is located the Ambulatório Docente-Assistencial da Bahiana, where a multidisciplinary team of professionals, teachers and students from diverse fields work together to provide free health care services.
=== Cabula ===
Cabula’s academic unit is the home for the Biomedicine, Medicine, Dentistry and Nursery courses. Built on a green area with 70,000 m², it hosts the majority of Bahiana’s main events, such as the Mostra Científica e Cultural (Science and Culture Exhibition), the Pedagogic Forum, the Nursery, Biomedicine and Dentistry journeys, admission exams and freshman welcome receptions.
== Undergraduate programs ==
* [[Medicine]]
* [[Physical therapy]]
* [[Psychology]]
* [[Dentistry]]
* [[Biomedicine]]
* [[Nurse]]ry
* [[Physical Education]]
== Post-Graduate programs ==
Bahiana offers several post-graduate courses, including Master of Science and Doctoral programs. The school also has 32 research groups registered on [[CNPq]] Lattes platform.
== Admissions ==
Since 2008, undergraduates have to pass through an admission process called Processo Seletivo Formativo (PROSEF), which allows them to experience their future profession and interact with teachers and classmates.
== Health care centres ==
*ADAB Brotas - Ambulatório Docente-Assistencial Multiprofissional (general services)
*ADAB Cabula - Ambulatório Docente-Assistencial Odontológico (dental services)
*Centro Integrado e Multidisciplinar de HTLV e Hepatites Virais
*CAFIS - Clínica Avançada em Fisioterapia (Physical Therapy)
*SEPSI - Serviço de Psicologia (Psychology)
*SerTO - Serviço de Terapia Ocupacional (Occupational Therapy)
== Scientific publications ==
*Brazilian Journal of Medicine and Human Health
*Revista Pesquisa em Fisioterapia ''(Research in Physical Therapy)''
*Revista Enfermagem Contemporânea ''(Contemporary Nursery)''
*Revista Psicologia, Diversidade e Saúde ''(Psychology, Diversity and Health)''
*Revista Bahiana de Odontologia ''(Bahian Journal of Odontology)''
==References==
{{Reflist|1}}
{{coord missing|Bahia}}
{{DEFAULTSORT:Escola Bahiana de Medicina e Saude Publica}}
[[Category:Universities and colleges in Bahia]]
[[Category:Educational institutions established in 1952]]
[[Category:1952 establishments in Brazil]]
[[Category:Medical schools in Brazil]]
<noinclude>
<small>This page was moved from [[:en:Escola Bahiana de Medicina e Saúde Pública]]. Its edit history can be viewed at [[Escola Bahiana de Medicina e Saúde Pública/edithistory]]</small></noinclude>
p82p7y3p6mpeurpofw1oyjd4fri777g
Guatemala national football team
0
114767
665052
635744
2025-07-01T19:00:33Z
Zilanttest24june01
69264
665052
wikitext
text/x-wiki
{{About|the men's team|the women's team|Guatemala women's national football team}}
{{Use dmy dates|date=March 2020}}
{{Infobox national football team
| Name = Guatemala
| Badge = Guatemala National Football team badge.png
| Nickname = ''Los Chapines'' <br> ''La Bicolor'' <br> ''La Furia Azul''
| Association = [[National Football Federation of Guatemala]]
| Sub-confederation = [[Central American Football Union|UNCAF]] (Central America)
| Confederation = {{nowrap|[[CONCACAF]] (North America)}}
| Coach = [[Amarini Villatoro]]<ref>{{cite web|url=https://www.fifa.com/associations/association=GUA/about.html|title=Guatemala - Association Information|website=FIFA.com|publisher=Fédération Internationale de Football Association|accessdate=3 November 2018|archive-date=13 October 2018|archive-url=https://web.archive.org/web/20181013132928/https://www.fifa.com/associations/association=gua/about.html|url-status=dead}} {{Cite web |url=https://www.fifa.com/associations/association=gua/about.html |title=Archived copy |access-date=24 August 2022 |archive-date=13 October 2018 |archive-url=https://web.archive.org/web/20181013132928/https://www.fifa.com/associations/association=gua/about.html }}</ref>
| Captain = Vacant
| Most caps = [[Carlos Ruiz (Guatemalan footballer)|Carlos Ruiz]] (133)<ref name="RSSSF">[http://www.rsssf.com/miscellaneous/guat-recintlp.html Guatemala – Record International Players] RSSSF</ref>
| Top scorer = [[Carlos Ruiz (Guatemalan footballer)|Carlos Ruiz]] (68)
| Home Stadium = [[Estadio Doroteo Guamuch Flores]]
| FIFA Trigramme = GUA
| FIFA Rank = {{FIFA World Rankings|GUA}}
| FIFA max = 50
| FIFA max date = August 2006
| FIFA min = 163
| FIFA min date = November 1995
| Elo Rank = {{World Football Elo Ratings|Guatemala}}
| Elo max = 40
| Elo max date = April 1972
| Elo min = 105
| Elo min date = February 2010
| pattern_la1 =
| pattern_b1 = _Guatemala15h
| pattern_ra1 =
| leftarm1 = FFFFFF
| body1 = FFFFFF
| rightarm1 = FFFFFF
| shorts1 = FFFFFF
| socks1 = FFFFFF
| pattern_la2 =
| pattern_b2 = _Guatemala15a
| pattern_ra2 =
| leftarm2 = 343FC5
| body2 = 343FC5
| rightarm2 = 343FC5
| shorts2 = 343FC5
| socks2 = 343FC5
| First game = {{flagicon|GUA}} '''Guatemala''' 10–1 {{fb-rt|HON}} <br> ([[Guatemala City]], [[Guatemala]]; September 14, 1921)
| Largest win = {{flagicon|GUA}} '''Guatemala''' 10–0 {{fb-rt|Anguilla}} <br> ([[Guatemala City]], [[Guatemala]]; September 5, 2019)
| Largest loss = {{fb|CRC}} 9–1 '''Guatemala''' {{flagicon|GUA}} <br> ([[San José, Costa Rica|San José]], [[Costa Rica]]; July 24, 1955)
| World Cup apps =
| World Cup first =
| World Cup best =
| Regional name = [[CONCACAF Championship]] & [[CONCACAF Gold Cup|Gold Cup]]
| Regional cup apps = 18
| Regional cup first = [[1963 CONCACAF Championship|1963]]
| Regional cup best = Champions ([[1967 CONCACAF Championship|1967]])
}}
The '''Guatemala national football team''' ({{lang-es|Selección de fútbol de Guatemala}}) represents [[Guatemala]] in men's international [[association football|football]] and is controlled by the ''[[National Football Federation of Guatemala|Federación Nacional de Fútbol de Guatemala]]''. Founded in 1919, it has been affiliated to [[FIFA]] since 1946, and it is a member of [[CONCACAF]].
The team has made three [[Football at the Summer Olympics|Olympic tournament]] appearances, competing at the [[Football at the 1968 Summer Olympics|1968]], [[Football at the 1976 Summer Olympics|1976]], and [[Football at the 1988 Summer Olympics|1988]] Olympic Games. Guatemala have never qualified for the finals tournament of the [[FIFA World Cup|World Cup]], although they have reached the final round of qualification on four occasions.
Guatemala won the [[1967 CONCACAF Championship]] and the [[2001 UNCAF Nations Cup]]. The team's best performance in a [[CONCACAF Gold Cup]] was in [[1996 CONCACAF Gold Cup|1996]], when they finished fourth. Guatemala has also earned a [[bronze medal]] at the [[Football at the 1983 Pan American Games|1983 Pan American Games]] in [[Caracas]], [[Venezuela]]. The national team kits are supplied by [[Umbro]]. Past kit suppliers include [[Atletica]], [[Adidas]] and [[Puma SE|Puma]].
==History==
===Beginnings===
Guatemala created its first soccer team, made up of 22 players, on 23 August 1902. The team was split into two sides, blue and white. With time, clubs were made and eventually the Guatemalan national team, nicknamed "la Azul y Blanco" (the blue and white), was created in 1921. Guatemala had its first game on 14 September 1921, in the [[Independence Centenary Games]] held in [[Guatemala City]], against [[Honduras national football team|Honduras]]. The game was played in Guatemala City and Guatemala beat Honduras 10–1.<ref>RSSSF.com: [http://www.rsssf.com/tablesg/guat-intres.html «Guatemala – List of International Matches»] (en inglés)</ref> In the final, Guatemala were defeated 6–0 by [[Costa Rica national football team|Costa Rica]].<ref>{{cite web|last=Courtney|first=Barrie |title=Guatemala International Soccer Matches Since 1920|url=http://www.rsssf.com/tablesg/guat-intres.html|publisher=RSSSF|date=14 August 2008|accessdate=2 November 2010}}</ref>
Guatemala had success in several editions of the [[CCCF Championship]], the precursor of the [[CONCACAF Gold Cup|Gold Cup]], by being the runners-up in [[1943 CCCF Championship|1943]], [[1946 CCCF Championship|1946]], and [[1948 CCCF Championship|1948]]. In [[1958 FIFA World Cup|1958]], Guatemala began participating in the qualifying rounds of the World Cup. They finished last, without a point, in a group with Costa Rica and the [[Netherlands Antilles national football team|Netherlands Antilles]].<ref>{{cite book|last1=Rinke|first1=Stefan|title=The FIFA World Cup 1930 – 2010|date=2014|publisher=Göttingen|location=Wallstein Verlag|isbn=9783835314573|pages=52–53}}</ref>
===Success in the 1960s===
Guatemala’s performance in the [[FIFA World Cup qualification|World Cup qualifying rounds]] began to improve in the 1960s. In [[1962 FIFA World Cup|1962]] they against both Costa Rica (4–4) and Honduras (1–1). However they again finished last in their qualifying group.<ref>{{cite web|title=Preliminaries North, Central America and Caribbean|url=https://www.fifa.com/worldcup/archive/chile1962/groups/preliminaries/nccamerica/index.html|website=Fifa.com|accessdate=2017-03-05|archive-date=7 March 2017|archive-url=https://web.archive.org/web/20170307204408/http://www.fifa.com/worldcup/archive/chile1962/groups/preliminaries/nccamerica/index.html|url-status=dead}} {{Cite web |url=http://www.fifa.com/worldcup/archive/chile1962/groups/preliminaries/nccamerica/index.html |title=Archived copy |access-date=24 August 2022 |archive-date=7 March 2017 |archive-url=https://web.archive.org/web/20170307204408/http://www.fifa.com/worldcup/archive/chile1962/groups/preliminaries/nccamerica/index.html }}</ref>
Guatemala did not participate in the qualifying round in [[1966 FIFA World Cup|1966]], as [[FIFA]] refused theirparticipation for administrative reasons.
Guatemala joined [[CONCACAF]] in [[1961 CCCF Championship|1961]]. In [[1967 CONCACAF Championship|1967]], they again showed the progress they had made when by participating by winning the Gold Cup for the only time in their history.<ref>{{cite web|title=CONCACAF NATIONS CUP 1967|url=http://www.rsssf.com/tablesc/conca67.html|website=rsssf.com|accessdate=2017-03-05}}</ref> In that tournament, hosted by [[Honduras]], Guatemala began with a 2–1 win against [[Haiti national football team|Haiti]], followed by a 1–0 win over the defending champions, [[Mexico national football team|Mexico]], a 0–0 draw against Honduras, a 2–0 win over [[Trinidad and Tobago national football team|Trinidad and Tobago]], and a 2–0 win over [[Nicaragua national football team|Nicaragua]]. The forward Manuel "Escopeta" Recinos was Guatemala's top scorer with four goals, including the goal against Mexico.
Guatemala were also the runners-up in the CONCACAF Championship in [[1965 CONCACAF Championship|1965]] and [[1969 CONCACAF Championship|1969]].
{{main|1967 CONCACAF Championship}}
'''Results'''
{| class="wikitable" style="text-align: center;"
|-
!width=30|Rank
!width=165 style="text-align:left;"|Team
!width=20|Pts
!width=20|Pld
!width=20|W
!width=20|D
!width=20|L
!width=20|GF
!width=20|GA
!width=20|GD
|- style="background:#ccffcc;"
|'''1'''
|style="text-align:left;"|{{fb|GUA}}
|'''9'''||5||4||1||0||7||1||6
|-
|'''2'''
|style="text-align:left;"|{{fb|MEX}}
|'''8'''||5||4||0||1||10||1||9
|-
|'''3'''
|style="text-align:left;"|{{fb|HON}}
|'''6'''||5||2||2||1||4||2||2
|-
|'''4'''
|style="text-align:left;"|{{fb|TRI}}
|'''4'''||5||2||0||3||6||10||−4
|-
|'''5'''
|style="text-align:left;"| {{fb|HAI}}
|'''2'''||5||1||0||4||5||9||−4
|-
|'''6'''
|style="text-align:left;"|{{fb|NCA}}
|'''1'''||5||0||1||4||3||12||−9
|}
In 1967, Guatemala showed further progress by qualifying for the [[Football at the 1968 Summer Olympics|1968 Olympic football tournament]] in [[Mexico City]]. In the first round, they won 1–0 against [[Czechoslovakia national football team|Czechoslovakia]], and 4–1 against [[Thailand national football team|Thailand]], and lost to [[Bulgaria national football team|Bulgaria]] 2–1. They went on the next round, where they lost 1–0 to the eventual champions, [[Hungary national football team|Hungary]].
===2006 World Cup===
Before the 2006 World Cup qualifiers, many fans{{who|date=May 2020}} saw [[Carlos Ruiz (Guatemalan footballer)|Carlos Ruiz]] as the main focus in providing goals for the national team along with Juan Carlos Plata. Many other stars such as Fredy, Garcia, Gonzalo Romero, Guillermo Ramirez and Martin Machon were expected to play huge roles as well. In [[2006 FIFA World Cup qualification (CONCACAF)|2006 World Cup qualifying]], Guatemala advanced to the third round by beating [[Suriname national football team|Suriname]] 4–2. There they finished second in Group B, behind Costa Rica, with 10 points each. In the fourth round they started with a 0–0 draw against [[Panama national football team|Panama]] and a 5–1 win against Trinidad and Tobago. Then followed a 2–0 loss against the [[United States men's national soccer team|United States]] and Mexico and a 3–2 loss against Costa Rica, and a 2–1 win against Panama. They lost against Trinidad and Tobago 3–2, drew against the United States 0–0 and then lost to Mexico 5–2. Guatemala had 8 points with one game left, and a win alongside a Trinidad and Tobago defeat against Mexico would send them into [[2006 FIFA World Cup qualification (AFC – CONCACAF play-off)|the play-offs]]. They won 3–1 against Costa Rica but Trinidad and Tobago beat Mexico 2–1. They finished fifth place, two points away from the play-off spot. Juan Carlos Plata and Martin Machón announced their retirement from International Football in 2006.
===2010 World Cup===
After a third-place finish at the [[2007 UNCAF Nations Cup]], and reaching the knockout stage in the [[2007 CONCACAF Gold Cup|Gold Cup]] of the same year, along with a couple of satisfying friendly matches including a 3–2 win against Mexico, many{{who|date=May 2020}} saw [[Hernán Darío Gómez]] as the next coach to lead Guatemala into the Hexagonal in the World Cup qualifying stage. However, after losing 5–0 in early 2008 against a under-23 [[Argentina|Argentine]] team, the Colombian soon departed. During [[2010 FIFA World Cup qualification (CONCACAF)|2010 World Cup qualifying]], expectations of qualifying for the finals were set among the national team as Ramon Maradiaga returned as coach. They began well by advancing to the third round by defeating [[Saint Lucia national football team|Saint Lucia]] 9–1 on aggregate.
In the third round, Guatemala began with a 1–0 home loss to the United States, with controversies surrounding the Panamanian referee Roberto Moreno, including not awarding a penalty to Guatemalain the first half after a handball from [[Steve Cherundolo]] as well as [[Gustavo Adolfo Cabrera|Gustavo Cabrera]] being sent off after colliding with [[Eddie Lewis (American soccer)|Eddie Lewis]] in the second half. In their second match, ''Los Chapines'' salvaged a draw in the closing minutes of the game against Trinidad and Tobago in [[Port of Spain]] after [[Carlos Eduardo Gallardo|Carlos Gallardo]] deflected a free kick by Marco Pappa. On 10 September, [[Cuba]] shocked the Guatemala fans by taking the lead after Roberto Linares scored in the 25th minute, but by half-time, Carlos Ruiz had equalised, and in the second half, Ruiz scored again. [[Mario Rafael Rodríguez|Mario Rodríguez]] and [[José Manuel Contreras]] also scored and Guatemala won 4–1.
On 11 October, many fans gathered around the Estadio Mateo Flores for the game against Trinidad and Tobago. Despite being reduced to 10 men, the Soca Warriors were able to hold Guatemala to a 0–0 stalemate. Guatemala then lost in Cuba, falling behind 1–0 after Jaime Colome scored a penalty. Marco Pappa volleyed in an equalizer in the 80th minute, but Urgelles won the match for Cuba in the 90th minute. Meanwhile, the Trinidadians defeated the United States 2–1 at home, putting them in second place. Maradiaga was fired and Benjamin Monterroso was appointed, focusing on the Copa UNCAF the following January. A 2–0 away loss against the United States confirmed the elimination of the national team from the World Cup.
At the UNCAF nations cup, Monterroso wanted to introduce more younger players into the starting line up such as Minor Lopez, Ricardo Jerez and Wilson Lalin, but Guatemala lost both group stage matches against Costa Rica and also lost 2–0 to [[Nicaragua national football team|Nicaragua]] in the play-off match for the final berth to attend the next Gold Cup; Minor Lopez was the lone goal scorer for Los Bicolores. As a result, the national team were inactive for the next two years and Monterroso stepped down after two months in charge.
===2014 World Cup===
In May 2010, the Uruguayan-born Paraguayan [[Ever Hugo Almeida]] was appointed as the Guatemala's next coach. At the [[2011 Copa Centroamericana]], formerly known as the "UNCAF Nations Cup", Guatemala finished in fifth place, losing 2–0 to Costa Rica and 3–1 Honduras before defeating Nicaragua 2–1 to qualify for the [[2011 CONCACAF Gold Cup|2011 Gold Cup]].
At the Gold Cup, Guatemala drew 0–0 against Honduras despite being reduced to nine men. They lost against a physically superior [[Jamaica national football team|Jamaica]] 2–0, but managed to redeem themselves by beating [[Grenada national football team|Grenada]] 4–0, with goals from [[José Javier del Águila]], [[Marco Pappa]], Carlos Ruiz, and Carlos Gallardo. In the quarter-finals, they lost to 2–1 the reigning champions [[Mexico national football team|Mexico]], after Ruiz had given them the lead in the first half.
For the [[2014 FIFA World Cup qualification (CONCACAF)|2014 World Cup qualifiers]], Guatemala began in the second round with six wins in six games, advancing to a third round group alongside the United States, Jamaica and [[Antigua and Barbuda national football team|Antigua and Barbuda]]. Before the third round, three key players – Guillermo Ramirez, Gustavo Cabrera and Yony Flores – were sent home during a practice session after their team-mates Ruiz and Luis Rodriguez heard of their involvement in money laundering and bribery in fixing multiple fixtures; they were subsequently banned for life.{{cn|date=May 2020}}
The team began with an away loss to Jamaica, with [[Dwight Pezzarossi]] only managing to pull back one goal in stoppage time. In the next match, Guatemala drew at home against the United States, after they equalised from Marco Pappa's free kick. At home against Antigua and Barbuda, Guatemala again fell behind, but after the Antiguan goalkeeper Molvin James was sent off for wasting time, Ruiz scored a brace and a goal from Pezzarossi sealed a 3–1 victory. Four days later, a goal from Ruiz sufficed for an away win against the same opponents in North Sound.
Guatemala beat Jamaica at home 2–1, leaving them needing a draw against the United States to progress to the final stage of the qualifiers. After they taking the lead in the first five minutes thanks to Ruiz, the United States scored three times, and Guatemala finished behind Jamaica on goal difference.
In January 2013, still led by Almeida, Guatemala participated in the [[2013 Copa Centroamericana]]. With a team of mainly younger players, they could only manage three draws in their group play (1–1 against Nicaragua, 0–0 against [[Belize national football team|Belize]] and 1–1 against Costa Rica), losing out to Belize for direct qualification for the [[2013 CONCACAF Gold Cup|2013 Gold Cup]]. They faced Panama in the fifth place match, but lost 3–1, and Almeida stepped down in favour of the technical director, [[Victor Hugo Monzón]].
===2016 suspension===
On Oct 28, 2016, the Guatemalan football federation was suspended indefinitely by FIFA, after the international football governing body had appointed an oversight committee to look into allegations of corruption.<ref>{{cite news | last=Menchu | first=Sofia | title=FIFA suspends Guatemalan soccer federation, citing resistance to oversight | url=https://www.reuters.com/article/us-soccer-fifa-guatemala-idUSKCN12S2ET | accessdate=2017-07-01 | publisher=Reuters | date=2016-10-28}}</ref> FIFA stated that the Guatemalan federation (FEDEFUT) had rejected the committee's mandate to run FEDEFUT's business, organize elections, and modernize its statutes, and would remain barred from international competition until FEDEFUT ratified an extension of the mandate.<ref>{{cite news | title=Guatemala suspended from international football | url=http://uk.reuters.com/article/soccer-fifa-guatemala-idUKL4N1CY56H | accessdate=2017-07-01 | publisher=Reuters | date=2016-10-28 }} {{Webarchive|url=https://web.archive.org/web/20170729053811/http://uk.reuters.com/article/soccer-fifa-guatemala-idUKL4N1CY56H |date=29 July 2017 }}</ref>
The football team missed their chance on qualifying on the 2017 and 2019 CONCACAF Gold Cup tournaments ([[2017 Copa Centroamericana]] and [[2019–20 CONCACAF Nations League qualifying]]) as they missed deadlines to have their suspension lifted.
The suspension was lifted on 31 May 2018 after FEDEFUT's normalization committee became fully operational.<ref>{{cite web|title=FIFA lifts suspension of Guatemalan Football Association|url=https://www.fifa.com/governance/news/y=2018/m=5/news=fifa-lifts-suspension-of-guatemalan-football-association.html|publisher=[[FIFA]]|date=31 May 2018|accessdate=5 July 2019|archive-date=25 March 2019|archive-url=https://web.archive.org/web/20190325230232/https://www.fifa.com/governance/news/y=2018/m=5/news=fifa-lifts-suspension-of-guatemalan-football-association.html|url-status=dead}} {{Cite web |url=https://www.fifa.com/governance/news/y=2018/m=5/news=fifa-lifts-suspension-of-guatemalan-football-association.html |title=Archived copy |access-date=7 July 2020 |archive-date=25 March 2019 |archive-url=https://web.archive.org/web/20190325230232/https://www.fifa.com/governance/news/y=2018/m=5/news=fifa-lifts-suspension-of-guatemalan-football-association.html }}</ref>
==Home stadium==
{{Main|Estadio Doroteo Guamuch Flores}}
The Estadio Nacional Mateo Flores, also known as Coloso de la Zona 5, is a multi-use national stadium in [[Guatemala City]], the largest in [[Guatemala]]. It was built in 1948, to host the [[Central American and Caribbean Games]] in 1950, and was renamed after long-distance runner [[Mateo Flores]], winner of the 1952 Boston Marathon. It has a capacity of 26,000 seats.
Used mostly for football matches, the stadium has hosted the majority of the home matches of the Guatemala national football team throughout its history.
==Competitive record==
===FIFA World Cup===
{| class="wikitable" style="text-align: center;"
!colspan=9|[[FIFA World Cup]] record
!width=1% rowspan=26|
!colspan=6|[[FIFA World Cup qualification]] record
|-
!Year
!Round
!Position
!{{Tooltip|Pld|Games played}}
!{{Tooltip|W|Won}}
!{{Tooltip|D|Drawn}}
!{{Tooltip|L|Lost}}
!{{Tooltip|GF|Goals for}}
!{{Tooltip|GA|Goals against}}
!{{Tooltip|Pld|Games played}}
!{{Tooltip|W|Won}}
!{{Tooltip|D|Drawn}}
!{{Tooltip|L|Lost}}
!{{Tooltip|GF|Goals for}}
!{{Tooltip|GA|Goals against}}
|-
| {{flagicon|Uruguay}} [[1930 FIFA World Cup|1930]]
| colspan=8 rowspan=5|''Did not enter''
| colspan=6 rowspan=5|''Did not enter''
|-
| {{flagicon|Italy|1861}} [[1934 FIFA World Cup|1934]]
|-
| {{flagicon|France|1794}} [[1938 FIFA World Cup|1938]]
|-
| {{flagicon|Brazil|1889}} [[1950 FIFA World Cup|1950]]
|-
| {{flagicon|Switzerland}} [[1954 FIFA World Cup|1954]]
|-
| {{flagicon|Sweden}} [[1958 FIFA World Cup|1958]]
| colspan=8 rowspan=2|''Did not qualify''
| 3
| 0
| 0
| 3
| 4
| 12
|-
| {{flagicon|Chile}} [[1962 FIFA World Cup|1962]]
| 4
| 0
| 2
| 2
| 7
| 10
|-
| {{flagicon|England}} [[1966 FIFA World Cup|1966]]
| colspan=8|''Entry not accepted''<ref>{{cite web |url=http://es.fifa.com/mm/document/fifafacts/mcwc/fifaworldcuppreliminaryhistory_byyear__13876.pdf |title=History of the FIFA World Cup Preliminary Competition (by year) |work=FIFA.com |publisher=Fédération Internationale de Football Association |accessdate=13 December 2011 |archive-date=21 October 2013 |archive-url=https://web.archive.org/web/20131021174859/http://es.fifa.com/mm/document/fifafacts/mcwc/fifaworldcuppreliminaryhistory_byyear__13876.pdf |url-status=dead }} {{Cite web |url=http://es.fifa.com/mm/document/fifafacts/mcwc/fifaworldcuppreliminaryhistory_byyear__13876.pdf |title=Archived copy |access-date=7 July 2020 |archive-date=21 October 2013 |archive-url=https://web.archive.org/web/20131021174859/http://es.fifa.com/mm/document/fifafacts/mcwc/fifaworldcuppreliminaryhistory_byyear__13876.pdf }}</ref>
| colspan=6|''Entry not accepted''
|-
| {{flagicon|Mexico}} [[1970 FIFA World Cup|1970]]
| colspan=8 rowspan=13|''Did not qualify''
| 4
| 1
| 2
| 1
| 5
| 3
|-
| {{flagicon|West Germany}} [[1974 FIFA World Cup|1974]]
| 7
| 2
| 3
| 2
| 6
| 6
|-
| {{flagicon|Argentina}} [[1978 FIFA World Cup|1978]]
| 11
| 4
| 3
| 4
| 23
| 16
|-
| {{flagicon|Spain}} [[1982 FIFA World Cup|1982]]
| 8
| 3
| 3
| 2
| 10
| 2
|-
| {{flagicon|Mexico}} [[1986 FIFA World Cup|1986]]
| 4
| 2
| 1
| 1
| 7
| 3
|-
| {{flagicon|Italy}} [[1990 FIFA World Cup|1990]]
| 10
| 3
| 2
| 5
| 9
| 10
|-
| {{flagicon|United States}} [[1994 FIFA World Cup|1994]]
| 2
| 0
| 1
| 1
| 0
| 2
|-
| {{flagicon|France}} [[1998 FIFA World Cup|1998]]
| 8
| 4
| 2
| 2
| 6
| 9
|-
| {{flagicon|South Korea}} {{flagicon|Japan}} [[2002 FIFA World Cup|2002]]
| 13
| 6
| 3
| 4
| 23
| 15
|-
| {{flagicon|Germany}} [[2006 FIFA World Cup|2006]]
| 18
| 7
| 4
| 7
| 27
| 29
|-
| {{flagicon|South Africa}} [[2010 FIFA World Cup|2010]]
| 8
| 3
| 2
| 3
| 15
| 8
|-
| {{flagicon|Brazil}} [[2014 FIFA World Cup|2014]]
| 12
| 9
| 1
| 2
| 28
| 11
|-
| {{flagicon|Russia}} [[2018 FIFA World Cup|2018]]
| 10
| 5
| 2
| 3
| 21
| 12
|-
|{{flagicon|Qatar}} [[2022 FIFA World Cup|2022]]
| colspan=8 rowspan=2|''To be determined''
| colspan=6 rowspan=2|''To be determined''
|-
|{{flagicon|Canada}} {{flagicon|Mexico}} {{flagicon|United States}} [[2026 FIFA World Cup|2026]]
|-
!Total
!–
!0/21
!–
!–
!–
!–
!–
!–
!122
!49
!31
!42
!191
!148
|}
===CONCACAF Gold Cup===
{| class="wikitable" style="text-align: center;"
|-
!colspan=9|[[CONCACAF Championship]] / [[CONCACAF Gold Cup]] record
|-
!width=120|Year
!width=100|Round
!width=80|Position
!width=20|{{Abbr|Pld|Games played}}
!width=20|{{Abbr|W|Won}}
!width=20|{{Abbr|D|Drawn}}
!width=20|{{Abbr|L|Lost}}
!width=20|{{Abbr|GF|Goals for}}
!width=20|{{Abbr|GA|Goals against}}
|- bgcolor=#9acdff
|{{flagicon|El Salvador}} [[1963 CONCACAF Championship|1963]]||Fourth place||4th||4||1||2||1||7||6
|- bgcolor=silver
|style="border: 3px solid red"|{{flagicon|Guatemala}} [[1965 CONCACAF Championship|1965]]||'''Runners-up'''||'''2nd'''||'''5'''||'''3'''||'''1'''||'''1'''||'''11'''||'''5'''
|- bgcolor=gold
|{{flagicon|Honduras}} [[1967 CONCACAF Championship|1967]]||'''Champions'''||'''1st'''||'''5'''||'''4'''||'''1'''||'''0'''||'''7'''||'''1'''
|- bgcolor=silver
|{{flagicon|Costa Rica}} [[1969 CONCACAF Championship|1969]]||'''Runners-up'''||'''2nd'''||'''5'''||'''3'''||'''2'''||'''0'''||'''10'''||'''2'''
|-
|{{flagicon|Trinidad and Tobago}} [[1971 CONCACAF Championship|1971]]||colspan=8|''Did not qualify''
|-
|{{flagicon|Haiti|1964}} [[1973 CONCACAF Championship|1973]]||Fifth place||5th||5||0||3||2||4||6
|-
|{{flagicon|Mexico}} [[1977 CONCACAF Championship|1977]]||Fifth place||5th||5||1||1||3||8||10
|-
|{{flagicon|Honduras}} [[1981 CONCACAF Championship|1981]]||colspan=8|''Did not qualify''
|-
|[[1985 CONCACAF Championship|1985]]||Round 1||5th||4||2||1||1||7||3
|- bgcolor=#9acdff
|[[1989 CONCACAF Championship|1989]]||Fourth place||4th||6||1||1||4||4||7
|-
|{{flagicon|United States}} [[1991 CONCACAF Gold Cup|1991]]||Round 1||7th||3||1||0||2||1||5
|-
|{{flagicon|Mexico}} {{flagicon|United States}} [[1993 CONCACAF Gold Cup|1993]]||colspan=8|''Did not enter''
|- bgcolor=#9acdff
|{{flagicon|United States}} [[1996 CONCACAF Gold Cup|1996]]||Fourth place||4th||4||1||0||3||3||5
|-
|{{flagicon|United States}} [[1998 CONCACAF Gold Cup|1998]]||Round 1||7th||3||0||2||1||3||4
|-
|{{flagicon|United States}} [[2000 CONCACAF Gold Cup|2000]]||Round 1||10th||2||0||1||1||3||5
|-
|{{flagicon|United States}} [[2002 CONCACAF Gold Cup|2002]]||Round 1||12th||2||0||0||2||1||4
|-
|{{flagicon|Mexico}} {{flagicon|United States}} [[2003 CONCACAF Gold Cup|2003]]||Round 1||11th||2||0||1||1||1||3
|-
|{{flagicon|United States}} [[2005 CONCACAF Gold Cup|2005]]||Round 1||11th||3||0||1||2||4||9
|-
|{{flagicon|United States}} [[2007 CONCACAF Gold Cup|2007]]||Quarter-finals||8th||4||1||1||2||2||5
|-
|{{flagicon|United States}} [[2009 CONCACAF Gold Cup|2009]]||colspan=8|''Did not qualify''
|-
|{{flagicon|United States}} [[2011 CONCACAF Gold Cup|2011]]||Quarter-finals||8th||4||1||1||2||5||4
|-
|{{flagicon|United States}} [[2013 CONCACAF Gold Cup|2013]]||colspan=8|''Did not qualify''
|-
|{{flagicon|Canada}} {{flagicon|United States}} [[2015 CONCACAF Gold Cup|2015]]||Round 1||12th||3||0||1||2||1||4
|-
|{{flagicon|United States}} [[2017 CONCACAF Gold Cup|2017]]||colspan=8 rowspan=2|''Disqualified due to FIFA Suspension''
|-
|{{flagicon|Costa Rica}} {{flagicon|Jamaica}} {{flagicon|United States}} [[2019 CONCACAF Gold Cup|2019]]
|-
!Total||1 Title||18/25||69||19||20||30||82||88
|}
===Copa Centroamericana===
{| class="wikitable" style="text-align: center;"
|-
!colspan=9|[[Copa Centroamericana]] record
|-
!Year
!Round
!Position
!{{Abbr|Pld|Games played}}
!{{Abbr|W|Won}}
!{{Abbr|D|Drawn}}
!{{Abbr|L|Lost}}
!{{Abbr|GF|Goals for}}
!{{Abbr|GA|Goals against}}
|- bgcolor="#cc9966"
|{{flagicon|Costa Rica}} [[1991 UNCAF Nations Cup|1991]]||Third place||3rd||3||0||2||1||0||1
|-
|{{flagicon|Honduras}} [[1993 UNCAF Nations Cup|1993]]||colspan=8|''Did not enter''
|- bgcolor=silver
|{{flagicon|El Salvador}} [[1995 UNCAF Nations Cup|1995]]||'''Runners-up'''||'''2nd'''||'''4'''||'''2'''||'''0'''||'''2'''||'''2'''||'''5'''
|- bgcolor=silver
|{{flagicon|Guatemala}} [[1997 UNCAF Nations Cup|1997]]||'''Runners-up'''||'''2nd'''||'''5'''||'''3'''||'''2'''||'''0'''||'''10'''||'''3'''
|- bgcolor=silver
|{{flagicon|Costa Rica}} [[1999 UNCAF Nations Cup|1999]]||'''Runners-up'''||'''2nd'''||'''5'''||'''3'''||'''1'''||'''1'''||'''5'''||'''2'''
|- bgcolor=gold
|{{flagicon|Honduras}} [[2001 UNCAF Nations Cup|2001]]||'''Champions'''||'''1st'''||'''5'''||'''2'''||'''3'''||'''0'''||'''9'''||'''5'''
|- bgcolor=silver
|{{flagicon|Panama}} [[2003 UNCAF Nations Cup|2003]]||'''Runners-up'''||'''2nd'''||'''5'''||'''3'''||'''1'''||'''1'''||'''10'''||'''4'''
|- bgcolor="#cc9966"
|{{flagicon|Guatemala}} [[2005 UNCAF Nations Cup|2005]]||Third place||3rd|| 5||3||1||1||10||5
|- bgcolor="#cc9966"
|{{flagicon|El Salvador}} [[2007 UNCAF Nations Cup|2007]]||Third place||3rd||5||3||1||1||3||2
|-
|{{flagicon|Honduras}} [[2009 UNCAF Nations Cup|2009]]||Round 1||6th||3||0||0||3||1||6
|-
|{{flagicon|Panama}} [[2011 Copa Centroamericana|2011]]||Fifth place||5th||3||1||0||2||3||6
|-
|{{flagicon|Costa Rica}} [[2013 Copa Centroamericana|2013]]||Sixth place||6th||4||0||3||1||3||5
|-bgcolor=silver
|{{flagicon|United States}} [[2014 Copa Centroamericana|2014]]||'''Runners-up'''||'''2nd'''||'''4'''||'''3'''||'''0'''||'''1'''||'''7'''||'''4'''
|-
|{{flagicon|Panama}} [[2017 Copa Centroamericana|2017]]||colspan=8|''Disqualified due to FIFA Suspension''
|-
!Total||1 Title||12/14||51||23||14||14||63||48
|}
===Pan American Games===
{| class="wikitable" style="text-align:center"
|-
!colspan=9|[[Football at the Pan American Games|Pan American Games]] record
|-
!Year
!Round
!Position
!{{Abbr|Pld|Games played}}
!{{Abbr|W|Won}}
!{{Abbr|D|Drawn}}
!{{Abbr|L|Lost}}
!{{Abbr|GF|Goals for}}
!{{Abbr|GA|Goals against}}
|-
| {{flagicon|Argentina}} [[Football at the 1951 Pan American Games|1951]]||colspan=8 rowspan=7|''Did not qualify''
|-
| {{flagicon|Mexico}} [[Football at the 1955 Pan American Games|1955]]
|-
| {{flagicon|United States}} [[Football at the 1959 Pan American Games|1959]]
|-
| {{flagicon|Brazil}} [[Football at the 1963 Pan American Games|1963]]
|-
| {{flagicon|Canada}} [[Football at the 1967 Pan American Games|1967]]
|-
| {{flagicon|Colombia}} [[Football at the 1971 Pan American Games|1971]]
|-
| {{flagicon|Mexico}} [[Football at the 1975 Pan American Games|1975]]
|-
| {{flagicon|Puerto Rico}} [[Football at the 1979 Pan American Games|1979]]||Group stage||7th||2||0||1||1||2||4
|- bgcolor="#cc9966"
| {{flagicon|Venezuela}} [[Football at the 1983 Pan American Games|1983]]||Bronze medal||3rd||4||1||2||1||6||4
|-
| {{flagicon|United States}} [[Football at the 1987 Pan American Games|1987]]||Group stage||5th||3||1||1||1||3||2
|-
| {{flagicon|Cuba}} [[Football at the 1991 Pan American Games|1991]]||colspan=8 rowspan=2|''Did not qualify''
|-
| {{flagicon|Argentina}} [[Football at the 1995 Pan American Games|1995]]
|-
| {{flagicon|Canada}} [[Football at the 1999 Pan American Games – Men's tournament|1999]]||Group stage||7th||3||1||1||2||4||5
|-
| {{flagicon|Dominican Republic}} [[Football at the 2003 Pan American Games – Men's tournament|2003]]||Group stage||7th||3||0||1||2||2||5
|-
| {{flagicon|Brazil}} [[Football at the 2007 Pan American Games – Men's tournament|2007]]||colspan=8 rowspan=4|''Did not qualify''
|-
| {{flagicon|Mexico}} [[Football at the 2011 Pan American Games – Men's tournament|2011]]
|-
| {{flagicon|Canada}} [[Football at the 2015 Pan American Games – Men's tournament|2015]]
|-
| {{flagicon|Peru}} [[Football at the 2019 Pan American Games – Men's tournament|2019]]
|-
!Total||1 Bronze medal||5/18||15||3||6||7||17||20
|}
''Note: Football at the Pan American Games has been an under-23 tournament since 1999.''
==All-time head-to-head record==
{{main|Guatemala national football team results}}
''As of 4 March 2020 after the match against {{fb|Panama}}''<ref>{{cite web|url=http://eloratings.net/Guatemala|title=World Football Elo Ratings: Guatemala|publisher=Elo Ratings|accessdate=16 November 2018}}</ref>
{{legend2|#CCFFCC|Positive Record|border=1px solid #AAAAAA}}
{{legend2|#FFFFCC|Neutral Record|border=1px solid #AAAAAA}}
{{legend2|#FFDACC|Negative Record|border=1px solid #AAAAAA}}
{| class="wikitable sortable collapsible collapsed" style="text-align: center; font-size: 100%;"
|- style="color:black;"
! style="width:145px;"|Opponents
!width=30|{{Tooltip|Pld|Games played}}
!width=30|{{Tooltip|W|Won}}
!width=30|{{Tooltip|D|Drawn}}
!width=30|{{Tooltip|L|Lost}}
!width=35|{{Tooltip|GF|Goals for}}
!width=35|{{Tooltip|GA|Goals against}}
!width=35|{{Tooltip|GD|Goal difference}}
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Anguilla}} || 2 || 2 || 0 || 0 || 15 || 0 || +15
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Antigua and Barbuda}} || 8 || 7 || 0 || 1 || 29 || 3 || +26
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Argentina}} || 2 || 0 || 0 || 2 || 0 || 7 || −7
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Armenia}} || 2 || 0 || 1 || 1 || 2 || 8 || −6
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Barbados}} || 3 || 2 || 1 || 0 || 5 || 1 || +4
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Belize}} || 11 || 7 || 4 || 0 || 19 || 9 || +10
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Bermuda}} || 6 || 2 || 4 || 0 || 4 || 2 || +2
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Bolivia}} || 5 || 3 || 1 || 1 || 7 || 5 || +2
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Brazil}} || 2 || 0 || 1 || 1 || 1 || 4 || −3
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Canada}} || 14 || 2 || 2 || 10 || 10 || 22 || −12
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Chile}} || 5 || 1 || 1 || 3 || 4 || 9 || −5
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Colombia}} || 5 || 1 || 2 || 2 || 7 || 11 || −4
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Costa Rica}} || 64 || 16 || 17 || 31 || 77 || 128 || −51
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Cuba}} || 17 || 7 || 7 || 3 || 22 || 13 || +9
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Curaçao}}{{efn|Includes matches against the {{fb|ANT}}.}} || 11 || 3 || 6 || 2 || 24 || 19 || +5
|-
|- bgcolor=FFFACD
| style="text-align:left;"| {{fb|Dominican Republic}} || 1 || 0 || 1 || 0 || 0 || 0 || 0
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Ecuador}} || 8 || 1 || 3 || 4 || 3 || 9 || −6
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|El Salvador}} || 80 || 35 || 25 || 20 || 94 || 70 || +24
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|France}} || 1 || 0 || 0 || 1 || 1 || 4 || −3
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Grenada}} || 3 || 3 || 0 || 0 || 11 || 1 || +10
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Guyana}} || 4 || 4 || 0 || 0 || 14 || 0 || +13
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Haiti}} || 16 || 9 || 2 || 5 || 25 || 16 || +9
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Honduras}} || 48 || 12 || 17 || 19 || 53 || 57 || −4
|-
|- bgcolor=FFFACD
| style="text-align:left;"| {{fb|Iran}} || 1 || 0 || 1 || 0 || 2 || 2 || 0
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Iraq}} || 1 || 0 || 0 || 1 || 0 || 3 || −3
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Israel}} || 2 || 0 || 1 || 1 || 0 || 7 || −7
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Italy}} || 1 || 0 || 0 || 1 || 2 || 5 || −3
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Jamaica}} || 18 || 4 || 4 || 10 || 19 || 30 || −11
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Japan}} || 2 || 0 || 0 || 2 || 1 || 5 || −4
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Mexico}} || 28 || 3 || 8 || 17 || 25 || 55 || −30
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Nicaragua}} || 23 || 19 || 2 || 2 || 67 || 14 || +53
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Norway}} || 1 || 0 || 0 || 1 || 1 || 3 || −2
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Panama}} || 38 || 13 || 9 || 16 || 60 || 57 || +3
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Paraguay}} || 11 || 0 || 2 || 9 || 10 || 25 || −15
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Peru}} || 4 || 0 || 1 || 3 || 2 || 8 || −6
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Poland}} || 2 || 0 || 1 || 1 || 2 || 3 || −1
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Puerto Rico}} || 3 || 3 || 0 || 0 || 14 || 1 || +13
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Russia}}{{efn|Includes matches against the {{fb|Soviet Union}}.}} || 1 || 0 || 0 || 1 || 0 || 3 || −3
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Saint Lucia}} || 2 || 2 || 0 || 0 || 9 || 1 || +8
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Saint Vincent and the Grenadines}} || 5 || 5 || 0 || 0 || 23 || 3 || +20
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|South Africa}} || 2 || 0 || 1 || 1 || 1 || 6 || −5
|-
|- bgcolor=FFFACD
| style="text-align:left;"| {{fb|South Korea}} || 3 || 1 || 1 || 1 || 3 || 4 || −1
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Suriname}} || 5 || 2 || 2 || 1 || 9 || 7 || +2
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Slovakia}} || 1 || 0 || 0 || 1 || 0 || 1 || −1
|-
|- bgcolor=CCFFCC
| style="text-align:left;"| {{fb|Thailand}} || 1 || 1 || 0 || 0 || 4 || 1 || +1
|-
|- bgcolor=FFFACD
| style="text-align:left;"| {{fb|Trinidad and Tobago}} || 24 || 8 || 8 || 8 || 40 || 32 || +8
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|United States}} || 27 || 5 || 6 || 16 || 19 || 47 || −28
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Uruguay}} || 3 || 1 || 0 || 2 || 3 || 7 || −4
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Venezuela}} || 7 || 2 || 1 || 4 || 9 || 10 || −1
|-
|- bgcolor=FFCCCC
| style="text-align:left;"| {{fb|Zambia}} || 1 || 0 || 0 || 1 || 0 || 4 || −4
|-
|- class="sortbottom"
! Total (50)
| 507 || 179 || 131 || 197 || 715 || 710 || +5
|}
{{notelist}}
==Schedule and results==
The following is a list of match results from the previous 12 months, as well as any future matches that have been scheduled.
{{legend2|#CCFFCC|Win|border=1px solid #AAAAAA}}
{{legend2|#FFFFCC|Draw|border=1px solid #AAAAAA}}
{{legend2|#FFCCCC|Loss|border=1px solid #AAAAAA}}
===2019===
{{football box collapsible
|date = 9 June
|time = 17:00
|round = [[Exhibition game|Friendly]]
|team1 = {{fb-rt|PAR}}
|score = 2–0
|report = https://int.soccerway.com/matches/2019/06/09/world/friendlies/paraguay/guatemala/3023860/
|team2 = {{fb|GUA}}
|goals1 = [[Gustavo Gómez|Gómez]] {{goal|48}}<br>[[Derlis González|González]] {{goal|76|pen.}}
|goals2 =
|location = [[Asunción]], [[Paraguay]]
|stadium = [[Estadio Defensores del Chaco]]
|attendance =
|referee = Rodolpho Toski Marques ([[Brazilian Football Confederation|Brazil]])
|result = L
}}
{{Football box collapsible
|round= [[2019–20 CONCACAF Nations League C#Group C|Nations League C]]
|date= 5 September
|time=22:00
|team1={{fb-rt|GUA}}
|score= 10–0
|report=https://www.concacafnationsleague.com/en/nations-league/game-detail/476668
|team2={{fb|AIA}}
|goals1=
*[[Jorge Estuardo Vargas|Vargas]] {{goal|13}}
*[[José Carlos Martínez (footballer)|J. Martínez]] {{goal|18}}
*[[Marvin Ceballos|Ceballos]] {{goal|37||82}}
*[[Alejandro Galindo (footballer)|Galindo]] {{goal|44}}
*[[Edi Danilo Guerra|Guerra]] {{goal|60||72||77||86}}
*[[Jean Márquez|Márquez]] {{goal|90+1|pen.}}
|goals2=
|stadium = [[Estadio Doroteo Guamuch Flores|Estadio Mateo Flores]]
|location = [[Guatemala City]], [[Guatemala]]
|attendance=
|referee = Randy Solano ([[Dominican Football Federation|Dominican Republic]])
|result = W
}}
{{Football box collapsible
|round= [[2019–20 CONCACAF Nations League C#Group C|Nations League C]]
|date= 10 September
|time=14:00
|team1={{fb-rt|PUR}}
|score=0–5
|report=https://www.concacafnationsleague.com/en/nations-league/game-detail/476669
|team2={{fb|GUA}}
|goals1=
|goals2=
*[[Marvin Ceballos|Ceballos]] {{goal|30|pen.}}
*[[Edi Danilo Guerra|Guerra]] {{goal|54|pen.}}
*[[Alejandro Galindo (footballer)|Galindo]] {{goal|61|pen.}}
*[[Stheven Robles|Robles]] {{goal|66}}
*[[Luis de León (footballer)|De León]] {{goal|89}}
|stadium=[[Mayagüez Athletics Stadium]]
|location = [[Mayagüez, Puerto Rico|Mayagüez]], [[Puerto Rico]]
|attendance=
|referee= Ismael Cornejo ([[Salvadoran Football Federation|El Salvador]])
|result = W
}}
{{Football box collapsible
|round= [[2019–20 CONCACAF Nations League C#Group C|Nations League C]]
|date= 12 October
|time=20:00
|team1={{fb-rt|AIA}}
|score=0–5
|report=https://www.concacafnationsleague.com/en/nations-league/game-detail/476670
|team2={{fb|GUA}}
|goals1=
|goals2=
*[[Edi Danilo Guerra|Guerra]] {{goal|4}}
*[[Edward Santeliz|Santeliz]] {{goal|18}}
*[[Marvin Ceballos|Ceballos]] {{goal|61|pen.}}
*[[Wilber Pérez|Pérez]] {{goal|72}}
*[[Wilson Pineda|Pineda]] {{goal|90+2}}
|stadium=[[Raymond E. Guishard Technical Centre]]
|location = [[The Valley, Anguilla|The Valley]], [[Anguilla]]
|attendance=
|referee=Reon Radix ([[Grenada Football Association|Grenada]])
|result = W
}}
{{Football box collapsible
|round = [[Exhibition game#Association football|Friendly]]
|date = 15 October
|time = 20:00
|team1 = {{fb-rt|BER}}
|score = 0–0
|report = https://int.soccerway.com/matches/2019/10/15/world/friendlies/bermuda/guatemala/3178981/
|team2 = {{fb|GUA}}
|goals1 =
|goals2 =
|stadium = [[Bermuda National Stadium]]
|location = [[Hamilton, Bermuda|Hamilton]], [[Bermuda]]
|attendance = 1,105
|referee = Ted Unkel ([[United States Soccer Federation|United States]])
|result = D
}}
{{Football box collapsible
|round= [[2019–20 CONCACAF Nations League C#Group C|Nations League C]]
|date= 16 November
|time=20:00
|team1={{fb-rt|GUA}}
|score=5–0
|report=https://www.concacafnationsleague.com/en/nations-league/game-detail/476672
|team2={{fb|PUR}}
|goals1=
*[[Carlos Eduardo Gallardo|Gallardo]] {{goal|3}}
*[[Alejandro Galindo (footballer)|Galindo]] {{goal|19|pen.}}
*[[Stefano Cincotta|Cincotta]] {{goal|45}}
*[[Yeltsin Álvarez|Álvarez]] {{goal|56}}
*[[Luis Martínez (Guatemalan footballer)|Martínez]] {{goal|82}}
|goals2=
|stadium=[[Estadio Doroteo Guamuch Flores|Estadio Mateo Flores]]
|location = [[Guatemala City]], [[Guatemala]]
|attendance=
|referee=Nelson Salgado ([[National Autonomous Federation of Football of Honduras|Honduras]])
|result = W
}}
{{Football box collapsible
|round = [[Exhibition game#Association football|Friendly]]
|id=|date = 21 November
|time =
|team1 = {{fb-rt|GUA}}
|score = 8–0
|report = https://int.soccerway.com/matches/2019/11/21/world/friendlies/guatemala/antigua-and-barbuda/3181200/
|team2 = {{fb|ATG}}
|goals1 =
*[[Yeltsin Álvarez|Álvarez]] {{goal|25}}
*[[Edi Danilo Guerra|Guerra]] {{goal|31||44}}
*[[Alejandro Galindo (footballer)|Galindo]] {{goal|45+1||47}}
*[[José Rosales (footballer)|Rosales]] {{goal|56}}
*[[Jorge Estuardo Vargas|Vargas]] {{goal|79}}
*[[Rudy Ronaldo Barrientos|Barrientos]] {{goal|88}}
|goals2 =
|stadium = [[Estadio Israel Barrios]]
|location = [[Coatepeque, Quetzaltenango|Coatepeque]], [[Guatemala]]
|attendance =
|referee = Sergio Reyna ([[National Football Federation of Guatemala|Guatemala]])
|result =W
}}
===2020===
{{football box collapsible
|date = 4 March
|time =
|round = [[Exhibition game|Friendly]]
|team1 = {{fb-rt|GUA}}
|score = 0–2
|report =
|team2 = {{fb|PAN}}
|goals1 =
|goals2 =
* [[Jose Murillo|Murillo]] {{goal|45}}
* [[Edwin Aguilar|Aguilar]] {{goal|83}}
|location = [[Guatemala City]], [[Guatemala]]
|stadium = [[Estadio Doroteo Guamuch Flores]]
|attendance =
|referee =
|result = L
}}
==Players==
===Current squad===
The following players were called up for a friendly game against [[Nicaragua national football team|Nicaragua]] on 26 March 2019.<ref>{{cite web|publisher=[[National Football Federation of Guatemala]]|url=http://www.fedefutguate.org/index.php/noticias/4187-nomina-oficial-seleccion-de-guatemala-ante-nicaragua.html|title=NOMINA OFICIAL SELECCION DE GUATEMALA ANTE NICARAGUA|date=25 March 2019|language=Spanish}}</ref><br>
''Caps and goals updated as of 26 March 2019 after the game against [[Nicaragua national football team|Nicaragua]].''
{{nat fs g start|background=#6495ED|color=white}}
{{nat fs g player|no=|pos=GK|name=[[Nicholas Hagen]]|age={{birth date and age|df=yes|1996|8|2}}|caps=4|goals=0|club=[[CSD Municipal]]|clubnat=GUA}}
{{nat fs g player|no=|pos=GK|name=[[Manuel Alejandro Sosa|Manuel Sosa]]|age={{birth date and age|df=yes|1987|4|5}}|caps=0|goals=0|club=[[C.D. Malacateco|Malacateco]]|clubnat=GUA}}
{{nat fs break|background=#6495ED}}
{{nat fs g player|no=|pos=DF|name=[[Carlos Eduardo Gallardo|Carlos Gallardo]]|age={{birth date and age|df=yes|1984|4|9}}|caps=58|goals=3|club=[[C.D. Guastatoya|Guastatoya]]|clubnat=GUA}}
{{nat fs g player|no=|pos=DF|name=[[Rafael Morales (footballer)|Rafael Morales]]|age={{birth date and age|df=yes|1988|4|6}}|caps=21|goals=2|club=[[Comunicaciones F.C.|Comunicaciones]]|clubnat=GUA}}
{{nat fs g player|no=|pos=DF|name=[[José Carlos Pinto]]|age={{birth date and age|df=yes|1993|6|16}}|caps=4|goals=0|club=[[Antigua GFC|Antigua]]|clubnat=GUA}}
{{nat fs g player|no=|pos=DF|name=[[Eduardo Soto]]|age={{birth date and age|df=yes|1990|3|3}}|caps=4|goals=0|club=[[Cobán Imperial]]|clubnat=GUA}}
{{nat fs g player|no=|pos=DF|name=[[Ángel Cabrera (Guatemalan footballer)|Ángel Cabrera]]|age={{birth date and age|df=yes|1986|2|10}}|caps=3|goals=0|club=[[Cobán Imperial]]|clubnat=GUA}}
{{nat fs g player|no=|pos=DF|name=[[Allen Yanes]]|age={{birth date and age|df=yes|1997|7|4}}|caps=3|goals=0|club=[[New York Red Bulls II]]|clubnat=USA}}
{{nat fs g player|no=|pos=DF|name=[[Manuel Estuardo López|Manuel López]]|age={{birth date and age|df=yes|1990|4|26}}|caps=2|goals=0|club=[[C.S.D. Municipal|Municipal]]|clubnat=GUA}}
{{nat fs g player|no=|pos=DF|name=[[Manuel Moreno (Guatemalan footballer)|Manuel Moreno]]|age={{birth date and age|df=yes|1992|6|18}}|caps=2|goals=0|club=[[Club Xelajú MC|Xelajú MC]]|clubnat=GUA}}
{{nat fs break|background=#6495ED}}
{{nat fs g player|no=|pos=MF|name=[[José Manuel Contreras]]|age={{birth date and age|df=yes|1986|1|19}}|caps=69|goals=5|club=[[Antigua GFC|Antigua]]|clubnat=GUA}}
{{nat fs g player|no=|pos=MF|name=[[Jorge Aparicio]]|age={{birth date and age|df=yes|1992|11|21}}|caps=15|goals=0|club=[[C.D. Guastatoya|Guastatoya]]|clubnat=GUA}}
{{nat fs g player|no=|pos=MF|name=[[Luis Martínez (Guatemalan footballer)|Luis Martínez]]|age={{birth date and age|df=yes|1991|12|14}}|caps=11|goals=2|club=[[C.D. Guastatoya|Guastatoya]]|clubnat=GUA}}
{{nat fs g player|no=|pos=MF|name=[[Rodrigo Saravia]]|age={{birth date and age|df=yes|1993|2|22}}|caps=10|goals=0|club=[[Comunicaciones F.C.|Comunicaciones]]|clubnat=GUA}}
{{nat fs g player|no=|pos=MF|name=[[Marvin Ceballos]]|age={{birth date and age|df=yes|1992|4|22}}|caps=9|goals=1|club=[[Leones Negros UdeG|Universidad de Guadelajara]]|clubnat=MEX}}
{{nat fs g player|no=|pos=MF|name=[[Alejandro Galindo (footballer)|Alejandro Galindo]]|age={{birth date and age|df=yes|1992|3|5}}|caps=8|goals=0|club=[[Antigua GFC|Antigua]]|clubnat=GUA}}
{{nat fs g player|no=|pos=MF|name=[[Jorge Estuardo Vargas|Jorge Vargas]]|age={{birth date and age|df=yes|1993|2|26}}|caps=6|goals=0|club=[[Comunicaciones F.C.|Comunicaciones]]|clubnat=GUA}}
{{nat fs g player|no=|pos=MF|name=[[John Méndez]]|age={{birth date and age|df=yes|1999|6|24}}|caps=1|goals=0|club=[[C.S.D. Municipal|Municipal]]|clubnat=GUA}}
{{nat fs break|background=#6495ED}}
{{nat fs g player|no=|pos=FW|name=[[Edi Danilo Guerra]]|age={{birth date and age|df=yes|1987|12|11}}|caps=8|goals=1|club=[[Cobán Imperial]]|clubnat=GUA}}
{{nat fs g player|no=|pos=FW|name=[[Robin Betancourth]]|age={{birth date and age|df=yes|1991|11|25}}|caps=7|goals=0|club=[[Comunicaciones F.C.|Comunicaciones]]|clubnat=GUA}}
{{nat fs end|background=#6495ED}}
===Records===
{{col-begin}}
{{col-2}}
{| class="wikitable" style="text-align: center;"
|-
|+Most capped
|-
! width="50" |#
! width="150" |Player
! width="50" |Caps<ref name="RSSSF"/>
! width="100" |Career
|-
| 1 ||align=left| [[Carlos Ruiz (Guatemalan footballer)|Carlos Ruiz]] || 133 || 1998–2016
|-
| 2 ||align=left| [[Guillermo Ramírez]] * || 106 || 1997–2012
|-
| 3 ||align=left| [[Gustavo Adolfo Cabrera|Gustavo Cabrera]] * || 104 || 2000–2012
|-
| 4 ||align=left| [[Fredy Thompson]] || 96 || 2001–2015
|-
| 5 ||align=left| [[Juan Carlos Plata]] || 87 || 1996–2010
|-
| 6 ||align=left| [[Gonzalo Romero]] || 83 || 2000–2012
|-
| 7 ||align=left| [[Julio Girón]] || 82 || 1992–2006
|-
| 8 ||align=left| [[Edgar Estrada]] || 80 || 1995–2003
|-
| 9 ||align=left| [[Mario Rafael Rodríguez|Mario Rodríguez]] || 79 || 2003–2013
|-
| 10 ||align=left| [[Freddy García (footballer)|Freddy García]] || 73 || 2000–2012
|}
{{small|Players in bold text are still active with Guatemala.}}<br>
{{small|* Banned from Football on suspicions of fixing match results.}}<ref name="auto">[http://football.uk.reuters.com/football/news/2012/10/16/C9A19424-177C-11E2-9A9C-97348033923B.php/ Central America is seen as especially vulnerable to match-fixing... 10/16/2012 Reuters.]{{Dead link|date=January 2020 |bot=InternetArchiveBot |fix-attempted=yes }} Retrieved 10/18/2012.</ref>
{{col-2}}
{| class="wikitable" style="text-align: center;"
|-
|+Top scorers
|-
! width="50" |#
! width="150" |Player
! width="50" |Goals<ref name="RSSSF"/>
! width="100" |Career
|-
| 1 ||align=left| [[Carlos Ruiz (Guatemalan footballer)|Carlos Ruiz]] || 68 || 1998–2016
|-
| 2 ||align=left| [[Juan Carlos Plata]] || 35 || 1996–2006
|-
| 3 ||align=left| [[Carlos Humberto Toledo|Carlos Toledo]] || 25 || 1943–1953
|-
| rowspan=2| 4 ||align=left| [[Mario Camposeco]] || 23 || 1943–1951
|-
| align=left| [[Freddy García (footballer)|Freddy García]] || 23 || 1998–2012
|-
| 6 ||align=left| [[Oscar Enrique Sánchez]] || 19 || 1976–1990
|-
| rowspan=3| 7 ||align=left| [[Dwight Pezzarossi]] || 16 || 2000–2012
|-
| align=left| [[Edwin Westphal]] || 16 || 1985–1998
|-
| align=left| [[Guillermo Ramírez]] * || 16 || 1997–2012
|-
| 10 ||align=left| [[Juan Manuel Funes]] || 15 || 1985–2000
|}
{{small|Players in bold text are still active with Guatemala.}}<br>
{{small|* Banned from Football on suspicions of fixing match results.}}<ref name="auto"/>
{{col-end}}
===Previous squads===
;CONCACAF Gold Cup
* [[1991 CONCACAF Gold Cup squads#_Guatemala|1991 CONCACAF Gold Cup squad]]
* [[1996 CONCACAF Gold Cup squads#_Guatemala|1996 CONCACAF Gold Cup squad]]
* [[1998 CONCACAF Gold_Cup squads#Guatemala|1998 CONCACAF Gold Cup squad]]
* [[2000 CONCACAF Gold Cup squads#Guatemala|2000 CONCACAF Gold Cup squad]]
* [[2002 CONCACAF Gold Cup squads#_Guatemala|2002 CONCACAF Gold Cup squad]]
* [[2003 CONCACAF Gold Cup squads#_Guatemala|2003 CONCACAF Gold Cup squad]]
* [[2005 CONCACAF Gold Cup squads#_Guatemala|2005 CONCACAF Gold Cup squad]]
* [[2007 CONCACAF Gold Cup squads#Guatemala|2007 CONCACAF Gold Cup squad]]
* [[2011 CONCACAF Gold Cup squads#Guatemala|2011 CONCACAF Gold Cup squad]]
* [[2015 CONCACAF Gold Cup squads#_Guatemala|2015 CONCACAF Gold Cup squad]]
==Managers==
<ref>{{cite web|last=Olenev|first=Maxim |title=Guatemala National Team Coaches |url=http://www.rsssf.com/miscellaneous/guat-coach-triv.html|publisher=[[RSSSF]]|accessdate=6 January 2011|date=15 July 1999}}</ref>
{| class="wikitable" style="text-align: right;"
|-
! Name
! Period
! Matches
! Wins
! Draws
! Losses
! Winning %
! Notes
|-
|style="text-align: left;"|{{flagicon|CRC}} [[Roberto Figueredo]]
|style="text-align: left;"|1930
| 2
| 0
| 0
| 2
| 00.0%
|<ref name="prensalibre.com">{{cite web|url=http://www.prensalibre.com/especiales/ME/guatefut/03.html|archiveurl=https://web.archive.org/web/20061119225549/http://www.prensalibre.com/especiales/ME/guatefut/03.html|title=Guatemala, 100 años de Fútbol|archivedate=19 November 2006|work=prensalibre.com}}</ref>
|-
|style="text-align: left;"|{{flagicon|ENG}} [[Jimmy Elliott (footballer)|Jimmy Elliott]]
|style="text-align: left;"|1935
| 5
| 0
| 1
| 4
| 20.0%
|<ref name="prensalibre.com"/>
|-
|style="text-align: left;"|{{flagicon|GUA}} [[Manuel Felipe Carrera]]
|style="text-align: left;"|1943
| 6
| 4
| 1
| 1
| 66.7%
|style="text-align: left;"|[[1943 CCCF Championship]] 2nd place<ref name="prensalibre.com1">{{cite web|url=http://www.prensalibre.com/especiales/ME/guatefut/04.html|archiveurl=https://web.archive.org/web/20061119225609/http://www.prensalibre.com/especiales/ME/guatefut/04.html|title=Guatemala, 100 años de Fútbol|archivedate=19 November 2006|work=prensalibre.com}}</ref>
|-
|style="text-align: left;"|{{flagicon|GUA}} [[Juan Francisco Aguirre]]
|style="text-align: left;"|1946
| 5
| 3
| 1
| 1
| 60.0%
|<ref name="prensalibre.com1"/>
|-
|style="text-align: left;"|{{flagicon|GUA}} Juan Francisco Aguirre<br/>{{flagicon|GUA}} Manuel Felipe Carrera
|style="text-align: left;"|1946
| 6
| 1
| 1
| 4
| 16.7%
|<ref name="prensalibre.com1"/>
|-
|style="text-align: left;"|{{flagicon|ARG}} [[José Alberto Cevasco]]
|style="text-align: left;"|1948
| 8
| 3
| 4
| 1
| 37.5%
|style="text-align: left;"|[[1948 CCCF Championship]] 2nd place<ref name="prensalibre.com1"/><ref>{{cite web|url=http://www.prensalibre.com/especiales/ME/guatefut/15.html|archiveurl=https://web.archive.org/web/20061119225522/http://www.prensalibre.com/especiales/ME/guatefut/15.html|title=Guatemala, 100 años de Fútbol|archivedate=19 November 2006|work=prensalibre.com}}</ref>
|-
|style="text-align: left;"|{{flagicon|ARG}} [[Enrique Natalio Pascal Palomini]]
|style="text-align: left;"|1950
| 6
| 3
| 1
| 2
| 50.0%
|<ref>{{cite web|url=http://www.prensalibre.com/especiales/ME/guatefut/05.html|archiveurl=https://web.archive.org/web/20061119225650/http://www.prensalibre.com/especiales/ME/guatefut/05.html|title=Guatemala, 100 años de Fútbol|archivedate=19 November 2006|work=prensalibre.com}}</ref>
|-
|style="text-align: left;"|{{flagicon|GUA}} Juan Francisco Aguirre
|style="text-align: left;"|1953
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|ARG}} [[Alfredo Cuevas]]
|style="text-align: left;"|1955–1957
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|ARG}} José Alberto Cevasco
|style="text-align: left;"|1960–1961
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|ESP|1945}} [[Lorenzo Ausina Tur]]
|style="text-align: left;"|1963
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|ARG}} [[César Viccino]]
|style="text-align: left;"|1965
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|URU}} [[Rubén Amorín]]
|style="text-align: left;"|1967
|
|
|
|
|
|style="text-align: left;"|[[1967 CONCACAF Championship]]
|-
|style="text-align: left;"|{{flagicon|ARG}} César Viccino
|style="text-align: left;"|1968–1969
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|ESP|1945}} Lorenzo Ausina Tur
|style="text-align: left;"|1969
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|ARG}} [[Carmelo Faraone]]
|style="text-align: left;"|1971
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|ITA}} {{flagicon|ARG}} Afro Geronazzo
|style="text-align: left;"|1971–1972
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|URU}} Rubén Amorín
|style="text-align: left;"|1972
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|CHI}} [[Néstor Valdez Moraga]]
|style="text-align: left;"|1972
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|URU}} Rubén Amorín
|style="text-align: left;"|1976
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|ARG}} [[Carlos Cavagnaro]]
|style="text-align: left;"|1976
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|GUA}} [[Carlos Wellmann]]
|style="text-align: left;"|1976
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|GUA}} [[José Ernesto Romero]]
|style="text-align: left;"|1979
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|URU}} Rubén Amorín
|style="text-align: left;"|1980
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|ARG}} Carlos Cavagnaro
|style="text-align: left;"|1983
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|YUG}} [[Dragoslav Šekularac]]
|style="text-align: left;"|1984–1985
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|URU}} [[Julio César Cortés]]
|style="text-align: left;"|1987
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|GUA}} [[Jorge Roldán]]
|style="text-align: left;"|1988
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|URU}} Rubén Amorín
|style="text-align: left;"|1989–1990
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|GUA}} Haroldo Cordón
|style="text-align: left;"|1991
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|ARG}} [[Miguel Angel Brindisi]]
|style="text-align: left;"|1992
|
|
|
|
|
|
|-
|style="text-align: left;"|{{flagicon|GUA}} Jorge Roldán
|style="text-align: left;"|1995
|
|
|
|
|
|style="text-align: left;"|[[UNCAF Nations Cup 1995|1995 UNCAF Nations Cup]] 2nd place
|-
|style="text-align: left;"|{{flagicon|ARG}} [[Juan Ramón Verón]]
|style="text-align: left;"|1996
| 11
| 6
| 1
| 4
| 54.6%
|
|-
|style="text-align: left;"|{{flagicon|ARG}} [[Horacio Cordero]]
|style="text-align: left;"|1996
| 18
| 7
| 5
| 6
| 48.1%
|
|-
|style="text-align: left;"|{{flagicon|ARG}} [[Miguel Angel Brindisi]]
|style="text-align: left;"|1997–1998
| 23
| 9
| 11
| 3
| 39.1%
|style="text-align: left;"|[[UNCAF Nations Cup 1997|1997 UNCAF Nations Cup]] 2nd place
|-
|style="text-align: left;"|{{flagicon|ARG}} [[Carlos Bilardo]]<br />{{flagicon|ARG}} [[Eduardo Luján Manera]]
|style="text-align: left;"|1998
| 8
| 2
| 3
| 3
| 25.0%
|
|-
|style="text-align: left;"|{{flagicon|GUA}} [[Benjamín Monterroso]]
|style="text-align: left;"|1999
| 11
| 4
| 2
| 5
| 36.4%
|style="text-align: left;"|[[UNCAF Nations Cup 1999|1999 UNCAF Nations Cup]] 2nd place
|-
|style="text-align: left;"|{{flagicon|URU}} [[Carlos Miloc]]
|style="text-align: left;"|2000
| 5
| 0
| 3
| 2
| 0.0%
|
|-
|style="text-align: left;"|{{flagicon|URU}} [[Julio César Cortés]]
|style="text-align: left;"|2000–2003
| 33
| 13
| 12
| 7
| 39.4%
|style="text-align: left;"|[[UNCAF Nations Cup 2001|2001 UNCAF Nations Cup]] <br/>[[UNCAF Nations Cup 2003|2003 UNCAF Nations Cup]] (Runner-up)
|-
|style="text-align: left;"|{{flagicon|MEX}} [[Víctor Manuel Aguado]]
|style="text-align: left;"|2003
| 7
| 1
| 2
| 4
| 14.3%
|
|-
|style="text-align: left;"|{{flagicon|HON}} [[Ramón Maradiaga]]
|style="text-align: left;"|2004–2005
| 42
| 17
| 9
| 16
| 40.5%
|
|-
|style="text-align: left;"|{{flagicon|COL}} [[Hernán Darío Gómez]]
|style="text-align: left;"|2006–2008
| 21
| 5
| 4
| 12
| 23.8%
|
|-
|style="text-align: left;"|{{flagicon|HON}} [[Ramón Maradiaga]]
|style="text-align: left;"|2008
| 5
| 2
| 1
| 2
| 50.0%
|
|-
|style="text-align: left;"|{{flagicon|GUA}} [[Benjamín Monterroso]]
|style="text-align: left;"|2008–2009
|5
|1
|0
|4
|20.0%
|
|-
|style="text-align: left;"|{{flagicon|Uruguay}} [[Ever Hugo Almeida]]
|style="text-align: left;"|2010–2013
|40
|16
|7
|17
|45.8%
|
|-
|style="text-align: left;"|{{flagicon|GUA}} [[Víctor Hugo Monzón]]
|style="text-align: left;"|2013
|4
|0
|1
|3
|11.1%
|
|-
|style="text-align: left;"|{{flagicon|CHI}} [[Sergio Pardo]]<ref>{{cite web|url=http://www.latercera.com/noticia/deportes/2013/08/656-536973-9-la-historia-del-chileno-que-sera-el-tecnico-de-la-seleccion-de-guatemala.shtml|title=La historia del chileno que será el técnico de la selección de Guatemala|date=9 August 2013|access-date=7 July 2020|archive-date=10 August 2013|archive-url=https://web.archive.org/web/20130810001154/http://www.latercera.com/noticia/deportes/2013/08/656-536973-9-la-historia-del-chileno-que-sera-el-tecnico-de-la-seleccion-de-guatemala.shtml|url-status=dead}}</ref>
|style="text-align: left;"|2013-2014
|1
|0
|0
|1
|0.0%
|
|-
|style="text-align: left;"|{{flagicon|ARG}} [[Ivan Franco Sopegno]]
|style="text-align: left;"|2014–2015
|23
|9
|4
|10
|44.9%
|style="text-align: left;"|[[2014 Copa Centroamericana]] (Runner-up)
|-
|style="text-align: left;"|{{flagicon|GUA}} [[Walter Claverí]]
|style="text-align: left;"|2016–2019
|11
|4
|2
|5
|40%
|
|-
|style="text-align: left;"|{{flagicon|GUA}} [[Amarini Villatoro]]
|2019-Present
|8
|5
|1
|2
|76%
|
|}
<br />
==Honors==
* '''[[CONCACAF Gold Cup|CONCACAF Championship]]'''
:''Champions (1):'' [[1967 CONCACAF Championship|1967]]
:''Runners-up (2):'' [[1965 CONCACAF Championship|1965]], [[1969 CONCACAF Championship|1969]]
* '''[[Copa Centroamericana]]'''
:''Champions (1):'' [[2001 UNCAF Nations Cup|2001]]
:''Runners-up (5):'' [[1995 UNCAF Nations Cup|1995]], [[1997 UNCAF Nations Cup|1997]], [[1999 UNCAF Nations Cup|1999]], [[2003 UNCAF Nations Cup|2003]], [[2014 Copa Centroamericana|2014]]
:''Third Place (3):'' [[1991 UNCAF Nations Cup|1991]], [[2005 UNCAF Nations Cup|2005]], [[2007 UNCAF Nations Cup|2007]]
* '''[[CONCACAF Men's Pre-Olympic Tournament]]'''
:''Silver Medal (2):''[[CONCACAF Men's Pre-Olympic Tournament|1976]], [[CONCACAF Men's Pre-Olympic Tournament|1988]]
* '''[[Football at the Pan American Games|Pan American Games]]'''
:''Bronze Medal (1):'' [[Football at the 1983 Pan American Games|1983]]
* '''[[U.S. Cup]]'''
:''Third Place (1):'' [[1999 U.S. Cup|1999]]
==See also==
{{portal|Association football|Guatemala}}
* [[Guatemala national under-20 football team]]
* [[Guatemala national under-17 football team]]
* [[Liga Nacional de Guatemala]]
==References==
{{Reflist|30em}}
==External links==
* [http://www.fedefutguate.org/ Official website] {{in lang|es}}
* [http://guatefutbol.com GuateFutbol.com] {{in lang|es}}
{{Navboxes colour
| title=Guatemala squads – CONCACAF Gold Cup
| bg = #4997D0
| fg = white
| bordercolor = #0062AA
|list1=
{{Guatemala squad 1991 CONCACAF Gold Cup}}
{{Guatemala squad 1996 CONCACAF Gold Cup}}
{{Guatemala squad 1998 CONCACAF Gold Cup}}
{{Guatemala squad 2000 CONCACAF Gold Cup}}
{{Guatemala squad 2002 CONCACAF Gold Cup}}
{{Guatemala squad 2003 CONCACAF Gold Cup}}
{{Guatemala squad 2005 CONCACAF Gold Cup}}
{{Guatemala squad 2007 CONCACAF Gold Cup}}
{{Guatemala squad 2011 CONCACAF Gold Cup}}
{{Guatemala squad 2015 CONCACAF Gold Cup}}
}}
{{Football in Guatemala}}
{{CONCACAF teams}}
{{National sports teams of Guatemala}}
{{CONCACAF Gold Cup Winners}}
{{DEFAULTSORT:Guatemala National Football Team}}
[[Category:Guatemala national football team| ]]
[[Category:Central American national association football teams]]
<noinclude>
<small>This page was moved from [[:en:Guatemala national football team]]. Its edit history can be viewed at [[Guatemala national football team/edithistory]]</small></noinclude>
sidymdoqzvlbigt09jj7srqgf8xenir
Module:Documentation/styles.css
828
117411
665079
613554
2025-02-22T07:52:19Z
en>Taavi
0
use codex tokens for borders to improve dark mode support
665079
sanitized-css
text/css
/* {{pp|small=yes}} */
.documentation,
.documentation-metadata {
border: 1px solid var( --border-color-base, #a2a9b1 );
background-color: #ecfcf4;
clear: both;
}
.documentation {
margin: 1em 0 0 0;
padding: 1em;
}
.documentation-metadata {
margin: 0.2em 0; /* same margin left-right as .documentation */
font-style: italic;
padding: 0.4em 1em; /* same padding left-right as .documentation */
}
.documentation-startbox {
padding-bottom: 3px;
border-bottom: 1px solid var( --border-color-base, #a2a9b1 );
margin-bottom: 1ex;
}
.documentation-heading {
font-weight: bold;
font-size: 125%;
}
.documentation-clear { /* Don't want things to stick out where they shouldn't. */
clear: both;
}
.documentation-toolbar {
font-style: normal;
font-size: 85%;
}
@media screen {
html.skin-theme-clientpref-night .documentation,
html.skin-theme-clientpref-night .documentation-metadata {
background-color: #0b1e1c;
}
}
@media screen and ( prefers-color-scheme: dark ) {
html.skin-theme-clientpref-os .documentation,
html.skin-theme-clientpref-os .documentation-metadata {
background-color: #0b1e1c;
}
}
i8lops10ml7ifgplup23473ri87jccv
665080
665079
2025-07-02T01:47:19Z
Novem Linguae
49714
1 revision imported from [[:en:Module:Documentation/styles.css]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665079
sanitized-css
text/css
/* {{pp|small=yes}} */
.documentation,
.documentation-metadata {
border: 1px solid var( --border-color-base, #a2a9b1 );
background-color: #ecfcf4;
clear: both;
}
.documentation {
margin: 1em 0 0 0;
padding: 1em;
}
.documentation-metadata {
margin: 0.2em 0; /* same margin left-right as .documentation */
font-style: italic;
padding: 0.4em 1em; /* same padding left-right as .documentation */
}
.documentation-startbox {
padding-bottom: 3px;
border-bottom: 1px solid var( --border-color-base, #a2a9b1 );
margin-bottom: 1ex;
}
.documentation-heading {
font-weight: bold;
font-size: 125%;
}
.documentation-clear { /* Don't want things to stick out where they shouldn't. */
clear: both;
}
.documentation-toolbar {
font-style: normal;
font-size: 85%;
}
@media screen {
html.skin-theme-clientpref-night .documentation,
html.skin-theme-clientpref-night .documentation-metadata {
background-color: #0b1e1c;
}
}
@media screen and ( prefers-color-scheme: dark ) {
html.skin-theme-clientpref-os .documentation,
html.skin-theme-clientpref-os .documentation-metadata {
background-color: #0b1e1c;
}
}
i8lops10ml7ifgplup23473ri87jccv
Module:Infobox/styles.css
828
122432
665071
629912
2025-06-16T15:26:13Z
en>Izno
0
per talk page
665071
sanitized-css
text/css
/* {{pp|small=y}} */
/*
* This TemplateStyles sheet deliberately does NOT include the full set of
* infobox styles. We are still working to migrate all of the manual
* infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]]
* DO NOT ADD THEM HERE
*/
/*
* not strictly certain these styles are necessary since the modules now
* exclusively output infobox-subbox or infobox, not both
* just replicating the module faithfully
*/
.infobox-subbox {
padding: 0;
border: none;
margin: -3px;
width: auto;
min-width: 100%;
font-size: 100%;
clear: none;
float: none;
background-color: transparent;
}
.infobox-3cols-child {
margin: auto;
}
.infobox .navbar {
font-size: 100%;
}
/* Dark theme: [[William_Wragg]], [[Coral_Castle]] */
@media screen {
html.skin-theme-clientpref-night .infobox-full-data:not(.notheme) > div:not(.notheme)[style] {
background: #1f1f23 !important;
/* switch with var( --color-base ) when supported. */
color: #f8f9fa;
}
}
@media screen and ( prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .infobox-full-data:not(.notheme) > div:not(.notheme)[style] {
background: #1f1f23 !important;
/* switch with var( --color-base ) when supported. */
color: #f8f9fa;
}
}
/* Since infobox is a table, many infobox templates take advantage of this to
* add columns and rows to the infobox itself rather than as part of a new table
* inside them. This class should be discouraged and removed on the long term,
* but allows us to at least identify these tables going forward
* Currently in use on: [[Module:Infobox3cols]]
* Fixes issue described in [[phab:F55300125]] on Vector 2022.
*/
@media (min-width: 640px) {
body.skin--responsive .infobox-table {
display: table !important;
}
body.skin--responsive .infobox-table > caption {
display: table-caption !important;
}
body.skin--responsive .infobox-table > tbody {
display: table-row-group;
}
body.skin--responsive .infobox-table th,
body.skin--responsive .infobox-table td {
padding-left: inherit;
padding-right: inherit;
}
}
ed9hwgdet8h6h2bc3c9iiv47kgu74p6
665072
665071
2025-07-02T01:47:17Z
Novem Linguae
49714
1 revision imported from [[:en:Module:Infobox/styles.css]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665071
sanitized-css
text/css
/* {{pp|small=y}} */
/*
* This TemplateStyles sheet deliberately does NOT include the full set of
* infobox styles. We are still working to migrate all of the manual
* infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]]
* DO NOT ADD THEM HERE
*/
/*
* not strictly certain these styles are necessary since the modules now
* exclusively output infobox-subbox or infobox, not both
* just replicating the module faithfully
*/
.infobox-subbox {
padding: 0;
border: none;
margin: -3px;
width: auto;
min-width: 100%;
font-size: 100%;
clear: none;
float: none;
background-color: transparent;
}
.infobox-3cols-child {
margin: auto;
}
.infobox .navbar {
font-size: 100%;
}
/* Dark theme: [[William_Wragg]], [[Coral_Castle]] */
@media screen {
html.skin-theme-clientpref-night .infobox-full-data:not(.notheme) > div:not(.notheme)[style] {
background: #1f1f23 !important;
/* switch with var( --color-base ) when supported. */
color: #f8f9fa;
}
}
@media screen and ( prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .infobox-full-data:not(.notheme) > div:not(.notheme)[style] {
background: #1f1f23 !important;
/* switch with var( --color-base ) when supported. */
color: #f8f9fa;
}
}
/* Since infobox is a table, many infobox templates take advantage of this to
* add columns and rows to the infobox itself rather than as part of a new table
* inside them. This class should be discouraged and removed on the long term,
* but allows us to at least identify these tables going forward
* Currently in use on: [[Module:Infobox3cols]]
* Fixes issue described in [[phab:F55300125]] on Vector 2022.
*/
@media (min-width: 640px) {
body.skin--responsive .infobox-table {
display: table !important;
}
body.skin--responsive .infobox-table > caption {
display: table-caption !important;
}
body.skin--responsive .infobox-table > tbody {
display: table-row-group;
}
body.skin--responsive .infobox-table th,
body.skin--responsive .infobox-table td {
padding-left: inherit;
padding-right: inherit;
}
}
ed9hwgdet8h6h2bc3c9iiv47kgu74p6
NovemTest2
0
123149
665175
491881
2025-07-02T09:23:47Z
Novem Linguae
49714
Requesting speedy deletion ([[WP:CSD#G10|CSD G10]]).
665175
wikitext
text/x-wiki
{{db-negublp}}
h30iw049it6whodzjf758ghn3qvkuug
665176
665175
2025-07-02T09:24:08Z
Novem Linguae
49714
Undo revision [[Special:Diff/665175|665175]] by [[Special:Contributions/Novem Linguae|Novem Linguae]] ([[User talk:Novem Linguae|talk]])
665176
wikitext
text/x-wiki
Hello
syvtbocopvw4f81bf07ocly0sl8ybqo
Module:Navbox/configuration
828
123781
665123
650552
2025-06-17T20:06:13Z
en>Ahecht
0
Fix type (colhfooterstyle → colfooterstyle)
665123
Scribunto
text/plain
return {
aria_label = 'Navbox',
nowrap_item = '%s<span class="nowrap">%s</span>',
templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' }
},
hlist_templatestyles = 'Hlist/styles.css',
plainlist_templatestyles = 'Plainlist/styles.css',
-- do not localize marker table
marker = {
oddeven = '\127_ODDEVEN_\127',
restart = '\127_ODDEVEN0_\127',
regex = '\127_ODDEVEN(%d?)_\127'
},
category = {
orphan = '[[Category:Navbox orphans]]',
horizontal_lists = 'Navigational boxes without horizontal lists',
background_colors = 'Navboxes using background colours',
illegible = 'Potentially illegible navboxes',
borders = 'Navboxes using borders',
without_first_col = '[[Category:Pages using navbox columns without the first column]]'
},
keyword = {
border_subgroup = 'subgroup',
border_child = 'child',
border_none = 'none',
evenodd_swap = 'swap',
navbar_off = 'off',
navbar_plain = 'plain',
nocat_false = 'false',
nowrapitems_yes = 'yes',
orphan_yes = 'yes',
state_collapsed = 'collapsed',
state_off = 'off',
state_plain = 'plain',
state_uncollapsed = 'uncollapsed',
subgroups = {'subgroup', 'child', ''},
subpage_doc = 'doc',
subpage_sandbox = 'sandbox',
subpage_testcases = 'testcases',
tracking_no = 'no',
with_collapsible_groups = 'with collapsible groups',
with_columns = 'with columns',
},
class = {
autocollapse = 'autocollapse',
collapsible = 'mw-collapsible',
collapsed = 'mw-collapsed',
-- Warning
navbox = 'navbox', -- WMF currently hides 'navbox' from mobile,
-- so you probably shouldn't change the navbox class.
navbox_abovebelow = 'navbox-abovebelow',
navbox_group = 'navbox-group',
navbox_image = 'navbox-image',
navbox_inner = 'navbox-inner',
navbox_list = 'navbox-list',
navbox_list_with_group = 'navbox-list-with-group',
navbox_part = 'navbox-', -- do not l10n
navbox_styles = 'navbox-styles',
navbox_subgroup = 'navbox-subgroup',
navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below
navbox_odd_part = 'odd', -- do not l10n
navbox_even_part = 'even', -- do not l10n
nomobile = 'nomobile',
nowraplinks = 'nowraplinks',
noviewer = 'noviewer', -- used to remove images from MediaViewer
notheme = 'notheme'
},
pattern = {
class = 'class',
colnum = '^col(%d+)$',
colheadernum = '^col(%d+)header$',
colfooternum = '^col(%d+)footer$',
contentnum = '^content(%d+)$',
groupnum = '^group(%d+)$',
hlist = 'hlist',
listnum = '^list(%d+)$',
navbox = 'Template:Navbox',
navbox_title = '<th[^>]*"navbox%-title"',
nowrap = '^<span class="nowrap">',
num = '^%a+(%d+)$',
plainlist = 'plainlist',
sandbox = '/sandbox$',
sectionnum = '^section(%d+)$',
sectnum = '^sect(%d+)$',
style = 'style$',
with_collapsible_groups = 'Template:Navbox with collapsible groups',
with_columns = 'Template:Navbox with columns',
},
arg = {
abbr_and_num = 'abbr%d',
above = 'above',
aboveclass = 'aboveclass',
abovestyle = 'abovestyle',
basestyle = 'basestyle',
below = 'below',
belowclass = 'belowclass',
belowstyle = 'belowstyle',
bodyclass = 'bodyclass',
bodystyle = 'bodystyle',
border = 'border',
content_and_num = 'content%d',
contentstyle = 'contentstyle',
contentstyle_and_num = 'content%dstyle',
colheaderstyle = 'colheaderstyle',
colheader_and_num = 'col%dheader',
colheaderstyle_and_num = 'col%dheaderstyle',
colheadercolspan_and_num = 'col%dheadercolspan',
colstyle = 'colstyle',
col_and_num = 'col%d',
colstyle_and_num = 'col%dstyle',
colwidth = 'colwidth',
colwidth_and_num = 'col%dwidth',
colfooterstyle = 'colfooterstyle',
colfooter_and_num = 'col%dfooter',
colfooterstyle_and_num = 'col%dfooterstyle',
colfootercolspan_and_num = 'col%dfootercolspan',
coltablestyle = 'coltablestyle',
evencolstyle = 'evencolstyle',
evenodd = 'evenodd',
evenstyle = 'evenstyle',
fullwidth = 'fullwidth',
group1 = 'group1',
group2 = 'group2',
group_and_num = 'group%d',
groupclass = 'groupclass',
groupstyle = 'groupstyle',
groupstyle_and_num = 'group%dstyle',
groupwidth = 'groupwidth',
image = 'image',
image_and_num = 'image%d',
imageclass = 'imageclass',
imageleft = 'imageleft',
imageleft_and_num = 'imageleft%d',
imageleftstyle = 'imageleftstyle',
imagestyle = 'imagestyle',
innerstyle = 'innerstyle',
list1padding = 'list1padding',
list_and_num = 'list%d',
listclass = 'listclass',
listclass_and_num = 'list%dclass',
listpadding = 'listpadding',
liststyle = 'liststyle',
liststyle_and_num = 'list%dstyle',
name = 'name',
navbar = 'navbar',
navboxclass = 'navboxclass',
nocat = 'nocat',
nowrapitems = 'nowrapitems',
oddcolstyle = 'oddcolstyle',
oddstyle = 'oddstyle',
orphan = 'orphan',
padding = 'padding',
sect_and_num = 'sect%d',
section_and_num = 'section%d',
sectiontitlestyle_and_num = 'section%dtitlestyle',
secttitlestyle = 'secttitlestyle',
selected = 'selected',
state = 'state',
state_and_num = 'state%d',
style = 'style',
subgroups_and_num = {'subgroup%d', 'child%d', '%d'},
templatestyles = 'templatestyles',
child_templatestyles = 'child templatestyles',
title = 'title',
titleclass = 'titleclass',
titlestyle = 'titlestyle',
tracking = 'tracking',
},
-- names of navbar arguments
navbar = {
name = 1,
fontstyle = 'fontstyle',
mini = 'mini'
}
}
0k99w2evbl4a1tw2cv5rius1j58gss6
665124
665123
2025-07-02T04:53:21Z
Novem Linguae
49714
1 revision imported from [[:en:Module:Navbox/configuration]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665123
Scribunto
text/plain
return {
aria_label = 'Navbox',
nowrap_item = '%s<span class="nowrap">%s</span>',
templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' }
},
hlist_templatestyles = 'Hlist/styles.css',
plainlist_templatestyles = 'Plainlist/styles.css',
-- do not localize marker table
marker = {
oddeven = '\127_ODDEVEN_\127',
restart = '\127_ODDEVEN0_\127',
regex = '\127_ODDEVEN(%d?)_\127'
},
category = {
orphan = '[[Category:Navbox orphans]]',
horizontal_lists = 'Navigational boxes without horizontal lists',
background_colors = 'Navboxes using background colours',
illegible = 'Potentially illegible navboxes',
borders = 'Navboxes using borders',
without_first_col = '[[Category:Pages using navbox columns without the first column]]'
},
keyword = {
border_subgroup = 'subgroup',
border_child = 'child',
border_none = 'none',
evenodd_swap = 'swap',
navbar_off = 'off',
navbar_plain = 'plain',
nocat_false = 'false',
nowrapitems_yes = 'yes',
orphan_yes = 'yes',
state_collapsed = 'collapsed',
state_off = 'off',
state_plain = 'plain',
state_uncollapsed = 'uncollapsed',
subgroups = {'subgroup', 'child', ''},
subpage_doc = 'doc',
subpage_sandbox = 'sandbox',
subpage_testcases = 'testcases',
tracking_no = 'no',
with_collapsible_groups = 'with collapsible groups',
with_columns = 'with columns',
},
class = {
autocollapse = 'autocollapse',
collapsible = 'mw-collapsible',
collapsed = 'mw-collapsed',
-- Warning
navbox = 'navbox', -- WMF currently hides 'navbox' from mobile,
-- so you probably shouldn't change the navbox class.
navbox_abovebelow = 'navbox-abovebelow',
navbox_group = 'navbox-group',
navbox_image = 'navbox-image',
navbox_inner = 'navbox-inner',
navbox_list = 'navbox-list',
navbox_list_with_group = 'navbox-list-with-group',
navbox_part = 'navbox-', -- do not l10n
navbox_styles = 'navbox-styles',
navbox_subgroup = 'navbox-subgroup',
navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below
navbox_odd_part = 'odd', -- do not l10n
navbox_even_part = 'even', -- do not l10n
nomobile = 'nomobile',
nowraplinks = 'nowraplinks',
noviewer = 'noviewer', -- used to remove images from MediaViewer
notheme = 'notheme'
},
pattern = {
class = 'class',
colnum = '^col(%d+)$',
colheadernum = '^col(%d+)header$',
colfooternum = '^col(%d+)footer$',
contentnum = '^content(%d+)$',
groupnum = '^group(%d+)$',
hlist = 'hlist',
listnum = '^list(%d+)$',
navbox = 'Template:Navbox',
navbox_title = '<th[^>]*"navbox%-title"',
nowrap = '^<span class="nowrap">',
num = '^%a+(%d+)$',
plainlist = 'plainlist',
sandbox = '/sandbox$',
sectionnum = '^section(%d+)$',
sectnum = '^sect(%d+)$',
style = 'style$',
with_collapsible_groups = 'Template:Navbox with collapsible groups',
with_columns = 'Template:Navbox with columns',
},
arg = {
abbr_and_num = 'abbr%d',
above = 'above',
aboveclass = 'aboveclass',
abovestyle = 'abovestyle',
basestyle = 'basestyle',
below = 'below',
belowclass = 'belowclass',
belowstyle = 'belowstyle',
bodyclass = 'bodyclass',
bodystyle = 'bodystyle',
border = 'border',
content_and_num = 'content%d',
contentstyle = 'contentstyle',
contentstyle_and_num = 'content%dstyle',
colheaderstyle = 'colheaderstyle',
colheader_and_num = 'col%dheader',
colheaderstyle_and_num = 'col%dheaderstyle',
colheadercolspan_and_num = 'col%dheadercolspan',
colstyle = 'colstyle',
col_and_num = 'col%d',
colstyle_and_num = 'col%dstyle',
colwidth = 'colwidth',
colwidth_and_num = 'col%dwidth',
colfooterstyle = 'colfooterstyle',
colfooter_and_num = 'col%dfooter',
colfooterstyle_and_num = 'col%dfooterstyle',
colfootercolspan_and_num = 'col%dfootercolspan',
coltablestyle = 'coltablestyle',
evencolstyle = 'evencolstyle',
evenodd = 'evenodd',
evenstyle = 'evenstyle',
fullwidth = 'fullwidth',
group1 = 'group1',
group2 = 'group2',
group_and_num = 'group%d',
groupclass = 'groupclass',
groupstyle = 'groupstyle',
groupstyle_and_num = 'group%dstyle',
groupwidth = 'groupwidth',
image = 'image',
image_and_num = 'image%d',
imageclass = 'imageclass',
imageleft = 'imageleft',
imageleft_and_num = 'imageleft%d',
imageleftstyle = 'imageleftstyle',
imagestyle = 'imagestyle',
innerstyle = 'innerstyle',
list1padding = 'list1padding',
list_and_num = 'list%d',
listclass = 'listclass',
listclass_and_num = 'list%dclass',
listpadding = 'listpadding',
liststyle = 'liststyle',
liststyle_and_num = 'list%dstyle',
name = 'name',
navbar = 'navbar',
navboxclass = 'navboxclass',
nocat = 'nocat',
nowrapitems = 'nowrapitems',
oddcolstyle = 'oddcolstyle',
oddstyle = 'oddstyle',
orphan = 'orphan',
padding = 'padding',
sect_and_num = 'sect%d',
section_and_num = 'section%d',
sectiontitlestyle_and_num = 'section%dtitlestyle',
secttitlestyle = 'secttitlestyle',
selected = 'selected',
state = 'state',
state_and_num = 'state%d',
style = 'style',
subgroups_and_num = {'subgroup%d', 'child%d', '%d'},
templatestyles = 'templatestyles',
child_templatestyles = 'child templatestyles',
title = 'title',
titleclass = 'titleclass',
titlestyle = 'titlestyle',
tracking = 'tracking',
},
-- names of navbar arguments
navbar = {
name = 1,
fontstyle = 'fontstyle',
mini = 'mini'
}
}
0k99w2evbl4a1tw2cv5rius1j58gss6
User:SongVĩ.Bot II
2
124239
665042
664923
2025-07-01T17:00:19Z
SongVĩ.Bot II
52414
[[User:SongVĩ.Bot II|Task 0]]: Đã 1282 ngày...
665042
wikitext
text/x-wiki
Cập nhật lần cuối: 02-07-2025
Đã 1282 ngày...
49e2picdhgxb0n7onobbnu7auozs5ck
Module:Text
828
125125
665125
578403
2025-04-26T12:19:49Z
en>Hike395
0
update date to last edit
665125
Scribunto
text/plain
local yesNo = require("Module:Yesno")
local Text = { serial = "2024-09-21",
suite = "Text" }
--[=[
Text utilities
]=]
local function fiatQuote( apply, alien, advance )
-- Quote text
-- Parameter:
-- apply -- string, with text
-- alien -- string, with language code
-- advance -- number, with level 1 or 2
local r = apply and tostring(apply) or ""
alien = alien or "en"
advance = tonumber(advance) or 0
local suite
local data = mw.loadData('Module:Text/data')
local QuoteLang = data.QuoteLang
local QuoteType = data.QuoteType
local slang = alien:match( "^(%l+)-" )
suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"]
if suite then
local quotes = QuoteType[ suite ]
if quotes then
local space
if quotes[ 3 ] then
space = " "
else
space = ""
end
quotes = quotes[ advance ]
if quotes then
r = mw.ustring.format( "%s%s%s%s%s",
mw.ustring.char( quotes[ 1 ] ),
space,
apply,
space,
mw.ustring.char( quotes[ 2 ] ) )
end
else
mw.log( "fiatQuote() " .. suite )
end
end
return r
end -- fiatQuote()
Text.char = function ( apply, again, accept )
-- Create string from codepoints
-- Parameter:
-- apply -- table (sequence) with numerical codepoints, or nil
-- again -- number of repetitions, or nil
-- accept -- true, if no error messages to be appended
-- Returns: string
local r = ""
apply = type(apply) == "table" and apply or {}
again = math.floor(tonumber(again) or 1)
if again < 1 then
return ""
end
local bad = { }
local codes = { }
for _, v in ipairs( apply ) do
local n = tonumber(v)
if not n or (n < 32 and n ~= 9 and n ~= 10) then
table.insert(bad, tostring(v))
else
table.insert(codes, math.floor(n))
end
end
if #bad > 0 then
if not accept then
r = tostring( mw.html.create( "span" )
:addClass( "error" )
:wikitext( "bad codepoints: " .. table.concat( bad, " " )) )
end
return r
end
if #codes > 0 then
r = mw.ustring.char( unpack( codes ) )
if again > 1 then
r = r:rep(again)
end
end
return r
end -- Text.char()
local function trimAndFormat(args, fmt)
local result = {}
if type(args) ~= 'table' then
args = {args}
end
for _, v in ipairs(args) do
v = mw.text.trim(tostring(v))
if v ~= "" then
table.insert(result,fmt and mw.ustring.format(fmt, v) or v)
end
end
return result
end
Text.concatParams = function ( args, apply, adapt )
-- Concat list items into one string
-- Parameter:
-- args -- table (sequence) with numKey=string
-- apply -- string (optional); separator (default: "|")
-- adapt -- string (optional); format including "%s"
-- Returns: string
local collect = { }
return table.concat(trimAndFormat(args,adapt), apply or "|")
end -- Text.concatParams()
Text.containsCJK = function ( s )
-- Is any CJK code within?
-- Parameter:
-- s -- string
-- Returns: true, if CJK detected
s = s and tostring(s) or ""
local patternCJK = mw.loadData('Module:Text/data').PatternCJK
return mw.ustring.find( s, patternCJK ) ~= nil
end -- Text.containsCJK()
Text.removeDelimited = function (s, prefix, suffix)
-- Remove all text in s delimited by prefix and suffix (inclusive)
-- Arguments:
-- s = string to process
-- prefix = initial delimiter
-- suffix = ending delimiter
-- Returns: stripped string
s = s and tostring(s) or ""
prefix = prefix and tostring(prefix) or ""
suffix = suffix and tostring(suffix) or ""
local prefixLen = mw.ustring.len(prefix)
local suffixLen = mw.ustring.len(suffix)
if prefixLen == 0 or suffixLen == 0 then
return s
end
local i = s:find(prefix, 1, true)
local r = s
local j
while i do
j = r:find(suffix, i + prefixLen)
if j then
r = r:sub(1, i - 1)..r:sub(j+suffixLen)
else
r = r:sub(1, i - 1)
end
i = r:find(prefix, 1, true)
end
return r
end
Text.getPlain = function ( adjust )
-- Remove wikisyntax from string, except templates
-- Parameter:
-- adjust -- string
-- Returns: string
local r = Text.removeDelimited(adjust,"<!--","-->")
r = r:gsub( "(</?%l[^>]*>)", "" )
:gsub( "'''", "" )
:gsub( "''", "" )
:gsub( " ", " " )
return r
end -- Text.getPlain()
Text.isLatinRange = function (s)
-- Are characters expected to be latin or symbols within latin texts?
-- Arguments:
-- s = string to analyze
-- Returns: true, if valid for latin only
s = s and tostring(s) or "" --- ensure input is always string
local PatternLatin = mw.loadData('Module:Text/data').PatternLatin
return mw.ustring.match(s, PatternLatin) ~= nil
end -- Text.isLatinRange()
Text.isQuote = function ( s )
-- Is this character any quotation mark?
-- Parameter:
-- s = single character to analyze
-- Returns: true, if s is quotation mark
s = s and tostring(s) or ""
if s == "" then
return false
end
local SeekQuote = mw.loadData('Module:Text/data').SeekQuote
return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil
end -- Text.isQuote()
Text.listToText = function ( args, adapt )
-- Format list items similar to mw.text.listToText()
-- Parameter:
-- args -- table (sequence) with numKey=string
-- adapt -- string (optional); format including "%s"
-- Returns: string
return mw.text.listToText(trimAndFormat(args, adapt))
end -- Text.listToText()
Text.quote = function ( apply, alien, advance )
-- Quote text
-- Parameter:
-- apply -- string, with text
-- alien -- string, with language code, or nil
-- advance -- number, with level 1 or 2, or nil
-- Returns: quoted string
apply = apply and tostring(apply) or ""
local mode, slang
if type( alien ) == "string" then
slang = mw.text.trim( alien ):lower()
else
slang = mw.title.getCurrentTitle().pageLanguage
if not slang then
-- TODO FIXME: Introduction expected 2017-04
slang = mw.language.getContentLanguage():getCode()
end
end
if advance == 2 then
mode = 2
else
mode = 1
end
return fiatQuote( mw.text.trim( apply ), slang, mode )
end -- Text.quote()
Text.quoteUnquoted = function ( apply, alien, advance )
-- Quote text, if not yet quoted and not empty
-- Parameter:
-- apply -- string, with text
-- alien -- string, with language code, or nil
-- advance -- number, with level 1 or 2, or nil
-- Returns: string; possibly quoted
local r = mw.text.trim( apply and tostring(apply) or "" )
local s = mw.ustring.sub( r, 1, 1 )
if s ~= "" and not Text.isQuote( s, advance ) then
s = mw.ustring.sub( r, -1, 1 )
if not Text.isQuote( s ) then
r = Text.quote( r, alien, advance )
end
end
return r
end -- Text.quoteUnquoted()
Text.removeDiacritics = function ( adjust )
-- Remove all diacritics
-- Parameter:
-- adjust -- string
-- Returns: string; all latin letters should be ASCII
-- or basic greek or cyrillic or symbols etc.
local cleanup, decomposed
local PatternCombined = mw.loadData('Module:Text/data').PatternCombined
decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" )
cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" )
return mw.ustring.toNFC( cleanup )
end -- Text.removeDiacritics()
Text.sentenceTerminated = function ( analyse )
-- Is string terminated by dot, question or exclamation mark?
-- Quotation, link termination and so on granted
-- Parameter:
-- analyse -- string
-- Returns: true, if sentence terminated
local r
local PatternTerminated = mw.loadData('Module:Text/data').PatternTerminated
if mw.ustring.find( analyse, PatternTerminated ) then
r = true
else
r = false
end
return r
end -- Text.sentenceTerminated()
Text.ucfirstAll = function ( adjust)
-- Capitalize all words
-- Arguments:
-- adjust = string to adjust
-- Returns: string with all first letters in upper case
adjust = adjust and tostring(adjust) or ""
local r = mw.text.decode(adjust,true)
local i = 1
local c, j, m
m = (r ~= adjust)
r = " "..r
while i do
i = mw.ustring.find( r, "%W%l", i )
if i then
j = i + 1
c = mw.ustring.upper( mw.ustring.sub( r, j, j ) )
r = string.format( "%s%s%s",
mw.ustring.sub( r, 1, i ),
c,
mw.ustring.sub( r, i + 2 ) )
i = j
end
end -- while i
r = r:sub( 2 )
if m then
r = mw.text.encode(r)
end
return r
end -- Text.ucfirstAll()
Text.uprightNonlatin = function ( adjust )
-- Ensure non-italics for non-latin text parts
-- One single greek letter might be granted
-- Precondition:
-- adjust -- string
-- Returns: string with non-latin parts enclosed in <span>
local r
local data = mw.loadData('Module:Text/data')
local PatternLatin = data.PatternLatin
local RangesLatin = data.RangesLatin
local NumLatinRanges = data.NumLatinRanges
if mw.ustring.match( adjust, PatternLatin ) then
-- latin only, horizontal dashes, quotes
r = adjust
else
local c
local j = false
local k = 1
local m = false
local n = mw.ustring.len( adjust )
local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>"
local flat = function ( a )
-- isLatin
local range
-- NumLatinRanges has to be precomputed because # does not work from loadData
for i = 1, NumLatinRanges do
range = RangesLatin[ i ]
if a >= range[ 1 ] and a <= range[ 2 ] then
return true
end
end -- for i
end -- flat()
local focus = function ( a )
-- char is not ambivalent
local r = ( a > 64 )
if r then
r = ( a < 8192 or a > 8212 )
else
r = ( a == 38 or a == 60 ) -- '&' '<'
end
return r
end -- focus()
local form = function ( a )
return string.format( span,
r,
mw.ustring.sub( adjust, k, j - 1 ),
mw.ustring.sub( adjust, j, a ) )
end -- form()
r = ""
for i = 1, n do
c = mw.ustring.codepoint( adjust, i, i )
if focus( c ) then
if flat( c ) then
if j then
if m then
if i == m then
-- single greek letter.
j = false
end
m = false
end
if j then
local nx = i - 1
local s = ""
for ix = nx, 1, -1 do
c = mw.ustring.sub( adjust, ix, ix )
if c == " " or c == "(" then
nx = nx - 1
s = c .. s
else
break -- for ix
end
end -- for ix
r = form( nx ) .. s
j = false
k = i
end
end
elseif not j then
j = i
if c >= 880 and c <= 1023 then
-- single greek letter?
m = i + 1
else
m = false
end
end
elseif m then
m = m + 1
end
end -- for i
if j and ( not m or m < n ) then
r = form( n )
else
r = r .. mw.ustring.sub( adjust, k )
end
end
return r
end -- Text.uprightNonlatin()
Text.test = function ( about )
local r
if about == "quote" then
data = mw.loadData('Module:Text/data')
r = { }
r.QuoteLang = data.QuoteLang
r.QuoteType = data.QuoteType
end
return r
end -- Text.test()
-- Non Unicode-aware version of mw.text.split and mw.text.gsplit
-- based on [[phab:diffusion/ELUA/browse/master/includes/Engines/LuaCommon/lualib/mw.text.lua]]
-- These run up to 60 times faster than the Unicode-aware versions
Text.split = function ( text, pattern, plain )
local ret = {}
for m in Text.gsplit( text, pattern, plain ) do
ret[#ret+1] = m
end
return ret
end
Text.gsplit = function ( text, pattern, plain )
local s, l = 1, string.len( text )
return function ()
if s then
local e, n = string.find( text, pattern, s, plain )
local ret
if not e then
ret = string.sub( text, s )
s = nil
elseif n < e then
-- Empty separator!
ret = string.sub( text, s, e )
if e < l then
s = e + 1
else
s = nil
end
else
ret = e > s and string.sub( text, s, e - 1 ) or ''
s = n + 1
end
return ret
end
end, nil, nil
end
-- Export
local p = { }
for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do
p[func] = function (frame)
return Text[func]( frame.args[ 1 ] or "" ) and "1" or ""
end
end
for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do
p[func] = function (frame)
return Text[func]( frame.args[ 1 ] or "" )
end
end
function p.char( frame )
local params = frame:getParent().args
local story = params[ 1 ]
local codes, lenient, multiple
if not story then
params = frame.args
story = params[ 1 ]
end
if story then
local items = mw.text.split( mw.text.trim(story), "%s+" )
if #items > 0 then
local j
lenient = (yesNo(params.errors) == false)
codes = { }
multiple = tonumber( params[ "*" ] )
for _, v in ipairs( items ) do
j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v)
table.insert( codes, j or v )
end
end
end
return Text.char( codes, multiple, lenient )
end
function p.concatParams( frame )
local args
local template = frame.args.template
if type( template ) == "string" then
template = mw.text.trim( template )
template = ( template == "1" )
end
if template then
args = frame:getParent().args
else
args = frame.args
end
return Text.concatParams( args,
frame.args.separator,
frame.args.format )
end
function p.listToFormat(frame)
local lists = {}
local pformat = frame.args["format"]
local sep = frame.args["sep"] or ";"
-- Parameter parsen: Listen
for k, v in pairs(frame.args) do
local knum = tonumber(k)
if knum then lists[knum] = v end
end
-- Listen splitten
local maxListLen = 0
for i = 1, #lists do
lists[i] = mw.text.split(lists[i], sep)
if #lists[i] > maxListLen then maxListLen = #lists[i] end
end
-- Ergebnisstring generieren
local result = ""
local result_line = ""
for i = 1, maxListLen do
result_line = pformat
for j = 1, #lists do
result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1)
end
result = result .. result_line
end
return result
end
function p.listToText( frame )
local args
local template = frame.args.template
if type( template ) == "string" then
template = mw.text.trim( template )
template = ( template == "1" )
end
if template then
args = frame:getParent().args
else
args = frame.args
end
return Text.listToText( args, frame.args.format )
end
function p.quote( frame )
local slang = frame.args[2]
if type( slang ) == "string" then
slang = mw.text.trim( slang )
if slang == "" then
slang = false
end
end
return Text.quote( frame.args[ 1 ] or "",
slang,
tonumber( frame.args[3] ) )
end
function p.quoteUnquoted( frame )
local slang = frame.args[2]
if type( slang ) == "string" then
slang = mw.text.trim( slang )
if slang == "" then
slang = false
end
end
return Text.quoteUnquoted( frame.args[ 1 ] or "",
slang,
tonumber( frame.args[3] ) )
end
function p.zip(frame)
local lists = {}
local seps = {}
local defaultsep = frame.args["sep"] or ""
local innersep = frame.args["isep"] or ""
local outersep = frame.args["osep"] or ""
-- Parameter parsen
for k, v in pairs(frame.args) do
local knum = tonumber(k)
if knum then lists[knum] = v else
if string.sub(k, 1, 3) == "sep" then
local sepnum = tonumber(string.sub(k, 4))
if sepnum then seps[sepnum] = v end
end
end
end
-- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden
for i = 1, math.max(#seps, #lists) do
if not seps[i] then seps[i] = defaultsep end
end
-- Listen splitten
local maxListLen = 0
for i = 1, #lists do
lists[i] = mw.text.split(lists[i], seps[i])
if #lists[i] > maxListLen then maxListLen = #lists[i] end
end
local result = ""
for i = 1, maxListLen do
if i ~= 1 then result = result .. outersep end
for j = 1, #lists do
if j ~= 1 then result = result .. innersep end
result = result .. (lists[j][i] or "")
end
end
return result
end
function p.split(frame)
local text = frame.args.text or frame.args[1] or ''
local pattern = frame.args.pattern or frame.args[2] or ''
local plain = yesNo(frame.args.plain or frame.args[3])
local index = tonumber(frame.args.index) or tonumber(frame.args[4]) or 1
local a = Text.split(text, pattern, plain)
if index < 0 then index = #a + index + 1 end
return a[index]
end
function p.failsafe()
return Text.serial
end
p.Text = function ()
return Text
end -- p.Text
return p
651uzyv6p5vsoexbfr111b6ilkxeurw
665126
665125
2025-07-02T04:53:21Z
Novem Linguae
49714
1 revision imported from [[:en:Module:Text]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665125
Scribunto
text/plain
local yesNo = require("Module:Yesno")
local Text = { serial = "2024-09-21",
suite = "Text" }
--[=[
Text utilities
]=]
local function fiatQuote( apply, alien, advance )
-- Quote text
-- Parameter:
-- apply -- string, with text
-- alien -- string, with language code
-- advance -- number, with level 1 or 2
local r = apply and tostring(apply) or ""
alien = alien or "en"
advance = tonumber(advance) or 0
local suite
local data = mw.loadData('Module:Text/data')
local QuoteLang = data.QuoteLang
local QuoteType = data.QuoteType
local slang = alien:match( "^(%l+)-" )
suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"]
if suite then
local quotes = QuoteType[ suite ]
if quotes then
local space
if quotes[ 3 ] then
space = " "
else
space = ""
end
quotes = quotes[ advance ]
if quotes then
r = mw.ustring.format( "%s%s%s%s%s",
mw.ustring.char( quotes[ 1 ] ),
space,
apply,
space,
mw.ustring.char( quotes[ 2 ] ) )
end
else
mw.log( "fiatQuote() " .. suite )
end
end
return r
end -- fiatQuote()
Text.char = function ( apply, again, accept )
-- Create string from codepoints
-- Parameter:
-- apply -- table (sequence) with numerical codepoints, or nil
-- again -- number of repetitions, or nil
-- accept -- true, if no error messages to be appended
-- Returns: string
local r = ""
apply = type(apply) == "table" and apply or {}
again = math.floor(tonumber(again) or 1)
if again < 1 then
return ""
end
local bad = { }
local codes = { }
for _, v in ipairs( apply ) do
local n = tonumber(v)
if not n or (n < 32 and n ~= 9 and n ~= 10) then
table.insert(bad, tostring(v))
else
table.insert(codes, math.floor(n))
end
end
if #bad > 0 then
if not accept then
r = tostring( mw.html.create( "span" )
:addClass( "error" )
:wikitext( "bad codepoints: " .. table.concat( bad, " " )) )
end
return r
end
if #codes > 0 then
r = mw.ustring.char( unpack( codes ) )
if again > 1 then
r = r:rep(again)
end
end
return r
end -- Text.char()
local function trimAndFormat(args, fmt)
local result = {}
if type(args) ~= 'table' then
args = {args}
end
for _, v in ipairs(args) do
v = mw.text.trim(tostring(v))
if v ~= "" then
table.insert(result,fmt and mw.ustring.format(fmt, v) or v)
end
end
return result
end
Text.concatParams = function ( args, apply, adapt )
-- Concat list items into one string
-- Parameter:
-- args -- table (sequence) with numKey=string
-- apply -- string (optional); separator (default: "|")
-- adapt -- string (optional); format including "%s"
-- Returns: string
local collect = { }
return table.concat(trimAndFormat(args,adapt), apply or "|")
end -- Text.concatParams()
Text.containsCJK = function ( s )
-- Is any CJK code within?
-- Parameter:
-- s -- string
-- Returns: true, if CJK detected
s = s and tostring(s) or ""
local patternCJK = mw.loadData('Module:Text/data').PatternCJK
return mw.ustring.find( s, patternCJK ) ~= nil
end -- Text.containsCJK()
Text.removeDelimited = function (s, prefix, suffix)
-- Remove all text in s delimited by prefix and suffix (inclusive)
-- Arguments:
-- s = string to process
-- prefix = initial delimiter
-- suffix = ending delimiter
-- Returns: stripped string
s = s and tostring(s) or ""
prefix = prefix and tostring(prefix) or ""
suffix = suffix and tostring(suffix) or ""
local prefixLen = mw.ustring.len(prefix)
local suffixLen = mw.ustring.len(suffix)
if prefixLen == 0 or suffixLen == 0 then
return s
end
local i = s:find(prefix, 1, true)
local r = s
local j
while i do
j = r:find(suffix, i + prefixLen)
if j then
r = r:sub(1, i - 1)..r:sub(j+suffixLen)
else
r = r:sub(1, i - 1)
end
i = r:find(prefix, 1, true)
end
return r
end
Text.getPlain = function ( adjust )
-- Remove wikisyntax from string, except templates
-- Parameter:
-- adjust -- string
-- Returns: string
local r = Text.removeDelimited(adjust,"<!--","-->")
r = r:gsub( "(</?%l[^>]*>)", "" )
:gsub( "'''", "" )
:gsub( "''", "" )
:gsub( " ", " " )
return r
end -- Text.getPlain()
Text.isLatinRange = function (s)
-- Are characters expected to be latin or symbols within latin texts?
-- Arguments:
-- s = string to analyze
-- Returns: true, if valid for latin only
s = s and tostring(s) or "" --- ensure input is always string
local PatternLatin = mw.loadData('Module:Text/data').PatternLatin
return mw.ustring.match(s, PatternLatin) ~= nil
end -- Text.isLatinRange()
Text.isQuote = function ( s )
-- Is this character any quotation mark?
-- Parameter:
-- s = single character to analyze
-- Returns: true, if s is quotation mark
s = s and tostring(s) or ""
if s == "" then
return false
end
local SeekQuote = mw.loadData('Module:Text/data').SeekQuote
return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil
end -- Text.isQuote()
Text.listToText = function ( args, adapt )
-- Format list items similar to mw.text.listToText()
-- Parameter:
-- args -- table (sequence) with numKey=string
-- adapt -- string (optional); format including "%s"
-- Returns: string
return mw.text.listToText(trimAndFormat(args, adapt))
end -- Text.listToText()
Text.quote = function ( apply, alien, advance )
-- Quote text
-- Parameter:
-- apply -- string, with text
-- alien -- string, with language code, or nil
-- advance -- number, with level 1 or 2, or nil
-- Returns: quoted string
apply = apply and tostring(apply) or ""
local mode, slang
if type( alien ) == "string" then
slang = mw.text.trim( alien ):lower()
else
slang = mw.title.getCurrentTitle().pageLanguage
if not slang then
-- TODO FIXME: Introduction expected 2017-04
slang = mw.language.getContentLanguage():getCode()
end
end
if advance == 2 then
mode = 2
else
mode = 1
end
return fiatQuote( mw.text.trim( apply ), slang, mode )
end -- Text.quote()
Text.quoteUnquoted = function ( apply, alien, advance )
-- Quote text, if not yet quoted and not empty
-- Parameter:
-- apply -- string, with text
-- alien -- string, with language code, or nil
-- advance -- number, with level 1 or 2, or nil
-- Returns: string; possibly quoted
local r = mw.text.trim( apply and tostring(apply) or "" )
local s = mw.ustring.sub( r, 1, 1 )
if s ~= "" and not Text.isQuote( s, advance ) then
s = mw.ustring.sub( r, -1, 1 )
if not Text.isQuote( s ) then
r = Text.quote( r, alien, advance )
end
end
return r
end -- Text.quoteUnquoted()
Text.removeDiacritics = function ( adjust )
-- Remove all diacritics
-- Parameter:
-- adjust -- string
-- Returns: string; all latin letters should be ASCII
-- or basic greek or cyrillic or symbols etc.
local cleanup, decomposed
local PatternCombined = mw.loadData('Module:Text/data').PatternCombined
decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" )
cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" )
return mw.ustring.toNFC( cleanup )
end -- Text.removeDiacritics()
Text.sentenceTerminated = function ( analyse )
-- Is string terminated by dot, question or exclamation mark?
-- Quotation, link termination and so on granted
-- Parameter:
-- analyse -- string
-- Returns: true, if sentence terminated
local r
local PatternTerminated = mw.loadData('Module:Text/data').PatternTerminated
if mw.ustring.find( analyse, PatternTerminated ) then
r = true
else
r = false
end
return r
end -- Text.sentenceTerminated()
Text.ucfirstAll = function ( adjust)
-- Capitalize all words
-- Arguments:
-- adjust = string to adjust
-- Returns: string with all first letters in upper case
adjust = adjust and tostring(adjust) or ""
local r = mw.text.decode(adjust,true)
local i = 1
local c, j, m
m = (r ~= adjust)
r = " "..r
while i do
i = mw.ustring.find( r, "%W%l", i )
if i then
j = i + 1
c = mw.ustring.upper( mw.ustring.sub( r, j, j ) )
r = string.format( "%s%s%s",
mw.ustring.sub( r, 1, i ),
c,
mw.ustring.sub( r, i + 2 ) )
i = j
end
end -- while i
r = r:sub( 2 )
if m then
r = mw.text.encode(r)
end
return r
end -- Text.ucfirstAll()
Text.uprightNonlatin = function ( adjust )
-- Ensure non-italics for non-latin text parts
-- One single greek letter might be granted
-- Precondition:
-- adjust -- string
-- Returns: string with non-latin parts enclosed in <span>
local r
local data = mw.loadData('Module:Text/data')
local PatternLatin = data.PatternLatin
local RangesLatin = data.RangesLatin
local NumLatinRanges = data.NumLatinRanges
if mw.ustring.match( adjust, PatternLatin ) then
-- latin only, horizontal dashes, quotes
r = adjust
else
local c
local j = false
local k = 1
local m = false
local n = mw.ustring.len( adjust )
local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>"
local flat = function ( a )
-- isLatin
local range
-- NumLatinRanges has to be precomputed because # does not work from loadData
for i = 1, NumLatinRanges do
range = RangesLatin[ i ]
if a >= range[ 1 ] and a <= range[ 2 ] then
return true
end
end -- for i
end -- flat()
local focus = function ( a )
-- char is not ambivalent
local r = ( a > 64 )
if r then
r = ( a < 8192 or a > 8212 )
else
r = ( a == 38 or a == 60 ) -- '&' '<'
end
return r
end -- focus()
local form = function ( a )
return string.format( span,
r,
mw.ustring.sub( adjust, k, j - 1 ),
mw.ustring.sub( adjust, j, a ) )
end -- form()
r = ""
for i = 1, n do
c = mw.ustring.codepoint( adjust, i, i )
if focus( c ) then
if flat( c ) then
if j then
if m then
if i == m then
-- single greek letter.
j = false
end
m = false
end
if j then
local nx = i - 1
local s = ""
for ix = nx, 1, -1 do
c = mw.ustring.sub( adjust, ix, ix )
if c == " " or c == "(" then
nx = nx - 1
s = c .. s
else
break -- for ix
end
end -- for ix
r = form( nx ) .. s
j = false
k = i
end
end
elseif not j then
j = i
if c >= 880 and c <= 1023 then
-- single greek letter?
m = i + 1
else
m = false
end
end
elseif m then
m = m + 1
end
end -- for i
if j and ( not m or m < n ) then
r = form( n )
else
r = r .. mw.ustring.sub( adjust, k )
end
end
return r
end -- Text.uprightNonlatin()
Text.test = function ( about )
local r
if about == "quote" then
data = mw.loadData('Module:Text/data')
r = { }
r.QuoteLang = data.QuoteLang
r.QuoteType = data.QuoteType
end
return r
end -- Text.test()
-- Non Unicode-aware version of mw.text.split and mw.text.gsplit
-- based on [[phab:diffusion/ELUA/browse/master/includes/Engines/LuaCommon/lualib/mw.text.lua]]
-- These run up to 60 times faster than the Unicode-aware versions
Text.split = function ( text, pattern, plain )
local ret = {}
for m in Text.gsplit( text, pattern, plain ) do
ret[#ret+1] = m
end
return ret
end
Text.gsplit = function ( text, pattern, plain )
local s, l = 1, string.len( text )
return function ()
if s then
local e, n = string.find( text, pattern, s, plain )
local ret
if not e then
ret = string.sub( text, s )
s = nil
elseif n < e then
-- Empty separator!
ret = string.sub( text, s, e )
if e < l then
s = e + 1
else
s = nil
end
else
ret = e > s and string.sub( text, s, e - 1 ) or ''
s = n + 1
end
return ret
end
end, nil, nil
end
-- Export
local p = { }
for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do
p[func] = function (frame)
return Text[func]( frame.args[ 1 ] or "" ) and "1" or ""
end
end
for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do
p[func] = function (frame)
return Text[func]( frame.args[ 1 ] or "" )
end
end
function p.char( frame )
local params = frame:getParent().args
local story = params[ 1 ]
local codes, lenient, multiple
if not story then
params = frame.args
story = params[ 1 ]
end
if story then
local items = mw.text.split( mw.text.trim(story), "%s+" )
if #items > 0 then
local j
lenient = (yesNo(params.errors) == false)
codes = { }
multiple = tonumber( params[ "*" ] )
for _, v in ipairs( items ) do
j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v)
table.insert( codes, j or v )
end
end
end
return Text.char( codes, multiple, lenient )
end
function p.concatParams( frame )
local args
local template = frame.args.template
if type( template ) == "string" then
template = mw.text.trim( template )
template = ( template == "1" )
end
if template then
args = frame:getParent().args
else
args = frame.args
end
return Text.concatParams( args,
frame.args.separator,
frame.args.format )
end
function p.listToFormat(frame)
local lists = {}
local pformat = frame.args["format"]
local sep = frame.args["sep"] or ";"
-- Parameter parsen: Listen
for k, v in pairs(frame.args) do
local knum = tonumber(k)
if knum then lists[knum] = v end
end
-- Listen splitten
local maxListLen = 0
for i = 1, #lists do
lists[i] = mw.text.split(lists[i], sep)
if #lists[i] > maxListLen then maxListLen = #lists[i] end
end
-- Ergebnisstring generieren
local result = ""
local result_line = ""
for i = 1, maxListLen do
result_line = pformat
for j = 1, #lists do
result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1)
end
result = result .. result_line
end
return result
end
function p.listToText( frame )
local args
local template = frame.args.template
if type( template ) == "string" then
template = mw.text.trim( template )
template = ( template == "1" )
end
if template then
args = frame:getParent().args
else
args = frame.args
end
return Text.listToText( args, frame.args.format )
end
function p.quote( frame )
local slang = frame.args[2]
if type( slang ) == "string" then
slang = mw.text.trim( slang )
if slang == "" then
slang = false
end
end
return Text.quote( frame.args[ 1 ] or "",
slang,
tonumber( frame.args[3] ) )
end
function p.quoteUnquoted( frame )
local slang = frame.args[2]
if type( slang ) == "string" then
slang = mw.text.trim( slang )
if slang == "" then
slang = false
end
end
return Text.quoteUnquoted( frame.args[ 1 ] or "",
slang,
tonumber( frame.args[3] ) )
end
function p.zip(frame)
local lists = {}
local seps = {}
local defaultsep = frame.args["sep"] or ""
local innersep = frame.args["isep"] or ""
local outersep = frame.args["osep"] or ""
-- Parameter parsen
for k, v in pairs(frame.args) do
local knum = tonumber(k)
if knum then lists[knum] = v else
if string.sub(k, 1, 3) == "sep" then
local sepnum = tonumber(string.sub(k, 4))
if sepnum then seps[sepnum] = v end
end
end
end
-- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden
for i = 1, math.max(#seps, #lists) do
if not seps[i] then seps[i] = defaultsep end
end
-- Listen splitten
local maxListLen = 0
for i = 1, #lists do
lists[i] = mw.text.split(lists[i], seps[i])
if #lists[i] > maxListLen then maxListLen = #lists[i] end
end
local result = ""
for i = 1, maxListLen do
if i ~= 1 then result = result .. outersep end
for j = 1, #lists do
if j ~= 1 then result = result .. innersep end
result = result .. (lists[j][i] or "")
end
end
return result
end
function p.split(frame)
local text = frame.args.text or frame.args[1] or ''
local pattern = frame.args.pattern or frame.args[2] or ''
local plain = yesNo(frame.args.plain or frame.args[3])
local index = tonumber(frame.args.index) or tonumber(frame.args[4]) or 1
local a = Text.split(text, pattern, plain)
if index < 0 then index = #a + index + 1 end
return a[index]
end
function p.failsafe()
return Text.serial
end
p.Text = function ()
return Text
end -- p.Text
return p
651uzyv6p5vsoexbfr111b6ilkxeurw
Template:Transclusionless
10
125588
665104
584344
2025-01-16T10:45:44Z
en>Rose Abrams
0
clearer language when split in two sentences
665104
wikitext
text/x-wiki
{{Mbox|text=This template {{Yesno|{{{should|}}}|yes=should|no=may}} have no [[Wikipedia:Transclusion|transclusions]]. This is because {{{reason|it is substituted by a tool or script, it is used as part of a short-term or less active Wikipedia process, or for some other reason}}}.}}<!--
--><includeonly>__EXPECTUNUSEDTEMPLATE__{{#switch: {{SUBPAGENAME}} |doc |sandbox= |{{module other | [[Category:Wikipedia transclusionless modules]] | [[Category:Wikipedia transclusionless templates]] }}}}</includeonly><noinclude>{{Documentation}}</noinclude>
dhnm7ib41234205ef8y0t8duuca6jti
665105
665104
2025-07-02T04:33:35Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Transclusionless]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665104
wikitext
text/x-wiki
{{Mbox|text=This template {{Yesno|{{{should|}}}|yes=should|no=may}} have no [[Wikipedia:Transclusion|transclusions]]. This is because {{{reason|it is substituted by a tool or script, it is used as part of a short-term or less active Wikipedia process, or for some other reason}}}.}}<!--
--><includeonly>__EXPECTUNUSEDTEMPLATE__{{#switch: {{SUBPAGENAME}} |doc |sandbox= |{{module other | [[Category:Wikipedia transclusionless modules]] | [[Category:Wikipedia transclusionless templates]] }}}}</includeonly><noinclude>{{Documentation}}</noinclude>
dhnm7ib41234205ef8y0t8duuca6jti
Template:Db-deleted
10
126679
665159
584995
2025-05-09T15:38:25Z
en>Unit Mango
0
better dark mode rendering
665159
wikitext
text/x-wiki
<noinclude>
<!-- Generate the {{first article}} welcome message and the header, if appropriate. -->
</noinclude>{{<includeonly>safesubst:</includeonly>#ifexist: {{<includeonly>safesubst:</includeonly>FULLPAGENAME}}
| {{<includeonly>safesubst:</includeonly>#ifeq: {{{header|}}}
| no
|
| {{<includeonly>safesubst:</includeonly>#if: {{{header-text|}}} | =={{{header-text}}}== | ==[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] of [[{{{namespace|}}}:{{{target}}}]]== }}
}}
| {{<includeonly>safesubst:</includeonly>#if:{{{nowelcome|}}}
| {{<includeonly>safesubst:</includeonly>#ifeq: {{{header|}}}
| no
|
| {{<includeonly>safesubst:</includeonly>#if: {{{header-text|}}} | =={{{header-text}}}== | ==[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] of [[{{{namespace|}}}:{{{target}}}]]== }}
}}
| {{<includeonly>safesubst:</includeonly>first article
|namespace={{{namespace|}}}
|header={{{header|}}}
|target={{{target}}}
|nothanks={{{nothanks|}}}
}}
{{<includeonly>safesubst:</includeonly>#if: {{{header-text|}}} | =={{{header-text}}}== | ==[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] of [[{{{namespace|}}}:{{{target}}}]]== }}
}}
}}<noinclude>
<!-- Generate the message body. -->
</noinclude>
{{<includeonly>safesubst:</includeonly>#if:{{{icon|}}}|[[{{{icon}}}|48px|left|alt=|link=]]|[[File:Ambox warning pn.svg|48px|alt=Warning icon|link=]]}}{{<includeonly>safesubst:</includeonly>#ifeq:{{<includeonly>safesubst:</includeonly>lc:{{{wizard|}}}}}|yes|{{Quote box|quote=<p>If this was the first article that you created, you may want to read [[WP:Your first article|the guide to writing your first article]].</p><p>You may want to consider using the [[Wikipedia:Article wizard|Article Wizard]] to help you create articles.</p>|width=20%|align=right}}|}}
{{{text}}}
{{<includeonly>safesubst:</includeonly>#if:{{{secondparagraph|}}}|{{{secondparagraph}}}|Please do not recreate the material without addressing these concerns, but do not hesitate to add information in line with [[Wikipedia:List of policies|Wikipedia's policies and guidelines]]. If you think {{{if you think that|this page should not have been deleted for this reason}}}, {{<includeonly>safesubst:</includeonly>#ifeq: {{<includeonly>safesubst:</includeonly>lc:{{{willprovide|}}}}}|no|you may|or you wish to retrieve the deleted material for future reference or improvement, then please}} contact the {{Querylink|Special:Log|qs=type=delete&page={{<includeonly>safesubst:</includeonly>urlencode:{{{target}}}}}|deleting administrator}}{{<includeonly>safesubst:</includeonly>#ifeq: {{<includeonly>safesubst:</includeonly>lc:{{{willprovide|}}}}}|no|, or if you have already done so, you may open a discussion at [[Wikipedia:Deletion review]].|{{<includeonly>safesubst:</includeonly>#if: {{{rfudlink|}}} ||, or if you have already done so, you can place a request [[WP:RFUD|here]]}}.}}}} {{<includeonly>safesubst:</includeonly>#ifeq: {{{additionally|}}}|||Additionally {{{additionally}}}}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
6r1rcmixtw9t6pc7fs6a77ywsgmmc9m
665160
665159
2025-07-02T04:53:48Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-deleted]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665159
wikitext
text/x-wiki
<noinclude>
<!-- Generate the {{first article}} welcome message and the header, if appropriate. -->
</noinclude>{{<includeonly>safesubst:</includeonly>#ifexist: {{<includeonly>safesubst:</includeonly>FULLPAGENAME}}
| {{<includeonly>safesubst:</includeonly>#ifeq: {{{header|}}}
| no
|
| {{<includeonly>safesubst:</includeonly>#if: {{{header-text|}}} | =={{{header-text}}}== | ==[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] of [[{{{namespace|}}}:{{{target}}}]]== }}
}}
| {{<includeonly>safesubst:</includeonly>#if:{{{nowelcome|}}}
| {{<includeonly>safesubst:</includeonly>#ifeq: {{{header|}}}
| no
|
| {{<includeonly>safesubst:</includeonly>#if: {{{header-text|}}} | =={{{header-text}}}== | ==[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] of [[{{{namespace|}}}:{{{target}}}]]== }}
}}
| {{<includeonly>safesubst:</includeonly>first article
|namespace={{{namespace|}}}
|header={{{header|}}}
|target={{{target}}}
|nothanks={{{nothanks|}}}
}}
{{<includeonly>safesubst:</includeonly>#if: {{{header-text|}}} | =={{{header-text}}}== | ==[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] of [[{{{namespace|}}}:{{{target}}}]]== }}
}}
}}<noinclude>
<!-- Generate the message body. -->
</noinclude>
{{<includeonly>safesubst:</includeonly>#if:{{{icon|}}}|[[{{{icon}}}|48px|left|alt=|link=]]|[[File:Ambox warning pn.svg|48px|alt=Warning icon|link=]]}}{{<includeonly>safesubst:</includeonly>#ifeq:{{<includeonly>safesubst:</includeonly>lc:{{{wizard|}}}}}|yes|{{Quote box|quote=<p>If this was the first article that you created, you may want to read [[WP:Your first article|the guide to writing your first article]].</p><p>You may want to consider using the [[Wikipedia:Article wizard|Article Wizard]] to help you create articles.</p>|width=20%|align=right}}|}}
{{{text}}}
{{<includeonly>safesubst:</includeonly>#if:{{{secondparagraph|}}}|{{{secondparagraph}}}|Please do not recreate the material without addressing these concerns, but do not hesitate to add information in line with [[Wikipedia:List of policies|Wikipedia's policies and guidelines]]. If you think {{{if you think that|this page should not have been deleted for this reason}}}, {{<includeonly>safesubst:</includeonly>#ifeq: {{<includeonly>safesubst:</includeonly>lc:{{{willprovide|}}}}}|no|you may|or you wish to retrieve the deleted material for future reference or improvement, then please}} contact the {{Querylink|Special:Log|qs=type=delete&page={{<includeonly>safesubst:</includeonly>urlencode:{{{target}}}}}|deleting administrator}}{{<includeonly>safesubst:</includeonly>#ifeq: {{<includeonly>safesubst:</includeonly>lc:{{{willprovide|}}}}}|no|, or if you have already done so, you may open a discussion at [[Wikipedia:Deletion review]].|{{<includeonly>safesubst:</includeonly>#if: {{{rfudlink|}}} ||, or if you have already done so, you can place a request [[WP:RFUD|here]]}}.}}}} {{<includeonly>safesubst:</includeonly>#ifeq: {{{additionally|}}}|||Additionally {{{additionally}}}}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
6r1rcmixtw9t6pc7fs6a77ywsgmmc9m
Template:Linked
10
126897
665115
514637
2025-01-15T08:06:08Z
en>Dinoguy1000
0
fix "|=foo" bug
665115
wikitext
text/x-wiki
{{ safesubst:<noinclude/>#if:{{{1|}}}|{{ safesubst:<noinclude/>#switch:{{ safesubst:<noinclude/>#invoke:String2|matchAny
|^%[%[:|^%[%[|^%[|^https?://|^//|^{|source={{{1}}}|plain=false}}
| 1 | 3 = {{{1}}}
| 2 = [[:{{ safesubst:<noinclude/>#invoke:string|sub|{{{1|}}}|3|-3}}]]
| 4 | 5 = {{ safesubst:<noinclude/>#if:{{{2|}}}|[{{ safesubst:<noinclude/>#if:1|{{{1}}}}} {{{2}}}]|[{{ safesubst:<noinclude/>#if:1|{{{1}}}}}]}}
| 6 = [[:{{{1}}}]]
|#default=[[:{{ safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}{{ safesubst:<noinclude/>#if:{{{2|}}}|{{ safesubst:<noinclude/>!}}{{{2}}}}}]]
}}|{{{2|}}}}}<noinclude>{{documentation}}</noinclude>
3ad85b2eygmdhorpn4n2sbabxhv6b6o
665116
665115
2025-07-02T04:53:10Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Linked]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665115
wikitext
text/x-wiki
{{ safesubst:<noinclude/>#if:{{{1|}}}|{{ safesubst:<noinclude/>#switch:{{ safesubst:<noinclude/>#invoke:String2|matchAny
|^%[%[:|^%[%[|^%[|^https?://|^//|^{|source={{{1}}}|plain=false}}
| 1 | 3 = {{{1}}}
| 2 = [[:{{ safesubst:<noinclude/>#invoke:string|sub|{{{1|}}}|3|-3}}]]
| 4 | 5 = {{ safesubst:<noinclude/>#if:{{{2|}}}|[{{ safesubst:<noinclude/>#if:1|{{{1}}}}} {{{2}}}]|[{{ safesubst:<noinclude/>#if:1|{{{1}}}}}]}}
| 6 = [[:{{{1}}}]]
|#default=[[:{{ safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}{{ safesubst:<noinclude/>#if:{{{2|}}}|{{ safesubst:<noinclude/>!}}{{{2}}}}}]]
}}|{{{2|}}}}}<noinclude>{{documentation}}</noinclude>
3ad85b2eygmdhorpn4n2sbabxhv6b6o
Module:TemplUtl
828
148989
665046
558508
2025-07-01T17:35:33Z
PerfektesChaos
18104
2025-06-30
665046
Scribunto
text/plain
local TemplUtl = { suite = "TemplUtl",
serial = "2025-06-30",
item = 52364930 };
--[=[
Utilities to support template programming.
]=]
local Failsafe = TemplUtl;
if mw.site.server:find( ".beta.wmflabs.org", 4, true ) then
require( "Module:No Globals" )
end
local fallible = function ( adjust, ahead )
-- Check for leading character disturbing syntax
-- Precondition:
-- adjust -- string; trimmed wikitext
-- ahead -- true, if leading syntax shall start on new line
-- Postcondition:
-- Returns string, modified if necessary
local r = adjust;
local c = r:byte( 1, 1 );
local lead;
if c <= 59 and
( c==35 or c==42 or c==58 or c==59 ) then
lead = true;
elseif c == 123 or c == 124 then
local c2 = r:byte( 2, 1 );
if c == 123 and c2 == 124 then
lead = true;
elseif ahead and c == 124 and
( c2 == 43 or c2 == 45 or c2 == 125 ) then
lead = true;
end
end
if lead then
if ahead then
r = "\n" .. r;
else
r = mw.text.nowiki( r:sub( 1, 1 ) ) .. r:sub( 2 );
end
end
return r;
end -- fallible()
local fiatTitleRegExp = function ( accept )
-- Create pattern to detect page name
-- Precondition:
-- accept -- string; trimmed title
-- Postcondition:
-- Returns string with pattern
local start = mw.ustring.sub( accept, 1, 1 );
local r;
if mw.ustring.match( start, "%a" ) then
r = string.format( "[%s%s]%s",
mw.ustring.lower( start ),
mw.ustring.upper( start ),
mw.ustring.sub( accept, 2 ) );
else
r = accept;
end
if r:match( " " ) then
r = r:gsub( "%", "%%" )
:gsub( "[%-^.?+*()$]", "%$1" )
:gsub( "_", " " )
:gsub( "%s+", "[%s_]+" );
end
return r;
end -- fiatTitleRegExp()
local framing = function ( frame )
-- Ensure availability of frame object
-- Precondition:
-- frame -- object; #invoke environment, or false
-- Postcondition:
-- Return frame object
if not TemplUtl.frame then
if type( frame ) == "table" then
TemplUtl.frame = frame;
else
TemplUtl.frame = mw.getCurrentFrame();
end
end
return TemplUtl.frame;
end -- framing()
TemplUtl.facets = function ( ask, adjust )
local r = ask;
if adjust == "%" and r:find( "%%%x%x" ) then
r = mw.uri.decode( r, "PATH" );
elseif r:find( "&", 1, true ) then
r = mw.text.decode( r );
end
r = mw.ustring.gsub( r, "[%s%p%c]+", " " );
r = mw.text.trim( r );
return r;
end -- TemplUtl.facets()
TemplUtl.faculty = function ( analyze, another )
-- Test template arg for boolean
-- analyze -- string, boolean, number or nil
-- another -- fallback: string, boolean, or nil
-- "-" to test for explicit vocabulary choice
-- Returns boolean, or "-"
local s = type( analyze );
local r;
if s == "string" then
r = mw.text.trim( analyze );
if r == "" then
r = TemplUtl.faculty( another, nil );
elseif r:find( "1", 1, true ) and
r:match( "^[0%-]*1[01%-]*$" ) then
r = true;
elseif r:match( "^[0%-]+$" ) then
r = false;
else
r = r:lower();
if r == "y" or
r == "yes" or
r == "true" or
r == "on" then
r = true;
elseif r == "n" or
r == "no" or
r == "false" or
r == "off" then
r = false;
else
if not TemplUtl.boolang then
-- TODO: page language
local l, d = pcall( mw.ext.data.get, "i18n/01.tab" );
if type( d ) == "table" and
type( d.data ) == "table" then
local f = function ( at )
local e = d.data[ at ];
l = e[ 1 ];
s = e[ 2 ];
if type( l ) == "boolean" and
type( s ) == "string" then
s = mw.text.split( s, "|" );
for i = 1, #s do
TemplUtl.boolang[ s[ i ] ] = l;
end -- for i
end
end
TemplUtl.boolang = { };
f( 1 );
f( 2 );
else
TemplUtl.boolang = true;
end
end
if type( TemplUtl.boolang ) == "table" then
s = TemplUtl.boolang[ r ];
if type( s ) == "boolean" then
r = s;
end
end
if type( r ) ~= "boolean" then
s = type( another );
if s == "nil" then
r = true;
elseif s == "boolean" then
r = another;
elseif s == "string" then
s = mw.text.trim( another );
if s == "-" then
r = "-";
elseif s == "" then
r = true;
else
r = TemplUtl.faculty( s );
end
end
end
end
end
elseif s == "boolean" then
r = analyze;
elseif s == "number" then
r = ( analyze ~= 0 );
else
r = false;
end
return r;
end -- TemplUtl.faculty()
TemplUtl.failure = function ( alert, always, addClass, frame )
-- Format error message, mostly hidden
-- alert -- string: message
-- always -- boolean, or nil: do not hide
-- addClass -- string, or nil: add classes to element
-- frame -- object, or nil
-- Returns string
local err = mw.html.create( "span" )
:addClass( "error" )
:wikitext( alert );
local live = ( framing( frame ):preprocess( "{{REVISIONID}}" )
== "" );
if type( addClass ) == "string" then
err:addClass( addClass )
end
if live then
local max = 1000000000;
local id = math.floor( os.clock() * max );
local sign = string.format( "error_%d", id );
local btn = mw.html.create( "span" );
local top = mw.html.create( "div" );
err:attr( "id", sign );
-- TODO: LTR
btn:css( { ["background"] = "#FFFF00",
["border"] = "#FF0000 3px solid",
["font-weight"] = "bold",
["padding"] = "2px",
["text-decoration"] = "none" } )
:wikitext( ">>>" );
sign = string.format( "[[#%s|%s]]", sign, tostring( btn ) );
top:wikitext( sign, " ", alert );
mw.addWarning( tostring( top:attr( "role", "alert" ) ) );
elseif not always then
err:css( { ["display"] = "none" } );
-- err:css( { ["display"] = "inline-block",
-- ["line-height"] = "0",
-- ["max-height"] = "0",
-- ["max-width"] = "0",
-- ["visibility"] = "hidden" } );
end
return tostring( err );
end -- TemplUtl.failure()
TemplUtl.fake = function ( access )
-- Simulation of template transclusion
-- Precondition:
-- access -- string; page name (template)
if type( access ) == "string" then
local s = mw.text.trim( access );
if s ~= "" then
local t = mw.title.new( s, 10 );
if not mw.title.equals( mw.title.getCurrentTitle(), t ) and
t.exists then
t:getContent();
end
end
end
end -- TemplUtl.fake()
TemplUtl.fakes = function ( array, frame, ahead, answer )
-- Simulation of template transclusions
-- Precondition:
-- array -- table, with template title strings
-- frame -- object, or nil
-- ahead -- string, or nil, with common prefix
-- answer -- true, or nil, for list creation
-- Postcondition:
-- Returns string, if answer requested
local e = framing( frame );
local f = function ( a )
e:expandTemplate{ title = a };
end
local s = ahead or "";
local r;
for k, v in pairs( array ) do
if type( k ) == "number" and
type( v ) == "string" then
v = s .. mw.text.trim( v );
pcall( f, v );
if answer then
if r then
r = r .. "\n";
else
r = "";
end
r = string.format( "%s* [[Template:%s|%s]]", r, v, v );
end
end
end -- for k, v
return r;
end -- TemplUtl.fakes()
TemplUtl.feasible = function ( address )
-- Does this describe an URL beginning?
-- Precondition:
-- address -- string; what to inspect, URL presumed
-- Postcondition:
-- Returns true, if URL beginning
local start, r = address:match( "^%s*((%a*:?)//)" );
if start then
if r == "" then
r = true;
elseif r:sub( -1, -1 ) == ":" then
local schemes = ":ftp:ftps:http:https:";
r = ":" .. r:lower();
if schemes:find( r, 1, true ) then
r = true;
else
r = false;
end
else
r = false;
end
end
return r;
end -- TemplUtl.feasible()
TemplUtl.feed = function ( area, ahead, at, after )
-- Detect next free "|" or "}}"
-- Precondition:
-- area -- string; template transclusion
-- ahead -- string; opening element, or false
-- at -- number; byte position in area where to start
-- after -- true, if only to search for "}}"
-- Postcondition:
-- Returns
-- -- number; byte position in area
-- -- before "|" or "}}", may be at end
-- -- to continue search; ahead has been closed
-- -- true, if to be continued at number
local j = at;
local loop = true;
local c, k, r, s, seek;
if after then
seek = "[{}<]";
else
seek = "[%[%]|{}<:]";
end
while loop do
j = area:find( seek, j );
if j then
c = area:byte( j, j );
if c == 123 then -- {
k = j + 1;
if area:byte( k, k ) == 123 then
k = k + 1;
if area:byte( k, k ) == 123 then
j, loop = TemplUtl.feed( area, "{{{", k, after );
else
k = k - 1;
j, loop = TemplUtl.feed( area, "{{", k, after );
end
if not loop then
r = j;
end
end
elseif c == 125 then -- }
k = j + 1;
if area:byte( k, k ) == 125 then
if ahead == "{{" then
r = k;
break; -- while loop;
elseif ahead == "{{{" then
k = k + 1;
if area:byte( k, k ) == 125 then
r = k;
break; -- while loop;
end
elseif not ahead then
r = j - 1;
loop = false;
end
end
elseif c == 60 then -- <
k = j + 3;
if area:sub( j, k ) == "<!--" then
k = area:find( "-->", k );
if k then
j = k + 2;
end
else
local skip;
s = area:sub( j + 1 ):lower();
skip = s:match( "^%s*nowiki%s*>" );
if skip then
local n = skip:len();
n, k = s:find( "<%s*/%s*nowiki%s*>", n );
if k then
j = j + k;
else
loop = false;
end
end
end
elseif c == 124 then -- |
if not r then
r = j - 1;
end
if not ahead then
loop = false;
end
elseif c == 91 then -- [
k = j + 1;
if area:byte( k, k ) == 91 then
k = k + 1;
j, loop = TemplUtl.feed( area, "[[", k, after );
elseif TemplUtl.feasible( area:sub( k ) ) then
k = k + 3;
j, loop = TemplUtl.feed( area, "[", k, after );
end
if not loop then
r = j;
end
elseif c == 93 then -- ]
if ahead == "[" then
r = j;
break; -- while loop
elseif ahead == "[[" then
k = j + 1;
if area:byte( k, k ) == 93 then
r = k;
break; -- while loop
end
end
elseif c == 58 then -- :
s = area:sub( j + 1, j + 2 );
if s == "//" then
s = " " .. area:sub( 1, j + 2 );
s = s:match( "%s(%a+://)$" );
if s and TemplUtl.feasible( s ) then
s = area .. " ";
s = s:match( "([^%s|]+)%s", j );
if s then
k = s:find( "}}" );
if k then
j = j + k + 1;
else
j = j + s:len();
end
end
end
end
end
j = j + 1;
else
loop = false;
end
end -- while loop
if not r then
r = area:len();
end
return r, loop;
end -- TemplUtl.feed()
TemplUtl.feeder = function ( area, at )
-- Retrieve all parameters
-- Precondition:
-- area -- string; template transclusion
-- at -- optional number; byte position in area of "{{"
-- Postcondition:
-- Returns
-- -- table
-- [0] -- template, page, parser function name
-- [1] -- unnamed parameter
-- ["name"] -- named parameter
-- -- string; error message, if any, else nil
local n = 0;
local j, k, p, r, r2, s, v;
if type( at ) == "number" then
j = at + 2;
else
j = 3;
end
while true do
k = TemplUtl.feed( area, false, j );
s = area:sub( j, k );
s = s:gsub( "<!--.*-->", "" );
if n == 0 then
r = { [ 0 ] = s };
n = 1;
else
p, v = s:match( "^([^=]*)=(.*)$" );
if p then
if p:match( "^%s*%d+%s*$" ) then
p = tonumber( p );
else
p = mw.text.trim( p );
end
v = mw.text.trim( v );
else
p = n;
v = s;
n = n + 1;
end
if r[ p ] then
if r2 then
r2 = r2 .. " * ";
else
r2 = "";
end
r2 = string.format( "%s%s '%s'",
r2,
"duplicated parameter",
tostring( p ) );
end
r[ p ] = v;
end
s = area:sub( k + 1, k + 2 );
if s == "}}" then
break; -- while true
elseif s == "" then
r2 = "template not closed";
break; -- while true
end
j = k + 2;
end -- while true
return r, r2;
end -- TemplUtl.feeder()
TemplUtl.fetch = function ( area, ask )
-- Find assignment of a named template parameter
-- Precondition:
-- area -- string; template transclusion
-- ask -- string; parameter name
-- Postcondition:
-- Returns string with trimmed parameter value, or nil
-- Does not return value if template inside
local r;
local scan = string.format( "%s%s%s",
"|%s*", ask, "%s*=(.+)$" );
r = mw.ustring.match( area, scan );
if r then
local j = TemplUtl.feed( r, false, 1 );
r = r:sub( 1, j );
if r then
r = mw.text.trim( r );
if r == "" then
r = nil;
end
end
end
return r;
end -- TemplUtl.fetch()
TemplUtl.find = function ( area, access, at, alter )
-- Find next occurrence of a template
-- Precondition:
-- area -- string; where to search
-- access -- string; trimmed (template) title
-- at -- optional number; ustring position in area, if not 1
-- alter -- optional string; lowercase namespace pattern
-- "" for article
-- no colon (:)
-- Postcondition:
-- Returns ustring position of "{{" in area, or false
-- Requires:
-- fiatTitleRegExp()
local scan = string.format( "{{%s%s%s",
"([%w_%s:]*)%s*",
fiatTitleRegExp( access ),
"%s*([|}<]!?)" );
local r, space, start, suffix;
if type( at ) == "number" then
r = at;
else
r = 1;
end
while true do
r = mw.ustring.find( area, scan, r );
if r then
start, suffix = mw.ustring.match( area, scan, r );
if start then
start = mw.text.trim( start );
if start == "" then
break; -- while true
elseif alter then
if not space then
space = string.format( "^:?%s:$", alter );
end
start = mw.ustring.lower( start );
if mw.ustring.match( start, space ) then
break; -- while true
end
else
start = start:match( "^:?(.+):$" );
if start then
start = mw.ustring.lower( start );
if start == "template" then
break; -- while true
else
if not space then
space = mw.site.namespaces[ 10 ].name;
space = mw.ustring.lower( space );
end
start = start:gsub( "_", " " )
:gsub( "%s+", " " );
if start == space then
break; -- while true
end
end
end
end
else
break; -- while true
end
r = r + 2;
else
r = false;
break; -- while true
end
end -- while true
return r;
end -- TemplUtl.find()
-- finder()
-- 1 page name
-- 2 template title / page name
-- 3 4 5 6
-- more like 2
TemplUtl.firstbreak = function ( adjust )
-- Precede leading character with newline if specific syntax
-- Precondition:
-- adjust -- string; trimmed wikitext
-- Postcondition:
-- Returns string, modified if necessary
return fallible( adjust, true );
end -- TemplUtl.firstbreak()
TemplUtl.flat = function ( area )
-- Remove syntax elements that hide effective syntax only
-- Precondition:
-- area -- string; unparsed wikitext to be reduced
-- Postcondition:
-- Returns cleared wikitext
local delimiters = { { "<%s*NOWIKI%s*>", "<%s*/%s*NOWIKI%s*>" },
{ "<!--", "-->", true },
{ "<%s*PRE%s*>", "<%s*/%s*PRE%s*>" },
{ "<%s*SYNTAXHIGHLIGHT[^<>]*>",
"<%s*/%s*SYNTAXHIGHLIGHT%s*>" } };
local i = 1;
local r = area;
local k, m, n;
if not TemplUtl.Delimiters then
local c, sD, sP;
TemplUtl.Delimiters = { };
for j = 1, #delimiters do
table.insert( TemplUtl.Delimiters, { } );
for ji = 1, 2 do
sD = delimiters[ j ][ ji ];
sP = "";
for js = 1, #sD, 1 do
c = sD:byte( js, js );
if c >= 65 and c <= 90 then
sP = string.format( "%s[%c%c]",
sP, c, c + 32 );
else
sP = sP .. string.char( c );
end
end -- for js
table.insert( TemplUtl.Delimiters[ j ], sP );
end -- for ji
end -- for j
end
while ( true ) do
k = false;
for j = 1, #delimiters do
m = r:find( TemplUtl.Delimiters[ j ][ 1 ],
i,
TemplUtl.Delimiters[ j ][ 3 ] );
if m and ( not k or m < k ) then
k = m;
n = j;
end
end -- for j
if k then
local s
if k > 1 then
i = k - 1;
s = r:sub( 1, i );
else
s = "";
end
j, m = r:find( TemplUtl.Delimiters[ n ][ 2 ],
k + 1,
TemplUtl.Delimiters[ n ][ 3 ] );
if m then
r = s .. r:sub( m + 1 );
else
r = s;
break; -- while true
end
else
break; -- while true
end
end -- while true
return r;
end -- TemplUtl.flat()
TemplUtl.isTempAccount = function ( account )
-- Check whether username is matching temporary scheme
-- Precondition:
-- account -- string
-- Postcondition:
-- Returns boolean
local r = false;
if type( account ) == "string" then
local y, s = account:match( "^~(20[2-9]%d)%-([1-9]%d*)$" );
if y then
y = tonumber( y );
if y >= 2024 then
r = true;
end
end
end
return r;
end -- TemplUtl.isTempAccount()
TemplUtl.nowiki1 = function ( adjust )
-- HTML-escape leading character if disturbing syntax
-- Precondition:
-- adjust -- string; trimmed wikitext
-- Postcondition:
-- Returns string, modified if necessary
return fallible( adjust, false );
end -- TemplUtl.nowiki1()
Failsafe.failsafe = function ( atleast )
-- Retrieve versioning and check for compliance
-- Precondition:
-- atleast -- string, with required version
-- or wikidata|item|~|@ or false
-- Postcondition:
-- Returns string -- with queried version/item, also if problem
-- false -- if appropriate
-- 2024-03-01
local since = atleast
local last = ( since == "~" )
local linked = ( since == "@" )
local link = ( since == "item" )
local r
if last or link or linked or since == "wikidata" then
local item = Failsafe.item
since = false
if type( item ) == "number" and item > 0 then
local suited = string.format( "Q%d", item )
if link then
r = suited
else
local entity = mw.wikibase.getEntity( suited )
if type( entity ) == "table" then
local seek = Failsafe.serialProperty or "P348"
local vsn = entity:formatPropertyValues( seek )
if type( vsn ) == "table" and
type( vsn.value ) == "string" and
vsn.value ~= "" then
if last and vsn.value == Failsafe.serial then
r = false
elseif linked then
if mw.title.getCurrentTitle().prefixedText
== mw.wikibase.getSitelink( suited ) then
r = false
else
r = suited
end
else
r = vsn.value
end
end
end
end
elseif link then
r = false
end
end
if type( r ) == "nil" then
if not since or since <= Failsafe.serial then
r = Failsafe.serial
else
r = false
end
end
return r
end -- Failsafe.failsafe()
-- Export
local p = { };
function p.facets( frame )
return TemplUtl.facets( frame.args[ 1 ] or "",
frame.args.decode );
end -- p.facets
function p.faculty( frame )
local r = TemplUtl.faculty( frame.args[ 1 ],
frame.args[ 2 ] );
if r ~= "-" then
r = r and "1";
end
return r or "";
end -- p.faculty
function p.failure( frame )
local scream = mw.text.trim( frame.args[ 1 ] or "" );
local loud = frame.args[ 2 ];
local select = frame.args.class;
if scream == "" then
scream = "?????????";
end
if loud then
loud = TemplUtl.faculty( loud, nil );
end
return TemplUtl.failure( scream, loud, select, frame );
end -- p.failure
function p.fake( frame )
TemplUtl.fake( frame.args[ 1 ] or "", frame );
return "";
end -- p.fake
function p.fakes( frame )
local list = ( frame.args.list == "1" );
local r = TemplUtl.fakes( frame.args,
frame,
frame.args.prefix,
list );
return r or "";
end -- p.fakes
function p.firstbreak( frame )
local r = ( frame.args[ 1 ] );
if r then
r = mw.text.trim( r );
if r ~= "" then
r = TemplUtl.firstbreak( r );
end
end
return r or "";
end -- p.firstbreak
function p.from( frame )
local r = frame:getParent():getTitle();
if r then
r = string.format( "{{%s}}", r );
end
return r or "";
end -- p.from
function p.isRedirect()
return mw.title.getCurrentTitle().isRedirect and "1" or "";
end -- p.isRedirect
function p.isTempAccount()
local r = ( frame.args[ 1 ] );
if r then
r = mw.text.trim( r );
if r == "" then
r = false;
end
end
return TemplUtl.isTempAccount( r ) and "1" or "";
end -- p.isRedirect
function p.nowiki1( frame )
local r = ( frame.args[ 1 ] );
if r then
r = mw.text.trim( r );
if r ~= "" then
r = TemplUtl.nowiki1( r );
end
end
return r or "";
end -- p.nowiki1
function p.siteID( frame )
return mw.wikibase.getGlobalSiteId();
end -- p.siteID
p.failsafe = function ( frame )
-- Versioning interface
local s = type( frame )
local since
if s == "table" then
since = frame.args[ 1 ]
elseif s == "string" then
since = frame
end
if since then
since = mw.text.trim( since )
if since == "" then
since = false
end
end
return Failsafe.failsafe( since ) or ""
end -- p.failsafe
p.TemplUtl = function ()
return TemplUtl;
end -- p.TemplUtl()
setmetatable( p, { __call = function ( func, ... )
setmetatable( p, nil );
return Failsafe;
end } );
return p;
chtz0mxevhx7mdafg9l7f0ams2mvycr
665047
665046
2025-07-01T17:46:10Z
PerfektesChaos
18104
2025-07-01
665047
Scribunto
text/plain
local TemplUtl = { suite = "TemplUtl",
serial = "2025-07-01",
item = 52364930 };
--[=[
Utilities to support template programming.
]=]
local Failsafe = TemplUtl;
if mw.site.server:find( ".beta.wmflabs.org", 4, true ) then
require( "Module:No Globals" )
end
local fallible = function ( adjust, ahead )
-- Check for leading character disturbing syntax
-- Precondition:
-- adjust -- string; trimmed wikitext
-- ahead -- true, if leading syntax shall start on new line
-- Postcondition:
-- Returns string, modified if necessary
local r = adjust;
local c = r:byte( 1, 1 );
local lead;
if c <= 59 and
( c==35 or c==42 or c==58 or c==59 ) then
lead = true;
elseif c == 123 or c == 124 then
local c2 = r:byte( 2, 1 );
if c == 123 and c2 == 124 then
lead = true;
elseif ahead and c == 124 and
( c2 == 43 or c2 == 45 or c2 == 125 ) then
lead = true;
end
end
if lead then
if ahead then
r = "\n" .. r;
else
r = mw.text.nowiki( r:sub( 1, 1 ) ) .. r:sub( 2 );
end
end
return r;
end -- fallible()
local fiatTitleRegExp = function ( accept )
-- Create pattern to detect page name
-- Precondition:
-- accept -- string; trimmed title
-- Postcondition:
-- Returns string with pattern
local start = mw.ustring.sub( accept, 1, 1 );
local r;
if mw.ustring.match( start, "%a" ) then
r = string.format( "[%s%s]%s",
mw.ustring.lower( start ),
mw.ustring.upper( start ),
mw.ustring.sub( accept, 2 ) );
else
r = accept;
end
if r:match( " " ) then
r = r:gsub( "%", "%%" )
:gsub( "[%-^.?+*()$]", "%$1" )
:gsub( "_", " " )
:gsub( "%s+", "[%s_]+" );
end
return r;
end -- fiatTitleRegExp()
local framing = function ( frame )
-- Ensure availability of frame object
-- Precondition:
-- frame -- object; #invoke environment, or false
-- Postcondition:
-- Return frame object
if not TemplUtl.frame then
if type( frame ) == "table" then
TemplUtl.frame = frame;
else
TemplUtl.frame = mw.getCurrentFrame();
end
end
return TemplUtl.frame;
end -- framing()
TemplUtl.facets = function ( ask, adjust )
local r = ask;
if adjust == "%" and r:find( "%%%x%x" ) then
r = mw.uri.decode( r, "PATH" );
elseif r:find( "&", 1, true ) then
r = mw.text.decode( r );
end
r = mw.ustring.gsub( r, "[%s%p%c]+", " " );
r = mw.text.trim( r );
return r;
end -- TemplUtl.facets()
TemplUtl.faculty = function ( analyze, another )
-- Test template arg for boolean
-- analyze -- string, boolean, number or nil
-- another -- fallback: string, boolean, or nil
-- "-" to test for explicit vocabulary choice
-- Returns boolean, or "-"
local s = type( analyze );
local r;
if s == "string" then
r = mw.text.trim( analyze );
if r == "" then
r = TemplUtl.faculty( another, nil );
elseif r:find( "1", 1, true ) and
r:match( "^[0%-]*1[01%-]*$" ) then
r = true;
elseif r:match( "^[0%-]+$" ) then
r = false;
else
r = r:lower();
if r == "y" or
r == "yes" or
r == "true" or
r == "on" then
r = true;
elseif r == "n" or
r == "no" or
r == "false" or
r == "off" then
r = false;
else
if not TemplUtl.boolang then
-- TODO: page language
local l, d = pcall( mw.ext.data.get, "i18n/01.tab" );
if type( d ) == "table" and
type( d.data ) == "table" then
local f = function ( at )
local e = d.data[ at ];
l = e[ 1 ];
s = e[ 2 ];
if type( l ) == "boolean" and
type( s ) == "string" then
s = mw.text.split( s, "|" );
for i = 1, #s do
TemplUtl.boolang[ s[ i ] ] = l;
end -- for i
end
end
TemplUtl.boolang = { };
f( 1 );
f( 2 );
else
TemplUtl.boolang = true;
end
end
if type( TemplUtl.boolang ) == "table" then
s = TemplUtl.boolang[ r ];
if type( s ) == "boolean" then
r = s;
end
end
if type( r ) ~= "boolean" then
s = type( another );
if s == "nil" then
r = true;
elseif s == "boolean" then
r = another;
elseif s == "string" then
s = mw.text.trim( another );
if s == "-" then
r = "-";
elseif s == "" then
r = true;
else
r = TemplUtl.faculty( s );
end
end
end
end
end
elseif s == "boolean" then
r = analyze;
elseif s == "number" then
r = ( analyze ~= 0 );
else
r = false;
end
return r;
end -- TemplUtl.faculty()
TemplUtl.failure = function ( alert, always, addClass, frame )
-- Format error message, mostly hidden
-- alert -- string: message
-- always -- boolean, or nil: do not hide
-- addClass -- string, or nil: add classes to element
-- frame -- object, or nil
-- Returns string
local err = mw.html.create( "span" )
:addClass( "error" )
:wikitext( alert );
local live = ( framing( frame ):preprocess( "{{REVISIONID}}" )
== "" );
if type( addClass ) == "string" then
err:addClass( addClass )
end
if live then
local max = 1000000000;
local id = math.floor( os.clock() * max );
local sign = string.format( "error_%d", id );
local btn = mw.html.create( "span" );
local top = mw.html.create( "div" );
err:attr( "id", sign );
-- TODO: LTR
btn:css( { ["background"] = "#FFFF00",
["border"] = "#FF0000 3px solid",
["font-weight"] = "bold",
["padding"] = "2px",
["text-decoration"] = "none" } )
:wikitext( ">>>" );
sign = string.format( "[[#%s|%s]]", sign, tostring( btn ) );
top:wikitext( sign, " ", alert );
mw.addWarning( tostring( top:attr( "role", "alert" ) ) );
elseif not always then
err:css( { ["display"] = "none" } );
-- err:css( { ["display"] = "inline-block",
-- ["line-height"] = "0",
-- ["max-height"] = "0",
-- ["max-width"] = "0",
-- ["visibility"] = "hidden" } );
end
return tostring( err );
end -- TemplUtl.failure()
TemplUtl.fake = function ( access )
-- Simulation of template transclusion
-- Precondition:
-- access -- string; page name (template)
if type( access ) == "string" then
local s = mw.text.trim( access );
if s ~= "" then
local t = mw.title.new( s, 10 );
if not mw.title.equals( mw.title.getCurrentTitle(), t ) and
t.exists then
t:getContent();
end
end
end
end -- TemplUtl.fake()
TemplUtl.fakes = function ( array, frame, ahead, answer )
-- Simulation of template transclusions
-- Precondition:
-- array -- table, with template title strings
-- frame -- object, or nil
-- ahead -- string, or nil, with common prefix
-- answer -- true, or nil, for list creation
-- Postcondition:
-- Returns string, if answer requested
local e = framing( frame );
local f = function ( a )
e:expandTemplate{ title = a };
end
local s = ahead or "";
local r;
for k, v in pairs( array ) do
if type( k ) == "number" and
type( v ) == "string" then
v = s .. mw.text.trim( v );
pcall( f, v );
if answer then
if r then
r = r .. "\n";
else
r = "";
end
r = string.format( "%s* [[Template:%s|%s]]", r, v, v );
end
end
end -- for k, v
return r;
end -- TemplUtl.fakes()
TemplUtl.feasible = function ( address )
-- Does this describe an URL beginning?
-- Precondition:
-- address -- string; what to inspect, URL presumed
-- Postcondition:
-- Returns true, if URL beginning
local start, r = address:match( "^%s*((%a*:?)//)" );
if start then
if r == "" then
r = true;
elseif r:sub( -1, -1 ) == ":" then
local schemes = ":ftp:ftps:http:https:";
r = ":" .. r:lower();
if schemes:find( r, 1, true ) then
r = true;
else
r = false;
end
else
r = false;
end
end
return r;
end -- TemplUtl.feasible()
TemplUtl.feed = function ( area, ahead, at, after )
-- Detect next free "|" or "}}"
-- Precondition:
-- area -- string; template transclusion
-- ahead -- string; opening element, or false
-- at -- number; byte position in area where to start
-- after -- true, if only to search for "}}"
-- Postcondition:
-- Returns
-- -- number; byte position in area
-- -- before "|" or "}}", may be at end
-- -- to continue search; ahead has been closed
-- -- true, if to be continued at number
local j = at;
local loop = true;
local c, k, r, s, seek;
if after then
seek = "[{}<]";
else
seek = "[%[%]|{}<:]";
end
while loop do
j = area:find( seek, j );
if j then
c = area:byte( j, j );
if c == 123 then -- {
k = j + 1;
if area:byte( k, k ) == 123 then
k = k + 1;
if area:byte( k, k ) == 123 then
j, loop = TemplUtl.feed( area, "{{{", k, after );
else
k = k - 1;
j, loop = TemplUtl.feed( area, "{{", k, after );
end
if not loop then
r = j;
end
end
elseif c == 125 then -- }
k = j + 1;
if area:byte( k, k ) == 125 then
if ahead == "{{" then
r = k;
break; -- while loop;
elseif ahead == "{{{" then
k = k + 1;
if area:byte( k, k ) == 125 then
r = k;
break; -- while loop;
end
elseif not ahead then
r = j - 1;
loop = false;
end
end
elseif c == 60 then -- <
k = j + 3;
if area:sub( j, k ) == "<!--" then
k = area:find( "-->", k );
if k then
j = k + 2;
end
else
local skip;
s = area:sub( j + 1 ):lower();
skip = s:match( "^%s*nowiki%s*>" );
if skip then
local n = skip:len();
n, k = s:find( "<%s*/%s*nowiki%s*>", n );
if k then
j = j + k;
else
loop = false;
end
end
end
elseif c == 124 then -- |
if not r then
r = j - 1;
end
if not ahead then
loop = false;
end
elseif c == 91 then -- [
k = j + 1;
if area:byte( k, k ) == 91 then
k = k + 1;
j, loop = TemplUtl.feed( area, "[[", k, after );
elseif TemplUtl.feasible( area:sub( k ) ) then
k = k + 3;
j, loop = TemplUtl.feed( area, "[", k, after );
end
if not loop then
r = j;
end
elseif c == 93 then -- ]
if ahead == "[" then
r = j;
break; -- while loop
elseif ahead == "[[" then
k = j + 1;
if area:byte( k, k ) == 93 then
r = k;
break; -- while loop
end
end
elseif c == 58 then -- :
s = area:sub( j + 1, j + 2 );
if s == "//" then
s = " " .. area:sub( 1, j + 2 );
s = s:match( "%s(%a+://)$" );
if s and TemplUtl.feasible( s ) then
s = area .. " ";
s = s:match( "([^%s|]+)%s", j );
if s then
k = s:find( "}}" );
if k then
j = j + k + 1;
else
j = j + s:len();
end
end
end
end
end
j = j + 1;
else
loop = false;
end
end -- while loop
if not r then
r = area:len();
end
return r, loop;
end -- TemplUtl.feed()
TemplUtl.feeder = function ( area, at )
-- Retrieve all parameters
-- Precondition:
-- area -- string; template transclusion
-- at -- optional number; byte position in area of "{{"
-- Postcondition:
-- Returns
-- -- table
-- [0] -- template, page, parser function name
-- [1] -- unnamed parameter
-- ["name"] -- named parameter
-- -- string; error message, if any, else nil
local n = 0;
local j, k, p, r, r2, s, v;
if type( at ) == "number" then
j = at + 2;
else
j = 3;
end
while true do
k = TemplUtl.feed( area, false, j );
s = area:sub( j, k );
s = s:gsub( "<!--.*-->", "" );
if n == 0 then
r = { [ 0 ] = s };
n = 1;
else
p, v = s:match( "^([^=]*)=(.*)$" );
if p then
if p:match( "^%s*%d+%s*$" ) then
p = tonumber( p );
else
p = mw.text.trim( p );
end
v = mw.text.trim( v );
else
p = n;
v = s;
n = n + 1;
end
if r[ p ] then
if r2 then
r2 = r2 .. " * ";
else
r2 = "";
end
r2 = string.format( "%s%s '%s'",
r2,
"duplicated parameter",
tostring( p ) );
end
r[ p ] = v;
end
s = area:sub( k + 1, k + 2 );
if s == "}}" then
break; -- while true
elseif s == "" then
r2 = "template not closed";
break; -- while true
end
j = k + 2;
end -- while true
return r, r2;
end -- TemplUtl.feeder()
TemplUtl.fetch = function ( area, ask )
-- Find assignment of a named template parameter
-- Precondition:
-- area -- string; template transclusion
-- ask -- string; parameter name
-- Postcondition:
-- Returns string with trimmed parameter value, or nil
-- Does not return value if template inside
local r;
local scan = string.format( "%s%s%s",
"|%s*", ask, "%s*=(.+)$" );
r = mw.ustring.match( area, scan );
if r then
local j = TemplUtl.feed( r, false, 1 );
r = r:sub( 1, j );
if r then
r = mw.text.trim( r );
if r == "" then
r = nil;
end
end
end
return r;
end -- TemplUtl.fetch()
TemplUtl.find = function ( area, access, at, alter )
-- Find next occurrence of a template
-- Precondition:
-- area -- string; where to search
-- access -- string; trimmed (template) title
-- at -- optional number; ustring position in area, if not 1
-- alter -- optional string; lowercase namespace pattern
-- "" for article
-- no colon (:)
-- Postcondition:
-- Returns ustring position of "{{" in area, or false
-- Requires:
-- fiatTitleRegExp()
local scan = string.format( "{{%s%s%s",
"([%w_%s:]*)%s*",
fiatTitleRegExp( access ),
"%s*([|}<]!?)" );
local r, space, start, suffix;
if type( at ) == "number" then
r = at;
else
r = 1;
end
while true do
r = mw.ustring.find( area, scan, r );
if r then
start, suffix = mw.ustring.match( area, scan, r );
if start then
start = mw.text.trim( start );
if start == "" then
break; -- while true
elseif alter then
if not space then
space = string.format( "^:?%s:$", alter );
end
start = mw.ustring.lower( start );
if mw.ustring.match( start, space ) then
break; -- while true
end
else
start = start:match( "^:?(.+):$" );
if start then
start = mw.ustring.lower( start );
if start == "template" then
break; -- while true
else
if not space then
space = mw.site.namespaces[ 10 ].name;
space = mw.ustring.lower( space );
end
start = start:gsub( "_", " " )
:gsub( "%s+", " " );
if start == space then
break; -- while true
end
end
end
end
else
break; -- while true
end
r = r + 2;
else
r = false;
break; -- while true
end
end -- while true
return r;
end -- TemplUtl.find()
-- finder()
-- 1 page name
-- 2 template title / page name
-- 3 4 5 6
-- more like 2
TemplUtl.firstbreak = function ( adjust )
-- Precede leading character with newline if specific syntax
-- Precondition:
-- adjust -- string; trimmed wikitext
-- Postcondition:
-- Returns string, modified if necessary
return fallible( adjust, true );
end -- TemplUtl.firstbreak()
TemplUtl.flat = function ( area )
-- Remove syntax elements that hide effective syntax only
-- Precondition:
-- area -- string; unparsed wikitext to be reduced
-- Postcondition:
-- Returns cleared wikitext
local delimiters = { { "<%s*NOWIKI%s*>", "<%s*/%s*NOWIKI%s*>" },
{ "<!--", "-->", true },
{ "<%s*PRE%s*>", "<%s*/%s*PRE%s*>" },
{ "<%s*SYNTAXHIGHLIGHT[^<>]*>",
"<%s*/%s*SYNTAXHIGHLIGHT%s*>" } };
local i = 1;
local r = area;
local k, m, n;
if not TemplUtl.Delimiters then
local c, sD, sP;
TemplUtl.Delimiters = { };
for j = 1, #delimiters do
table.insert( TemplUtl.Delimiters, { } );
for ji = 1, 2 do
sD = delimiters[ j ][ ji ];
sP = "";
for js = 1, #sD, 1 do
c = sD:byte( js, js );
if c >= 65 and c <= 90 then
sP = string.format( "%s[%c%c]",
sP, c, c + 32 );
else
sP = sP .. string.char( c );
end
end -- for js
table.insert( TemplUtl.Delimiters[ j ], sP );
end -- for ji
end -- for j
end
while ( true ) do
k = false;
for j = 1, #delimiters do
m = r:find( TemplUtl.Delimiters[ j ][ 1 ],
i,
TemplUtl.Delimiters[ j ][ 3 ] );
if m and ( not k or m < k ) then
k = m;
n = j;
end
end -- for j
if k then
local s
if k > 1 then
i = k - 1;
s = r:sub( 1, i );
else
s = "";
end
j, m = r:find( TemplUtl.Delimiters[ n ][ 2 ],
k + 1,
TemplUtl.Delimiters[ n ][ 3 ] );
if m then
r = s .. r:sub( m + 1 );
else
r = s;
break; -- while true
end
else
break; -- while true
end
end -- while true
return r;
end -- TemplUtl.flat()
TemplUtl.isTempAccount = function ( account )
-- Check whether username is matching temporary scheme
-- Precondition:
-- account -- string
-- Postcondition:
-- Returns boolean
local r = false;
if type( account ) == "string" then
local y, s = account:match( "^~(20[2-9]%d)%-([1-9]%d*)$" );
if y then
y = tonumber( y );
if y >= 2024 then
r = true;
end
end
end
return r;
end -- TemplUtl.isTempAccount()
TemplUtl.nowiki1 = function ( adjust )
-- HTML-escape leading character if disturbing syntax
-- Precondition:
-- adjust -- string; trimmed wikitext
-- Postcondition:
-- Returns string, modified if necessary
return fallible( adjust, false );
end -- TemplUtl.nowiki1()
Failsafe.failsafe = function ( atleast )
-- Retrieve versioning and check for compliance
-- Precondition:
-- atleast -- string, with required version
-- or wikidata|item|~|@ or false
-- Postcondition:
-- Returns string -- with queried version/item, also if problem
-- false -- if appropriate
-- 2024-03-01
local since = atleast
local last = ( since == "~" )
local linked = ( since == "@" )
local link = ( since == "item" )
local r
if last or link or linked or since == "wikidata" then
local item = Failsafe.item
since = false
if type( item ) == "number" and item > 0 then
local suited = string.format( "Q%d", item )
if link then
r = suited
else
local entity = mw.wikibase.getEntity( suited )
if type( entity ) == "table" then
local seek = Failsafe.serialProperty or "P348"
local vsn = entity:formatPropertyValues( seek )
if type( vsn ) == "table" and
type( vsn.value ) == "string" and
vsn.value ~= "" then
if last and vsn.value == Failsafe.serial then
r = false
elseif linked then
if mw.title.getCurrentTitle().prefixedText
== mw.wikibase.getSitelink( suited ) then
r = false
else
r = suited
end
else
r = vsn.value
end
end
end
end
elseif link then
r = false
end
end
if type( r ) == "nil" then
if not since or since <= Failsafe.serial then
r = Failsafe.serial
else
r = false
end
end
return r
end -- Failsafe.failsafe()
-- Export
local p = { };
function p.facets( frame )
return TemplUtl.facets( frame.args[ 1 ] or "",
frame.args.decode );
end -- p.facets
function p.faculty( frame )
local r = TemplUtl.faculty( frame.args[ 1 ],
frame.args[ 2 ] );
if r ~= "-" then
r = r and "1";
end
return r or "";
end -- p.faculty
function p.failure( frame )
local scream = mw.text.trim( frame.args[ 1 ] or "" );
local loud = frame.args[ 2 ];
local select = frame.args.class;
if scream == "" then
scream = "?????????";
end
if loud then
loud = TemplUtl.faculty( loud, nil );
end
return TemplUtl.failure( scream, loud, select, frame );
end -- p.failure
function p.fake( frame )
TemplUtl.fake( frame.args[ 1 ] or "", frame );
return "";
end -- p.fake
function p.fakes( frame )
local list = ( frame.args.list == "1" );
local r = TemplUtl.fakes( frame.args,
frame,
frame.args.prefix,
list );
return r or "";
end -- p.fakes
function p.firstbreak( frame )
local r = ( frame.args[ 1 ] );
if r then
r = mw.text.trim( r );
if r ~= "" then
r = TemplUtl.firstbreak( r );
end
end
return r or "";
end -- p.firstbreak
function p.from( frame )
local r = frame:getParent():getTitle();
if r then
r = string.format( "{{%s}}", r );
end
return r or "";
end -- p.from
function p.isRedirect()
return mw.title.getCurrentTitle().isRedirect and "1" or "";
end -- p.isRedirect
function p.isTempAccount( frame )
local r = ( frame.args[ 1 ] );
if r then
r = mw.text.trim( r );
if r == "" then
r = false;
end
end
return TemplUtl.isTempAccount( r ) and "1" or "";
end -- p.isRedirect
function p.nowiki1( frame )
local r = ( frame.args[ 1 ] );
if r then
r = mw.text.trim( r );
if r ~= "" then
r = TemplUtl.nowiki1( r );
end
end
return r or "";
end -- p.nowiki1
function p.siteID( frame )
return mw.wikibase.getGlobalSiteId();
end -- p.siteID
p.failsafe = function ( frame )
-- Versioning interface
local s = type( frame )
local since
if s == "table" then
since = frame.args[ 1 ]
elseif s == "string" then
since = frame
end
if since then
since = mw.text.trim( since )
if since == "" then
since = false
end
end
return Failsafe.failsafe( since ) or ""
end -- p.failsafe
p.TemplUtl = function ()
return TemplUtl;
end -- p.TemplUtl()
setmetatable( p, { __call = function ( func, ... )
setmetatable( p, nil );
return Failsafe;
end } );
return p;
o55ji2tphdcacdj4yordce6rmxavvlt
Template:IsIPAddress
10
150327
665113
561154
2023-08-28T13:12:28Z
en>Xaosflux
0
Changed protection settings for "[[Template:IsIPAddress]]": used in system messages ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
561153
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:IPAddress|isIp|1={{{1|}}}}}<noinclude>
{{documentation}}
</noinclude>
k3cyj91jrykek5542up8uye0ws7gvh8
665114
665113
2025-07-02T04:53:10Z
Novem Linguae
49714
1 revision imported from [[:en:Template:IsIPAddress]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
561153
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:IPAddress|isIp|1={{{1|}}}}}<noinclude>
{{documentation}}
</noinclude>
k3cyj91jrykek5542up8uye0ws7gvh8
Module:Wikitext Parsing
828
155427
665083
592628
2025-05-05T17:47:12Z
en>Dinoguy1000
0
the Lua # operator recalculates the length every time it's accessed (including on every loop in a for), so cache its value in cheaptrim since the string isn't modified in-place
665083
Scribunto
text/plain
require("strict")
--Helper functions
local function startswith(text, subtext)
return string.sub(text, 1, #subtext) == subtext
end
local function endswith(text, subtext)
return string.sub(text, -#subtext, -1) == subtext
end
local function allcases(s)
return s:gsub("%a", function(c)
return "["..c:upper()..c:lower().."]"
end)
end
local trimcache = {}
local whitespace = {[" "]=1, ["\n"]=1, ["\t"]=1, ["\r"]=1}
local function cheaptrim(str) --mw.text.trim is surprisingly expensive, so here's an alternative approach
local quick = trimcache[str]
if quick then
return quick
else
-- local out = string.gsub(str, "^%s*(.-)%s*$", "%1")
local lowEnd
local strlen = #str
for i = 1,strlen do
if not whitespace[string.sub(str, i, i)] then
lowEnd = i
break
end
end
if not lowEnd then
trimcache[str] = ""
return ""
end
for i = strlen,1,-1 do
if not whitespace[string.sub(str, i, i)] then
local out = string.sub(str, lowEnd, i)
trimcache[str] = out
return out
end
end
end
end
--[=[ Implementation notes
---- NORMAL HTML TAGS ----
Tags are very strict on how they want to start, but loose on how they end.
The start must strictly follow <[tAgNaMe](%s|>) with no room for whitespace in
the tag's name, but may then flow as they want afterwards, making
<div\nclass\n=\n"\nerror\n"\n> valid
There's no sense of escaping < or >
E.g.
<div class="error\>"> will end at \> despite it being inside a quote
<div class="<span class="error">error</span>"> will not process the larger div
If a tag has no end, it will consume all text instead of not processing
---- NOPROCESSING TAGS (nowiki, pre, syntaxhighlight, source, etc.) ----
(In most comments, <source> will not be mentioned. This is because it is the
deprecated version of <syntaxhighlight>)
No-Processing tags have some interesting differences to the above rules.
For example, their syntax is a lot stricter. While an opening tag appears to
follow the same set of rules, A closing tag can't have any sort of extra
formatting period. While </div a/a> is valid, </nowiki a/a> isn't - only
newlines and spaces/tabs are allowed in closing tags.
Note that, even though <pre> tags cause a visual change when the ending tag has
extra formatting, it won't cause the no-processing effects. For some reason, the
format must be strict for that to apply.
Both the content inside the tag pair and the content inside each side of the
pair is not processed. E.g. <nowiki |}}>|}}</nowiki> would have both of the |}}
escaped in practice.
When something in the code is referenced to as a "Nowiki Tag", it means a tag
which causes wiki text to not be processed, which includes <nowiki>, <pre>,
and <syntaxhighlight>
Since we only care about these tags, we can ignore the idea of an intercepting
tag preventing processing, and just go straight for the first ending we can find
If there is no ending to find, the tag will NOT consume the rest of the text in
terms of processing behaviour (though <pre> will appear to have an effect).
Even if there is no end of the tag, the content inside the opening half will
still be unprocessed, meaning {{X20|<nowiki }}>}} wouldn't end at the first }}
despite there being no ending to the tag.
Note that there are some tags, like <math>, which also function like <nowiki>
which are included in this aswell. Some other tags, like <ref>, have far too
unpredictable behaviour to be handled currently (they'd have to be split and
processed as something seperate - its complicated, but maybe not impossible.)
I suspect that every tag listed in [[Special:Version]] may behave somewhat like
this, but that's far too many cases worth checking for rarely used tags that may
not even have a good reason to contain {{ or }} anyways, so we leave them alone.
---- HTML COMMENTS AND INCLUDEONLY ----
HTML Comments are about as basic as it could get for this
Start at <!--, end at -->, no extra conditions. Simple enough
If a comment has no end, it will eat all text instead of not being processed
includeonly tags function mostly like a regular nowiki tag, with the exception
that the tag will actually consume all future text if not given an ending as
opposed to simply giving up and not changing anything. Due to complications and
the fact that this is far less likely to be present on a page, aswell as being
something that may not want to be escaped, includeonly tags are ignored during
our processing
--]=]
local validtags = {nowiki=1, pre=1, syntaxhighlight=1, source=1, math=1}
--This function expects the string to start with the tag
local function TestForNowikiTag(text, scanPosition)
local tagName = (string.match(text, "^<([^\n />]+)", scanPosition) or ""):lower()
if not validtags[tagName] then
return nil
end
local nextOpener = string.find(text, "<", scanPosition+1) or -1
local nextCloser = string.find(text, ">", scanPosition+1) or -1
if nextCloser > -1 and (nextOpener == -1 or nextCloser < nextOpener) then
local startingTag = string.sub(text, scanPosition, nextCloser)
--We have our starting tag (E.g. '<pre style="color:red">')
--Now find our ending...
if endswith(startingTag, "/>") then --self-closing tag (we are our own ending)
return {
Tag = tagName,
Start = startingTag,
Content = "", End = "",
Length = #startingTag
}
else
local endingTagStart, endingTagEnd = string.find(text, "</"..allcases(tagName).."[ \t\n]*>", scanPosition)
if endingTagStart then --Regular tag formation
local endingTag = string.sub(text, endingTagStart, endingTagEnd)
local tagContent = string.sub(text, nextCloser+1, endingTagStart-1)
return {
Tag = tagName,
Start = startingTag,
Content = tagContent,
End = endingTag,
Length = #startingTag + #tagContent + #endingTag
}
else --Content inside still needs escaping (also linter error!)
return {
Tag = tagName,
Start = startingTag,
Content = "", End = "",
Length = #startingTag
}
end
end
end
return nil
end
local function TestForComment(text, scanPosition) --Like TestForNowikiTag but for <!-- -->
if string.match(text, "^<!%-%-", scanPosition) then
local commentEnd = string.find(text, "-->", scanPosition+4, true)
if commentEnd then
return {
Start = "<!--", End = "-->",
Content = string.sub(text, scanPosition+4, commentEnd-1),
Length = commentEnd-scanPosition+3
}
else --Consumes all text if not given an ending
return {
Start = "<!--", End = "",
Content = string.sub(text, scanPosition+4),
Length = #text-scanPosition+1
}
end
end
return nil
end
--[[ Implementation notes
The goal of this function is to escape all text that wouldn't be parsed if it
was preprocessed (see above implementation notes).
Using keepComments will keep all HTML comments instead of removing them. They
will still be escaped regardless to avoid processing errors
--]]
local function PrepareText(text, keepComments)
local newtext = {}
local scanPosition = 1
while true do
local NextCheck = string.find(text, "<[NnSsPpMm!]", scanPosition) --Advance to the next potential tag we care about
if not NextCheck then --Done
newtext[#newtext+1] = string.sub(text,scanPosition)
break
end
newtext[#newtext+1] = string.sub(text,scanPosition,NextCheck-1)
scanPosition = NextCheck
local Comment = TestForComment(text, scanPosition)
if Comment then
if keepComments then
newtext[#newtext+1] = Comment.Start .. mw.text.nowiki(Comment.Content) .. Comment.End
end
scanPosition = scanPosition + Comment.Length
else
local Tag = TestForNowikiTag(text, scanPosition)
if Tag then
local newTagStart = "<" .. mw.text.nowiki(string.sub(Tag.Start,2,-2)) .. ">"
local newTagEnd =
Tag.End == "" and "" or --Respect no tag ending
"</" .. mw.text.nowiki(string.sub(Tag.End,3,-2)) .. ">"
local newContent = mw.text.nowiki(Tag.Content)
newtext[#newtext+1] = newTagStart .. newContent .. newTagEnd
scanPosition = scanPosition + Tag.Length
else --Nothing special, move on...
newtext[#newtext+1] = string.sub(text, scanPosition, scanPosition)
scanPosition = scanPosition + 1
end
end
end
return table.concat(newtext, "")
end
--[=[ Implementation notes
This function is an alternative to Transcluder's getParameters which considers
the potential for a singular { or } or other odd syntax that %b doesn't like to
be in a parameter's value.
When handling the difference between {{ and {{{, mediawiki will attempt to match
as many sequences of {{{ as possible before matching a {{
E.g.
{{{{A}}}} -> { {{{A}}} }
{{{{{{{{Text|A}}}}}}}} -> {{ {{{ {{{Text|A}}} }}} }}
If there aren't enough triple braces on both sides, the parser will compromise
for a template interpretation.
E.g.
{{{{A}} }} -> {{ {{ A }} }}
While there are technically concerns about things such as wikilinks breaking
template processing (E.g. {{[[}}]]}} doesn't stop at the first }}), it shouldn't
be our job to process inputs perfectly when the input has garbage ({ / } isn't
legal in titles anyways, so if something's unmatched in a wikilink, it's
guaranteed GIGO)
Setting dontEscape will prevent running the input text through EET. Avoid
setting this to true if you don't have to set it.
Returned values:
A table of all templates. Template data goes as follows:
Text: The raw text of the template
Name: The name of the template
Args: A list of arguments
Children: A list of immediate template children
--]=]
--Helper functions
local function boundlen(pair)
return pair.End-pair.Start+1
end
--Main function
local function ParseTemplates(InputText, dontEscape)
--Setup
if not dontEscape then
InputText = PrepareText(InputText)
end
local function finalise(text)
if not dontEscape then
return mw.text.decode(text)
else
return text
end
end
local function CreateContainerObj(Container)
Container.Text = {}
Container.Args = {}
Container.ArgOrder = {}
Container.Children = {}
-- Container.Name = nil
-- Container.Value = nil
-- Container.Key = nil
Container.BeyondStart = false
Container.LastIndex = 1
Container.finalise = finalise
function Container:HandleArgInput(character, internalcall)
if not internalcall then
self.Text[#self.Text+1] = character
end
if character == "=" then
if self.Key then
self.Value[#self.Value+1] = character
else
self.Key = cheaptrim(self.Value and table.concat(self.Value, "") or "")
self.Value = {}
end
else --"|" or "}"
if not self.Name then
self.Name = cheaptrim(self.Value and table.concat(self.Value, "") or "")
self.Value = nil
else
self.Value = self.finalise(self.Value and table.concat(self.Value, "") or "")
if self.Key then
self.Key = self.finalise(self.Key)
self.Args[self.Key] = cheaptrim(self.Value)
self.ArgOrder[#self.ArgOrder+1] = self.Key
else
local Key = tostring(self.LastIndex)
self.Args[Key] = self.Value
self.ArgOrder[#self.ArgOrder+1] = Key
self.LastIndex = self.LastIndex + 1
end
self.Key = nil
self.Value = nil
end
end
end
function Container:AppendText(text, ftext)
self.Text[#self.Text+1] = (ftext or text)
if not self.Value then
self.Value = {}
end
self.BeyondStart = self.BeyondStart or (#table.concat(self.Text, "") > 2)
if self.BeyondStart then
self.Value[#self.Value+1] = text
end
end
function Container:Clean(IsTemplate)
self.Text = table.concat(self.Text, "")
if self.Value and IsTemplate then
self.Value = {string.sub(table.concat(self.Value, ""), 1, -3)} --Trim ending }}
self:HandleArgInput("|", true) --Simulate ending
end
self.Value = nil
self.Key = nil
self.BeyondStart = nil
self.LastIndex = nil
self.finalise = nil
self.HandleArgInput = nil
self.AppendText = nil
self.Clean = nil
end
return Container
end
--Step 1: Find and escape the content of all wikilinks on the page, which are stronger than templates (see implementation notes)
local scannerPosition = 1
local wikilinks = {}
local openWikilinks = {}
while true do
local Position, _, Character = string.find(InputText, "([%[%]])%1", scannerPosition)
if not Position then --Done
break
end
scannerPosition = Position+2 --+2 to pass the [[ / ]]
if Character == "[" then --Add a [[ to the pending wikilink queue
openWikilinks[#openWikilinks+1] = Position
else --Pair up the ]] to any available [[
if #openWikilinks >= 1 then
local start = table.remove(openWikilinks) --Pop the latest [[
wikilinks[start] = {Start=start, End=Position+1, Type="Wikilink"} --Note the pair
end
end
end
--Step 2: Find the bounds of every valid template and variable ({{ and {{{)
local scannerPosition = 1
local templates = {}
local variables = {}
local openBrackets = {}
while true do
local Start, _, Character = string.find(InputText, "([{}])%1", scannerPosition)
if not Start then --Done (both 9e9)
break
end
local _, End = string.find(InputText, "^"..Character.."+", Start)
scannerPosition = Start --Get to the {{ / }} set
if Character == "{" then --Add the {{+ set to the queue
openBrackets[#openBrackets+1] = {Start=Start, End=End}
else --Pair up the }} to any available {{, accounting for {{{ / }}}
local BracketCount = End-Start+1
while BracketCount >= 2 and #openBrackets >= 1 do
local OpenSet = table.remove(openBrackets)
if boundlen(OpenSet) >= 3 and BracketCount >= 3 then --We have a {{{variable}}} (both sides have 3 spare)
variables[OpenSet.End-2] = {Start=OpenSet.End-2, End=scannerPosition+2, Type="Variable"} --Done like this to ensure chronological order
BracketCount = BracketCount - 3
OpenSet.End = OpenSet.End - 3
scannerPosition = scannerPosition + 3
else --We have a {{template}} (both sides have 2 spare, but at least one side doesn't have 3 spare)
templates[OpenSet.End-1] = {Start=OpenSet.End-1, End=scannerPosition+1, Type="Template"} --Done like this to ensure chronological order
BracketCount = BracketCount - 2
OpenSet.End = OpenSet.End - 2
scannerPosition = scannerPosition + 2
end
if boundlen(OpenSet) >= 2 then --Still has enough data left, leave it in
openBrackets[#openBrackets+1] = OpenSet
end
end
end
scannerPosition = End --Now move past the bracket set
end
--Step 3: Re-trace every object using their known bounds, collecting our parameters with (slight) ease
local scannerPosition = 1
local activeObjects = {}
local finalObjects = {}
while true do
local LatestObject = activeObjects[#activeObjects] --Commonly needed object
local NNC, _, Character --NNC = NextNotableCharacter
if LatestObject then
NNC, _, Character = string.find(InputText, "([{}%[%]|=])", scannerPosition)
else
NNC, _, Character = string.find(InputText, "([{}])", scannerPosition) --We are only after templates right now
end
if not NNC then
break
end
if NNC > scannerPosition and LatestObject then
local scannedContent = string.sub(InputText, scannerPosition, NNC-1)
LatestObject:AppendText(scannedContent, finalise(scannedContent))
end
scannerPosition = NNC+1
if Character == "{" or Character == "[" then
local Container = templates[NNC] or variables[NNC] or wikilinks[NNC]
if Container then
CreateContainerObj(Container)
if Container.Type == "Template" then
Container:AppendText("{{")
scannerPosition = NNC+2
elseif Container.Type == "Variable" then
Container:AppendText("{{{")
scannerPosition = NNC+3
else --Wikilink
Container:AppendText("[[")
scannerPosition = NNC+2
end
if LatestObject and Container.Type == "Template" then --Only templates count as children
LatestObject.Children[#LatestObject.Children+1] = Container
end
activeObjects[#activeObjects+1] = Container
elseif LatestObject then
LatestObject:AppendText(Character)
end
elseif Character == "}" or Character == "]" then
if LatestObject then
LatestObject:AppendText(Character)
if LatestObject.End == NNC then
if LatestObject.Type == "Template" then
LatestObject:Clean(true)
finalObjects[#finalObjects+1] = LatestObject
else
LatestObject:Clean(false)
end
activeObjects[#activeObjects] = nil
local NewLatest = activeObjects[#activeObjects]
if NewLatest then
NewLatest:AppendText(LatestObject.Text) --Append to new latest
end
end
end
else --| or =
if LatestObject then
LatestObject:HandleArgInput(Character)
end
end
end
--Step 4: Fix the order
local FixedOrder = {}
local SortableReference = {}
for _,Object in next,finalObjects do
SortableReference[#SortableReference+1] = Object.Start
end
table.sort(SortableReference)
for i = 1,#SortableReference do
local start = SortableReference[i]
for n,Object in next,finalObjects do
if Object.Start == start then
finalObjects[n] = nil
Object.Start = nil --Final cleanup
Object.End = nil
Object.Type = nil
FixedOrder[#FixedOrder+1] = Object
break
end
end
end
--Finished, return
return FixedOrder
end
local p = {}
--Main entry points
p.PrepareText = PrepareText
p.ParseTemplates = ParseTemplates
--Extra entry points, not really required
p.TestForNowikiTag = TestForNowikiTag
p.TestForComment = TestForComment
return p
--[==[ console tests
local s = [=[Hey!{{Text|<nowiki | ||>
Hey! }}
A</nowiki>|<!--AAAAA|AAA-->Should see|Shouldn't see}}]=]
local out = p.PrepareText(s)
mw.logObject(out)
local s = [=[B<!--
Hey!
-->A]=]
local out = p.TestForComment(s, 2)
mw.logObject(out); mw.log(string.sub(s, 2, out.Length))
local a = p.ParseTemplates([=[
{{User:Aidan9382/templates/dummy
|A|B|C {{{A|B}}} { } } {
|<nowiki>D</nowiki>
|<pre>E
|F</pre>
|G|=|a=|A = [[{{PAGENAME}}|A=B]]{{Text|1==<nowiki>}}</nowiki>}}|A B=Success}}
]=])
mw.logObject(a)
]==]
1pc5nwfjm9r5mkdrg3s2ci608uixfb7
665084
665083
2025-07-02T01:47:20Z
Novem Linguae
49714
1 revision imported from [[:en:Module:Wikitext_Parsing]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665083
Scribunto
text/plain
require("strict")
--Helper functions
local function startswith(text, subtext)
return string.sub(text, 1, #subtext) == subtext
end
local function endswith(text, subtext)
return string.sub(text, -#subtext, -1) == subtext
end
local function allcases(s)
return s:gsub("%a", function(c)
return "["..c:upper()..c:lower().."]"
end)
end
local trimcache = {}
local whitespace = {[" "]=1, ["\n"]=1, ["\t"]=1, ["\r"]=1}
local function cheaptrim(str) --mw.text.trim is surprisingly expensive, so here's an alternative approach
local quick = trimcache[str]
if quick then
return quick
else
-- local out = string.gsub(str, "^%s*(.-)%s*$", "%1")
local lowEnd
local strlen = #str
for i = 1,strlen do
if not whitespace[string.sub(str, i, i)] then
lowEnd = i
break
end
end
if not lowEnd then
trimcache[str] = ""
return ""
end
for i = strlen,1,-1 do
if not whitespace[string.sub(str, i, i)] then
local out = string.sub(str, lowEnd, i)
trimcache[str] = out
return out
end
end
end
end
--[=[ Implementation notes
---- NORMAL HTML TAGS ----
Tags are very strict on how they want to start, but loose on how they end.
The start must strictly follow <[tAgNaMe](%s|>) with no room for whitespace in
the tag's name, but may then flow as they want afterwards, making
<div\nclass\n=\n"\nerror\n"\n> valid
There's no sense of escaping < or >
E.g.
<div class="error\>"> will end at \> despite it being inside a quote
<div class="<span class="error">error</span>"> will not process the larger div
If a tag has no end, it will consume all text instead of not processing
---- NOPROCESSING TAGS (nowiki, pre, syntaxhighlight, source, etc.) ----
(In most comments, <source> will not be mentioned. This is because it is the
deprecated version of <syntaxhighlight>)
No-Processing tags have some interesting differences to the above rules.
For example, their syntax is a lot stricter. While an opening tag appears to
follow the same set of rules, A closing tag can't have any sort of extra
formatting period. While </div a/a> is valid, </nowiki a/a> isn't - only
newlines and spaces/tabs are allowed in closing tags.
Note that, even though <pre> tags cause a visual change when the ending tag has
extra formatting, it won't cause the no-processing effects. For some reason, the
format must be strict for that to apply.
Both the content inside the tag pair and the content inside each side of the
pair is not processed. E.g. <nowiki |}}>|}}</nowiki> would have both of the |}}
escaped in practice.
When something in the code is referenced to as a "Nowiki Tag", it means a tag
which causes wiki text to not be processed, which includes <nowiki>, <pre>,
and <syntaxhighlight>
Since we only care about these tags, we can ignore the idea of an intercepting
tag preventing processing, and just go straight for the first ending we can find
If there is no ending to find, the tag will NOT consume the rest of the text in
terms of processing behaviour (though <pre> will appear to have an effect).
Even if there is no end of the tag, the content inside the opening half will
still be unprocessed, meaning {{X20|<nowiki }}>}} wouldn't end at the first }}
despite there being no ending to the tag.
Note that there are some tags, like <math>, which also function like <nowiki>
which are included in this aswell. Some other tags, like <ref>, have far too
unpredictable behaviour to be handled currently (they'd have to be split and
processed as something seperate - its complicated, but maybe not impossible.)
I suspect that every tag listed in [[Special:Version]] may behave somewhat like
this, but that's far too many cases worth checking for rarely used tags that may
not even have a good reason to contain {{ or }} anyways, so we leave them alone.
---- HTML COMMENTS AND INCLUDEONLY ----
HTML Comments are about as basic as it could get for this
Start at <!--, end at -->, no extra conditions. Simple enough
If a comment has no end, it will eat all text instead of not being processed
includeonly tags function mostly like a regular nowiki tag, with the exception
that the tag will actually consume all future text if not given an ending as
opposed to simply giving up and not changing anything. Due to complications and
the fact that this is far less likely to be present on a page, aswell as being
something that may not want to be escaped, includeonly tags are ignored during
our processing
--]=]
local validtags = {nowiki=1, pre=1, syntaxhighlight=1, source=1, math=1}
--This function expects the string to start with the tag
local function TestForNowikiTag(text, scanPosition)
local tagName = (string.match(text, "^<([^\n />]+)", scanPosition) or ""):lower()
if not validtags[tagName] then
return nil
end
local nextOpener = string.find(text, "<", scanPosition+1) or -1
local nextCloser = string.find(text, ">", scanPosition+1) or -1
if nextCloser > -1 and (nextOpener == -1 or nextCloser < nextOpener) then
local startingTag = string.sub(text, scanPosition, nextCloser)
--We have our starting tag (E.g. '<pre style="color:red">')
--Now find our ending...
if endswith(startingTag, "/>") then --self-closing tag (we are our own ending)
return {
Tag = tagName,
Start = startingTag,
Content = "", End = "",
Length = #startingTag
}
else
local endingTagStart, endingTagEnd = string.find(text, "</"..allcases(tagName).."[ \t\n]*>", scanPosition)
if endingTagStart then --Regular tag formation
local endingTag = string.sub(text, endingTagStart, endingTagEnd)
local tagContent = string.sub(text, nextCloser+1, endingTagStart-1)
return {
Tag = tagName,
Start = startingTag,
Content = tagContent,
End = endingTag,
Length = #startingTag + #tagContent + #endingTag
}
else --Content inside still needs escaping (also linter error!)
return {
Tag = tagName,
Start = startingTag,
Content = "", End = "",
Length = #startingTag
}
end
end
end
return nil
end
local function TestForComment(text, scanPosition) --Like TestForNowikiTag but for <!-- -->
if string.match(text, "^<!%-%-", scanPosition) then
local commentEnd = string.find(text, "-->", scanPosition+4, true)
if commentEnd then
return {
Start = "<!--", End = "-->",
Content = string.sub(text, scanPosition+4, commentEnd-1),
Length = commentEnd-scanPosition+3
}
else --Consumes all text if not given an ending
return {
Start = "<!--", End = "",
Content = string.sub(text, scanPosition+4),
Length = #text-scanPosition+1
}
end
end
return nil
end
--[[ Implementation notes
The goal of this function is to escape all text that wouldn't be parsed if it
was preprocessed (see above implementation notes).
Using keepComments will keep all HTML comments instead of removing them. They
will still be escaped regardless to avoid processing errors
--]]
local function PrepareText(text, keepComments)
local newtext = {}
local scanPosition = 1
while true do
local NextCheck = string.find(text, "<[NnSsPpMm!]", scanPosition) --Advance to the next potential tag we care about
if not NextCheck then --Done
newtext[#newtext+1] = string.sub(text,scanPosition)
break
end
newtext[#newtext+1] = string.sub(text,scanPosition,NextCheck-1)
scanPosition = NextCheck
local Comment = TestForComment(text, scanPosition)
if Comment then
if keepComments then
newtext[#newtext+1] = Comment.Start .. mw.text.nowiki(Comment.Content) .. Comment.End
end
scanPosition = scanPosition + Comment.Length
else
local Tag = TestForNowikiTag(text, scanPosition)
if Tag then
local newTagStart = "<" .. mw.text.nowiki(string.sub(Tag.Start,2,-2)) .. ">"
local newTagEnd =
Tag.End == "" and "" or --Respect no tag ending
"</" .. mw.text.nowiki(string.sub(Tag.End,3,-2)) .. ">"
local newContent = mw.text.nowiki(Tag.Content)
newtext[#newtext+1] = newTagStart .. newContent .. newTagEnd
scanPosition = scanPosition + Tag.Length
else --Nothing special, move on...
newtext[#newtext+1] = string.sub(text, scanPosition, scanPosition)
scanPosition = scanPosition + 1
end
end
end
return table.concat(newtext, "")
end
--[=[ Implementation notes
This function is an alternative to Transcluder's getParameters which considers
the potential for a singular { or } or other odd syntax that %b doesn't like to
be in a parameter's value.
When handling the difference between {{ and {{{, mediawiki will attempt to match
as many sequences of {{{ as possible before matching a {{
E.g.
{{{{A}}}} -> { {{{A}}} }
{{{{{{{{Text|A}}}}}}}} -> {{ {{{ {{{Text|A}}} }}} }}
If there aren't enough triple braces on both sides, the parser will compromise
for a template interpretation.
E.g.
{{{{A}} }} -> {{ {{ A }} }}
While there are technically concerns about things such as wikilinks breaking
template processing (E.g. {{[[}}]]}} doesn't stop at the first }}), it shouldn't
be our job to process inputs perfectly when the input has garbage ({ / } isn't
legal in titles anyways, so if something's unmatched in a wikilink, it's
guaranteed GIGO)
Setting dontEscape will prevent running the input text through EET. Avoid
setting this to true if you don't have to set it.
Returned values:
A table of all templates. Template data goes as follows:
Text: The raw text of the template
Name: The name of the template
Args: A list of arguments
Children: A list of immediate template children
--]=]
--Helper functions
local function boundlen(pair)
return pair.End-pair.Start+1
end
--Main function
local function ParseTemplates(InputText, dontEscape)
--Setup
if not dontEscape then
InputText = PrepareText(InputText)
end
local function finalise(text)
if not dontEscape then
return mw.text.decode(text)
else
return text
end
end
local function CreateContainerObj(Container)
Container.Text = {}
Container.Args = {}
Container.ArgOrder = {}
Container.Children = {}
-- Container.Name = nil
-- Container.Value = nil
-- Container.Key = nil
Container.BeyondStart = false
Container.LastIndex = 1
Container.finalise = finalise
function Container:HandleArgInput(character, internalcall)
if not internalcall then
self.Text[#self.Text+1] = character
end
if character == "=" then
if self.Key then
self.Value[#self.Value+1] = character
else
self.Key = cheaptrim(self.Value and table.concat(self.Value, "") or "")
self.Value = {}
end
else --"|" or "}"
if not self.Name then
self.Name = cheaptrim(self.Value and table.concat(self.Value, "") or "")
self.Value = nil
else
self.Value = self.finalise(self.Value and table.concat(self.Value, "") or "")
if self.Key then
self.Key = self.finalise(self.Key)
self.Args[self.Key] = cheaptrim(self.Value)
self.ArgOrder[#self.ArgOrder+1] = self.Key
else
local Key = tostring(self.LastIndex)
self.Args[Key] = self.Value
self.ArgOrder[#self.ArgOrder+1] = Key
self.LastIndex = self.LastIndex + 1
end
self.Key = nil
self.Value = nil
end
end
end
function Container:AppendText(text, ftext)
self.Text[#self.Text+1] = (ftext or text)
if not self.Value then
self.Value = {}
end
self.BeyondStart = self.BeyondStart or (#table.concat(self.Text, "") > 2)
if self.BeyondStart then
self.Value[#self.Value+1] = text
end
end
function Container:Clean(IsTemplate)
self.Text = table.concat(self.Text, "")
if self.Value and IsTemplate then
self.Value = {string.sub(table.concat(self.Value, ""), 1, -3)} --Trim ending }}
self:HandleArgInput("|", true) --Simulate ending
end
self.Value = nil
self.Key = nil
self.BeyondStart = nil
self.LastIndex = nil
self.finalise = nil
self.HandleArgInput = nil
self.AppendText = nil
self.Clean = nil
end
return Container
end
--Step 1: Find and escape the content of all wikilinks on the page, which are stronger than templates (see implementation notes)
local scannerPosition = 1
local wikilinks = {}
local openWikilinks = {}
while true do
local Position, _, Character = string.find(InputText, "([%[%]])%1", scannerPosition)
if not Position then --Done
break
end
scannerPosition = Position+2 --+2 to pass the [[ / ]]
if Character == "[" then --Add a [[ to the pending wikilink queue
openWikilinks[#openWikilinks+1] = Position
else --Pair up the ]] to any available [[
if #openWikilinks >= 1 then
local start = table.remove(openWikilinks) --Pop the latest [[
wikilinks[start] = {Start=start, End=Position+1, Type="Wikilink"} --Note the pair
end
end
end
--Step 2: Find the bounds of every valid template and variable ({{ and {{{)
local scannerPosition = 1
local templates = {}
local variables = {}
local openBrackets = {}
while true do
local Start, _, Character = string.find(InputText, "([{}])%1", scannerPosition)
if not Start then --Done (both 9e9)
break
end
local _, End = string.find(InputText, "^"..Character.."+", Start)
scannerPosition = Start --Get to the {{ / }} set
if Character == "{" then --Add the {{+ set to the queue
openBrackets[#openBrackets+1] = {Start=Start, End=End}
else --Pair up the }} to any available {{, accounting for {{{ / }}}
local BracketCount = End-Start+1
while BracketCount >= 2 and #openBrackets >= 1 do
local OpenSet = table.remove(openBrackets)
if boundlen(OpenSet) >= 3 and BracketCount >= 3 then --We have a {{{variable}}} (both sides have 3 spare)
variables[OpenSet.End-2] = {Start=OpenSet.End-2, End=scannerPosition+2, Type="Variable"} --Done like this to ensure chronological order
BracketCount = BracketCount - 3
OpenSet.End = OpenSet.End - 3
scannerPosition = scannerPosition + 3
else --We have a {{template}} (both sides have 2 spare, but at least one side doesn't have 3 spare)
templates[OpenSet.End-1] = {Start=OpenSet.End-1, End=scannerPosition+1, Type="Template"} --Done like this to ensure chronological order
BracketCount = BracketCount - 2
OpenSet.End = OpenSet.End - 2
scannerPosition = scannerPosition + 2
end
if boundlen(OpenSet) >= 2 then --Still has enough data left, leave it in
openBrackets[#openBrackets+1] = OpenSet
end
end
end
scannerPosition = End --Now move past the bracket set
end
--Step 3: Re-trace every object using their known bounds, collecting our parameters with (slight) ease
local scannerPosition = 1
local activeObjects = {}
local finalObjects = {}
while true do
local LatestObject = activeObjects[#activeObjects] --Commonly needed object
local NNC, _, Character --NNC = NextNotableCharacter
if LatestObject then
NNC, _, Character = string.find(InputText, "([{}%[%]|=])", scannerPosition)
else
NNC, _, Character = string.find(InputText, "([{}])", scannerPosition) --We are only after templates right now
end
if not NNC then
break
end
if NNC > scannerPosition and LatestObject then
local scannedContent = string.sub(InputText, scannerPosition, NNC-1)
LatestObject:AppendText(scannedContent, finalise(scannedContent))
end
scannerPosition = NNC+1
if Character == "{" or Character == "[" then
local Container = templates[NNC] or variables[NNC] or wikilinks[NNC]
if Container then
CreateContainerObj(Container)
if Container.Type == "Template" then
Container:AppendText("{{")
scannerPosition = NNC+2
elseif Container.Type == "Variable" then
Container:AppendText("{{{")
scannerPosition = NNC+3
else --Wikilink
Container:AppendText("[[")
scannerPosition = NNC+2
end
if LatestObject and Container.Type == "Template" then --Only templates count as children
LatestObject.Children[#LatestObject.Children+1] = Container
end
activeObjects[#activeObjects+1] = Container
elseif LatestObject then
LatestObject:AppendText(Character)
end
elseif Character == "}" or Character == "]" then
if LatestObject then
LatestObject:AppendText(Character)
if LatestObject.End == NNC then
if LatestObject.Type == "Template" then
LatestObject:Clean(true)
finalObjects[#finalObjects+1] = LatestObject
else
LatestObject:Clean(false)
end
activeObjects[#activeObjects] = nil
local NewLatest = activeObjects[#activeObjects]
if NewLatest then
NewLatest:AppendText(LatestObject.Text) --Append to new latest
end
end
end
else --| or =
if LatestObject then
LatestObject:HandleArgInput(Character)
end
end
end
--Step 4: Fix the order
local FixedOrder = {}
local SortableReference = {}
for _,Object in next,finalObjects do
SortableReference[#SortableReference+1] = Object.Start
end
table.sort(SortableReference)
for i = 1,#SortableReference do
local start = SortableReference[i]
for n,Object in next,finalObjects do
if Object.Start == start then
finalObjects[n] = nil
Object.Start = nil --Final cleanup
Object.End = nil
Object.Type = nil
FixedOrder[#FixedOrder+1] = Object
break
end
end
end
--Finished, return
return FixedOrder
end
local p = {}
--Main entry points
p.PrepareText = PrepareText
p.ParseTemplates = ParseTemplates
--Extra entry points, not really required
p.TestForNowikiTag = TestForNowikiTag
p.TestForComment = TestForComment
return p
--[==[ console tests
local s = [=[Hey!{{Text|<nowiki | ||>
Hey! }}
A</nowiki>|<!--AAAAA|AAA-->Should see|Shouldn't see}}]=]
local out = p.PrepareText(s)
mw.logObject(out)
local s = [=[B<!--
Hey!
-->A]=]
local out = p.TestForComment(s, 2)
mw.logObject(out); mw.log(string.sub(s, 2, out.Length))
local a = p.ParseTemplates([=[
{{User:Aidan9382/templates/dummy
|A|B|C {{{A|B}}} { } } {
|<nowiki>D</nowiki>
|<pre>E
|F</pre>
|G|=|a=|A = [[{{PAGENAME}}|A=B]]{{Text|1==<nowiki>}}</nowiki>}}|A B=Success}}
]=])
mw.logObject(a)
]==]
1pc5nwfjm9r5mkdrg3s2ci608uixfb7
NovemsRedirect2
0
155535
665161
597110
2025-07-02T04:54:41Z
Novem Linguae
49714
Redirected page to [[Test]]
665161
wikitext
text/x-wiki
#REDIRECT [[Test]]
7b7a93jxadqud0gsdhyim6gnupmymjn
MediaWiki:GrowthExperimentsSuggestedEdits.json
8
156151
665056
664144
2025-07-01T21:03:55Z
Etonkovidova (WMF)
27425
testing thresholds for Add link task
665056
json
application/json
{
"$version": "2.0.0",
"GEInfoboxTemplates": [],
"copyedit": {
"disabled": false,
"templates": [
"Who",
"Which",
"Whose",
"To whom?",
"From whom?",
"Like whom?",
"Compared to?",
"NPOV",
"Copy edit",
"Proofreader needed",
"Pronunciation needed",
"Romanization needed",
"Advert"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Basic copyediting"
},
"expand": {
"disabled": false,
"templates": [
"Stub",
"Missing information",
"Expand section"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Manual of Style/Layout"
},
"image_recommendation": {
"disabled": false,
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "",
"maxTasksPerDay": 25,
"templates": [],
"group": "medium",
"type": "image-recommendation"
},
"link_recommendation": {
"disabled": false,
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Hello World",
"maximumLinksToShowPerTask": 3,
"excludedSections": [
"test 1",
"test 2"
],
"maxTasksPerDay": 3,
"underlinkedWeight": 0.5,
"minimumLinkScore": 0.6,
"maximumEditsTaskIsAvailable": "5",
"templates": [],
"group": "easy",
"type": "link-recommendation"
},
"links": {
"disabled": false,
"templates": [
"Sections",
"Cleanup bare URLs"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Manual of Style/Linking"
},
"references": {
"disabled": false,
"templates": [
"Citation needed",
"Unreferenced"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Citing sources"
},
"section_image_recommendation": {
"disabled": false,
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "",
"maxTasksPerDay": 1,
"templates": [],
"group": "medium",
"type": "section-image-recommendation"
},
"update": {
"disabled": false,
"templates": [
"Update",
"Update inline"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:As of"
}
}
fjsj8qf3q3tydyf0l29pbljh7prlq2t
QATEST
0
157067
665090
664235
2025-07-02T01:51:47Z
DJackson (WMF)
62776
Testing Purposes Only
665090
wikitext
text/x-wiki
testteesttestst 123
test
test 12sadfsadfsadfsafsafsd34testssetrerwettessttestsdfsdfsftesttest
test 1234testtsttestsadfsafsafsafasfsffsafsafsdatestfsafasfsfasfsfasf
test 1234testasfsfsa
testtttttttesttesttstewrwerwerwerwrwerwrasdfsdfsdafs
== <big>test 1234test</big> ==
'''<big>test 1234</big>'''
TEST1234
[[Special:Contributions/~2024-7984|~2024-7984]] ([[User talk:~2024-7984|talk]]) 22:34, 23 September 2024 (UTC), </nowiki>~2024-7984
[[Special:Contributions/~2024-7984|~2024-7984]] ([[User talk:~2024-7984|talk]]) 22:34, 23 September 2024 (UTC), ~2024-7984
asp6w4kpieg69k7cd95wc6im55m3irx
665091
665090
2025-07-02T01:54:29Z
DJackson (WMF)
62776
Testing Purposes Only
665091
wikitext
text/x-wiki
testteesttestst 123
test
test 12sadfsadfsadfsafsafsd34testssetrerwettessttestsdfsdfsftesttest
test 1234testtsttestsadfsafsafsafasfsffsafsafsdatestfsafasfsfasfsfasf
test 1234te
testtttttttesttesttstewrwerwerwerwrwerwrasdfsdfsdafs
== <big>test 1234test</big> ==
'''<big>test 1234</big>'''
TEST1234
[[Special:Contributions/~2024-7984|~2024-7984]] ([[User talk:~2024-7984|talk]]) 22:34, 23 September 2024 (UTC), </nowiki>~2024-7984
[[Special:Contributions/~2024-7984|~2024-7984]] ([[User talk:~2024-7984|talk]]) 22:34, 23 September 2024 (UTC), ~2024-7984
ry5y5mqqqfw4bnwvegl69r8op363jwg
User talk:NovemBot
3
160473
665164
648991
2025-07-02T04:56:24Z
Novem Linguae
49714
Notification: speedy deletion nomination of [[:NovemsRedirect]].
665164
wikitext
text/x-wiki
== December 2024 ==
<div class="notice" style="background:#ffe0e0; border:1px solid #886644; padding:0.5em; margin:0.5em auto; min-height: 40px">[[File:Stop x nuvola with clock.svg|40px|left|alt=Stop icon with clock]]<div style="margin-left:45px">You have been '''[[WP:Blocking policy|blocked]]''' from editing for a period of '''3 hours''' for [[WP:Disruptive editing|abuse of editing privileges]]. Once the block has expired, you are welcome to [[WP:Five pillars|make useful contributions]]. In addition, your ability to edit your talk page has {{em|also}} been revoked.</div><div style="margin-left:45px">If you think there are good reasons for being unblocked, please read the [[WP:Guide to appealing blocks|guide to appealing blocks]], then submit a request to the ''[[Wikipedia:Unblock Ticket Request System|Unblock Ticket Request System]]''. –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 10:33, 9 December 2024 (UTC)</div></div><!-- Template:uw-block -->
== I have sent you a note about a page you started ==
{{subst:Sentnote-NPF|1=Test9028|2=Novem Linguae|3=Test}}
–[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 07:00, 6 March 2025 (UTC)
== I have sent you a note about a page you started ==
{{subst:Sentnote-NPF|1=Test9028|2=Novem Linguae|3=Test}}
–[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 07:09, 9 March 2025 (UTC)
==[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] nomination of [[:NovemsRedirect]]==
[[File:Ambox warning pn.svg|48px|left|alt=|link=]]
A tag has been placed on [[:NovemsRedirect]] requesting that it be speedily deleted from Wikipedia. This has been done under [[WP:CSD#X3|section X3 of the criteria for speedy deletion]], because it is a redirect with no space before a parenthetical disambiguation.
If you think this page should not be deleted for this reason, you may '''contest the nomination''' by [[:NovemsRedirect|visiting the page]] and clicking the button labelled "Contest this speedy deletion". This will give you the opportunity to explain why you believe the page should not be deleted. However, be aware that once a page is tagged for speedy deletion, it may be deleted without delay. Please do not remove the speedy deletion tag from the page yourself, but do not hesitate to add information in line with [[Wikipedia:List of policies|Wikipedia's policies and guidelines]]. <!-- Template:Db-x3-notice --><!-- Template:Db-csd-notice-custom --> –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 04:56, 2 July 2025 (UTC)
hapq5kjfizr3me07ki7mf1ulfoowwvz
665166
665164
2025-07-02T05:03:12Z
Novem Linguae
49714
Notification: speedy deletion of [[:NovemsRedirect]].
665166
wikitext
text/x-wiki
== December 2024 ==
<div class="notice" style="background:#ffe0e0; border:1px solid #886644; padding:0.5em; margin:0.5em auto; min-height: 40px">[[File:Stop x nuvola with clock.svg|40px|left|alt=Stop icon with clock]]<div style="margin-left:45px">You have been '''[[WP:Blocking policy|blocked]]''' from editing for a period of '''3 hours''' for [[WP:Disruptive editing|abuse of editing privileges]]. Once the block has expired, you are welcome to [[WP:Five pillars|make useful contributions]]. In addition, your ability to edit your talk page has {{em|also}} been revoked.</div><div style="margin-left:45px">If you think there are good reasons for being unblocked, please read the [[WP:Guide to appealing blocks|guide to appealing blocks]], then submit a request to the ''[[Wikipedia:Unblock Ticket Request System|Unblock Ticket Request System]]''. –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 10:33, 9 December 2024 (UTC)</div></div><!-- Template:uw-block -->
== I have sent you a note about a page you started ==
{{subst:Sentnote-NPF|1=Test9028|2=Novem Linguae|3=Test}}
–[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 07:00, 6 March 2025 (UTC)
== I have sent you a note about a page you started ==
{{subst:Sentnote-NPF|1=Test9028|2=Novem Linguae|3=Test}}
–[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 07:09, 9 March 2025 (UTC)
==[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] nomination of [[:NovemsRedirect]]==
[[File:Ambox warning pn.svg|48px|left|alt=|link=]]
A tag has been placed on [[:NovemsRedirect]] requesting that it be speedily deleted from Wikipedia. This has been done under [[WP:CSD#X3|section X3 of the criteria for speedy deletion]], because it is a redirect with no space before a parenthetical disambiguation.
If you think this page should not be deleted for this reason, you may '''contest the nomination''' by [[:NovemsRedirect|visiting the page]] and clicking the button labelled "Contest this speedy deletion". This will give you the opportunity to explain why you believe the page should not be deleted. However, be aware that once a page is tagged for speedy deletion, it may be deleted without delay. Please do not remove the speedy deletion tag from the page yourself, but do not hesitate to add information in line with [[Wikipedia:List of policies|Wikipedia's policies and guidelines]]. <!-- Template:Db-x3-notice --><!-- Template:Db-csd-notice-custom --> –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 04:56, 2 July 2025 (UTC)
{{subst:db-csd-deleted-custom|1=NovemsRedirect|2=x3}} –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 05:03, 2 July 2025 (UTC)
spsret5nxwp8fbhh5hg5ctbrzp0zf36
665171
665166
2025-07-02T05:04:44Z
Novem Linguae
49714
665171
wikitext
text/x-wiki
== December 2024 ==
<div class="notice" style="background:#ffe0e0; border:1px solid #886644; padding:0.5em; margin:0.5em auto; min-height: 40px">[[File:Stop x nuvola with clock.svg|40px|left|alt=Stop icon with clock]]<div style="margin-left:45px">You have been '''[[WP:Blocking policy|blocked]]''' from editing for a period of '''3 hours''' for [[WP:Disruptive editing|abuse of editing privileges]]. Once the block has expired, you are welcome to [[WP:Five pillars|make useful contributions]]. In addition, your ability to edit your talk page has {{em|also}} been revoked.</div><div style="margin-left:45px">If you think there are good reasons for being unblocked, please read the [[WP:Guide to appealing blocks|guide to appealing blocks]], then submit a request to the ''[[Wikipedia:Unblock Ticket Request System|Unblock Ticket Request System]]''. –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 10:33, 9 December 2024 (UTC)</div></div><!-- Template:uw-block -->
== I have sent you a note about a page you started ==
{{subst:Sentnote-NPF|1=Test9028|2=Novem Linguae|3=Test}}
–[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 07:00, 6 March 2025 (UTC)
== I have sent you a note about a page you started ==
{{subst:Sentnote-NPF|1=Test9028|2=Novem Linguae|3=Test}}
–[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 07:09, 9 March 2025 (UTC)
==[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] nomination of [[:NovemsRedirect]]==
[[File:Ambox warning pn.svg|48px|left|alt=|link=]]
A tag has been placed on [[:NovemsRedirect]] requesting that it be speedily deleted from Wikipedia. This has been done under [[WP:CSD#X3|section X3 of the criteria for speedy deletion]], because it is a redirect with no space before a parenthetical disambiguation.
If you think this page should not be deleted for this reason, you may '''contest the nomination''' by [[:NovemsRedirect|visiting the page]] and clicking the button labelled "Contest this speedy deletion". This will give you the opportunity to explain why you believe the page should not be deleted. However, be aware that once a page is tagged for speedy deletion, it may be deleted without delay. Please do not remove the speedy deletion tag from the page yourself, but do not hesitate to add information in line with [[Wikipedia:List of policies|Wikipedia's policies and guidelines]]. <!-- Template:Db-x3-notice --><!-- Template:Db-csd-notice-custom --> –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 04:56, 2 July 2025 (UTC)
==[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] of [[:NovemsRedirect]]==
[[Image:Ambox warning pn.svg|48px|left|alt=|link=]]
The page [[:NovemsRedirect]] has been speedily deleted from Wikipedia. This was done under [[WP:CSD#X3|section X3 of the criteria for speedy deletion]], because it was a redirect with no space before a parenthetical disambiguation.
Please do not recreate the material without addressing these concerns, but do not hesitate to add information in line with [[Wikipedia:List of policies|Wikipedia's policies and guidelines]]. If you think this page should not have been deleted for this reason, you may contact the {{Querylink|Special:Log|qs=type=delete&page=NovemsRedirect|deleting administrator}}, or if you have already done so, you may open a discussion at [[Wikipedia:Deletion review]]. <!-- Template:Db-x3-deleted --><!-- Template:Db-csd-deleted-custom --> –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 05:03, 2 July 2025 (UTC)
onmem1wutio1qu9xsecrcpoc76uhqku
User:Novem Linguae/twinkleoptions.js
2
161013
665174
629904
2025-07-02T09:21:40Z
Novem Linguae
49714
Saving Twinkle preferences: automatic edit from [[:Wikipedia:Twinkle/Preferences]]
665174
javascript
text/javascript
// twinkleoptions.js: personal Twinkle preferences file
//
// NOTE: The easiest way to change your Twinkle preferences is by using the
// Twinkle preferences panel, at [[Wikipedia:Twinkle/Preferences]].
//
// This file is AUTOMATICALLY GENERATED. Any changes you make (aside from
// changing the configuration parameters in a valid-JavaScript way) will be
// overwritten the next time you click "save" in the Twinkle preferences
// panel. If modifying this file, make sure to use correct JavaScript.
// <nowiki>
window.Twinkle.prefs = {
"optionsVersion": 2.1,
"confirmOnRollback": true,
"watchSpeedyPages": [
"c4",
"g3",
"g5",
"g10",
"g11",
"g12",
"x3"
],
"welcomeUserOnSpeedyDeletionNotification": [
"db",
"a1",
"a2",
"a3",
"a7",
"a9",
"a10",
"a11",
"c1",
"f1",
"f2",
"f3",
"f7",
"f9",
"g1",
"g2",
"g3",
"g4",
"g6",
"g10",
"g11",
"g12",
"g13",
"g14",
"r3",
"u5",
"x3"
],
"notifyUserOnSpeedyDeletionNomination": [
"db",
"a1",
"a2",
"a3",
"a7",
"a9",
"a10",
"a11",
"c1",
"f1",
"f2",
"f3",
"f7",
"f9",
"g1",
"g2",
"g3",
"g4",
"g6",
"g10",
"g11",
"g12",
"g13",
"g14",
"r3",
"u5",
"x3"
],
"warnUserOnSpeedyDelete": [
"db",
"a1",
"a2",
"a3",
"a7",
"a9",
"a10",
"a11",
"c1",
"f1",
"f2",
"f3",
"f7",
"f9",
"g1",
"g2",
"g3",
"g4",
"g6",
"g10",
"g11",
"g12",
"g13",
"g14",
"r3",
"u5",
"x3"
],
"quickWelcomeTemplate": "welcome-short"
};
// </nowiki>
// End of twinkleoptions.js
pxuoir3660adpwihkzfhdzlo4fggslh
665177
665174
2025-07-02T09:24:30Z
Novem Linguae
49714
Revert to revision 629904 dated 2024-12-08 06:05:08 by Novem Linguae using [[:en:Wikipedia:Tools/Navigation_popups|popups]]
665177
javascript
text/javascript
// twinkleoptions.js: personal Twinkle preferences file
//
// NOTE: The easiest way to change your Twinkle preferences is by using the
// Twinkle preferences panel, at [[Wikipedia:Twinkle/Preferences]].
//
// This file is AUTOMATICALLY GENERATED. Any changes you make (aside from
// changing the configuration parameters in a valid-JavaScript way) will be
// overwritten the next time you click "save" in the Twinkle preferences
// panel. If modifying this file, make sure to use correct JavaScript.
// <nowiki>
window.Twinkle.prefs = {
"optionsVersion": 2.1,
"confirmOnRollback": true,
"watchSpeedyPages": [
"g3",
"g5",
"g10",
"g11",
"g12",
"x3"
],
"welcomeUserOnSpeedyDeletionNotification": [
"db",
"g1",
"g2",
"g3",
"g4",
"g6",
"g10",
"g11",
"g12",
"g13",
"g14",
"a1",
"a2",
"a3",
"a7",
"a9",
"a10",
"a11",
"u5",
"f1",
"f2",
"f3",
"f7",
"f9",
"c1",
"r3",
"x3"
],
"notifyUserOnSpeedyDeletionNomination": [
"db",
"g1",
"g2",
"g3",
"g4",
"g6",
"g10",
"g11",
"g12",
"g13",
"g14",
"a1",
"a2",
"a3",
"a7",
"a9",
"a10",
"a11",
"u5",
"f1",
"f2",
"f3",
"f7",
"f9",
"c1",
"r3",
"x3"
],
"warnUserOnSpeedyDelete": [
"db",
"g1",
"g2",
"g3",
"g4",
"g6",
"g10",
"g11",
"g12",
"g13",
"g14",
"a1",
"a2",
"a3",
"a7",
"a9",
"a10",
"a11",
"u5",
"f1",
"f2",
"f3",
"f7",
"f9",
"c1",
"r3",
"x3"
],
"quickWelcomeTemplate": "welcome-short"
};
// </nowiki>
// End of twinkleoptions.js
s77vmfjoap21hp9oetma6biky8wdytr
Template:Db-x3/doc
10
161563
665106
629918
2024-12-23T16:46:48Z
en>Jonesey95
0
add transclusionless template to keep this page off of reports
665106
wikitext
text/x-wiki
{{Speedy deletion templates}}
{{Lua|Module:Unsubst}}
{{transclusionless|reason=it is used temporarily for pages that are tagged for speedy deletion}}
This template is used to tag pages for speedy deletion under the [[Wikipedia:Criteria for speedy deletion|speedy deletion criteria]], specifically [[Wikipedia:Criteria for speedy deletion#X3|CSD X3]]. There is a separate template for each criterion – see the table to the right.
This template places the page into the category: [[:Category:Candidates for speedy deletion as redirects with no space before a parenthetical disambiguation|Candidates for speedy deletion as redirects with no space before a parenthetical disambiguation]].
== Usage ==
The template should be placed at the top of the page to be deleted.
===Parameters===
<kbd><nowiki>{{</nowiki>db-x3<nowiki>}}</nowiki></kbd>
:This is the most basic form of the template.
<kbd><nowiki>{{</nowiki>db-x3<nowiki>|bot=ExampleBot</nowiki><nowiki>}}</nowiki></kbd>
:[[WP:BOT|Bot accounts]] will specify the <code><nowiki>|bot=</nowiki></code> parameter to notify the reviewing admin that the page was tagged by an automated process.
==See also==
*[[Wikipedia:Criteria for speedy deletion]]
*[[Wikipedia:Deletion policy]]
*[[Wikipedia:Deletion process]]
*[[Wikipedia:Deletion review]]
*[[Wikipedia:Template messages/User talk namespace]]
{{sandbox other||[[Category:Speedy deletion templates|X2]]}}
brrlj2hfk5vvp7cma1c4p7d1j3hv0e6
665107
665106
2025-07-02T04:33:36Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-x3/doc]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665106
wikitext
text/x-wiki
{{Speedy deletion templates}}
{{Lua|Module:Unsubst}}
{{transclusionless|reason=it is used temporarily for pages that are tagged for speedy deletion}}
This template is used to tag pages for speedy deletion under the [[Wikipedia:Criteria for speedy deletion|speedy deletion criteria]], specifically [[Wikipedia:Criteria for speedy deletion#X3|CSD X3]]. There is a separate template for each criterion – see the table to the right.
This template places the page into the category: [[:Category:Candidates for speedy deletion as redirects with no space before a parenthetical disambiguation|Candidates for speedy deletion as redirects with no space before a parenthetical disambiguation]].
== Usage ==
The template should be placed at the top of the page to be deleted.
===Parameters===
<kbd><nowiki>{{</nowiki>db-x3<nowiki>}}</nowiki></kbd>
:This is the most basic form of the template.
<kbd><nowiki>{{</nowiki>db-x3<nowiki>|bot=ExampleBot</nowiki><nowiki>}}</nowiki></kbd>
:[[WP:BOT|Bot accounts]] will specify the <code><nowiki>|bot=</nowiki></code> parameter to notify the reviewing admin that the page was tagged by an automated process.
==See also==
*[[Wikipedia:Criteria for speedy deletion]]
*[[Wikipedia:Deletion policy]]
*[[Wikipedia:Deletion process]]
*[[Wikipedia:Deletion review]]
*[[Wikipedia:Template messages/User talk namespace]]
{{sandbox other||[[Category:Speedy deletion templates|X2]]}}
brrlj2hfk5vvp7cma1c4p7d1j3hv0e6
File:Wikitech-2021-blue-large-icon(2).svg
6
166430
665172
662681
2025-07-02T07:16:58Z
Ladsgroup
2217
Ladsgroup uploaded a new version of [[File:Wikitech-2021-blue-large-icon(2).svg]]
659173
wikitext
text/x-wiki
== Licensing ==
{{self|GFDL|cc-by-sa-all|migration=redundant}}
5ln3dh380i59r738tvezfwc817fpsth
665173
665172
2025-07-02T07:20:45Z
Ladsgroup
2217
Ladsgroup uploaded a new version of [[File:Wikitech-2021-blue-large-icon(2).svg]]
659173
wikitext
text/x-wiki
== Licensing ==
{{self|GFDL|cc-by-sa-all|migration=redundant}}
5ln3dh380i59r738tvezfwc817fpsth
What is Espresso
0
166781
665030
664983
2025-07-01T13:56:46Z
Orange2024
68268
665030
wikitext
text/x-wiki
What is Espresso Test?
'''Bold text aa<sub>10</sub>7ba5-7d91-4036-b40d-e664abc79783'''
''Italic text 3bb15488-e4b6-46d4-a605-ae6ae73a0f74''
<u>Underline text</u>
<s>Strikethrough text 400e5517-f1<sup>2</sup>0-43db-82c0-b49b765a7fa2</s>
X2
X10
<big>Large Text</big>
<small>Small Text</small>
<code>fun main() { println("Hello World!!")}</code>
==Heading 2 20173201-cfcd-46a9-a0fc-8b040ff6117e==
===Heading 3===
====Heading 4====
=====Heading 5=====
71rw30x23yt179ecld5rliwna7fmr75
665031
665030
2025-07-01T14:05:28Z
Orange2024
68268
665031
wikitext
text/x-wiki
What is Espresso Test?
'''Bold text d599f64f-<sup>2</sup>925-4c3a-9701-bc42232327a7'''
''Italic text 015ac83d-4f46-4c41-8030-81ae9c2a2272''
<u>Underline text</u>
<s>Strikethrough text ca3<sub>10</sub>634-f24e-48f7-b328-d322b4354b5c</s>
X2
X10
<big>Large Text</big>
<small>Small Text</small>
<code>fun main() { println("Hello World!!")}</code>
==Heading 2 379782ee-08c2-4d7f-b436-ab3a7dd9e641==
===Heading 3===
====Heading 4====
=====Heading 5=====
6ut9ikrwvajf2h732226f0c84ijnsa2
665033
665031
2025-07-01T14:09:17Z
~2025-107739
69365
Adds a note at the top of the page
665033
wikitext
text/x-wiki
== This is a page meant for testing android editing functionality. ==
What is Espresso Test?
'''Bold text d599f64f-<sup>2</sup>925-4c3a-9701-bc42232327a7'''
''Italic text 015ac83d-4f46-4c41-8030-81ae9c2a2272''
<u>Underline text</u>
<s>Strikethrough text ca3<sub>10</sub>634-f24e-48f7-b328-d322b4354b5c</s>
X2
X10
<big>Large Text</big>
<small>Small Text</small>
<code>fun main() { println("Hello World!!")}</code>
==Heading 2 379782ee-08c2-4d7f-b436-ab3a7dd9e641==
===Heading 3===
====Heading 4====
=====Heading 5=====
duwxwmt3t8ddwnrpx9e95fjh5bl4qwh
665034
665033
2025-07-01T14:09:24Z
Orange2024
68268
665034
wikitext
text/x-wiki
== This is a page meant for testing android editing functionality. ==
What is Espresso Test?
'''Bold text <sup>2</sup>5aa38cd-2577-4ee6-a038-46e1ea07a483'''
''Italic text 24e6cf82-2206-456e-b845-43adcda8bbf7''
<u>Underline text</u>
<s>Strikethrough text 3d546467-0459-4c01-9385-ae2661f7db7e</s>
X2
X<sub>10</sub>
<big>Large Text</big>
<small>Small Text</small>
<code>fun main() { println("Hello World!!")}</code>
==Heading 2 aaf63545-abea-43f5-8417-54a52257eb45==
===Heading 3===
====Heading 4====
=====Heading 5=====
8oeu4pz1bqkzs3byl3pdzrgb1b7310n
665036
665034
2025-07-01T14:12:03Z
Orange2024
68268
665036
wikitext
text/x-wiki
* Apple
*Orange
#Bread
#Peanut Butter
[[What is Espresso]]
[[File:Morning_Espresso_Routine_-_Progress,_Results,_Observations_and_Miscellany.webm|thumb]]
o5eqw9jebn7ez07tpmu2clh4a2lvnue
665037
665036
2025-07-01T14:18:14Z
Orange2024
68268
665037
wikitext
text/x-wiki
What is Espresso Test?
==This is a page meant for testing android editing functionality=='''Bold text 67<sup>2</sup>b6355-21cf-4965-a69d-df86624c6a80'''
''Italic text 34ebd389-986c-407b-aee3-246737396e5c''
<u>Underline text</u>
<s>Strikethrough text 2a0b8679-8e5d-4050-9cf6-0b20555b55d4</s>
X2
X<sub>10</sub>
<big>Large Text</big>
<small>Small Text</small>
<code>fun main() { println("Hello World!!")}</code>
==Heading 2 63009314-c622-4aa3-b0f7-45020565841c==
===Heading 3===
====Heading 4====
=====Heading 5=====
q0bcfn6gy3zjqm6c8xwlxfsray76wpr
665038
665037
2025-07-01T14:22:43Z
Orange2024
68268
665038
wikitext
text/x-wiki
What is Espresso Test?
==This is a page meant for testing android editing functionality==
'''Bold text 81c<sup>2</sup>03cb-6f5a-47f9-a238-77a41c1a241f'''
''Italic text 1de7b8d0-a2a9-4313-8391-660cce59624f''
<u>Underline text</u>
<s>Strikethrough text e0156513-d7fd-4ae3-8285-b0ab184eefd9</s>
X2
X<sub>10</sub>
<big>Large Text</big>
<small>Small Text</small>
<code>fun main() { println("Hello World!!")}</code>
==Heading 2 4c6134da-bd9e-43af-af55-c596d0c5dc21==
===Heading 3===
====Heading 4====
=====Heading 5=====
i38ahl1ivly0fx8zn54xb79jrp15fwc
665039
665038
2025-07-01T14:24:52Z
Orange2024
68268
665039
wikitext
text/x-wiki
What is Espresso Test?
==This is a page meant f* Apple
*Orange
#Bread
#Peanut Butter
[[What is Espresso]]
[[File:Morning_Espresso_Routine_-_Progress,_Results,_Observations_and_Miscellany.webm|thumb]]
or testing android editing functionality==
kp9bxovr4piyg7aee7go58xin6ybocs
665040
665039
2025-07-01T14:27:02Z
Orange2024
68268
665040
wikitext
text/x-wiki
What is Espresso Test?
==This is a page meant f
*Apple
*Orange
[[What is Espresso]]
#Bread
#Peanut Butter
[[File:Morning_Espresso_Routine_-_Progress,_Results,_Observations_and_Miscellany.webm|thumb]]
or testing android editing functionality==
8ft8c8rc6q7bo49zrrxnszw2qekto2h
665041
665040
2025-07-01T14:29:18Z
Orange2024
68268
665041
wikitext
text/x-wiki
What is Espresso Test?
==This is a page meant for testing android editing functionality==
*Apple
[[What is Espresso]]
*Orange
#Bread
#Peanut Butter
[[File:Morning_Espresso_Routine_-_Progress,_Results,_Observations_and_Miscellany.webm|thumb]]
8s93ji98ora1w397cgx9xx33idepsxe
Talk:What is Espresso
1
166914
665032
664985
2025-07-01T14:06:56Z
DBrant (WMF)
25683
665032
wikitext
text/x-wiki
== what is this 😂🤣? ==
Please explain what is Espresso? [[User:Orange2024|Orange2024]] ([[User talk:Orange2024|talk]]) 13:52, 30 June 2025 (UTC)
t9w4nhsysobmtyy5102ub5b5v2mkwox
665035
665032
2025-07-01T14:09:54Z
DBrant (WMF)
25683
/* what is this 😂🤣? */ Reply
665035
wikitext
text/x-wiki
== what is this 😂🤣? ==
Please explain what is Espresso? [[User:Orange2024|Orange2024]] ([[User talk:Orange2024|talk]]) 13:52, 30 June 2025 (UTC)
:[https://developer.android.com/training/testing/espresso Espresso] is an instrumented testing framework for Android. This framework will run automated tests that will make edits to this page on testwiki. [[User:DBrant (WMF)|DBrant (WMF)]] ([[User talk:DBrant (WMF)|talk]]) 14:09, 1 July 2025 (UTC)
acj13ujtmd3kgrgoh2xg9dthl8gw66j
Wikipedia:Lua/Module/TemplUtl/Test
4
166924
665043
2025-07-01T17:21:58Z
PerfektesChaos
18104
Setup
665043
wikitext
text/x-wiki
{{LuaModuleDoc}}
Testfälle zum Modul:TemplUtl <code>{{#invoke:TemplUtl|failsafe}}</code>; unerwartete Resultate werden markiert:
== faculty ==
{{#invoke:TemplUtl/test|f|_f_=faculty|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty||_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|0|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|1|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|-|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|yes|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|y|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|YES|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|Yes|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|Y|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|no|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|n|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|No|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|NO|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|N|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|dunno|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|Ja|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|J|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|j|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|ja|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|JA|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|Nein|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|NEIN|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|dunno|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|dunno|0|_r_=0}}
{{#invoke:TemplUtl/test|f|_f_=faculty|dunno|1|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|dunno|-|_r_=-}}
{{#invoke:TemplUtl/test|f|_f_=faculty||1|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|-|1|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|00-00|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|0110-1|_r_=1}}
== facets ==
{{#invoke:TemplUtl/test|f|_f_=facets|abc.def gh (ij)|_r_=abc def gh ij}}
[[Kategorie:Wikipedia:Lua/Modul/Testseite|TemplUtl]]
8wbr7pxfqpjsel7beyhe42c9tc2ejxv
665048
665043
2025-07-01T17:48:57Z
PerfektesChaos
18104
+
665048
wikitext
text/x-wiki
{{LuaModuleDoc}}
Testfälle zum Modul:TemplUtl <code>{{#invoke:TemplUtl|failsafe}}</code>; unerwartete Resultate werden markiert:
== faculty ==
{{#invoke:TemplUtl/test|f|_f_=faculty|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty||_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|0|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|1|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|-|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|yes|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|y|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|YES|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|Yes|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|Y|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|no|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|n|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|No|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|NO|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|N|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|dunno|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|Ja|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|J|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|j|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|ja|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|JA|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|Nein|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|NEIN|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|dunno|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|dunno|0|_r_=0}}
{{#invoke:TemplUtl/test|f|_f_=faculty|dunno|1|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|dunno|-|_r_=-}}
{{#invoke:TemplUtl/test|f|_f_=faculty||1|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=faculty|-|1|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|00-00|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=faculty|0110-1|_r_=1}}
== facets ==
{{#invoke:TemplUtl/test|f|_f_=facets|abc.def gh (ij)|_r_=abc def gh ij}}
== isTempAccount ==
{{#invoke:TemplUtl/test|f|_f_=isTempAccount|Beispielnutzer|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=isTempAccount|~2024-1|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=isTempAccount|~2024-123456789|_r_=1}}
{{#invoke:TemplUtl/test|f|_f_=isTempAccount|~2024-0987|_r_=}}
{{#invoke:TemplUtl/test|f|_f_=isTempAccount|~123-456|_r_=}}
== siteID ==
{{#invoke:TemplUtl/test|f|_f_=siteID|1=|_r_=testwiki}}
[[Kategorie:Wikipedia:Lua/Modul/Testseite|TemplUtl]]
gzyqz669rqqyuxo9te9wrpv94eaoojz
Module:TemplUtl/test
828
166925
665044
2025-07-01T17:33:09Z
PerfektesChaos
18104
Setup
665044
Scribunto
text/plain
return require( "Module:UnitTests/invoke" )
t775y4tkasi7cyoeannvg69wswiymyg
Module:UnitTests/invoke
828
166926
665045
2025-07-01T17:34:06Z
PerfektesChaos
18104
Setup
665045
Scribunto
text/plain
local UnitTests = { suite = "UnitTests",
serial = "2020-04-21",
sub = "invoke",
item = 0 }
--[=[
UnitTests/invoke
Debug any Module from which this is required as a submodule.
Compare result after invoke and expectation.
]=]
local Failsafe = UnitTests
local function fault( alert )
-- Format error by class=error
return tostring( mw.html.create( "span" )
:addClass( "error" )
:wikitext( alert ) )
end -- fault()
local function fade( frame, apply, assign, allow )
-- Escape wikisyntax into one line
-- Parameter:
-- apply -- string, to be escaped
-- assign -- apply CSS style, if string
-- allow -- permit regular text, if true; else code
-- Returns:
-- string, without line break
local r = apply:gsub( string.char( 10 ),
mw.ustring.char( 182 ) )
if allow then
if assign then
local e = mw.html.create( "span" )
:attr( "style", assign )
:wikitext( r )
r = tostring( e )
end
else
local params = { r,
lang="text",
inline="" }
if assign then
params.style = assign
end
r = frame:callParserFunction( "#tag:syntaxhighlight", params )
end
return r
end -- fade()
local function fidelity( frame, action, args, alt, accept, approve )
-- Show result; append string wikisyntax if differing
-- Parameter:
-- action -- string, function
-- args -- table, with forwarded parameter values
-- alt -- table, with displayed parameter values
-- accept -- string, with expectation, or nil
-- approve -- string, with result
-- Returns:
-- string
local r, set, story
for k, v in pairs( alt ) do
if type( k ) == "number" then
set = string.format( "%d", k )
else
set = k
end
if story then
story = story .. "|"
else
story = ""
end
story = string.format( "%s%s=%s", story, set, v )
end -- for k, v
if story then
story = story .. "}}"
else
story = ""
end
r = "* ''" .. action .. "''<br />"
.. fade( frame, story ) .. "<br />"
if accept and accept ~= "" then
r = r .. fade( frame, accept )
end
if not accept and accept ~= "" then
local e = mw.html.create( "code" )
:wikitext( "|_r_=" )
r = string.format( "%s<br />%s%s",
r,
tostring( e ),
fade( frame, approve, "color:#8B008B" ) )
elseif not approve and accept and accept ~= "" then
r = r .. "<br />" .. fault( "''no result''" )
elseif accept and approve and accept ~= approve then
local j = -1
local m = mw.ustring.len( accept )
local n = mw.ustring.len( approve )
local i, sub
r = r .. "<br />»"
for i = 1, m do
if mw.ustring.codepoint( accept, i, i ) ~=
mw.ustring.codepoint( approve, i, i ) then
j = i - 1
break -- for i
end
end -- for i
if j > 0 then
sub = mw.ustring.sub( accept, 1, j )
r = r .. fade( frame, sub )
if n > j then
r = r .. "¶"
end
end
if n > j then
local style = "color: #FF0000; font-weight: bold;"
sub = mw.ustring.sub( approve, j + 1 )
r = string.format( "%s%s",
r, fade( frame, sub, style ) )
end
r = r .. "«"
end
return r
end -- fidelity()
Failsafe.failsafe = function ( atleast )
-- Retrieve versioning and check for compliance
-- Precondition:
-- atleast -- string, with required version or "wikidata" or "~"
-- or false
-- Postcondition:
-- Returns string -- with queried version, also if problem
-- false -- if appropriate
-- 2019-10-15
local last = ( atleast == "~" )
local since = atleast
local r
if last or since == "wikidata" then
local item = Failsafe.item
since = false
if type( item ) == "number" and item > 0 then
local entity = mw.wikibase.getEntity( string.format( "Q%d",
item ) )
if type( entity ) == "table" then
local seek = Failsafe.serialProperty or "P348"
local vsn = entity:formatPropertyValues( seek )
if type( vsn ) == "table" and
type( vsn.value ) == "string" and
vsn.value ~= "" then
if last and vsn.value == Failsafe.serial then
r = false
else
r = vsn.value
end
end
end
end
end
if type( r ) == "nil" then
if not since or since <= Failsafe.serial then
r = Failsafe.serial
else
r = false
end
end
return r
end -- Failsafe.failsafe()
-- Export
local p = { }
function p.f( frame )
local self = frame:getTitle()
local subject = self:match( "^(.+)/[^/]+$" )
local lucky, modt, r
lucky, modt = pcall( require, subject )
if type( modt ) == "table" then
local fun = frame.args[ "_f_" ]
if fun then
local funny = modt[ fun ]
if funny then
local should = frame.args[ "_r_" ]
local params = { }
local views = { }
for k, v in pairs( frame.args ) do
if type( k ) == "string"
and k:sub( 1, 1 ) == "_" then
if k:match( "^_%l_$" ) then
k = false
else
k = k:match( "^__(.+)__$" )
if k then
if k:match( "^[0-9]%d*$" ) then
k = tonumber( k )
end
views[ k ] = v
k = false
end
end
end
if k then
params[ k ] = v
end
end -- for k, v
frame.args = params
lucky, r = pcall( funny, frame )
if lucky then
for k, v in pairs( params ) do
if type( views[ k ] ) ~= "string" then
views[ k ] = v
end
end -- for k, v
r = fidelity( frame, fun, params, views, should, r )
else
r = fault( string.format( "%s %s", self, r ) )
end
else
r = fault( string.format( "%s * function %s unknown",
subject, fun ) )
end
else
r = fault( self .. " * no fun" )
end
else
r = fault( self .. " " .. modt )
end
return r
end -- p.f
p.failsafe = function ( frame )
-- Versioning interface
local s = type( frame )
local since
if s == "table" then
since = frame.args[ 1 ]
elseif s == "string" then
since = frame
end
if since then
since = mw.text.trim( since )
if since == "" then
since = false
end
end
return Failsafe.failsafe( since ) or ""
end -- p.failsafe()
return p
7iurur8ylmicupv1puw89k33klgiz7g
User:~2025-111172
2
166927
665063
2025-07-01T22:40:55Z
~2025-111172
69372
Created page with "This is my user page."
665063
wikitext
text/x-wiki
This is my user page.
cz50nzdtdpsf2l5q032a6ml05dsvexi
Template:Db-t5
10
166929
665069
2024-12-03T05:33:41Z
en>Pppery
0
Protected "[[Template:Db-t5]]": Per standard for CSD templates ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
665069
wikitext
text/x-wiki
{{SAFESUBST:<noinclude />#invoke:Unsubst||$B={{db-meta
|bot={{{bot|}}}
|raw={{{raw|}}}
|rationale={{{rationale|}}}
|criterion=T5
|1= as a template subpage that is no longer used
|self=yes
|summary={{{summary|Unused template subpage}}}
|help={{{help|}}}
}}}}<includeonly>{{Category handler
| all = [[Category:Candidates for speedy deletion]][[Category:Candidates for speedy deletion as unused template subpages]]
| nocat = {{{nocat|}}}
| category2 = {{{category|¬}}}
| page = Foo <!--CIRCUMVENT BLACKLIST-->
}}</includeonly><noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
</noinclude>
sqmfj4wmfp8f7p8jig2mqfrrrbfxk2g
665070
665069
2025-07-02T01:47:17Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-t5]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665069
wikitext
text/x-wiki
{{SAFESUBST:<noinclude />#invoke:Unsubst||$B={{db-meta
|bot={{{bot|}}}
|raw={{{raw|}}}
|rationale={{{rationale|}}}
|criterion=T5
|1= as a template subpage that is no longer used
|self=yes
|summary={{{summary|Unused template subpage}}}
|help={{{help|}}}
}}}}<includeonly>{{Category handler
| all = [[Category:Candidates for speedy deletion]][[Category:Candidates for speedy deletion as unused template subpages]]
| nocat = {{{nocat|}}}
| category2 = {{{category|¬}}}
| page = Foo <!--CIRCUMVENT BLACKLIST-->
}}</includeonly><noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
</noinclude>
sqmfj4wmfp8f7p8jig2mqfrrrbfxk2g
Template:Db-t5/doc
10
166930
665085
2025-01-28T09:19:15Z
en>Gonnym
0
665085
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Speedy deletion templates}}
{{Lua|Module:Unsubst}}
{{tlb|Db-t5}} is used to tag pages for speedy deletion under the [[Wikipedia:Criteria for speedy deletion|speedy deletion criteria]], specifically [[Wikipedia:Criteria for speedy deletion#T5|CSD T5]] and should be placed at the top of the page to be deleted. There is a separate template for each criterion – see the table to the right.
This template places the page into the categor: [[:Category:Candidates for speedy deletion as unused template subpages|Candidates for speedy deletion as unused template subpages]].
==Usage==
The most basic form of the template:
{{tlx|db-t5}}
==Parameters==
* {{para|bot}}: [[WP:BOT|Bot accounts]] will specify the {{para|bot}} parameter to notify the reviewing admin that the page was tagged by an automated process.
* {{para|rationale}}: Can be used to give further explanation.
==See also==
*[[Wikipedia:Criteria for speedy deletion]]
*[[Wikipedia:Deletion policy]]
*{{Section link|Wikipedia talk:Speedy deletion/Archive 90|RfC%3A Enacting T5 (unused template subpages)}}, where the speedy deletion criterion [[WP:T5]] was adopted.
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Speedy deletion templates|T5]]
}}</includeonly>
f6x9vrtdg8kzsi2wz9rfbeo7mj5ql7w
665086
665085
2025-07-02T01:47:21Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-t5/doc]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665085
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Speedy deletion templates}}
{{Lua|Module:Unsubst}}
{{tlb|Db-t5}} is used to tag pages for speedy deletion under the [[Wikipedia:Criteria for speedy deletion|speedy deletion criteria]], specifically [[Wikipedia:Criteria for speedy deletion#T5|CSD T5]] and should be placed at the top of the page to be deleted. There is a separate template for each criterion – see the table to the right.
This template places the page into the categor: [[:Category:Candidates for speedy deletion as unused template subpages|Candidates for speedy deletion as unused template subpages]].
==Usage==
The most basic form of the template:
{{tlx|db-t5}}
==Parameters==
* {{para|bot}}: [[WP:BOT|Bot accounts]] will specify the {{para|bot}} parameter to notify the reviewing admin that the page was tagged by an automated process.
* {{para|rationale}}: Can be used to give further explanation.
==See also==
*[[Wikipedia:Criteria for speedy deletion]]
*[[Wikipedia:Deletion policy]]
*{{Section link|Wikipedia talk:Speedy deletion/Archive 90|RfC%3A Enacting T5 (unused template subpages)}}, where the speedy deletion criterion [[WP:T5]] was adopted.
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Speedy deletion templates|T5]]
}}</includeonly>
f6x9vrtdg8kzsi2wz9rfbeo7mj5ql7w
Peruvian selection of sóftbol feminine
0
166933
665093
2025-07-02T03:09:45Z
EChukwukere-WMF
53540
Created by translating the page "[[:es:Special:Redirect/revision/167859850|Selección peruana de sóftbol femenino]]"
665093
wikitext
text/x-wiki
{| class="toccolours" style="float: right; margin: 0 0 1em 1em;"
| colspan="2" style="background: #efefef; text-align: center;" |'''Selección femenina de sóftbol del Perú'''<br /><br />[[File:Flag_of_Peru.svg|link=Archivo:Flag_of_Peru.svg|200x200px]]
|- style="vertical-align:top;"
|'''Federación'''
|[[Federación Deportiva Peruana de Softbol]] (FDPS)
|- style="vertical-align:top;"
|'''Confederación'''
|[[Confederación Panamericana de Sóftbol]] (CONPASA)
|- style="vertical-align:top;"
|'''Dir. Técnico'''
|
|- style="vertical-align:top;"
|'''Ranking'''
|19° (1021 Puntos)
|- style="vertical-align:top;"
|'''Uniforme'''
|- style="text-align:center;"
| colspan="2" class="toccolours" style="background: #FFFFFF;" |
{| align="center" style="width:100%; text-align:center;"
|{{Baseball uniform}}
|{{Baseball uniform}}
|}
|- style="text-align:center;"
| colspan="2" bgcolor="#E0E0E0" |[[Women's Softball World Cup|Campeonato Mundial de Sóftbol]]
|- style="text-align:right;"
|'''Participaciones'''
|1 (''por primera vez en [[Campeonato Mundial de Sóftbol Femenino de 2016|2016]]'')
|- style="text-align:right;"
|'''Mejor resultado'''
|21.º lugar: ([[Campeonato Mundial de Sóftbol Femenino de 2016|2016]])
|- style="text-align:center;"
| colspan="2" bgcolor="#E0E0E0" |Campeonato Panamericano de Sóftbol
|- style="text-align:center;"
|'''Participaciones'''
|5 (''por primera vez en [[Campeonato Mundial de Sóftbol Femenino de 1987|1987]]'')
|- style="text-align:center;"
|'''Mejor resultado'''
|
|- style="text-align:center;"
| colspan="2" bgcolor="#E0E0E0" |[[Campeonato Suramericano de Sóftbol Femenino|Campeonato Suramericano de Sóftbol]]
|- style="text-align:center;"
|'''Participaciones'''
|
|- style="text-align:center;"
|'''Mejor resultado'''
|
|- style="text-align:center;"
| colspan="2" bgcolor="#E0E0E0" |[[Pan American Games|Juegos Panamericanos]]
|- style="text-align:center;"
|'''Participaciones'''
|1 (''por primera vez en 2019'')
|- style="text-align:center;"
|'''Mejor resultado'''
|
|- style="text-align:center;"
| colspan="2" bgcolor="#E0E0E0" |[[South American Games|Juegos Suramericanos]]
|- style="text-align:center;"
|'''Participaciones'''
|
|- style="text-align:center;"
|'''Mejor resultado'''
|- style="text-align:center;"
|}
The '''Women's team of sóftbol of the Peru''' is the set that represents to the country in the main competitions of this sport to world-wide level, continental and regional.<ref>{{Cite web |year=2013 |editor-last=generaccion.com |title=Selección de softbol buscará el podio en los Juegos Bolivarianos |url=http://www.generaccion.com/noticia/192150/seleccion-softbol-buscara-podio-juegos-bolivarianos |access-date=17 de octubre de 2014}}</ref> In the 2016 took part for the first time in the World-wide Championship of Sóftbol Feminine of 2016 in Canada situating in the place 21.<ref>{{Cite web |title=Perú se ubica en el puesto 21 del ranking mundial de sóftbol |url=http://elcomercio.pe/deporte-total/polideportivo/peru-se-ubica-puesto-21-ranking-mundial-softbol-noticia-1938919 |access-date=7 de enero de 2017 |publisher=El Comercio}}</ref> In the 2022 attained his classification to the Games Panamericanos Santiago 2023.<ref>{{Cite web |date=20 de noviembre de 2022 |title=Selección femenina de sóftbol logró clasificación a Santiago 2023 |url=https://www.infobae.com/america/peru/2022/11/21/seleccion-femenina-de-softbol-logro-clasificacion-a-santiago-2023/ |access-date=18 de diciembre de 2022 |publisher=Infobae}}</ref> Test test test test test test test test test test test test test test test test test test test test test test
[[Category:Women's national sports teams of Peru]]
[[Category:Women's national softball teams]]
86uytpj8gyb9o8k87cv5ref80eiag1d
Module:AddWarning
828
166934
665094
2025-07-02T03:16:44Z
Nardog
40946
Created page with "local p = {} mw.addWarning('foo') mw.addWarning('bar') function p.main(frame) return nil end return p"
665094
Scribunto
text/plain
local p = {}
mw.addWarning('foo')
mw.addWarning('bar')
function p.main(frame)
return nil
end
return p
8ouiclfotiiteip5h6b5gmeqevm49r7
665096
665094
2025-07-02T03:19:31Z
Nardog
40946
665096
Scribunto
text/plain
local p = {}
function p.main(frame)
mw.addWarning(frame.args[1])
return string.format('This should add "Script warning: %s"', frame.args[1])
end
return p
4shvx6vavwo08h1k7up42denveem304
AddWarning
0
166935
665095
2025-07-02T03:17:00Z
Nardog
40946
Created page with "{{#invoke:AddWarning|main}}"
665095
wikitext
text/x-wiki
{{#invoke:AddWarning|main}}
cuh5cqkyhx38cvm3hugnarank0lnbst
665097
665095
2025-07-02T03:19:45Z
Nardog
40946
665097
wikitext
text/x-wiki
{{#invoke:AddWarning|main|foo}}
{{#invoke:AddWarning|main|bar}}
6w8wj1la1m1wmzk3nq7y77l82n7puu0
Chikezie
0
166936
665098
2025-07-02T03:27:58Z
EChukwukere-WMF
53540
Auto-created by SectionTranslation:onSectionTranslationBeforePublish
665098
wikitext
text/x-wiki
{{Short description|American singer}}
{{Use mdy dates|date=December 2018}}
{{Infobox musical artist
| name = Chikezie
| image = ChikezieEze.jpg
| caption = Chikezie in 2008
| birth_name =
| birth_date =
| birth_place = [[Inglewood, California]], US
| origin =
| genre = [[R&B]], [[Soul music|soul]]
| occupation = [[Singing|Singer]]
| instrument = [[Vocal]]s, [[guitar]], [[harmonica]]
| years_active = 2007–present
| label =
| website =
}}
'''Chikezie Eze'''<ref>{{cite news |last1=Tomcho |first1=Sandy |title=Former 'American Idol' Chikezie Eze speaks out |url=https://www.recordonline.com/story/entertainment/local/2008/11/28/former-american-idol-chikezie-eze/52167769007/ |access-date=4 June 2023 |work=Times Herald-Record |date=28 November 2008}}</ref> ({{IPAc-en|ˈ|tʃ|ɪ|k|iː|z|iː}}) is an American singer and the tenth place finalist on the [[American Idol (season 7)|seventh season]] of the television series ''[[American Idol]]''.
==Early life==
Chikezie was born in [[Inglewood, California]] to Nigerian parents, attended high school at the Los Angeles Center for Enriched Studies in West LA and [[Bethel College (Kansas)|Bethel College]] in Kansas.<ref>{{Cite web|url=http://napavalleyregister.com/eagle/entertainment/american-idol-finalist-to-visit-idol-nv/article_5e6f50cd-2f17-5e17-b58e-704c67e0751e.html|title = American Idol finalist to visit Idol NV| date=January 29, 2009 }}</ref> Before auditioning for ''American Idol'', he was a [[Transportation Security Administration]] screener and a cashier. He also attended [[Santa Monica College]] in [[Santa Monica, California]].<ref>{{Cite web |title='American Idol': It's over for Amanda Overmyer - USATODAY.com |url=http://usatoday30.usatoday.com/life/television/news/2008-03-19-idol-elimination_N.htm |access-date=2024-06-12 |website=usatoday30.usatoday.com}}</ref>
==American Idol==
Chikezie successfully auditioned for the [[American Idol (season 7)|seventh season]] of ''[[American Idol]]'' and made it to the top 12. He was eliminated on March 26, 2008, finishing in tenth place.
===Performances===
{| class="wikitable unsortable" style="text-align:center;"
|-
! scope="col"| Week
! scope="col"| Theme
! scope="col"| Song
! scope="col"| Original artist
! scope="col"| Result
|-
! scope="row" | Top 24
| 1960s
| "[[More Today Than Yesterday]]"
| [[The Spiral Starecase]]
| style="background:#FDFC8F|Safe
|-
! scope="row" | Top 20
| 1970s
| "[[I Believe to My Soul (song)|I Believe to My Soul]]"
| [[Donny Hathaway]]
| style="background:#FDFC8F|Safe
|-
! scope="row" | Top 16
| 1980s
| "[[All the Man That I Need]]"
| [[Linda Clifford]]
| style="background:#FDFC8F|Safe
|-
! scope="row" | Top 12
| [[Lennon–McCartney]]
| "[[She's a Woman]]"
| [[The Beatles]]
| style="background:#FDFC8F|Safe
|-
! scope="row" | Top 11
| [[The Beatles]]
| "[[I've Just Seen a Face]]"
| [[The Beatles]]
| style="background:#FDFC8F|Safe
|-
! scope="row" | Top 10
| Birth year
| "[[The Night I Fell in Love (album)|If Only for One Night]]"
| [[Luther Vandross]]
| bgcolor="FF91A4" | Eliminated
|}
==Discography==
[[Image:Chikezie.jpg|right|thumb|250px|Chikezie performing during the American Idols Live! Tour 2008.]]
===Singles===
These are his most downloaded songs and performances from [[iTunes]]:
*2008:"[[She's a Woman]]"
*2008:"[[I've Just Seen a Face]]"
*2008:"[[I Believe to My Soul (song)|I Believe to My Soul]]"
===Tours===
*2008: [[American Idols LIVE! Tour 2008]]
*2009: American Stars In Concert - Wings Stadium, Kalamazoo, MI March 26, 2009
==References==
{{Reflist}}
==External links==
* [http://www.americanidol.com/contestants/season7/chikezie/ Official profile on American Idol.com]
* [https://web.archive.org/web/20050405152507/http://www.thekansan.com/stories/031005/accent_0310050031.shtml Bethel celebrates 50 years of opera]
{{American Idol 7}}
{{Authority control}}
[[Category:1985 births]]
[[Category:Living people]]
[[Category:21st-century American singers]]
[[Category:African-American male actors]]
[[Category:20th-century African-American male singers]]
[[Category:20th-century American male singers]]
[[Category:20th-century American singers]]
[[Category:American Idol participants]]
[[Category:American male television actors]]
[[Category:Musicians from Inglewood, California]]
[[Category:Santa Monica College alumni]]
[[Category:Singers from California]]
[[Category:21st-century American male singers]]
[[Category:21st-century African-American male singers]]
[[Category:American musicians of Nigerian descent]]
ee1czq6tmv5741b3xks2les03i5vwbw
665099
665098
2025-07-02T03:27:59Z
EChukwukere-WMF
53540
Created by translating the section "Biografía" from the page "[[:es:Special:Redirect/revision/166747091|Chikezie]]"
665099
wikitext
text/x-wiki
{{Short description|American singer}}
{{Use mdy dates|date=December 2018}}
{{Infobox musical artist
| name = Chikezie
| image = ChikezieEze.jpg
| caption = Chikezie in 2008
| birth_name =
| birth_date =
| birth_place = [[Inglewood, California]], US
| origin =
| genre = [[R&B]], [[Soul music|soul]]
| occupation = [[Singing|Singer]]
| instrument = [[Vocal]]s, [[guitar]], [[harmonica]]
| years_active = 2007–present
| label =
| website =
}}
'''Chikezie Eze'''<ref>{{cite news |last1=Tomcho |first1=Sandy |title=Former 'American Idol' Chikezie Eze speaks out |url=https://www.recordonline.com/story/entertainment/local/2008/11/28/former-american-idol-chikezie-eze/52167769007/ |access-date=4 June 2023 |work=Times Herald-Record |date=28 November 2008}}</ref> ({{IPAc-en|ˈ|tʃ|ɪ|k|iː|z|iː}}) is an American singer and the tenth place finalist on the [[American Idol (season 7)|seventh season]] of the television series ''[[American Idol]]''.
==Early life==
Chikezie was born in [[Inglewood, California]] to Nigerian parents, attended high school at the Los Angeles Center for Enriched Studies in West LA and [[Bethel College (Kansas)|Bethel College]] in Kansas.<ref>{{Cite web|url=http://napavalleyregister.com/eagle/entertainment/american-idol-finalist-to-visit-idol-nv/article_5e6f50cd-2f17-5e17-b58e-704c67e0751e.html|title = American Idol finalist to visit Idol NV| date=January 29, 2009 }}</ref> Before auditioning for ''American Idol'', he was a [[Transportation Security Administration]] screener and a cashier. He also attended [[Santa Monica College]] in [[Santa Monica, California]].<ref>{{Cite web |title='American Idol': It's over for Amanda Overmyer - USATODAY.com |url=http://usatoday30.usatoday.com/life/television/news/2008-03-19-idol-elimination_N.htm |access-date=2024-06-12 |website=usatoday30.usatoday.com}}</ref>
==American Idol==
Chikezie successfully auditioned for the [[American Idol (season 7)|seventh season]] of ''[[American Idol]]'' and made it to the top 12. He was eliminated on March 26, 2008, finishing in tenth place.
===Performances===
{| class="wikitable unsortable" style="text-align:center;"
|-
! scope="col"| Week
! scope="col"| Theme
! scope="col"| Song
! scope="col"| Original artist
! scope="col"| Result
|-
! scope="row" | Top 24
| 1960s
| "[[More Today Than Yesterday]]"
| [[The Spiral Starecase]]
| style="background:#FDFC8F|Safe
|-
! scope="row" | Top 20
| 1970s
| "[[I Believe to My Soul (song)|I Believe to My Soul]]"
| [[Donny Hathaway]]
| style="background:#FDFC8F|Safe
|-
! scope="row" | Top 16
| 1980s
| "[[All the Man That I Need]]"
| [[Linda Clifford]]
| style="background:#FDFC8F|Safe
|-
! scope="row" | Top 12
| [[Lennon–McCartney]]
| "[[She's a Woman]]"
| [[The Beatles]]
| style="background:#FDFC8F|Safe
|-
! scope="row" | Top 11
| [[The Beatles]]
| "[[I've Just Seen a Face]]"
| [[The Beatles]]
| style="background:#FDFC8F|Safe
|-
! scope="row" | Top 10
| Birth year
| "[[The Night I Fell in Love (album)|If Only for One Night]]"
| [[Luther Vandross]]
| bgcolor="FF91A4" | Eliminated
|}
== The following is a list of the ==
He was born in Inglewood, California, the son of [[Nigeria|Nigerians]] immigrants Richard Eze and Chika Emerueh Eze. Test test test test test test test test test Test test test test test test test test test Test test test test test test test test test
==Discography==
[[Image:Chikezie.jpg|right|thumb|250px|Chikezie performing during the American Idols Live! Tour 2008.]]
===Singles===
These are his most downloaded songs and performances from [[iTunes]]:
*2008:"[[She's a Woman]]"
*2008:"[[I've Just Seen a Face]]"
*2008:"[[I Believe to My Soul (song)|I Believe to My Soul]]"
===Tours===
*2008: [[American Idols LIVE! Tour 2008]]
*2009: American Stars In Concert - Wings Stadium, Kalamazoo, MI March 26, 2009
==References==
{{Reflist}}
==External links==
* [http://www.americanidol.com/contestants/season7/chikezie/ Official profile on American Idol.com]
* [https://web.archive.org/web/20050405152507/http://www.thekansan.com/stories/031005/accent_0310050031.shtml Bethel celebrates 50 years of opera]
{{American Idol 7}}
{{Authority control}}
[[Category:1985 births]]
[[Category:Living people]]
[[Category:21st-century American singers]]
[[Category:African-American male actors]]
[[Category:20th-century African-American male singers]]
[[Category:20th-century American male singers]]
[[Category:20th-century American singers]]
[[Category:American Idol participants]]
[[Category:American male television actors]]
[[Category:Musicians from Inglewood, California]]
[[Category:Santa Monica College alumni]]
[[Category:Singers from California]]
[[Category:21st-century American male singers]]
[[Category:21st-century African-American male singers]]
[[Category:American musicians of Nigerian descent]]
1osdju78svz8oyzaxdvsihdysuuhrec
Template:NovemTest
10
166937
665108
2025-07-02T04:41:54Z
NovemBot
52214
Created page with "Test"
665108
wikitext
text/x-wiki
Test
bop1vj5i98maix36pjrpgep1w6hnxfe
Template:Db-x3-notice
10
166938
665109
2025-07-02T04:46:12Z
en>Novem Linguae
0
Copied content from [[Template:Db-redirtypo-notice]]; see that page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665109
wikitext
text/x-wiki
{{{{{|safesubst:}}}db-notice
|namespace = {{{namespace|}}}
|target = {{{1}}}
|nowelcome = {{{nowelcome|}}}
|header = {{{header|}}}
|header-text = {{{header-text|}}}
|icon = File:Ambox warning pn.svg
|willprovide = no
|text = A tag has been placed on [[:{{{1}}}]] requesting that it be speedily deleted from Wikipedia. This has been done under [[WP:CSD#X3|section X3 of the criteria for speedy deletion]], because it is a redirect with no space before a parenthetical disambiguation.}}<!-- Template:Db-x3-notice --><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
gxksekzkege4gndz4og5t0ilp57o63d
665110
665109
2025-07-02T04:53:09Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-x3-notice]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665109
wikitext
text/x-wiki
{{{{{|safesubst:}}}db-notice
|namespace = {{{namespace|}}}
|target = {{{1}}}
|nowelcome = {{{nowelcome|}}}
|header = {{{header|}}}
|header-text = {{{header-text|}}}
|icon = File:Ambox warning pn.svg
|willprovide = no
|text = A tag has been placed on [[:{{{1}}}]] requesting that it be speedily deleted from Wikipedia. This has been done under [[WP:CSD#X3|section X3 of the criteria for speedy deletion]], because it is a redirect with no space before a parenthetical disambiguation.}}<!-- Template:Db-x3-notice --><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
gxksekzkege4gndz4og5t0ilp57o63d
Template:First article
10
166939
665117
2023-06-14T19:42:03Z
en>Frietjes
0
remove redundant </noinclude><noinclude>
665117
wikitext
text/x-wiki
{{{{{|safesubst:}}}#ifeq: {{{{{|safesubst:}}}lc:{{{header|}}}}} | no | Hello| == Welcome! ==
Hello}}<noinclude>, Jimbo,</noinclude><includeonly>{{{{{|safesubst:}}}#if:{{{{{|safesubst:}}}IsIPAddress|{{{{{|safesubst:}}}BASEPAGENAME}}}}||, {{{{{|safesubst:}}}BASEPAGENAME}},}}</includeonly> and [[Help:Introduction|welcome]] to Wikipedia! {{{{{|safesubst:}}}#if:{{{thanks|}}}|Thank you for [[Special:Contributions/{{{{{|safesubst:}}}PAGENAME}}|your contributions]].}} I hope you like the place and decide to stay. Unfortunately, one or more of the pages you created{{{{{|safesubst:}}}#if:{{{target|{{{1|}}}}}}| , such as {{{{{|safesubst:}}}linked|{{{namespace|}}}:{{{target|{{{1}}}}}}}},}} may not conform to some of Wikipedia's [[Wikipedia:Core content policies|content policies]] and may not be retained. In short, the topic of an article must be [[Wikipedia:Notability|notable]] and have already been the subject of publication by [[Wikipedia:Reliable sources|reliable]] and [[Wikipedia:Independent sources|independent sources]].
Please review '''[[Help:Your first article|Your first article]]''' for an overview of the [[Wikipedia:Articles for creation|article creation process]]. The '''[[Wikipedia:Article wizard|Article Wizard]]''' is available to help you create an article, where it will be reviewed and considered for publication. For information on how to request a new article that can be created by someone else, see '''[[Wikipedia:Requested articles|Requested articles]].''' If you are stuck, come to the '''[[Wikipedia:Teahouse|Teahouse]]''', where experienced Wikipedians can help you through the processes.
New to Wikipedia? Please consider taking a look at [[Help:Introduction|our introductory tutorial]] or reviewing the [[Wikipedia:Contributing to Wikipedia|contributing to Wikipedia]] page to learn the basics about editing. Below are a few other good pages about article creation.
* [[Wikipedia:Article development|Article development]]
* [[Wikipedia:Manual of Style/Layout|Standard layout]]
* [[Wikipedia:Manual of Style/Lead section|Lead section]]
* [[Wikipedia:The perfect article|The perfect article]]
* [[Wikipedia:Task Center|Task Center]]{{snd}}need some ideas of what kind of things need doing? Go here.
I hope you enjoy editing here and being a [[Wikipedia:Wikipedians|Wikipedian]]! Please [[Wikipedia:Signatures|sign your name]] on talk pages using four tildes (<nowiki>~~~~</nowiki>); this will automatically produce your name and the date. If you have any questions, ask me on {{{{{|safesubst:}}}#if:{{{2|}}}|[[User talk:{{{2}}}|my talk page]]|my talk page}}. You can also type '''{{tl|help me}}''' on this page, followed by your question, and someone will show up shortly to answer your questions. Again, welcome!<!-- Template:First article --> ~~<includeonly>~~</includeonly><noinclude>~~
{{documentation}}
<!-- Please add this template's categories to the /doc subpage - thanks! -->
</noinclude>
j2ro1lc88ya68qso9rpd0tww21vgisu
665118
665117
2025-07-02T04:53:10Z
Novem Linguae
49714
1 revision imported from [[:en:Template:First_article]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665117
wikitext
text/x-wiki
{{{{{|safesubst:}}}#ifeq: {{{{{|safesubst:}}}lc:{{{header|}}}}} | no | Hello| == Welcome! ==
Hello}}<noinclude>, Jimbo,</noinclude><includeonly>{{{{{|safesubst:}}}#if:{{{{{|safesubst:}}}IsIPAddress|{{{{{|safesubst:}}}BASEPAGENAME}}}}||, {{{{{|safesubst:}}}BASEPAGENAME}},}}</includeonly> and [[Help:Introduction|welcome]] to Wikipedia! {{{{{|safesubst:}}}#if:{{{thanks|}}}|Thank you for [[Special:Contributions/{{{{{|safesubst:}}}PAGENAME}}|your contributions]].}} I hope you like the place and decide to stay. Unfortunately, one or more of the pages you created{{{{{|safesubst:}}}#if:{{{target|{{{1|}}}}}}| , such as {{{{{|safesubst:}}}linked|{{{namespace|}}}:{{{target|{{{1}}}}}}}},}} may not conform to some of Wikipedia's [[Wikipedia:Core content policies|content policies]] and may not be retained. In short, the topic of an article must be [[Wikipedia:Notability|notable]] and have already been the subject of publication by [[Wikipedia:Reliable sources|reliable]] and [[Wikipedia:Independent sources|independent sources]].
Please review '''[[Help:Your first article|Your first article]]''' for an overview of the [[Wikipedia:Articles for creation|article creation process]]. The '''[[Wikipedia:Article wizard|Article Wizard]]''' is available to help you create an article, where it will be reviewed and considered for publication. For information on how to request a new article that can be created by someone else, see '''[[Wikipedia:Requested articles|Requested articles]].''' If you are stuck, come to the '''[[Wikipedia:Teahouse|Teahouse]]''', where experienced Wikipedians can help you through the processes.
New to Wikipedia? Please consider taking a look at [[Help:Introduction|our introductory tutorial]] or reviewing the [[Wikipedia:Contributing to Wikipedia|contributing to Wikipedia]] page to learn the basics about editing. Below are a few other good pages about article creation.
* [[Wikipedia:Article development|Article development]]
* [[Wikipedia:Manual of Style/Layout|Standard layout]]
* [[Wikipedia:Manual of Style/Lead section|Lead section]]
* [[Wikipedia:The perfect article|The perfect article]]
* [[Wikipedia:Task Center|Task Center]]{{snd}}need some ideas of what kind of things need doing? Go here.
I hope you enjoy editing here and being a [[Wikipedia:Wikipedians|Wikipedian]]! Please [[Wikipedia:Signatures|sign your name]] on talk pages using four tildes (<nowiki>~~~~</nowiki>); this will automatically produce your name and the date. If you have any questions, ask me on {{{{{|safesubst:}}}#if:{{{2|}}}|[[User talk:{{{2}}}|my talk page]]|my talk page}}. You can also type '''{{tl|help me}}''' on this page, followed by your question, and someone will show up shortly to answer your questions. Again, welcome!<!-- Template:First article --> ~~<includeonly>~~</includeonly><noinclude>~~
{{documentation}}
<!-- Please add this template's categories to the /doc subpage - thanks! -->
</noinclude>
j2ro1lc88ya68qso9rpd0tww21vgisu
Template:Db-x3-notice/doc
10
166940
665119
2025-07-02T04:51:31Z
en>Novem Linguae
0
fix sortkey
665119
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{Twinkle standard installation}}
{{subst only|auto=yes}}
{{speedy deletion notices}}
{{db notice doc/lead
|criterion = X3
|criterion-desc = redirect with no space before a parenthetical disambiguation
|speedy-template = db-x3
}}
== Usage ==
{{db notice doc/usage
|nowelcome = yes
}}
=== Basic usage ===
{{db notice doc/basicusage
| warning-template =
}}
=== Parameters ===
{{db notice doc/parameters
|nowelcome = yes
|header = yes
|header-text = yes
|demo = yes
|namespace = yes
}}
=== Examples ===
{{db notice doc/examples
|nowelcome = yes
|header = yes
|header-text = yes
|warning-template =
}}
== See also ==
{{db notice doc/seealso}}
{{speedy deletion navbox}}
__NOEDITSECTION__
<includeonly>{{Sandbox other||
__NOTOC__
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Speedy deletion warning templates|x3-notice]]
}}</includeonly>
45z75divl9y9mlq4uyxdlj51q2p2ldg
665120
665119
2025-07-02T04:53:20Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-x3-notice/doc]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665119
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{Twinkle standard installation}}
{{subst only|auto=yes}}
{{speedy deletion notices}}
{{db notice doc/lead
|criterion = X3
|criterion-desc = redirect with no space before a parenthetical disambiguation
|speedy-template = db-x3
}}
== Usage ==
{{db notice doc/usage
|nowelcome = yes
}}
=== Basic usage ===
{{db notice doc/basicusage
| warning-template =
}}
=== Parameters ===
{{db notice doc/parameters
|nowelcome = yes
|header = yes
|header-text = yes
|demo = yes
|namespace = yes
}}
=== Examples ===
{{db notice doc/examples
|nowelcome = yes
|header = yes
|header-text = yes
|warning-template =
}}
== See also ==
{{db notice doc/seealso}}
{{speedy deletion navbox}}
__NOEDITSECTION__
<includeonly>{{Sandbox other||
__NOTOC__
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Speedy deletion warning templates|x3-notice]]
}}</includeonly>
45z75divl9y9mlq4uyxdlj51q2p2ldg
Template:Speedy deletion notices/styles.css
10
166941
665135
2024-08-02T23:23:24Z
en>Warudo
0
lint
665135
sanitized-css
text/css
/* Pre sidebar version included:
.speedy-deletion-notices {
margin:0.5em 0 0.7em 1.4em;border:1px solid #aaa;
}
*/
.speedy-deletion-notices .sidebar-pretitle,
.speedy-deletion-notices .sidebar-heading {
background: #ddddff;
}
.speedy-deletion-notices .sidebar-title {
background: #ddddff;
display: block;
margin-bottom: 0.5em;
}
.speedy-deletion-notices .sidebar-list-title {
background: #ddddff;
text-align: center;
}
.speedy-deletion-notices .infobox-label {
width: 2.5em;
background: #ddddff;
vertical-align: middle;
text-align: center;
line-height: 1.35em;
border-bottom: 1px solid #aaa;
}
.speedy-deletion-notices .infobox-data {
padding-left: 0.25em;
line-height: 1.35em;
border-bottom: 1px solid #aaa;
}
l5gsphhb3paujfpxsob69fz0yqr8okd
665136
665135
2025-07-02T04:53:23Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Speedy_deletion_notices/styles.css]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665135
sanitized-css
text/css
/* Pre sidebar version included:
.speedy-deletion-notices {
margin:0.5em 0 0.7em 1.4em;border:1px solid #aaa;
}
*/
.speedy-deletion-notices .sidebar-pretitle,
.speedy-deletion-notices .sidebar-heading {
background: #ddddff;
}
.speedy-deletion-notices .sidebar-title {
background: #ddddff;
display: block;
margin-bottom: 0.5em;
}
.speedy-deletion-notices .sidebar-list-title {
background: #ddddff;
text-align: center;
}
.speedy-deletion-notices .infobox-label {
width: 2.5em;
background: #ddddff;
vertical-align: middle;
text-align: center;
line-height: 1.35em;
border-bottom: 1px solid #aaa;
}
.speedy-deletion-notices .infobox-data {
padding-left: 0.25em;
line-height: 1.35em;
border-bottom: 1px solid #aaa;
}
l5gsphhb3paujfpxsob69fz0yqr8okd
Module:Text/data
828
166942
665137
2024-09-29T18:00:25Z
en>MusikBot II
0
Changed protection settings for "[[Module:Text/data]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 11676 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
665137
Scribunto
text/plain
-- Data required by [[Module:Text]].
-- Either Lua string patterns (defined by codepoint) or information about quotes
local data = {}
data.PatternCJK = mw.ustring.char( 91,
4352, 45, 4607,
11904, 45, 42191,
43072, 45, 43135,
44032, 45, 55215,
63744, 45, 64255,
65072, 45, 65103,
65381, 45, 65500,
131072, 45, 196607,
93 )
data.PatternCombined = mw.ustring.char( 91,
0x0300, 45, 0x036F,
0x1AB0, 45, 0x1AFF,
0x1DC0, 45, 0x1DFF,
0xFE20, 45, 0xFE2F,
93 )
local RangesLatin = { { 7, 687 },
{ 7531, 7578 },
{ 7680, 7935 },
{ 8194, 8250 } }
local PatternLatin = "^["
for i = 1, #RangesLatin do
local range = RangesLatin[ i ]
PatternLatin = PatternLatin .. mw.ustring.char( range[ 1 ], 45, range[ 2 ] )
end
PatternLatin = PatternLatin .. "]*$"
data.RangesLatin = RangesLatin
data.NumLatinRanges = #RangesLatin
data.PatternLatin = PatternLatin
data.PatternTerminated = mw.ustring.char( 91,
12290,
65281,
65294,
65311 )
.. "!%.%?…][\"'%]‹›«»‘’“”]*$"
data.QuoteLang = { af = "bd",
ar = "la",
be = "labd",
bg = "bd",
ca = "la",
cs = "bd",
da = "bd",
de = "bd",
dsb = "bd",
et = "bd",
el = "lald",
en = "ld",
es = "la",
eu = "la",
-- fa = "la",
fi = "rd",
fr = "laSPC",
ga = "ld",
he = "ldla",
hr = "bd",
hsb = "bd",
hu = "bd",
hy = "labd",
id = "rd",
is = "bd",
it = "ld",
ja = "x300C",
ka = "bd",
ko = "ld",
lt = "bd",
lv = "bd",
nl = "ld",
nn = "la",
no = "la",
pl = "bdla",
pt = "lald",
ro = "bdla",
ru = "labd",
sk = "bd",
sl = "bd",
sq = "la",
sr = "bx",
sv = "rd",
th = "ld",
tr = "ld",
uk = "la",
zh = "ld",
["de-ch"] = "la",
["en-gb"] = "lsld",
["en-us"] = "ld",
["fr-ch"] = "la",
["it-ch"] = "la",
["pt-br"] = "ldla",
["zh-tw"] = "x300C",
["zh-cn"] = "ld" }
data.QuoteType = { bd = { { 8222, 8220 }, { 8218, 8217 } },
bdla = { { 8222, 8220 }, { 171, 187 } },
bx = { { 8222, 8221 }, { 8218, 8217 } },
la = { { 171, 187 }, { 8249, 8250 } },
laSPC = { { 171, 187 }, { 8249, 8250 }, true },
labd = { { 171, 187 }, { 8222, 8220 } },
lald = { { 171, 187 }, { 8220, 8221 } },
ld = { { 8220, 8221 }, { 8216, 8217 } },
ldla = { { 8220, 8221 }, { 171, 187 } },
lsld = { { 8216, 8217 }, { 8220, 8221 } },
rd = { { 8221, 8221 }, { 8217, 8217 } },
x300C = { { 0x300C, 0x300D },
{ 0x300E, 0x300F } } }
data.SeekQuote = mw.ustring.char( 34, -- "
39, -- '
171, -- laquo
187, -- raquo
8216, -- lsquo
8217, -- rsquo
8218, -- sbquo
8220, -- ldquo
8221, -- rdquo
8222, -- bdquo
8249, -- lsaquo
8250, -- rsaquo
0x300C, -- CJK
0x300D, -- CJK
0x300E, -- CJK
0x300F ) -- CJK
return data
rprocu4zwgbkgfucd4r6zhxmmt256r8
665138
665137
2025-07-02T04:53:24Z
Novem Linguae
49714
1 revision imported from [[:en:Module:Text/data]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665137
Scribunto
text/plain
-- Data required by [[Module:Text]].
-- Either Lua string patterns (defined by codepoint) or information about quotes
local data = {}
data.PatternCJK = mw.ustring.char( 91,
4352, 45, 4607,
11904, 45, 42191,
43072, 45, 43135,
44032, 45, 55215,
63744, 45, 64255,
65072, 45, 65103,
65381, 45, 65500,
131072, 45, 196607,
93 )
data.PatternCombined = mw.ustring.char( 91,
0x0300, 45, 0x036F,
0x1AB0, 45, 0x1AFF,
0x1DC0, 45, 0x1DFF,
0xFE20, 45, 0xFE2F,
93 )
local RangesLatin = { { 7, 687 },
{ 7531, 7578 },
{ 7680, 7935 },
{ 8194, 8250 } }
local PatternLatin = "^["
for i = 1, #RangesLatin do
local range = RangesLatin[ i ]
PatternLatin = PatternLatin .. mw.ustring.char( range[ 1 ], 45, range[ 2 ] )
end
PatternLatin = PatternLatin .. "]*$"
data.RangesLatin = RangesLatin
data.NumLatinRanges = #RangesLatin
data.PatternLatin = PatternLatin
data.PatternTerminated = mw.ustring.char( 91,
12290,
65281,
65294,
65311 )
.. "!%.%?…][\"'%]‹›«»‘’“”]*$"
data.QuoteLang = { af = "bd",
ar = "la",
be = "labd",
bg = "bd",
ca = "la",
cs = "bd",
da = "bd",
de = "bd",
dsb = "bd",
et = "bd",
el = "lald",
en = "ld",
es = "la",
eu = "la",
-- fa = "la",
fi = "rd",
fr = "laSPC",
ga = "ld",
he = "ldla",
hr = "bd",
hsb = "bd",
hu = "bd",
hy = "labd",
id = "rd",
is = "bd",
it = "ld",
ja = "x300C",
ka = "bd",
ko = "ld",
lt = "bd",
lv = "bd",
nl = "ld",
nn = "la",
no = "la",
pl = "bdla",
pt = "lald",
ro = "bdla",
ru = "labd",
sk = "bd",
sl = "bd",
sq = "la",
sr = "bx",
sv = "rd",
th = "ld",
tr = "ld",
uk = "la",
zh = "ld",
["de-ch"] = "la",
["en-gb"] = "lsld",
["en-us"] = "ld",
["fr-ch"] = "la",
["it-ch"] = "la",
["pt-br"] = "ldla",
["zh-tw"] = "x300C",
["zh-cn"] = "ld" }
data.QuoteType = { bd = { { 8222, 8220 }, { 8218, 8217 } },
bdla = { { 8222, 8220 }, { 171, 187 } },
bx = { { 8222, 8221 }, { 8218, 8217 } },
la = { { 171, 187 }, { 8249, 8250 } },
laSPC = { { 171, 187 }, { 8249, 8250 }, true },
labd = { { 171, 187 }, { 8222, 8220 } },
lald = { { 171, 187 }, { 8220, 8221 } },
ld = { { 8220, 8221 }, { 8216, 8217 } },
ldla = { { 8220, 8221 }, { 171, 187 } },
lsld = { { 8216, 8217 }, { 8220, 8221 } },
rd = { { 8221, 8221 }, { 8217, 8217 } },
x300C = { { 0x300C, 0x300D },
{ 0x300E, 0x300F } } }
data.SeekQuote = mw.ustring.char( 34, -- "
39, -- '
171, -- laquo
187, -- raquo
8216, -- lsquo
8217, -- rsquo
8218, -- sbquo
8220, -- ldquo
8221, -- rdquo
8222, -- bdquo
8249, -- lsaquo
8250, -- rsaquo
0x300C, -- CJK
0x300D, -- CJK
0x300E, -- CJK
0x300F ) -- CJK
return data
rprocu4zwgbkgfucd4r6zhxmmt256r8
Template:Db-x3-deleted/doc
10
166943
665139
2025-07-02T04:50:56Z
en>Novem Linguae
0
Copied content from [[Template:Db-redirtypo-deleted/doc]]; see that page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665139
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{Twinkle standard installation}}
{{subst only|auto=yes}}
{{speedy deletion deleted}}
{{db deleted doc/lead
|criterion = X3
|criterion-desc = redirect with no space before a parenthetical disambiguation
|speedy-template = db-x3
}}
== Usage ==
{{db deleted doc/usage
|nowelcome = yes
}}
=== Basic usage ===
{{db deleted doc/basicusage
| deleted-template =
}}
=== Parameters ===
{{db deleted doc/parameters
|nowelcome = yes
|header = yes
|header-text = yes
|demo = yes
|namespace = yes
}}
=== Examples ===
{{db deleted doc/examples
|nowelcome = yes
|header = yes
|header-text = yes
|deleted-template =
}}
== See also ==
{{db deleted doc/seealso}}
{{speedy deletion navbox}}
__NOEDITSECTION__
<includeonly>{{Sandbox other||
__NOTOC__
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Speedy deletion warning templates|x3-deleted]]
}}</includeonly>
t6ldvaf8hh0marhh9wl9thdrmyjnxto
665140
665139
2025-07-02T04:53:37Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-x3-deleted/doc]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665139
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{Twinkle standard installation}}
{{subst only|auto=yes}}
{{speedy deletion deleted}}
{{db deleted doc/lead
|criterion = X3
|criterion-desc = redirect with no space before a parenthetical disambiguation
|speedy-template = db-x3
}}
== Usage ==
{{db deleted doc/usage
|nowelcome = yes
}}
=== Basic usage ===
{{db deleted doc/basicusage
| deleted-template =
}}
=== Parameters ===
{{db deleted doc/parameters
|nowelcome = yes
|header = yes
|header-text = yes
|demo = yes
|namespace = yes
}}
=== Examples ===
{{db deleted doc/examples
|nowelcome = yes
|header = yes
|header-text = yes
|deleted-template =
}}
== See also ==
{{db deleted doc/seealso}}
{{speedy deletion navbox}}
__NOEDITSECTION__
<includeonly>{{Sandbox other||
__NOTOC__
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Speedy deletion warning templates|x3-deleted]]
}}</includeonly>
t6ldvaf8hh0marhh9wl9thdrmyjnxto
Template:Speedy deletion deleted
10
166944
665141
2025-02-18T22:50:17Z
en>Warudo
0
Added [[TM:db-t5-deleted]]
665141
wikitext
text/x-wiki
{{Sidebar with collapsible lists
| name = Speedy deletion deleted
| templatestyles = Speedy deletion deleted/styles.css
| class = speedy-deletion-deleted
| title = [[Wikipedia:Criteria for speedy deletion|Speedy deletion post-deletion]]
| expanded = {{{expanded|{{{selected|{{{1|}}}}}}}}}
| list1name = general
| list1title = General criteria
| list1 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:G1|G1]] |data1={{tl|db-nonsense-deleted}} {{tl|Nonsense-warn-deletion}}
|label2=[[WP:G2|G2]] |data2={{tl|db-test-deleted}}
|label3=[[WP:G3|G3]] |data3={{tl|db-vandalism-deleted}}
|label4=[[WP:G4|G4]] |data4={{tl|db-repost-deleted}}
|label5=[[WP:G5|G5]] |data5={{tl|db-gs-deleted}}
|label6=[[WP:G6|G6]] |data6={{tl|db-copypaste-deleted}}
|label10=[[WP:G10|G10]] |data10={{tl|db-attack-deleted}} {{tl|db-negublp-deleted}}
|label11=[[WP:G11|G11]] |data11={{tl|db-spam-deleted}} {{tl|db-spamuser-deleted}} {{tl|spam-warn-deletion}}
|label12=[[WP:G12|G12]] |data12={{tl|db-copyvio-deleted}} {{tl|nothanks-warn-deletion}}
|label13=[[WP:G13|G13]] |data13={{tl|db-draft-deleted}}
|label14=[[WP:G14|G14]] |data14={{tl|db-disambig-deleted}}
}}
| list2name = articles
| list2title = Articles
| list2 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:A1|A1]] |data1={{tl|db-nocontext-deleted}}
|label2=[[WP:A2|A2]] |data2={{tl|db-foreign-deleted}}
|label3=[[WP:A3|A3]] |data3={{tl|db-nocontent-deleted}}
|label7=[[WP:A7|A7]] |data7={{tl|db-notability-deleted}} {{tl|db-bio-deleted}} {{tl|db-band-deleted}} {{tl|db-club-deleted}} {{tl|db-inc-deleted}} {{tl|db-web-deleted}} {{tl|db-animal-deleted}} {{tl|db-event-deleted}} {{tl|nn-warn-deletion}} {{tl|bio-warn-deletion}}
|label9=[[WP:A9|A9]] |data9={{tl|db-a9-deleted}}
|label10=[[WP:A10|A10]] |data10={{tl|db-a10-deleted}}
|label11=[[WP:A11|A11]] |data11={{tl|db-invented-deleted}} {{tl|empty-warn-deletion}}
}}
| list3name = redirects
| list3title = Redirects
| list3 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label2=[[WP:R2|R2]] |data2={{tl|db-rediruser-deleted}}
|label3=[[WP:R3|R3]] |data3={{tl|db-redirtypo-deleted}}
|label4=[[WP:R4|R4]] |data4={{tl|db-redircom-deleted}}
}}
| list4name = files
| list4title = Files
| list4 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[Wikipedia:Criteria for speedy deletion#F1|F1]] |data1={{tl|db-redundantimage-deleted}}
|label2=[[WP:F2|F2]] |data2={{tl|db-noimage-deleted}}
|label3=[[WP:F3|F3]] |data3={{tl|db-noncom-deleted}}
|label7=[[WP:F7|F7]] |data7={{tl|db-badfairuse-deleted}}
|label9=[[WP:F9|F9]] |data9={{tl|db-imgcopyvio-deleted}}
}}
| list5name = categories
| list5title = Categories
| list5 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:C1|C1]] |data1={{tl|db-catempty-deleted}}
}}
| list6name = templates
| list6title = Templates
| list6 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:T5|T5]] |data1={{tl|db-t5-deleted}}
}}
| list7name = user
| list7title = User pages
| list7 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label5=[[WP:U5|U5]] |data5={{tl|db-notwebhost-deleted}}
}}
| list8name = other
| list8title = Other
| list8 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|data1={{tl|db-reason-deleted}} {{tl|db-deleted-multiple}} {{tl|CSD-deleted}}
}}
}}<noinclude>
{{documentation|Template:Speedy deletion templates/doc}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
jc289zg5t1egyfe8ocj7rh79lwybw6m
665142
665141
2025-07-02T04:53:38Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Speedy_deletion_deleted]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665141
wikitext
text/x-wiki
{{Sidebar with collapsible lists
| name = Speedy deletion deleted
| templatestyles = Speedy deletion deleted/styles.css
| class = speedy-deletion-deleted
| title = [[Wikipedia:Criteria for speedy deletion|Speedy deletion post-deletion]]
| expanded = {{{expanded|{{{selected|{{{1|}}}}}}}}}
| list1name = general
| list1title = General criteria
| list1 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:G1|G1]] |data1={{tl|db-nonsense-deleted}} {{tl|Nonsense-warn-deletion}}
|label2=[[WP:G2|G2]] |data2={{tl|db-test-deleted}}
|label3=[[WP:G3|G3]] |data3={{tl|db-vandalism-deleted}}
|label4=[[WP:G4|G4]] |data4={{tl|db-repost-deleted}}
|label5=[[WP:G5|G5]] |data5={{tl|db-gs-deleted}}
|label6=[[WP:G6|G6]] |data6={{tl|db-copypaste-deleted}}
|label10=[[WP:G10|G10]] |data10={{tl|db-attack-deleted}} {{tl|db-negublp-deleted}}
|label11=[[WP:G11|G11]] |data11={{tl|db-spam-deleted}} {{tl|db-spamuser-deleted}} {{tl|spam-warn-deletion}}
|label12=[[WP:G12|G12]] |data12={{tl|db-copyvio-deleted}} {{tl|nothanks-warn-deletion}}
|label13=[[WP:G13|G13]] |data13={{tl|db-draft-deleted}}
|label14=[[WP:G14|G14]] |data14={{tl|db-disambig-deleted}}
}}
| list2name = articles
| list2title = Articles
| list2 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:A1|A1]] |data1={{tl|db-nocontext-deleted}}
|label2=[[WP:A2|A2]] |data2={{tl|db-foreign-deleted}}
|label3=[[WP:A3|A3]] |data3={{tl|db-nocontent-deleted}}
|label7=[[WP:A7|A7]] |data7={{tl|db-notability-deleted}} {{tl|db-bio-deleted}} {{tl|db-band-deleted}} {{tl|db-club-deleted}} {{tl|db-inc-deleted}} {{tl|db-web-deleted}} {{tl|db-animal-deleted}} {{tl|db-event-deleted}} {{tl|nn-warn-deletion}} {{tl|bio-warn-deletion}}
|label9=[[WP:A9|A9]] |data9={{tl|db-a9-deleted}}
|label10=[[WP:A10|A10]] |data10={{tl|db-a10-deleted}}
|label11=[[WP:A11|A11]] |data11={{tl|db-invented-deleted}} {{tl|empty-warn-deletion}}
}}
| list3name = redirects
| list3title = Redirects
| list3 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label2=[[WP:R2|R2]] |data2={{tl|db-rediruser-deleted}}
|label3=[[WP:R3|R3]] |data3={{tl|db-redirtypo-deleted}}
|label4=[[WP:R4|R4]] |data4={{tl|db-redircom-deleted}}
}}
| list4name = files
| list4title = Files
| list4 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[Wikipedia:Criteria for speedy deletion#F1|F1]] |data1={{tl|db-redundantimage-deleted}}
|label2=[[WP:F2|F2]] |data2={{tl|db-noimage-deleted}}
|label3=[[WP:F3|F3]] |data3={{tl|db-noncom-deleted}}
|label7=[[WP:F7|F7]] |data7={{tl|db-badfairuse-deleted}}
|label9=[[WP:F9|F9]] |data9={{tl|db-imgcopyvio-deleted}}
}}
| list5name = categories
| list5title = Categories
| list5 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:C1|C1]] |data1={{tl|db-catempty-deleted}}
}}
| list6name = templates
| list6title = Templates
| list6 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label1=[[WP:T5|T5]] |data1={{tl|db-t5-deleted}}
}}
| list7name = user
| list7title = User pages
| list7 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|label5=[[WP:U5|U5]] |data5={{tl|db-notwebhost-deleted}}
}}
| list8name = other
| list8title = Other
| list8 =
{{Infobox |bodystyle={{subinfobox bodystyle}}
|data1={{tl|db-reason-deleted}} {{tl|db-deleted-multiple}} {{tl|CSD-deleted}}
}}
}}<noinclude>
{{documentation|Template:Speedy deletion templates/doc}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
jc289zg5t1egyfe8ocj7rh79lwybw6m
Template:Db deleted doc/basicusage
10
166945
665143
2019-05-17T11:02:10Z
en>Amorymeltzer
0
Create based off [[Template:Db notice doc/basicusage]] ([[Special:PermaLink/758141086]])
665143
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/basicusage}} text. If you would like to completely change the "basic usage" section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/basicusage}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. --><code><nowiki>{{subst:</nowiki>{{{{{|safesubst:}}}#if: {{{deleted-template|}}} | {{{deleted-template}}} | {{{{{|safesubst:}}}lc:{{{{{|safesubst:}}}BASEPAGENAME}}}} }}|''PageName''<nowiki>}}</nowiki></code>
Where ''PageName'' is the name of the page that has been speedily deleted.<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
h2fg42vwvhrmdn9cq0d3ey6od5cmeoe
665144
665143
2025-07-02T04:53:39Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db_deleted_doc/basicusage]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665143
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/basicusage}} text. If you would like to completely change the "basic usage" section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/basicusage}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. --><code><nowiki>{{subst:</nowiki>{{{{{|safesubst:}}}#if: {{{deleted-template|}}} | {{{deleted-template}}} | {{{{{|safesubst:}}}lc:{{{{{|safesubst:}}}BASEPAGENAME}}}} }}|''PageName''<nowiki>}}</nowiki></code>
Where ''PageName'' is the name of the page that has been speedily deleted.<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
h2fg42vwvhrmdn9cq0d3ey6od5cmeoe
Template:Db deleted doc/examples
10
166946
665145
2019-05-17T10:28:36Z
en>Amorymeltzer
0
Create based off [[Template:Db notice doc/examples]] ([[Special:PermaLink/507051305]])
665145
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/examples}} text. If you would like to completely change the "examples" section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/examples}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. -->{{{{{|safesubst:}}}#if: {{{nowelcome|}}} |
;No welcome message
<code><nowiki>{{subst:</nowiki>{{{{{|safesubst:}}}#if: {{{deleted-template|}}} | {{{deleted-template}}} | {{{{{|safesubst:}}}lc:{{{{{|safesubst:}}}BASEPAGENAME}}}} }}{{{{{|safesubst:}}}!}}''PageName''{{{{{|safesubst:}}}!}}nowelcome=yes<nowiki>}}</nowiki></code>}}{{{{{|safesubst:}}}#if: {{{header|}}} |
;No header
<code><nowiki>{{subst:</nowiki>{{{{{|safesubst:}}}#if: {{{deleted-template|}}} | {{{deleted-template}}} | {{{{{|safesubst:}}}lc:{{{{{|safesubst:}}}BASEPAGENAME}}}} }}{{{{{|safesubst:}}}!}}''PageName''{{{{{|safesubst:}}}!}}header=no<nowiki>}}</nowiki></code>}}{{{{{|safesubst:}}}#if: {{{header-text|}}} |
;Using a custom header
<code><nowiki>{{subst:</nowiki>{{{{{|safesubst:}}}#if: {{{deleted-template|}}} | {{{deleted-template}}} | {{{{{|safesubst:}}}lc:{{{{{|safesubst:}}}BASEPAGENAME}}}} }}{{{{{|safesubst:}}}!}}''PageName''{{{{{|safesubst:}}}!}}header-text=''Custom header text''<nowiki>}}</nowiki></code>}}{{{{{|safesubst:}}}#if: {{{nowelcome|}}} | {{{{{|safesubst:}}}#if: {{{header-text|}}} |
;No welcome message and a custom header
<code><nowiki>{{subst:</nowiki>{{{{{|safesubst:}}}#if: {{{deleted-template|}}} | {{{deleted-template}}} | {{{{{|safesubst:}}}lc:{{{{{|safesubst:}}}BASEPAGENAME}}}} }}{{{{{|safesubst:}}}!}}''PageName''{{{{{|safesubst:}}}!}}nowelcome=yes{{{{{|safesubst:}}}!}}header-text=''Custom header text''<nowiki>}}</nowiki></code>}}}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
9hs7hg48tpncw8l8jvc60ytg7mkqyq3
665146
665145
2025-07-02T04:53:39Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db_deleted_doc/examples]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665145
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/examples}} text. If you would like to completely change the "examples" section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/examples}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. -->{{{{{|safesubst:}}}#if: {{{nowelcome|}}} |
;No welcome message
<code><nowiki>{{subst:</nowiki>{{{{{|safesubst:}}}#if: {{{deleted-template|}}} | {{{deleted-template}}} | {{{{{|safesubst:}}}lc:{{{{{|safesubst:}}}BASEPAGENAME}}}} }}{{{{{|safesubst:}}}!}}''PageName''{{{{{|safesubst:}}}!}}nowelcome=yes<nowiki>}}</nowiki></code>}}{{{{{|safesubst:}}}#if: {{{header|}}} |
;No header
<code><nowiki>{{subst:</nowiki>{{{{{|safesubst:}}}#if: {{{deleted-template|}}} | {{{deleted-template}}} | {{{{{|safesubst:}}}lc:{{{{{|safesubst:}}}BASEPAGENAME}}}} }}{{{{{|safesubst:}}}!}}''PageName''{{{{{|safesubst:}}}!}}header=no<nowiki>}}</nowiki></code>}}{{{{{|safesubst:}}}#if: {{{header-text|}}} |
;Using a custom header
<code><nowiki>{{subst:</nowiki>{{{{{|safesubst:}}}#if: {{{deleted-template|}}} | {{{deleted-template}}} | {{{{{|safesubst:}}}lc:{{{{{|safesubst:}}}BASEPAGENAME}}}} }}{{{{{|safesubst:}}}!}}''PageName''{{{{{|safesubst:}}}!}}header-text=''Custom header text''<nowiki>}}</nowiki></code>}}{{{{{|safesubst:}}}#if: {{{nowelcome|}}} | {{{{{|safesubst:}}}#if: {{{header-text|}}} |
;No welcome message and a custom header
<code><nowiki>{{subst:</nowiki>{{{{{|safesubst:}}}#if: {{{deleted-template|}}} | {{{deleted-template}}} | {{{{{|safesubst:}}}lc:{{{{{|safesubst:}}}BASEPAGENAME}}}} }}{{{{{|safesubst:}}}!}}''PageName''{{{{{|safesubst:}}}!}}nowelcome=yes{{{{{|safesubst:}}}!}}header-text=''Custom header text''<nowiki>}}</nowiki></code>}}}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
9hs7hg48tpncw8l8jvc60ytg7mkqyq3
Template:Db deleted doc/lead
10
166947
665147
2019-05-27T09:58:10Z
en>Amorymeltzer
0
Not tagging
665147
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/lead}} text. If you would like to completely change the lead section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/lead}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. --> This template is used to notify users about pages that have been [[Wikipedia:Criteria for speedy deletion|speedily deleted]]. Specifically, it is used for pages that have been deleted under [[Wikipedia:Criteria for speedy deletion#{{{criterion|}}}|section {{{criterion|}}} of the criteria for speedy deletion]], "{{{criterion-desc|}}}". This template is usually used in lieu of tagging with {{tl|{{{speedy-template|}}}}}; for other post-deletion speedy deletion notification templates see the table to the right.<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
of2x82aax8bji4yuo9cjzfc76naz5sq
665148
665147
2025-07-02T04:53:39Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db_deleted_doc/lead]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665147
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/lead}} text. If you would like to completely change the lead section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/lead}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. --> This template is used to notify users about pages that have been [[Wikipedia:Criteria for speedy deletion|speedily deleted]]. Specifically, it is used for pages that have been deleted under [[Wikipedia:Criteria for speedy deletion#{{{criterion|}}}|section {{{criterion|}}} of the criteria for speedy deletion]], "{{{criterion-desc|}}}". This template is usually used in lieu of tagging with {{tl|{{{speedy-template|}}}}}; for other post-deletion speedy deletion notification templates see the table to the right.<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
of2x82aax8bji4yuo9cjzfc76naz5sq
Template:Db deleted doc/parameters
10
166948
665149
2019-05-17T10:24:44Z
en>Amorymeltzer
0
Create based off [[Template:Db notice doc/parameters]] ([[Special:PermaLink/507047778]])
665149
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/parameters}} text. If you would like to completely change the "parameters" section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/parameters}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. -->{{{{{|safesubst:}}}#if: {{{nowelcome|}}} |
*'''nowelcome''':- If this parameter exists, then the {{tl|first article}} welcome message is not included, even if the page the notice is being placed on did not previously exist.}}{{{{{|safesubst:}}}#if: {{{header|}}} |
*'''header''':- by default, the template adds a level two section header of "[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] of ''[[PageName]]''". To suppress the header, use {{para|header|no}}.}}{{{{{|safesubst:}}}#if: {{{header-text|}}} |
*'''header-text''':- a custom value for the header text.}}{{{{{|safesubst:}}}#if: {{{demo|}}} |
*'''demo''':- if you are demonstrating the template's functionality, [[Wikipedia:Transclusion|transclude]] the template rather than [[Wikipedia:Substitution|substitute]] it, and use {{para|demo|yes}}. This will prevent the template from being automatically substituted by a bot.}}{{{{{|safesubst:}}}#if: {{{namespace|}}} |
*'''namespace''':- this is the [[Wikipedia:Namespace|namespace]] of the page that has been speedily deleted. For example, if the page is in the "Wikipedia" namespace then the value would be <code>Wikipedia</code>. It is not necessary to specify this parameter if the namespace is already included in the page name. If the page is in the main article namespace then this parameter should be omitted.}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
8x9dpfr78q9ws4lv6fbt0ya4rqut193
665150
665149
2025-07-02T04:53:39Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db_deleted_doc/parameters]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665149
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/parameters}} text. If you would like to completely change the "parameters" section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/parameters}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. -->{{{{{|safesubst:}}}#if: {{{nowelcome|}}} |
*'''nowelcome''':- If this parameter exists, then the {{tl|first article}} welcome message is not included, even if the page the notice is being placed on did not previously exist.}}{{{{{|safesubst:}}}#if: {{{header|}}} |
*'''header''':- by default, the template adds a level two section header of "[[Wikipedia:Criteria for speedy deletion|Speedy deletion]] of ''[[PageName]]''". To suppress the header, use {{para|header|no}}.}}{{{{{|safesubst:}}}#if: {{{header-text|}}} |
*'''header-text''':- a custom value for the header text.}}{{{{{|safesubst:}}}#if: {{{demo|}}} |
*'''demo''':- if you are demonstrating the template's functionality, [[Wikipedia:Transclusion|transclude]] the template rather than [[Wikipedia:Substitution|substitute]] it, and use {{para|demo|yes}}. This will prevent the template from being automatically substituted by a bot.}}{{{{{|safesubst:}}}#if: {{{namespace|}}} |
*'''namespace''':- this is the [[Wikipedia:Namespace|namespace]] of the page that has been speedily deleted. For example, if the page is in the "Wikipedia" namespace then the value would be <code>Wikipedia</code>. It is not necessary to specify this parameter if the namespace is already included in the page name. If the page is in the main article namespace then this parameter should be omitted.}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
8x9dpfr78q9ws4lv6fbt0ya4rqut193
Template:Db deleted doc/seealso
10
166949
665151
2019-05-17T10:22:18Z
en>Amorymeltzer
0
Create based off [[Template:Db notice doc/seealso]] ([[Special:PermaLink/507047943]])
665151
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/seealso}} text. If you would like to completely change the "see also" section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/seealso}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. -->
*[[Wikipedia:Criteria for speedy deletion]]
*[[Wikipedia:Deletion policy]]
*[[Wikipedia:Deletion process]]
*[[Wikipedia:Deletion review]]
*[[Wikipedia:Template messages/User talk namespace]]<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
sfvyw5k6znknjykpgtdm99mqfrj99z3
665152
665151
2025-07-02T04:53:40Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db_deleted_doc/seealso]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665151
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/seealso}} text. If you would like to completely change the "see also" section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/seealso}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. -->
*[[Wikipedia:Criteria for speedy deletion]]
*[[Wikipedia:Deletion policy]]
*[[Wikipedia:Deletion process]]
*[[Wikipedia:Deletion review]]
*[[Wikipedia:Template messages/User talk namespace]]<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
sfvyw5k6znknjykpgtdm99mqfrj99z3
Template:Db deleted doc/usage
10
166950
665153
2020-09-26T08:15:12Z
en>Graham87
0
add word
665153
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/usage}} text. If you would like to completely change the "usage" section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/usage}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. -->This template should be [[Help:Substitution|substituted]] on to the [[WP:USERTALK|user talk page]] of the author of the page that has been speedily deleted.
If this template is used on a page that did not previously exist (that is, if the user receiving the warning is a new user), the template automatically includes a {{tl|first article}} welcome message. {{{{{|safesubst:}}}#if: {{{nowelcome|}}} | This welcome can be turned off with the {{para|nowelcome}} parameter as described below. }}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
r63uz4u58ytnetb4tgg9vzi4dnb4e94
665154
665153
2025-07-02T04:53:40Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db_deleted_doc/usage]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665153
wikitext
text/x-wiki
<noinclude><!--
WARNING - this template affects the documentation for all the post-deletion speedy deletion notification templates! If you only want to edit the documentation for one particular notification template, please go back to the documentation page for that template and add your new text directly after the {{db deleted doc/usage}} text. If you would like to completely change the "usage" section for one individual template, please see the documentation for instructions on how to substitute this template.
--></noinclude>{{ed right|Db deleted doc/usage}}<!-- If you can see this comment (which means that this template has been substituted), please remove both this comment and the {{ed right}} template to the left. -->This template should be [[Help:Substitution|substituted]] on to the [[WP:USERTALK|user talk page]] of the author of the page that has been speedily deleted.
If this template is used on a page that did not previously exist (that is, if the user receiving the warning is a new user), the template automatically includes a {{tl|first article}} welcome message. {{{{{|safesubst:}}}#if: {{{nowelcome|}}} | This welcome can be turned off with the {{para|nowelcome}} parameter as described below. }}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
r63uz4u58ytnetb4tgg9vzi4dnb4e94
Template:Speedy deletion deleted/styles.css
10
166951
665155
2024-08-02T23:24:05Z
en>Warudo
0
lint
665155
sanitized-css
text/css
/* Pre sidebar version included:
.speedy-deletion-deleted {
margin:0.5em 0 0.7em 1.4em;border:1px solid #aaa;
}
*/
.speedy-deletion-deleted .sidebar-pretitle,
.speedy-deletion-deleted .sidebar-heading {
background: #ddddff;
}
.speedy-deletion-deleted .sidebar-title {
background: #ddddff;
display: block;
margin-bottom: 0.5em;
}
.speedy-deletion-deleted .sidebar-list-title {
background: #ddddff;
text-align: center;
}
.speedy-deletion-deleted .infobox-label {
width: 2.5em;
background: #ddddff;
vertical-align: middle;
text-align: center;
line-height: 1.35em;
border-bottom: 1px solid #aaa;
}
.speedy-deletion-deleted .infobox-data {
padding-left: 0.25em;
line-height: 1.35em;
border-bottom: 1px solid #aaa;
}
jxmr3vwwfp4s9ay8a21kx942c12e3gj
665156
665155
2025-07-02T04:53:40Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Speedy_deletion_deleted/styles.css]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665155
sanitized-css
text/css
/* Pre sidebar version included:
.speedy-deletion-deleted {
margin:0.5em 0 0.7em 1.4em;border:1px solid #aaa;
}
*/
.speedy-deletion-deleted .sidebar-pretitle,
.speedy-deletion-deleted .sidebar-heading {
background: #ddddff;
}
.speedy-deletion-deleted .sidebar-title {
background: #ddddff;
display: block;
margin-bottom: 0.5em;
}
.speedy-deletion-deleted .sidebar-list-title {
background: #ddddff;
text-align: center;
}
.speedy-deletion-deleted .infobox-label {
width: 2.5em;
background: #ddddff;
vertical-align: middle;
text-align: center;
line-height: 1.35em;
border-bottom: 1px solid #aaa;
}
.speedy-deletion-deleted .infobox-data {
padding-left: 0.25em;
line-height: 1.35em;
border-bottom: 1px solid #aaa;
}
jxmr3vwwfp4s9ay8a21kx942c12e3gj
Template:Db-x3-deleted
10
166952
665157
2025-07-02T04:49:26Z
en>Novem Linguae
0
Copied content from [[Template:Db-redirtypo-deleted]]; see that page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665157
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>db-deleted
|namespace = {{{namespace|}}}
|target = {{{1}}}
|nowelcome = {{{nowelcome|}}}
|header = {{{header|}}}
|header-text = {{{header-text|}}}
|icon = Image:Ambox warning pn.svg
|willprovide = no
|text = The page [[:{{{1}}}]] has been speedily deleted from Wikipedia. This was done under [[WP:CSD#X3|section X3 of the criteria for speedy deletion]], because it was a redirect with no space before a parenthetical disambiguation.}}<!-- Template:Db-x3-deleted --><noinclude>
<!-- Add categories and interwikis to the /doc subpage, not here! -->
{{Documentation}}</noinclude>
clv1kyxst4tzwiorpw2ejum8a7bc482
665158
665157
2025-07-02T04:53:47Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-x3-deleted]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665157
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>db-deleted
|namespace = {{{namespace|}}}
|target = {{{1}}}
|nowelcome = {{{nowelcome|}}}
|header = {{{header|}}}
|header-text = {{{header-text|}}}
|icon = Image:Ambox warning pn.svg
|willprovide = no
|text = The page [[:{{{1}}}]] has been speedily deleted from Wikipedia. This was done under [[WP:CSD#X3|section X3 of the criteria for speedy deletion]], because it was a redirect with no space before a parenthetical disambiguation.}}<!-- Template:Db-x3-deleted --><noinclude>
<!-- Add categories and interwikis to the /doc subpage, not here! -->
{{Documentation}}</noinclude>
clv1kyxst4tzwiorpw2ejum8a7bc482
Template:Db-csd-deleted-custom
10
166954
665167
2020-02-12T19:10:18Z
en>Amorymeltzer
0
Support secondary and tertiary key/value parameters, currently just useful for G12
665167
wikitext
text/x-wiki
{{<includeonly>subst:</includeonly>db-{{{2}}}-deleted|{{{1}}}|nowelcome={{{nowelcome|}}}|{{{key1}}}={{{value1}}}|{{{key2}}}={{{value2}}}|{{{key3}}}={{{value3}}}}}<!-- Template:Db-csd-deleted-custom --><noinclude>
<!-- Add categories and interwikis to the /doc subpage, not here! -->
{{Documentation}}</noinclude>
44bmsjj1wfk7xl5ar503a9nbclr2lxi
665168
665167
2025-07-02T05:04:16Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-csd-deleted-custom]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665167
wikitext
text/x-wiki
{{<includeonly>subst:</includeonly>db-{{{2}}}-deleted|{{{1}}}|nowelcome={{{nowelcome|}}}|{{{key1}}}={{{value1}}}|{{{key2}}}={{{value2}}}|{{{key3}}}={{{value3}}}}}<!-- Template:Db-csd-deleted-custom --><noinclude>
<!-- Add categories and interwikis to the /doc subpage, not here! -->
{{Documentation}}</noinclude>
44bmsjj1wfk7xl5ar503a9nbclr2lxi
Template:Db-csd-deleted-custom/doc
10
166955
665169
2024-12-10T21:49:42Z
en>JJMC89 bot III
0
Moving [[:Category:CSD warning templates]] to [[:Category:Speedy deletion warning templates]] per [[Wikipedia:Categories for discussion/Speedy]]
665169
wikitext
text/x-wiki
{{Documentation subpage}}
{{Twinkle standard installation}}
{{transclusionless}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
This template is used to make post-deletion [[WP:CSD|CSD]] user notifications fully compatible with the [[WP:TW|Twinkle]] user script. It is used automatically to notify users of the speedy deletion of pages they create.
For anyone looking to make a bot or script work with more customized CSD notices, this template is quite useful.
;Use:<code><nowiki>{{subst:db-csd-deleted-custom|1=Article name|2=X#}}</nowiki></code>
<code>X#</code> is the criterion being used, e.g. A7 or G11. Note that the letter must be capitalized. For notability (A7), the following can be used for parameter 2 to give a more specific message:
* A7 for people
* A7.1 for bands or singers
* A7.2 for clubs or groups
* A7.3 for companies
* A7.4 for web content or websites
* A7.5 for animals
<includeonly>{{Sandbox other||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Speedy deletion warning templates|Csd-deleted-custom]]
}}</includeonly>
36nlewy0doclagrvtogprzy67say370
665170
665169
2025-07-02T05:04:17Z
Novem Linguae
49714
1 revision imported from [[:en:Template:Db-csd-deleted-custom/doc]]: Copied content from another wiki; see the linked page's history for attribution ([[w:User:Novem Linguae/Scripts/CWWEditSummary.js|CWWEditSummary]])
665169
wikitext
text/x-wiki
{{Documentation subpage}}
{{Twinkle standard installation}}
{{transclusionless}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
This template is used to make post-deletion [[WP:CSD|CSD]] user notifications fully compatible with the [[WP:TW|Twinkle]] user script. It is used automatically to notify users of the speedy deletion of pages they create.
For anyone looking to make a bot or script work with more customized CSD notices, this template is quite useful.
;Use:<code><nowiki>{{subst:db-csd-deleted-custom|1=Article name|2=X#}}</nowiki></code>
<code>X#</code> is the criterion being used, e.g. A7 or G11. Note that the letter must be capitalized. For notability (A7), the following can be used for parameter 2 to give a more specific message:
* A7 for people
* A7.1 for bands or singers
* A7.2 for clubs or groups
* A7.3 for companies
* A7.4 for web content or websites
* A7.5 for animals
<includeonly>{{Sandbox other||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Speedy deletion warning templates|Csd-deleted-custom]]
}}</includeonly>
36nlewy0doclagrvtogprzy67say370