<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ar">
	<id>https://3rabica.org/index.php?action=history&amp;feed=atom&amp;title=%D9%88%D8%AD%D8%AF%D8%A9%3AParseVauthors</id>
	<title>وحدة:ParseVauthors - تاريخ المراجعة</title>
	<link rel="self" type="application/atom+xml" href="https://3rabica.org/index.php?action=history&amp;feed=atom&amp;title=%D9%88%D8%AD%D8%AF%D8%A9%3AParseVauthors"/>
	<link rel="alternate" type="text/html" href="https://3rabica.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:ParseVauthors&amp;action=history"/>
	<updated>2026-06-05T17:30:05Z</updated>
	<subtitle>تاريخ التعديل لهذه الصفحة في الويكي</subtitle>
	<generator>MediaWiki 1.43.7</generator>
	<entry>
		<id>https://3rabica.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:ParseVauthors&amp;diff=118&amp;oldid=prev</id>
		<title>عبد العزيز: أنشأ الصفحة ب&#039;local p = {}  function p.parse(frame) 	local args = frame:getParent().args -- This gets the arguments passed to the template that called #invoke, so we don&#039;t need to pas...&#039;</title>
		<link rel="alternate" type="text/html" href="https://3rabica.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:ParseVauthors&amp;diff=118&amp;oldid=prev"/>
		<updated>2015-04-27T17:33:44Z</updated>

		<summary type="html">&lt;p&gt;أنشأ الصفحة ب&amp;#039;local p = {}  function p.parse(frame) 	local args = frame:getParent().args -- This gets the arguments passed to the template that called #invoke, so we don&amp;#039;t need to pas...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;صفحة جديدة&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.parse(frame)&lt;br /&gt;
	local args = frame:getParent().args -- This gets the arguments passed to the template that called #invoke, so we don&amp;#039;t need to pass them all through to the module. See also [[Module:Arguments]].&lt;br /&gt;
	local vauthors = args[1] or args.vauthors&lt;br /&gt;
	local authorTable&lt;br /&gt;
	local lastfirstTable&lt;br /&gt;
	local nauthors&lt;br /&gt;
	if vauthors then&lt;br /&gt;
		if string.find(vauthors, &amp;#039;;&amp;#039;) or string.find(vauthors, &amp;#039;%.&amp;#039;) then&lt;br /&gt;
			verror = true -- Vancouver author format should not contain semicolons or periods&lt;br /&gt;
		else&lt;br /&gt;
			verror = false&lt;br /&gt;
		end&lt;br /&gt;
		authorTable = mw.text.split(vauthors, &amp;quot;%s*,%s*&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		authorTable = {}&lt;br /&gt;
	end&lt;br /&gt;
	local citeArgs = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		citeArgs[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	citeArgs[1] = nil -- Erase vauthors from the citation arguments.&lt;br /&gt;
	citeArgs.vauthors = nil -- Erase vauthors from the citation arguments.&lt;br /&gt;
	nauthors = 0&lt;br /&gt;
	for i, author in ipairs(authorTable) do&lt;br /&gt;
		if string.find(author, &amp;quot;%s&amp;quot;) then&lt;br /&gt;
		    lastfirstTable = {}&lt;br /&gt;
		    lastfirstTable = mw.text.split(author, &amp;quot;%s&amp;quot;)&lt;br /&gt;
		    first = table.remove(lastfirstTable)&lt;br /&gt;
		    last  = table.concat(lastfirstTable, &amp;quot; &amp;quot;)&lt;br /&gt;
		    citeArgs[&amp;#039;first&amp;#039; .. i] = first&lt;br /&gt;
		    citeArgs[&amp;#039;last&amp;#039; .. i]  = last&lt;br /&gt;
		    nauthors = nauthors + 1&lt;br /&gt;
		else&lt;br /&gt;
			citeArgs[&amp;#039;first&amp;#039; .. i] = &amp;quot;&amp;quot;&lt;br /&gt;
			citeArgs[&amp;#039;last&amp;#039; .. i]  = author&lt;br /&gt;
		    nauthors = nauthors + 1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if citeArgs[&amp;#039;name-list-format&amp;#039;] == nil then&lt;br /&gt;
	    citeArgs[&amp;#039;name-list-format&amp;#039;] = &amp;quot;vanc&amp;quot; -- change default settings of authorformat, etc. parameters so that Vancouver style author format is used&lt;br /&gt;
	end&lt;br /&gt;
	if citeArgs[&amp;#039;display-authors&amp;#039;] == nil and citeArgs[&amp;#039;displayauthors&amp;#039;] == nil and nauthors &amp;gt; 6 then&lt;br /&gt;
		citeArgs[&amp;#039;display-authors&amp;#039;] = &amp;#039;6&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
	if verror then&lt;br /&gt;
        errorArgs = {}&lt;br /&gt;
        errorArgs[&amp;#039;1&amp;#039;]=&amp;#039;vauthors format&amp;#039;&lt;br /&gt;
		return frame:expandTemplate{title = &amp;#039;cite journal&amp;#039;, args = citeArgs}, frame:expandTemplate{title = &amp;#039;citation error&amp;#039;, args = errorArgs}&lt;br /&gt;
	else&lt;br /&gt;
		return frame:expandTemplate{title = &amp;#039;cite journal&amp;#039;, args = citeArgs}&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>عبد العزيز</name></author>
	</entry>
</feed>