Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Guild of Archivists
Search
Editing
Module:Protection banner/doc
(section)
From Guild of Archivists
Namespaces
Module
Discussion
More
More
Page actions
Read
Edit source
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == Most users will not need to use this module directly. For adding protection templates to pages you can use the {{tl|pp}} template, or you may find it more convenient to use one of the more specific protection templates in the table below. {{protection templates}} === From wikitext === {{#invoke:Protection banner|main | 1 = ''reason'' | small = ''yes/no'' | action = ''action'' | expiry = ''expiry'' | date = ''protection date'' | user = ''username'' | section = ''talk page section name'' | category = ''no'' }} The #invoke syntax can be used for creating protection templates more specific than {{tl|pp}}. For example, it is possible to create a protection template which always shows a padlock icon by using the code <code><nowiki>{{#invoke:Protection banner|main|small=yes}}</nowiki></code>. Pages which call this template will still be able to use other arguments, like ''action'' and ''expiry''. However, this only works one level deep; a page calling a template which calls another template containing the above code will not automatically be able to use parameters like ''action'' and ''expiry''. === From Lua === First, load the module. <source lang="lua"> local mProtectionBanner = require('Module:Protection banner') </source> Then you can make protection banners by using the _main function. <source lang="lua"> mProtectionBanner._main(args, cfg, titleObj) </source> <var>args</var> is an table of arguments to pass to the module. For possible keys and values for this table, see the [[#Parameters|parameters section]]. The <var>cfg</var> and <var>titleObj</var> variables are intended only for testing; <var>cfg</var> specifies a customised config table to use instead of [[Module:Protection banner/config]], and <var>titleObj</var> specifies a mw.title object to use instead of the current title. <var>args</var>, <var>cfg</var> and <var>titleObj</var> are all optional.
Summary:
Please note that all contributions to Guild of Archivists may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
GoArch:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Main Page
Random page
Categories
All pages
Recent changes
Resources
D'ni dictionary
Reference material
Utilities
Community
Forums
Jalak Game Directory
Projects
Apocrypha
Unexplored Branches
All projects
Contribute
Stubs
Wanted
Cleanup
Dead ends
Image requested
Help
Help
Guide
Policies
Wiki tools
Wiki tools
Special pages
Page values
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs