Module:Trial2

--This is much harder than I thought... local p = {} function p.quote(frame) frame = frame:getParent local speaker = '' local quotetext = mw.html.create('table') local source = '' if frame.args[1] and frame.args[1] ~= '' then speaker = mw.html.create('table') local link = frame.args[1] local link2 = frame.args[2] local text = frame.args[1] local text2 = frame.args[2] if mw.ustring.find(frame.args[1], '\!\!') then link = mw.ustring.sub(frame.args[1], 0, mw.ustring.find(frame.args[1], '\!\!') - 1) text = mw.ustring.sub(frame.args[1], mw.ustring.find(frame.args[1], '\!\!') + 2) end speaker :attr('class', 'speaker') :cssText(               'border: 1px solid #000;' ..                '-moz-border-radius: 5px 5px 0 0;' ..                'border-radius: 5px 5px 0 0;' ..                'background: rgba(0, 0, 0, .8);' ..                'margin:0 0 -1px 5px'            ) :tag('td') :cssText(                   'line-height: 15px;' ..                    'font-size: 1em'                ) :wikitext(' ' .. text .. ' ' .. text2 .. ' ') :done :allDone end quotetext :attr('class', 'quotetext') :cssText(           '-moz-border-radius: 5px;' ..            'border-radius: 5px;' ..            'border: 1px solid #000;' ..            'background: rgba(0, 0, 0, .8);' ..            'color: #fff'        ) :tag('td') :cssText(               'line-height: 19px;' ..                'padding: 2px'            ) :wikitext(frame.args[3]) :done :allDone if frame.args[4] and frame.args[4] ~= '' then source = mw.html.create('div') source :attr('class', 'source') :cssText(               'margin: 5px 0 0 10px;' ..                'font-size: small'            ) :wikitext('&mdash; ') :tag('cite') :wikitext(frame.args[4]) :done :allDone end local div = mw.html.create('div') div :attr('class', 'quote') :css('margin', '0 10px 10px 0') if speaker ~= '' then div :node(speaker) end div :node(quotetext) if source ~= '' then div :node(source) end return tostring(div) end return p --