Modulo:Vedi anche

Hello, you have come here looking for the meaning of the word Modulo:Vedi anche. In DICTIOUS you will not only get to know all the dictionary meanings for the word Modulo:Vedi anche, but we will also tell you about its etymology, its characteristics and you will know how to say Modulo:Vedi anche in singular and plural. Everything you need to know about the word Modulo:Vedi anche you have here. The definition of the word Modulo:Vedi anche will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModulo:Vedi anche, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

Questo template serve unicamente per gestire il {{Vedi}}, ha perciò un'unica funzione, main, che gestisce tutti i parametri e la creazione del box.

Fare riferimento al suddetto template per la sintassi d'uso.


local mBox = require('Module:Message box')
local getArgs = require('Modulo:Arguments').getArgs

local p = {}

local function categorizza(cat)
	return string.format(']', mw.site.namespaces.name, cat)
end

function p.main(frame)
	local lemmi = {}
	local boxArgs = {}
	local testo, stile, immagine
	local args = getArgs(frame)
	local sect = args.sect
	
	
	for i, j in pairs(args) do
--		if type(i) ~= 'number' then
--			error (']: È stato specificato un parametro nominale')
--		end
		
		if mw.text.trim(j) == '' then
			error (']: È stato specificato un parametro vuoto')
		end

		if i ~= 'sect' then
			table.insert(lemmi, string.format(']', mw.text.trim(j)))
		end
	end

	if (#lemmi) == 0 then
			stile = 'background-color: #FFDBDB; color:#000;'
			immagine = ']'
			testo =  '<strong class="error">Il ] è stato lasciato vuoto</strong> per correggere questo errore puoi <span class="plainlinks"> oppure, per sapere come correggere, puoi leggere la ]'
			testo = testo .. categorizza('Template Vedi compilato in maniera errata') 
		else
			
			stile = 'background-color: #D8E8FF; border:1px solid #A0CCA0; color:#000;'
			immagine = ']'
			testo = 'Vedi anche: ' ..mw.text.listToText( lemmi, ', ', ' e ' )
		
	end

-- GESTIONE E CREAZIONE DEL BOX

	boxArgs.stile = stile
	boxArgs.immagine = immagine
if sect == 'y' then
	boxArgs.small='y'
end
	boxArgs.testo = testo	
	return mBox.main('ombox', boxArgs)
end

return p