Wikiwand AI

User:Zackmann08/Notes

From Wikipedia, the free encyclopedia

User:Zackmann08 User talk:Zackmann08 User:Zackmann08/Awards User:Zackmann08/Contacts User:Zackmann08/Notes User:Zackmann08/Templates User:Zackmann08/Wikipedia Bookmarks User:Zackmann08/sandbox
User Talk Awards Contacts Notes Templates/Tools Bookmarks My Sandbox

\{\{if empty\|\{\{\{[\-\w\s]+\|\}\}\}\|(\{\{\{[\w\s\-]+\|\}\}\}\|)*(\{\{\{\w+\|\}\}\})\}\}
<syntaxhighlight inline lang="wikitext"></syntaxhighlight>
Replace with dup params
{
"replaceText": "([\\w\\W]+)(^\\s*\\|\\s*(image|image_size)\\s*=\\s*$\\n)([\\w\\W]*)(^\\s*\\|\\s*\\3\\s*=.*$\\n)",
"replaceWith": "$1$4$5",
"useRegex": true,
"regexFlags": "gmi",
"ignoreNowiki": false
},
{
"replaceText": "([\\w\\W]+)(^\\s*\\|\\s*(image|image_size)\\s*=.*$\\n)([\\w\\W]*)(^\\s*\\|\\s*\\3\\s*=\\s*$\\n)",
"replaceWith": "$1$2$4",
"useRegex": true,
"regexFlags": "gmi",
"ignoreNowiki": false
}
Fetch coords from wikidata
{{#invoke:WikidataIB|getValue|P625|name=coordinate location|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|}}}|{{{coordinates|}}} }}
{{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}}
{{Parameter names example| }}
<syntaxhighlight lang="wikitext" style="overflow: auto">
== Template data ==
{{collapse top|title=[[Wikipedia:TemplateData|TemplateData]] documentation used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools}}
{{TemplateData header|noheader=1}}
<templatedata>
</templatedata>
{{collapse bottom}}
{{pluralize from text|{{{REPLACEME|}}}|plural=s}}
Template param report
^([\w\-\_\s]*)\s\(page links\)\tN\t(\d+).*\n\+.*
* $1 - $2
Regex to get header if statement
\s*\|\s*label\d*\s*=\s*.*\n\s*\|\s*data\d*\s*=\s*(.*)\n*

Script notes

var my_content = $('#wpTextbox1').textSelection('getContents');
....
$('#wpTextbox1').textSelection('setContents', final_text);

Template wrapper

<includeonly>{{#invoke:Template wrapper|wrap|_template = TEMPLATE
| _alias-map = 
| _exclude   = 
| _reuse     = 

| template_name = 
}}</includeonly>
Converting this to a [[Module:Template wrapper]] for [[Template:Infobox TEMPLATE]]. This [[refactor]] should not change any existing transclusions. 

Deprecated params

Copy deprecated parameters code then use:

\|\s([\w\s]*)\s=\s(\w+)
{\n\t"replaceText": "(^\\\s*\\\|\\\s*)($1)(\\\s*=.*$\\\\n)",\n\t"replaceWith": "$$1$2$$3",\n\t"useRegex": true,\n\t"regexFlags": "mg",\n\t"ignoreNowiki": false\n},

Other

\s*([a-zA-Z_\s0-9\s]*)\s*\|
\s*([^/|]*)\s\s*\|
| $1 = "$1" \n

Good responses

Other party LTA

Related Articles

Timelines

Top Qs

Fact Checks