跳转到内容

模块讨论:Sports table/WDL

页面内容不支持其他语言。
维基百科,自由的百科全书

编辑请求,求更改模板

{{Editprotected}}

模块:Sports table/WDL之中将

原本内容

function pp.status(Args) -- Declare status options -- ------------------------------------------------------------ -- NOTE: If you add to status_code, also add to status_called and status_letters!! -- Or functionality will be compromised -- ------------------------------------------------------------ local status_code, status_called = {} status_code = { A='晋级下一圈', C='冠军', D='取消资格', E='确定淘汰出局',G='特邀嘉宾', H='东道主', O='附加赛胜者', P='升班', Q='获得指定赛事参赛权', R='降班', S='卫冕球队', T='晋级,但未定指定轮次', X='?', Y='?', Z='?'} status_called = { A=false, C=false, D=false, E=false, H=false, O=false, P=false, Q=false, R=false, S=false, T=false, X=false, Y=false, Z=false} local status_letters = 'ACDEHOPQRSTXYZ'

-- Status position (before or after read and default) local stat_pos_val = Args['status_pos'] or local status_position = 'after' -- Default location stat_pos_val = string.lower(stat_pos_val) if stat_pos_val=='before' then status_position = 'before' elseif stat_pos_val=='after' then status_position = 'after' end

-- Read in custom status options if Args['status_text_X'] then status_code.X = Args['status_text_X'] end if Args['status_text_Y'] then status_code.Y = Args['status_text_Y'] end if Args['status_text_Z'] then status_code.Z = Args['status_text_Z'] end

return {code=status_code, called=status_called, letters=status_letters, position=status_position} end

return pp

修改为

要更改之内容

function pp.status(Args) -- Declare status options -- ------------------------------------------------------------ -- NOTE: If you add to status_code, also add to status_called and status_letters!! -- Or functionality will be compromised -- ------------------------------------------------------------ local status_code, status_called = {}, {} status_code = { A='晋级下一圈', C='冠军', D='取消资格', E='确定淘汰出局',G='特邀嘉宾', H='东道主', O='附加赛胜者', P='升班', Q='获得指定赛事参赛权', R='降班', S='卫冕球队', T='晋级,但未定指定轮次'} local status_letters = (Args['status_order'] or ) .. 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

-- Status position (before or after read and default) local stat_pos_val = Args['status_pos'] or local status_position = 'after' -- Default location stat_pos_val = string.lower(stat_pos_val) if stat_pos_val=='before' then status_position = 'before' elseif stat_pos_val=='after' then status_position = 'after' end -- Read in custom status options for l in mw.text.gsplit(status_letters, ) do status_called[l] = false status_code[l] = status_code[l] or '?' status_letters = mw.ustring.gsub(status_letters, '(' .. l ..'.-)' .. l, '%1')

if Args['status_text_' .. l] then status_code[l] = Args['status_text_' .. l] end end

return {code=status_code, called=status_called, letters=status_letters, position=status_position} end

return pp

或者

要更改之内容-2

function pp.status(Args) -- Declare status options -- ------------------------------------------------------------ -- NOTE: If you add to status_code, also add to status_called and status_letters!! -- Or functionality will be compromised -- ------------------------------------------------------------ local status_code, status_called = {} status_code = { A='晋级下一圈', C='冠军', D='取消资格', E='确定淘汰出局',G='特邀嘉宾', H='东道主', O='附加赛胜者', P='升班', Q='获得指定赛事参赛权', R='降班', S='卫冕球队', T='晋级,但未定指定轮次', X='?', Y='?', Z='?'} status_called = { A=false, C=false, D=false, E=false, H=false, O=false, P=false, Q=false, R=false, S=false, T=false, X=false, Y=false, Z=false} local status_letters = 'ACDEHOPQRSTXYZ'

-- Status position (before or after read and default) local stat_pos_val = Args['status_pos'] or local status_position = 'after' -- Default location stat_pos_val = string.lower(stat_pos_val) if stat_pos_val=='before' then status_position = 'before' elseif stat_pos_val=='after' then status_position = 'after' end

-- Read in custom status options

if Args['status_text_A'] then status_code.A = Args['status_text_A'] end if Args['status_text_B'] then status_code.B = Args['status_text_B'] end if Args['status_text_C'] then status_code.C = Args['status_text_C'] end if Args['status_text_D'] then status_code.D = Args['status_text_D'] end if Args['status_text_E'] then status_code.E = Args['status_text_E'] end if Args['status_text_F'] then status_code.F = Args['status_text_F'] end if Args['status_text_G'] then status_code.G = Args['status_text_G'] end if Args['status_text_H'] then status_code.H = Args['status_text_H'] end if Args['status_text_I'] then status_code.I = Args['status_text_I'] end if Args['status_text_J'] then status_code.J = Args['status_text_J'] end if Args['status_text_K'] then status_code.K = Args['status_text_K'] end if Args['status_text_L'] then status_code.L = Args['status_text_L'] end

       if Args['status_text_M'] then status_code.M = Args['status_text_M'] end

if Args['status_text_N'] then status_code.N = Args['status_text_N'] end

       if Args['status_text_O'] then status_code.O = Args['status_text_O'] end

if Args['status_text_P'] then status_code.P = Args['status_text_P'] end

       if Args['status_text_Q'] then status_code.Q = Args['status_text_Q'] end

if Args['status_text_R'] then status_code.R = Args['status_text_R'] end

       if Args['status_text_S'] then status_code.S = Args['status_text_S'] end

if Args['status_text_T'] then status_code.T = Args['status_text_T'] end

       if Args['status_text_U'] then status_code.U = Args['status_text_U'] end

if Args['status_text_V'] then status_code.V = Args['status_text_V'] end

       if Args['status_text_W'] then status_code.W = Args['status_text_W'] end

if Args['status_text_X'] then status_code.X = Args['status_text_X'] end if Args['status_text_Y'] then status_code.Y = Args['status_text_Y'] end if Args['status_text_Z'] then status_code.Z = Args['status_text_Z'] end

return {code=status_code, called=status_called, letters=status_letters, position=status_position} end

return pp

谢谢

--1.161.245.175留言2019年1月15日 (二) 13:48 (UTC)[回复]

请求时请列明理由。--Jimmy Xu 2019年1月15日 (二) 16:34 (UTC)[回复]

请求代为编辑

和前一匿名用户要求的一样,谢谢。原因是:可以有更多标记可以进行,也可进行预设标记之修改,就不会困在只能标X、Y、Z的窘境。36.226.52.140留言2019年2月10日 (日) 15:09 (UTC)[回复]

不要在表格里加入hard-coded的字体

各地管用的字体并不一样,请不要随意指定固定字体,让用户的浏览器自动选择。--Fireattack留言2019年12月24日 (二) 13:26 (UTC)[回复]