<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ro">
	<id>https://insemn.org/signify/index.php?action=history&amp;feed=atom&amp;title=Modul%3AHatnote%2Fdoc</id>
	<title>Modul:Hatnote/doc - Revizia istoricului</title>
	<link rel="self" type="application/atom+xml" href="https://insemn.org/signify/index.php?action=history&amp;feed=atom&amp;title=Modul%3AHatnote%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://insemn.org/signify/index.php?title=Modul:Hatnote/doc&amp;action=history"/>
	<updated>2026-04-21T19:24:13Z</updated>
	<subtitle>Istoricul versiunilor pentru această pagină din wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://insemn.org/signify/index.php?title=Modul:Hatnote/doc&amp;diff=199&amp;oldid=prev</id>
		<title>Adminsorg: 1 versiune importată</title>
		<link rel="alternate" type="text/html" href="https://insemn.org/signify/index.php?title=Modul:Hatnote/doc&amp;diff=199&amp;oldid=prev"/>
		<updated>2024-10-26T07:02:30Z</updated>

		<summary type="html">&lt;p&gt;1 versiune importată&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 26 octombrie 2024 10:02&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ro&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Nicio diferență)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Adminsorg</name></author>
	</entry>
	<entry>
		<id>https://insemn.org/signify/index.php?title=Modul:Hatnote/doc&amp;diff=198&amp;oldid=prev</id>
		<title>WikiPedia&gt;Nickps: Added the page to :Category:Module documentation pages</title>
		<link rel="alternate" type="text/html" href="https://insemn.org/signify/index.php?title=Modul:Hatnote/doc&amp;diff=198&amp;oldid=prev"/>
		<updated>2024-08-29T21:37:49Z</updated>

		<summary type="html">&lt;p&gt;Added the page to &lt;a href=&quot;/signify/index.php?title=Categorie:Module_documentation_pages&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Categorie:Module documentation pages (pagină inexistentă)&quot;&gt;Category:Module documentation pages&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pagină nouă&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{used in system|in [[MediaWiki:Wantedpages-summary]]}}&lt;br /&gt;
{{module rating|protected}}&lt;br /&gt;
{{Lua|Module:Yesno|Module:Arguments}}&lt;br /&gt;
{{Uses TemplateStyles|Module:Hatnote/styles.css}}&lt;br /&gt;
This is a meta-module that provides various functions for making [[Wikipedia:Hatnote|hatnotes]]. It implements the {{tl|hatnote}} template, for use in hatnotes at the top of pages. It also contains a number of helper functions for use in other Lua hatnote modules.&lt;br /&gt;
&lt;br /&gt;
== Use from wikitext ==&lt;br /&gt;
&lt;br /&gt;
The functions in this module cannot be used directly from #invoke, and must be used through templates instead. Please see [[Template:Hatnote]] and [[Template:Format link]] for documentation.&lt;br /&gt;
&lt;br /&gt;
== Use from other Lua modules ==&lt;br /&gt;
&lt;br /&gt;
To load this module from another Lua module, use the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mHatnote = require(&amp;#039;Module:Hatnote&amp;#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then use the functions as documented below.&lt;br /&gt;
&lt;br /&gt;
=== Hatnote ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote._hatnote(s, options)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Formats the string &amp;lt;var&amp;gt;s&amp;lt;/var&amp;gt; as a hatnote. This encloses &amp;lt;var&amp;gt;s&amp;lt;/var&amp;gt; in the tags {{tag|div|params=class=&amp;quot;hatnote&amp;quot;}}. Options are provided in the &amp;lt;var&amp;gt;options&amp;lt;/var&amp;gt; table. Options include:&lt;br /&gt;
* &amp;lt;var&amp;gt;options.extraclasses&amp;lt;/var&amp;gt; - a string of extra classes to provide&lt;br /&gt;
* &amp;lt;var&amp;gt;options.selfref&amp;lt;/var&amp;gt; - if this is not nil or false, adds the class &amp;quot;selfref&amp;quot;, used to denote self-references to Wikipedia (see [[Template:Selfref]]))&lt;br /&gt;
The CSS of the hatnote class is defined in [[Module:Hatnote/styles.css]].&lt;br /&gt;
&lt;br /&gt;
; Example 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote._hatnote(&amp;#039;This is a hatnote.&amp;#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
{{tag|div|content=This is a hatnote.|params=class=&amp;quot;hatnote&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
Displays as:&lt;br /&gt;
{{hatnote|This is a hatnote.}}&lt;br /&gt;
&lt;br /&gt;
; Example 2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote._hatnote(&amp;#039;This is a hatnote.&amp;#039;, {extraclasses = &amp;#039;boilerplate seealso&amp;#039;, selfref = true})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
{{tag|div|content=This is a hatnote.|params=class=&amp;quot;hatnote boilerplate seealso selfref&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
Displayed as:&lt;br /&gt;
{{hatnote|This is a hatnote.|extraclasses=boilerplate seealso|selfref=true}}&lt;br /&gt;
&lt;br /&gt;
=== Find namespace id ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote.findNamespaceId(link, removeColon)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finds the [[WP:NS|namespace id]] of the string &amp;lt;var&amp;gt;link&amp;lt;/var&amp;gt;, which should be a valid page name, with or without the section name. This function will not work if the page name is enclosed with square brackets. When trying to parse the namespace name, colons are removed from the start of the link by default. This is helpful if users have specified colons when they are not strictly necessary. If you do not need to check for initial colons, set &amp;lt;var&amp;gt;removeColon&amp;lt;/var&amp;gt; to false.&lt;br /&gt;
&lt;br /&gt;
;Examples:&lt;br /&gt;
: {{code|mHatnote.findNamespaceId(&amp;#039;Lion&amp;#039;)|lua}} &amp;amp;rarr; 0&lt;br /&gt;
: {{code|mHatnote.findNamespaceId(&amp;#039;Category:Lions&amp;#039;)|lua}} &amp;amp;rarr; 14&lt;br /&gt;
: {{code|mHatnote.findNamespaceId(&amp;#039;:Category:Lions&amp;#039;)|lua}} &amp;amp;rarr; 14&lt;br /&gt;
: {{code|mHatnote.findNamespaceId(&amp;#039;:Category:Lions&amp;#039;, false)|lua}} &amp;amp;rarr; 0 (the namespace is detected as &amp;quot;:Category&amp;quot;, rather than &amp;quot;Category&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== Make wikitext error ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote.makeWikitextError(msg, helpLink, addTrackingCategory)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Formats the string &amp;lt;var&amp;gt;msg&amp;lt;/var&amp;gt; as a red wikitext error message, with optional link to a help page &amp;lt;var&amp;gt;helpLink&amp;lt;/var&amp;gt;. Normally this function also adds {{clc|Hatnote templates with errors}}. To suppress categorization, pass &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; as third parameter of the function (&amp;lt;code&amp;gt;addTrackingCategory&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
:{{code|mHatnote.makeWikitextError(&amp;#039;an error has occurred&amp;#039;)|lua}} &amp;amp;rarr; &amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: an error has occurred.&amp;lt;/strong&amp;gt;&lt;br /&gt;
:{{code|mHatnote.makeWikitextError(&amp;#039;an error has occurred&amp;#039;, &amp;#039;Template:Example#Errors&amp;#039;)|lua}} &amp;amp;rarr; &amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: an error has occurred ([[Template:Example#Errors|help]]).&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
For an example of how this module is used in other Lua modules, see [[Module:Labelled list hatnote]]&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories go here and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
[[Category:Hatnote modules| ]]&lt;br /&gt;
[[Category:Modules that add a tracking category]]&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Module documentation pages]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>WikiPedia&gt;Nickps</name></author>
	</entry>
</feed>