Module:RfP header: Difference between revisions

From Test Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:
end
end
if mw.allToString( mw.title.getCurrentTitle() ) == 'Test Wiki:Request permissions' then
if mw.allToString( mw.title.getCurrentTitle() ) == 'Test Wiki:Request permissions' then
m_body_a = m_body_a .. '{| style="width: 100%; border: 3px double #662; padding: .3em; background-color: darkgreen; color: #EEE"\n| colspan="3" style="background-color: #888" align="center" | ' .. "'''Request permissions'''" .. '\n|-\n|<center>You can request administrator or other permissions below. You must already be an administrator to be eligible for Bureaucrat. Interface administrator rights may only be granted by the stewards and are only given to highly trusted users. Rights may be removed after 3 months of [[Test Wiki:Inactivity policy|<span style="color:#FFFFFF; text-decoration:underline">inactivity</span>]].<br/>\nOther Permissions: Bot,  translate administrator, interwiki admin,  autopatrol,  <br>\nFor Steward or System Administrator, a vote should take place on the [[Test_Wiki:Community_portal|<span style="color:#FFFFFF; text-decoration:underline">community portal</span>]].<br/>\nBureaucrats, you can use the [[Special:Preferences#mw-prefsection-gadgets|<span style="color:#FFFFFF; text-decoration:underline">userRightsManagerTW gadget</span>]] to easily handle requests.\n</center>' .. m_body_b .. ' (<span class="plainlinks">[' .. mw.title.new('Request permissions/Archive' .. m_i , 4):fullUrl('action=edit') .. ' edit]</span>)' .. '\n|-\n| width="97px" style="padding:1px; padding-left:2px;" | <center>' .. "'''Click the '''Request rights''' button to request rights'''" .. '</center>\n|-\n|<inputbox>\ntype=comment\nbuttonlabel= Request rights \nsummary= Request rights\npreload= Test Wiki:Request permissions/Preload\npage=Test Wiki:Request permissions\ndefault=Test Wiki:Request permissions\nhidden=yes\n</inputbox>\n|}'
m_body_a = m_body_a .. '{| style="width: 100%; border: 3px double #662; padding: .3em; background-color: darkgreen; color: #EEE"\n| colspan="3" style="background-color: #888" align="center" | ' .. "'''Request permissions'''" .. '\n|-\n|<center>You can request administrator or other permissions below. You must already be an administrator to be eligible for Bureaucrat. Interface administrator rights may only be granted by the stewards and are only given to highly trusted users. Rights may be removed after 3 months of [[Test Wiki:Inactivity policy|<span style="color:#FFFFFF; text-decoration:underline">inactivity</span>]].<br/>\nOther Permissions: Bot,  translate administrator, interwiki admin,  autopatrol,  <br>\nFor Steward or System Administrator, a vote should take place on the [[Test_Wiki:Community_portal|<span style="color:#FFFFFF; text-decoration:underline">community portal</span>]].<br/>\nBureaucrats, you can use the [[Special:Preferences#mw-prefsection-gadgets|<span style="color:#FFFFFF; text-decoration:underline">userRightsManagerTW gadget</span>]] to easily handle requests.\n</center>' .. m_body_b .. ' (<span class="plainlinks">[' .. mw.title.new('Request permissions/Archive' .. m_i , 4):fullUrl('action=edit') .. ' edit]</span>)' .. '\n|-\n| width="97px" style="padding:1px; padding-left:2px;" | <center>' .. "'''Click the '''Request rights''' button to request rights'''" .. '</center>\n|-\n|' .. frame:callParserFunction{ name = '#tag:inputbox', args = { 'type=comment\nbuttonlabel= Request rights \nsummary= Request rights\npreload= Test Wiki:Request permissions/Preload\npage=Test Wiki:Request permissions\ndefault=Test Wiki:Request permissions\nhidden=yes' } } .. '\n|}'
else
else
m_body_a = m_body_a .. '{| style="width: 100%; border: 3px double #662; padding: .3em; background-color: darkgreen; color: #EEE"\n| colspan="3" style="background-color: #888" align="center" | ' .. "'''Request permissions Archives'''" .. '\n|-\n|\n' .. m_body_b
m_body_a = m_body_a .. '{| style="width: 100%; border: 3px double #662; padding: .3em; background-color: darkgreen; color: #EEE"\n| colspan="3" style="background-color: #888" align="center" | ' .. "'''Request permissions Archives'''" .. '\n|-\n|\n' .. m_body_b
Line 21: Line 21:
end
end
function p.Test( frame )
function p.Test( frame )
return frame:callParserFunction{ name = '#tag:inputbox', args = { 'type=comment\nbuttonlabel=Request rights' } }
return  
end
end
return p
return p

Revision as of 11:44, 17 May 2022

Documentation for this module may be created at Module:RfP header/doc

local p = {}
function p.Main( frame )
	local m_body_a = ''
		local m_i = 1
		while mw.title.new('Request permissions/Archive' .. m_i , 4).exists do
			m_i = m_i + 1
		end
		m_i = m_i - 1
	local m_apn = 1
	local m_body_b = ''
	while m_apn <= m_i do
		m_body_b = m_body_b .. '\n' .. '|-\n' .. '|colspan="3" style="background-color: #457645" align="center"|[[File:Human-folder.png|25px|link=Test Wiki:Request permissions/Archive' .. m_apn .. ']][[Test Wiki:Request permissions/Archive' .. m_apn .. '|<span style="color:#FFFFFF; text-decoration:underline">Archive' .. m_apn .. '</span>]]'
		m_apn = m_apn + 1
	end
	if mw.allToString( mw.title.getCurrentTitle() ) == 'Test Wiki:Request permissions' then
		m_body_a = m_body_a .. '{| style="width: 100%; border: 3px double #662; padding: .3em; background-color: darkgreen; color: #EEE"\n| colspan="3" style="background-color: #888" align="center" | ' .. "'''Request permissions'''" .. '\n|-\n|<center>You can request administrator or other permissions below. You must already be an administrator to be eligible for Bureaucrat. Interface administrator rights may only be granted by the stewards and are only given to highly trusted users. Rights may be removed after 3 months of [[Test Wiki:Inactivity policy|<span style="color:#FFFFFF; text-decoration:underline">inactivity</span>]].<br/>\nOther Permissions: Bot,  translate administrator, interwiki admin,  autopatrol,  <br>\nFor Steward or System Administrator, a vote should take place on the [[Test_Wiki:Community_portal|<span style="color:#FFFFFF; text-decoration:underline">community portal</span>]].<br/>\nBureaucrats, you can use the [[Special:Preferences#mw-prefsection-gadgets|<span style="color:#FFFFFF; text-decoration:underline">userRightsManagerTW gadget</span>]] to easily handle requests.\n</center>' .. m_body_b .. ' (<span class="plainlinks">[' .. mw.title.new('Request permissions/Archive' .. m_i , 4):fullUrl('action=edit') .. ' edit]</span>)' .. '\n|-\n| width="97px" style="padding:1px; padding-left:2px;" | <center>' .. "'''Click the '''Request rights''' button to request rights'''" .. '</center>\n|-\n|' .. frame:callParserFunction{ name = '#tag:inputbox', args = { 'type=comment\nbuttonlabel= Request rights \nsummary= Request rights\npreload= Test Wiki:Request permissions/Preload\npage=Test Wiki:Request permissions\ndefault=Test Wiki:Request permissions\nhidden=yes' } } .. '\n|}'
	else
		m_body_a = m_body_a .. '{| style="width: 100%; border: 3px double #662; padding: .3em; background-color: darkgreen; color: #EEE"\n| colspan="3" style="background-color: #888" align="center" | ' .. "'''Request permissions Archives'''" .. '\n|-\n|\n' .. m_body_b
	end
	return m_body_a
end
function p.Test( frame )
	return 
end
return p