Editing Module:BSW/MainPage
From the only original and legitimate Battlestar Wiki: the free-as-in-beer, non-corporate, open-content encyclopedia, analytical reference, and episode guide on all things Battlestar Galactica. Accept neither subpar substitutes nor subpar clones.
More actions
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 63: | Line 63: | ||
end | end | ||
-- ── | -- ── hero() ──────────────────────────────────────────────────────── | ||
function p.hero( frame ) | function p.hero( frame ) | ||
local args = frame.args | local args = frame.args | ||
| Line 267: | Line 239: | ||
local filename = mw.text.trim( content ) | local filename = mw.text.trim( content ) | ||
if filename ~= '' then | if filename ~= '' then | ||
rendered_content = frame:preprocess( | rendered_content = frame:preprocess( | ||
'[[File:' .. filename .. '|center|frameless| | '[[File:' .. filename .. '|center|frameless|400px]]' | ||
) | ) | ||
end | end | ||
| Line 283: | Line 253: | ||
local fn = mw.text.trim( t:getContent() or '' ) | local fn = mw.text.trim( t:getContent() or '' ) | ||
if fn ~= '' and not fn:match( '%[%[' ) then | if fn ~= '' and not fn:match( '%[%[' ) then | ||
return frame:preprocess( '[[File:' .. fn .. '|' .. label .. ']]' ) | |||
return frame:preprocess( '[[ | |||
end | end | ||
end | end | ||
-- Fallback: link to the Potd: subpage itself | |||
return frame:preprocess( '[[' .. potd_page .. '|' .. label .. ']]' ) | return frame:preprocess( '[[' .. potd_page .. '|' .. label .. ']]' ) | ||
end | end | ||