<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AClade%2Fhidden</id>
	<title>Module:Clade/hidden - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AClade%2Fhidden"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Clade/hidden&amp;action=history"/>
	<updated>2026-07-05T01:37:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://mywikibiz.com/index.php?title=Module:Clade/hidden&amp;diff=471292&amp;oldid=prev</id>
		<title>Zoran: Pywikibot 6.4.0</title>
		<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Clade/hidden&amp;diff=471292&amp;oldid=prev"/>
		<updated>2021-07-15T21:02:36Z</updated>

		<summary type="html">&lt;p&gt;Pywikibot 6.4.0&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.hidden(frame)&lt;br /&gt;
    &lt;br /&gt;
    local id = mw.getCurrentFrame():getParent().args['id'] or &amp;quot;&amp;quot;&lt;br /&gt;
    local mode = mw.getCurrentFrame():getParent().args['mode'] or &amp;quot;right&amp;quot;&lt;br /&gt;
    local expandSymbol = mw.getCurrentFrame():getParent().args['expand-symbol'] or &amp;quot;&amp;amp;#8862;&amp;quot;&lt;br /&gt;
    local collapseSymbol = mw.getCurrentFrame():getParent().args['collapse-symbol'] or &amp;quot;&amp;amp;#8863;&amp;quot;&lt;br /&gt;
    local expandText = mw.getCurrentFrame():getParent().args['expand-text'] or &amp;quot;&amp;quot;&lt;br /&gt;
    local collapseText = mw.getCurrentFrame():getParent().args['collapse-text'] or &amp;quot;&amp;quot;&lt;br /&gt;
    local initialState = mw.getCurrentFrame():getParent().args['expanded']&lt;br /&gt;
    expandSymbol = expandSymbol .. expandText&lt;br /&gt;
    collapseSymbol = collapseSymbol .. collapseText&lt;br /&gt;
    &lt;br /&gt;
    -- default is content collapsed&lt;br /&gt;
    local contentState = &amp;quot; mw-collapsed&amp;quot; -- class to collapse content at start&lt;br /&gt;
    local collapseSymbolState = &amp;quot; mw-collapsed&amp;quot;&lt;br /&gt;
    local expandSymbolState = &amp;quot;&amp;quot;&lt;br /&gt;
    if initialState then&lt;br /&gt;
       contentState = &amp;quot;&amp;quot;&lt;br /&gt;
       collapseSymbolState =  &amp;quot;&amp;quot;&lt;br /&gt;
       expandSymbolState = &amp;quot; mw-collapsed&amp;quot; &lt;br /&gt;
    end&lt;br /&gt;
    	&lt;br /&gt;
	&lt;br /&gt;
    -- collapsible element containing the EXPAND SYMBOL and/or text&lt;br /&gt;
    local expandSymbolString = '&amp;lt;td class=&amp;quot;nomobile&amp;quot; style=&amp;quot;padding:0 0 0.0em 0;&amp;quot;&amp;gt;' &lt;br /&gt;
                .. '&amp;lt;div class=&amp;quot;mw-collapsible' .. expandSymbolState .. '&amp;quot; id=&amp;quot;mw-customcollapsible-expandSymbol' .. id .. '&amp;quot;&amp;gt;'&lt;br /&gt;
                .. '&amp;lt;div class=&amp;quot;mw-collapsible-content mw-customtoggle-expandSymbol' .. id .. '&amp;quot;&amp;gt;'&lt;br /&gt;
                .. '&amp;lt;span class=&amp;quot;mw-customtoggle-myClade' .. id &lt;br /&gt;
                ..             ' mw-customtoggle-collapseSymbol' .. id &lt;br /&gt;
                ..             ' mw-customtoggle-expandSymbol' .. id &lt;br /&gt;
                ..    '&amp;quot; style=&amp;quot;font-size:100%;&amp;quot;&amp;gt;' .. expandSymbol .. '&amp;lt;/span&amp;gt;'&lt;br /&gt;
                .. '&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;'&lt;br /&gt;
    &lt;br /&gt;
    -- collapsible element containing the CLADE CONTENT &lt;br /&gt;
    local clade = require( 'Module:Clade' )&lt;br /&gt;
    local contentString = '&amp;lt;td style=&amp;quot;padding:0;&amp;quot; class=&amp;quot;clade-interactive&amp;quot; &amp;gt;'&lt;br /&gt;
                .. '&amp;lt;div class=&amp;quot;mw-collapsible' .. contentState .. '&amp;quot; id=&amp;quot;mw-customcollapsible-myClade' .. id .. '&amp;gt;'&lt;br /&gt;
                .. '&amp;lt;div class=&amp;quot;mw-collapsible-content mw-customtoggle-NOT_ON_CONTENT&amp;quot; &amp;gt;' -- don't toggle on the content&lt;br /&gt;
                &lt;br /&gt;
                .. '\n' .. clade.main(frame)  -- important to start wikitext tables on new line&lt;br /&gt;
                .. '&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;'&lt;br /&gt;
    &lt;br /&gt;
    -- collapsible element containing the COLLAPSE SYMBOL and/or text&lt;br /&gt;
    local collapseSymbolString = '&amp;lt;td class=&amp;quot;nomobile&amp;quot; style=&amp;quot;padding:0 0 0.0em 0;&amp;quot;&amp;gt;'&lt;br /&gt;
                .. '&amp;lt;div class=&amp;quot;mw-collapsible' .. collapseSymbolState .. '&amp;quot; id=&amp;quot;mw-customcollapsible-collapseSymbol' .. id .. '&amp;quot;&amp;gt;'&lt;br /&gt;
                .. '&amp;lt;div class=&amp;quot;mw-collapsible-content mw-customtoggle-collapseSymbol' .. id .. '&amp;quot; &amp;gt;'&lt;br /&gt;
                .. '&amp;lt;span class=&amp;quot;mw-customtoggle-expandSymbol' .. id &lt;br /&gt;
                            .. ' mw-customtoggle-myClade' .. id &lt;br /&gt;
                            .. ' mw-customtoggle-collapseSymbol' .. id &lt;br /&gt;
                            .. ' &amp;quot; style=&amp;quot;font-size:100%;&amp;quot; &amp;gt;' .. collapseSymbol .. '&amp;lt;/span&amp;gt;'&lt;br /&gt;
                            .. '&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	local tableStyle = frame.args.style or &amp;quot;&amp;quot;&lt;br /&gt;
	if tableStyle == '{{{style}}}' then tableStyle = &amp;quot;&amp;quot; end&lt;br /&gt;
 	local cladeString = '&amp;lt;table style=&amp;quot;border-spacing:0;margin:0;'..tableStyle ..'&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;'&lt;br /&gt;
    cladeString = cladeString .. expandSymbolString &lt;br /&gt;
    if mode == &amp;quot;left&amp;quot; then&lt;br /&gt;
    	cladeString = cladeString .. collapseSymbolString&lt;br /&gt;
    end&lt;br /&gt;
    cladeString = cladeString .. contentString &lt;br /&gt;
    if mode == &amp;quot;right&amp;quot; then&lt;br /&gt;
    	cladeString = cladeString .. collapseSymbolString&lt;br /&gt;
    end&lt;br /&gt;
    -- Note: if we want collapse string left and right it needs an extra element with a different id&lt;br /&gt;
    cladeString = cladeString ..  '&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return p.templateStyle( frame, &amp;quot;Clade hidden/styles.css&amp;quot; ) .. cladeString&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.toggle(frame)&lt;br /&gt;
	&lt;br /&gt;
	if 1==2 then return 'some text' end&lt;br /&gt;
	&lt;br /&gt;
	--local toggleSymbol = 'toggle all'&lt;br /&gt;
	local toggleSymbol = mw.getCurrentFrame():getParent().args['button'] or &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	local toggleString = '&amp;lt;div class=&amp;quot;'&lt;br /&gt;
                &lt;br /&gt;
    local i=0&lt;br /&gt;
    while 	i &amp;lt; 20 do  -- limit on number of toggle elements controlled by the trigger button&lt;br /&gt;
    	i = i + 1 -- so we start with 1&lt;br /&gt;
		local target = mw.getCurrentFrame():getParent().args['id'..tostring(i)] &lt;br /&gt;
	    &lt;br /&gt;
	    -- add classes for the three elements of each target: expand symbol, collapse symbol and contents&lt;br /&gt;
	    if target ~= nil then&lt;br /&gt;
            toggleString = toggleString .. ' mw-customtoggle-myClade' .. target &lt;br /&gt;
                ..             ' mw-customtoggle-collapseSymbol' .. target &lt;br /&gt;
                ..             ' mw-customtoggle-expandSymbol' .. target &lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
 toggleString = toggleString  ..  '&amp;quot;&amp;gt;' .. toggleSymbol .. '&amp;lt;/div&amp;gt;'&lt;br /&gt;
&lt;br /&gt;
  return toggleString&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- &amp;lt;templatestyles src=&amp;quot;Clade hidden/styles.css&amp;quot;&amp;gt;&amp;lt;/templatestyles&amp;gt;&lt;br /&gt;
function p.templateStyle( frame, src )&lt;br /&gt;
   return frame:extensionTag( 'templatestyles', '', { src = src } );&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>