Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

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.
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
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 372: Line 372:
         '<div class="bsw-card-hd">Sister projects</div>' ..
         '<div class="bsw-card-hd">Sister projects</div>' ..
         '<div class="bsw-card-body">' .. body .. '</div>' ..
         '<div class="bsw-card-body">' .. body .. '</div>' ..
        '</div>'
end
-- ── votd() ────────────────────────────────────────────────────────
function p.votd( frame )
    -- Build today's date string using os.date (server local time)
    -- MW magic words aren't accessible via callParserFunction
    local today = os.date( '%Y-%m-%d' )
    local override_page  = 'BattlestarWiki:VotD/' .. today
    local override_title = mw.title.new( override_page )
    local override_token = ''
    if override_title and override_title.exists then
        local content = override_title:getContent()
        if content then
            override_token = mw.text.trim( content )
        end
    end
    -- Header bar
    local hd =
        '<div class="bsw-votd-hd">' ..
        '<span class="bsw-votd-hd-inner">' ..
        '<span class="bsw-votd-hd-dot"></span>' ..
        '\226\136\158 Video of the Day' ..
        '</span>' ..
        frame:preprocess( '[https://battlestarpegasus.com battlestarpegasus.com \226\134\151]' ) ..
        '</div>'
    -- Inner grid: player + info panel, both populated by JS
    local inner =
        '<div class="bsw-votd-inner">' ..
        '<div class="bsw-votd-player">' ..
        '<div class="bsw-loading"><div class="bsw-spinner"></div>' ..
        'Loading today\226\128\153s video\226\128\166</div>' ..
        '</div>' ..
        '<div class="bsw-votd-info" id="bsw-votd-info" style="display:none"></div>' ..
        '</div>'
    return
        '<div class="bsw-votd-band" id="bsw-votd-container"' ..
        ' data-date="' .. today .. '"' ..
        ' data-override="' .. override_token .. '">' ..
        hd .. inner ..
         '</div>'
         '</div>'
end
end


return p
return p

To edit this page, please enter the words that appear below in the box (more info):

Refresh
Cancel Editing help (opens in new window)

  [] · [[]] · [[|]] · {{}} · · “” ‘’ «» ‹› „“ ‚‘ · ~ | ° &nbsp; · ± × ÷ ² ³ ½ · §
     [[Category:]] · [[:File:]] · [[Special:MyLanguage/]] · <code></code> · <nowiki></nowiki> <code><nowiki></nowiki></code> · <syntaxhighlight></syntaxhighlight> · <includeonly></includeonly> · <noinclude></noinclude> · #REDIRECT[[]] · <translate></translate> · <languages/> · {{#translation:}} · <tvar|></> · {{DEFAULTSORT:}} · <categorytree></categorytree> · <div style="clear:both;"></div> <s></s>


Your changes will be visible immediately.
  • For testing, please use the sandbox instead.
  • On talk pages, please sign your comment by typing four tildes (~~~~).

Page included on this page: