<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="vi">
	<id>https://wikibeta.org/index.php?action=history&amp;feed=atom&amp;title=M%C3%B4_%C4%91un%3ACountVotes</id>
	<title>Mô đun:CountVotes - Lịch sử thay đổi</title>
	<link rel="self" type="application/atom+xml" href="https://wikibeta.org/index.php?action=history&amp;feed=atom&amp;title=M%C3%B4_%C4%91un%3ACountVotes"/>
	<link rel="alternate" type="text/html" href="https://wikibeta.org/index.php?title=M%C3%B4_%C4%91un:CountVotes&amp;action=history"/>
	<updated>2026-08-11T11:40:00Z</updated>
	<subtitle>Lịch sử thay đổi trang này trên wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wikibeta.org/index.php?title=M%C3%B4_%C4%91un:CountVotes&amp;diff=7660250&amp;oldid=prev</id>
		<title>imported&gt;Veritas Sapientiae: -</title>
		<link rel="alternate" type="text/html" href="https://wikibeta.org/index.php?title=M%C3%B4_%C4%91un:CountVotes&amp;diff=7660250&amp;oldid=prev"/>
		<updated>2025-06-29T04:08:07Z</updated>

		<summary type="html">&lt;p&gt;-&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Trang mới&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local TableTools = require(&amp;#039;Module:TableTools&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local positiveVoteTemplateNames = {&lt;br /&gt;
	&amp;#039;ok&amp;#039;, &amp;#039;agree&amp;#039;, &amp;#039;support&amp;#039;,&lt;br /&gt;
	&amp;#039;đồng ý&amp;#039;, &amp;#039;tán thành&amp;#039;, &amp;#039;ủng hộ&amp;#039;,&lt;br /&gt;
	&amp;#039;phiếu xóa&amp;#039;, &amp;#039;bqx&amp;#039;, &amp;#039;phiếu xóa nhanh&amp;#039;, &amp;#039;phiếu xoá nhanh&amp;#039;, &amp;#039;bqxn&amp;#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local negativeVoteTemplateNames = {&lt;br /&gt;
	&amp;#039;ok?&amp;#039;, &amp;#039;disagree&amp;#039;, &amp;#039;oppose&amp;#039;,&lt;br /&gt;
	&amp;#039;phản đối&amp;#039;, &amp;#039;chưa đồng ý&amp;#039;, &amp;#039;phản đối mạnh&amp;#039;, &amp;#039;phản đối kịch liệt&amp;#039;,&lt;br /&gt;
	&amp;#039;phiếu giữ&amp;#039;, &amp;#039;bqg&amp;#039;, &amp;#039;phiếu giữ nhanh&amp;#039;, &amp;#039;bqgn&amp;#039;,&lt;br /&gt;
	&amp;#039;chống&amp;#039;, &amp;#039;giữ&amp;#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local function isPositiveVote(templateName)&lt;br /&gt;
	return TableTools.inArray(positiveVoteTemplateNames, templateName)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isNegativeVote(templateName)&lt;br /&gt;
	return TableTools.inArray(negativeVoteTemplateNames, templateName)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(title)&lt;br /&gt;
	local positiveVotesNumber, negativeVotesNumber = 0, 0&lt;br /&gt;
&lt;br /&gt;
	if (title or {}).exists then&lt;br /&gt;
		local content = title:getContent()&lt;br /&gt;
&lt;br /&gt;
		for line in string.gmatch(content, &amp;#039;([^\n]+)&amp;#039;) do&lt;br /&gt;
			local match = line:match(&amp;#039;^[#*]:?%s-{{([^|]-)}}&amp;#039;)&lt;br /&gt;
					or line:match(&amp;#039;^[#*]:?&amp;lt;li%s-value=.?%d.?&amp;gt;{{([^|]-)}}&amp;#039;)&lt;br /&gt;
			if match then&lt;br /&gt;
				match = mw.ustring.lower(mw.text.trim(match))&lt;br /&gt;
				if isPositiveVote(match) then&lt;br /&gt;
					positiveVotesNumber = positiveVotesNumber + 1&lt;br /&gt;
				elseif isNegativeVote(match) then&lt;br /&gt;
					negativeVotesNumber = negativeVotesNumber + 1&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return positiveVotesNumber, negativeVotesNumber&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.positive(frame)&lt;br /&gt;
	local titleText = frame.args[1] or mw.title.getCurrentTitle().fullText&lt;br /&gt;
	local title = mw.title.new(titleText)&lt;br /&gt;
	local pos, _ = p._main(title)&lt;br /&gt;
	return tostring(pos)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.negative(frame)&lt;br /&gt;
	local titleText = frame.args[1] or mw.title.getCurrentTitle().fullText&lt;br /&gt;
	local title = mw.title.new(titleText)&lt;br /&gt;
	local _, neg = p._main(title)&lt;br /&gt;
	return tostring(neg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Veritas Sapientiae</name></author>
	</entry>
</feed>