<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ro">
	<id>https://enciclopedia.md/index.php?action=history&amp;feed=atom&amp;title=Modul%3AEditAtWikidata</id>
	<title>Modul:EditAtWikidata - Revizia istoricului</title>
	<link rel="self" type="application/atom+xml" href="https://enciclopedia.md/index.php?action=history&amp;feed=atom&amp;title=Modul%3AEditAtWikidata"/>
	<link rel="alternate" type="text/html" href="https://enciclopedia.md/index.php?title=Modul:EditAtWikidata&amp;action=history"/>
	<updated>2026-04-22T00:40:59Z</updated>
	<subtitle>Istoricul versiunilor pentru această pagină din wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://enciclopedia.md/index.php?title=Modul:EditAtWikidata&amp;diff=355&amp;oldid=prev</id>
		<title>Sergiu: Pagină nouă: -- Module to display an icon with a tooltip such as &quot;Edit this at Wikidata&quot; -- Icon will be linked to the Wikidata entry for the article where this is placed. -- This message is only displayed if a local_parameter is not supplied -- i.e. when called from a template, it can be coded not to display the message  -- when a local parameter is in use, preventing the value form Wikidata being fetched. -- The qid of a Wikidata entry can optionally be supplied for testing outside the...</title>
		<link rel="alternate" type="text/html" href="https://enciclopedia.md/index.php?title=Modul:EditAtWikidata&amp;diff=355&amp;oldid=prev"/>
		<updated>2024-07-14T20:30:45Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: -- Module to display an icon with a tooltip such as &amp;quot;Edit this at Wikidata&amp;quot; -- Icon will be linked to the Wikidata entry for the article where this is placed. -- This message is only displayed if a local_parameter is not supplied -- i.e. when called from a template, it can be coded not to display the message  -- when a local parameter is in use, preventing the value form Wikidata being fetched. -- The qid of a Wikidata entry can optionally be supplied for testing outside the...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pagină nouă&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module to display an icon with a tooltip such as &amp;quot;Edit this at Wikidata&amp;quot;&lt;br /&gt;
-- Icon will be linked to the Wikidata entry for the article where this is placed.&lt;br /&gt;
-- This message is only displayed if a local_parameter is not supplied&lt;br /&gt;
-- i.e. when called from a template, it can be coded not to display the message &lt;br /&gt;
-- when a local parameter is in use, preventing the value form Wikidata being fetched.&lt;br /&gt;
-- The qid of a Wikidata entry can optionally be supplied for testing outside the article.&lt;br /&gt;
-- Usage:&lt;br /&gt;
-- {{#invoke:EditAtWikidata|showMessage|local_parameter}}&lt;br /&gt;
-- {{#invoke:EditAtWikidata|showMessage|qid=&amp;lt;ArticleID&amp;gt;|local_parameter}}&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
local getArgs = require(&amp;#039;Modul:Arguments&amp;#039;).getArgs&lt;br /&gt;
&lt;br /&gt;
local i18n =&lt;br /&gt;
{&lt;br /&gt;
    [&amp;quot;message&amp;quot;] = &amp;quot;Modificați la Wikidata&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
p.displayMessageWithCustomText = function(pid, qid, text)&lt;br /&gt;
	-- Get the object containing all the claims for the article&lt;br /&gt;
	local thisQid = qid or mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
	if not thisQid then return nil end&lt;br /&gt;
	if not text then return p.displayMessage(pid, qid) end&lt;br /&gt;
		&lt;br /&gt;
	local link = &amp;quot; [[:d:&amp;quot; .. thisQid .. (pid and (&amp;quot;#&amp;quot; .. pid ) or &amp;quot;&amp;quot;) .. &amp;quot;|&amp;quot; .. text .. &amp;quot;]]&amp;quot;&lt;br /&gt;
	return link&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.displayMessage = function(pid, qid)&lt;br /&gt;
	&lt;br /&gt;
	-- Get the object containing all the claims for the article&lt;br /&gt;
	local thisQid = qid or mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
	if not thisQid then return nil end&lt;br /&gt;
	&lt;br /&gt;
	local icon&lt;br /&gt;
	if pid then&lt;br /&gt;
		icon = &amp;quot; [[File:Blue pencil.svg |frameless |text-top |10px |alt=&amp;quot; .. i18n.message .. &amp;quot; |link=https://www.wikidata.org/wiki/&amp;quot; .. thisQid .. &amp;quot;#&amp;quot; .. pid .. &amp;quot;|&amp;quot; .. i18n.message .. &amp;quot;]]&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		icon = &amp;quot; [[File:Blue pencil.svg |frameless |text-top |10px |alt=&amp;quot; .. i18n.message .. &amp;quot; |link=https://www.wikidata.org/wiki/&amp;quot; .. thisQid .. &amp;quot;|&amp;quot; .. i18n.message .. &amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return icon&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
p.showMessage = function(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	&lt;br /&gt;
	-- There may be a local parameter supplied, if it&amp;#039;s blank, set it to nil&lt;br /&gt;
	local local_parm =  args[1] or &amp;quot;&amp;quot;&lt;br /&gt;
	if local_parm and (#local_parm == 0) then local_parm = nil end&lt;br /&gt;
	&lt;br /&gt;
	-- If there is a local parameter used, we don&amp;#039;t want to display the message&lt;br /&gt;
	if local_parm then return nil end&lt;br /&gt;
	&lt;br /&gt;
	-- Can take a named parameter |qid which is the Wikidata ID for the article.&lt;br /&gt;
	-- This will not normally be used except for testing outside the article.&lt;br /&gt;
	local qid = args.qid&lt;br /&gt;
	&lt;br /&gt;
	-- The module can take a parameter pid= &lt;br /&gt;
	-- which will create a link to that property in the Wikidata entry for the article&lt;br /&gt;
	local pid = args.pid&lt;br /&gt;
	&lt;br /&gt;
	local label = args.label&lt;br /&gt;
	&lt;br /&gt;
	if not label then&lt;br /&gt;
		return p.displayMessage(pid, qid)&lt;br /&gt;
	else &lt;br /&gt;
		return p.displayMessageWithCustomText(pid, qid, label)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
	&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Sergiu</name></author>
	</entry>
</feed>