Content deleted Content added
No edit summary |
m Adding Category:Wikipedia user script templates using Cat-a-lot |
||
(27 intermediate revisions by 8 users not shown) | |||
Line 8:
<code><nowiki>{{userscript |code= [.js address] |name= [script name] |doc= [documentation page address] }}</nowiki></code>
At least <code>|code=</code> ''' -or- ''' <code>|doc=</code> is required. The template will attempt to determine defaults for any information not entered.
* '''Check
* If you end up leaving the template with no "(source)" link produced, make sure your documentation page includes complete installation instructions, along with any necessary code page addresses.
* You can make up any name for the <code>|name</code> parameter. It is just for display purposes
{{collapse top|1=Default logic details}}
▲* '''Check to make sure the links are accurate after placing this template!''' If any defaults are inaccurate, enter the necessary parameters explicitly.
▲* You can make up any name for the <code>|name</code> parameter. It is just for display purposes, and does not need to match any actual page address.
* The template will add .js to the documentation page name to get a default code page, or remove .js from the code page name to get a default documentation page.
** Entering <code>|code='''User:TheDJ/Sharebox'''.js</code> will look for a page named '''User:TheDJ/Sharebox''', and if found, will be linked as the documentation page.
** Entering <code>|doc='''User:TheDJ/Sharebox'''</code> will look for a page named '''User:TheDJ/Sharebox<span style="color:red">.js</span>''', and if found, will be linked as the code page.
* If the default pages don't actually exist, they won't be linked (so
* If no name is entered, a default name will be produced from the code or doc page name
{{collapse bottom}}
* This template enables an automatic installation link for editors who use automatic installer scripts like [[User:Enterprisey/script-installer]] or [[User:Equazcion/ScriptInstaller]]. If you have reason to disable automatic installation for a particular script (
* To suppress the creation of a footnote with installation instructions, set {{para|noref|yes}}.
== Examples ==
All parameters specified: <code><nowiki>{{userscript|name=sharebox!!!!!|code=User:TheDJ/sharebox.js|doc=User:TheDJ/sharebox}}</nowiki></code>
*Produces: {{userscript|name=sharebox!!!!!|code=User:TheDJ/sharebox.js|doc=User:TheDJ/sharebox}}
Code only: <code><nowiki>{{userscript|code=User:TheDJ/sharebox.js}}</nowiki></code>
*Produces: {{userscript|code=User:TheDJ/sharebox.js}}
Line 31 ⟶ 33:
*Produces: {{userscript|doc=User:TheDJ/sharebox}}
Use <code><nowiki>{{reflist}}</nowiki></code> to produce specific installation instructions:
▲== Additional parameter ==
{{reflist}}
▲This template enables an automatic installation link for editors who use automatic installer scripts like [[User:Equazcion/ScriptInstaller]]. If you have reason to disable automatic installation for a particular script (eg. because it requires more than just the usual importScript line), add the following parameter:
==See also==
<includeonly>▼
* [[Wikipedia:User scripts/List]]
{{Wikipedia:User scripts/Navbox}}
<
[[Category:Wikipedia scripts|*]]
[[Category:Wikipedia user script templates]]
▲}}</includeonly>
|