Module:BonewrightList: Difference between revisions

277 bytes removed ,  Yesterday at 16:17
No need to hide broken image file links. Should encourage people to upload them.
m (hide broken image links in table)
Tag: Reverted
(No need to hide broken image file links. Should encourage people to upload them.)
Tag: Manual revert
 
(One intermediate revision by one other user not shown)
Line 103:
item.XPPerHour = item.XP and item.productPerHour and math.floor(item.XP * item.productPerHour)
item.buyPerHour = item.buy and item.productPerHour and math.floor(item.buy * item.productPerHour)
-- testing something that will stop broken image links appearing
local imgQuery = mw.smw.ask('[[File:' .. item.name .. '.png]]|?Modification date #- =data|mainlabel=-')
item.imgResult = imgQuery and imgQuery[1] and imgQuery[1].data
end
 
Line 187 ⟶ 183:
:addClass('plinkt-image no-border')
:css{ ['border-left'] = '0', ['padding-left'] = '0' }
:wikitext('[[File:' .. item.name .. '.png|link=' .. item.name .. '|30px]]')
:IF(item.imgResult)
:wikitext('[[File:' .. item.name .. '.png|link=' .. item.name .. '|30px]]')
:END()
:done()
:tag('td')