<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://petitplanet.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AFilterBuilder</id>
	<title>Module:FilterBuilder - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://petitplanet.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AFilterBuilder"/>
	<link rel="alternate" type="text/html" href="https://petitplanet.wiki/index.php?title=Module:FilterBuilder&amp;action=history"/>
	<updated>2026-04-15T14:42:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://petitplanet.wiki/index.php?title=Module:FilterBuilder&amp;diff=1232&amp;oldid=prev</id>
		<title>Stevium: Created Module:FilterBuilder</title>
		<link rel="alternate" type="text/html" href="https://petitplanet.wiki/index.php?title=Module:FilterBuilder&amp;diff=1232&amp;oldid=prev"/>
		<updated>2025-11-12T18:16:35Z</updated>

		<summary type="html">&lt;p&gt;Created Module:FilterBuilder&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Source: https://anothereden.wiki/w/Module:FilterBuilder&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.filterBuilder(frame)&lt;br /&gt;
	local dataKey = mw.text.trim(frame.args[1])&lt;br /&gt;
	local dataValues = mw.text.split(frame.args[2], &amp;quot;,&amp;quot;)&lt;br /&gt;
	local contentValues = mw.text.split(frame.args[3], &amp;quot;,&amp;quot;)&lt;br /&gt;
	local selectedValues = frame.args[4]&lt;br /&gt;
	if selectedValues~=nill then&lt;br /&gt;
		selectedValues = string.lower(selectedValues)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local filterGroup = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;mw-ui-button-group&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;filter-group-&amp;#039; .. dataKey)&lt;br /&gt;
		:css(&amp;#039;margin&amp;#039;, &amp;#039;0&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;flex-wrap&amp;#039;, &amp;#039;wrap&amp;#039;)&lt;br /&gt;
	if string.find(dataKey, &amp;quot;strict&amp;quot;) then&lt;br /&gt;
	    filterGroup:addClass(&amp;#039;group-strict&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if dataKey == &amp;#039;reset&amp;#039; then&lt;br /&gt;
			filterGroup:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;filter-reset&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;mw-ui-button&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;filter-button&amp;#039;)&lt;br /&gt;
				:css(&amp;#039;height&amp;#039;, &amp;#039;auto&amp;#039;)&lt;br /&gt;
				:wikitext(contentValues[1])&lt;br /&gt;
	else&lt;br /&gt;
		for i,value in ipairs(dataValues) do&lt;br /&gt;
			button=filterGroup:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
			button&lt;br /&gt;
				:addClass(&amp;#039;mw-ui-button&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;filter-button&amp;#039;)&lt;br /&gt;
				:attr(&amp;#039;data-key&amp;#039;, dataKey)&lt;br /&gt;
				:attr(&amp;#039;data-value&amp;#039;, string.lower(mw.text.trim(value)))&lt;br /&gt;
				:css(&amp;#039;height&amp;#039;, &amp;#039;auto&amp;#039;)&lt;br /&gt;
				:wikitext(contentValues[i])&lt;br /&gt;
			&lt;br /&gt;
			if selectedValues~=nill then &lt;br /&gt;
				if string.find(selectedValues, string.lower(mw.text.trim(value))) then&lt;br /&gt;
					button&lt;br /&gt;
					    :addClass(&amp;#039;filter-button-selected&amp;#039;)&lt;br /&gt;
					    :addClass(&amp;quot;default-selected&amp;quot;)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return tostring(filterGroup)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Stevium</name></author>
	</entry>
</feed>