Fandom

Infobox Wikia

Module:Quote/sandbox

< Module:Quote

226pages on
this wiki
Add New Page
Talk1
--<pre>
local Quote = {}
local getArgs = require('Module:Arguments').getArgs
 
function Quote.quote(frame) -- Implements {{Quote}}
	local args = getArgs(frame)
	return Quote._quote(args)
end
 
Quote.main = Quote.quote
 
function Quote._quote( args )
    local quotetext = args['quote'] or args[1] or args['quotetext'] or ''
    local personquoted = args['person'] or args[2] or args['personquoted']
    local quotesource = args[3] or args['quotesource']
    local quoteWrapper = mw.html.create('div')
    local reference = mw.html.create('div')
            :addClass("ref_quote")
    local blockquote = mw.html.create('blockquote')
            :wikitext('“ ' .. quotetext .. ' “')
    -- local quotewidth = args['size'] or args[4] or args['quotewidth'] or args['width'] or '20px'
    -- local quotemarksize = {
    --     ["10px"] = "20px",
    --     ["20px"] = "40px",
    --     ["30px"] = "60px",
    --     ["40px"] = "80px",
    --     ["50px"] = "100px",
    --     ["60px"] = "120px",
    -- }
 
    quoteWrapper:node(blockquote)
 
    if (personquoted or quotesource) then 
        local source = '&mdash; '..(personquoted or quotesource)
 
        if (personquoted and quotesource) then 
            source = '&mdash; '..personquoted..', ' .. quotesource 
        end
 
        reference:wikitext(source)
        quoteWrapper:node(reference)
    end
 
    return tostring(quoteWrapper)
end
 
function Quote.line( frame )
-- implements {{Line}}
 
end
 
function Quote.dialogue( frame )
-- implements {{Dialogue}}
end
 
return Quote

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.