8,756
edits
(split main favilink to its own main function that cannot be individually called, added modulefavilink that allows direct calling that does not require frame usage) |
mNo edit summary |
||
Line 53: | Line 53: | ||
local displayname = result[1]['DisplayName'] or name | local displayname = result[1]['DisplayName'] or name | ||
local image = (result[1]['Image'] ~= '' and result[1]['Image']~=nil) and result[1]['Image'] or 'None' | local image = (result[1]['Image'] ~= '' and result[1]['Image']~=nil) and result[1]['Image'] or 'None' | ||
local display = result[1]['Display'] | |||
local displaychar = result[1]['DisplayChar'] or '•' | local displaychar = result[1]['DisplayChar'] or '•' | ||
Line 76: | Line 77: | ||
end | end | ||
local img | local img = display | ||
if ( | if string.len(display) > 4 then | ||
if string.sub(display, -4) == '.png' then | |||
img = '[[File:' .. display.. '|16px|link='..pagelink..']]' | |||
end | |||
end | end | ||
--if (mw.title.new('File:' .. image).exists == true) then | |||
-- img = '[[File:' .. image .. '|16px|link='..pagelink..']]' | |||
--else | |||
-- img = displaychar | |||
--end | |||