查看“模块:VoiceTable”的源代码
←
模块:VoiceTable
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于这些用户组的用户执行:
用户
、Editor
此页面已被保护以防止编辑或其他操作。
您可以查看和复制此页面的源代码。
local p = {} function p.table(frame) local max_pieces = 50 local args = (frame == mw.getCurrentFrame() and frame.args) or frame res_table = {} table.insert(res_table, frame:callParserFunction{name = '#Widget:MiniAudioPlayerJS'}) local playable = ((args["可播放"] or "") ~= "") local title = mw.text.trim(args["表格标题"] or "") local path = mw.text.trim(args["目录"] or "") local lack_file = false local lack_jp = false local lack_cn = false local table_class = playable and "wikitable voice-table" or "wikitable voice-table mw-collapsible mw-collapsed" -- Desktop Table table.insert(res_table, string.format("\n{|class=\"%s %s\" ", table_class, "nomobile")) table.insert(res_table, "style=\"width:835px;max-width:100%;line-height:18px;text-align:center;display:table;white-space:normal;\"\n") if not playable then table.insert(res_table, string.format("|-\n! colspan=\"3\" |'''%s'''", title)) end for i = 1, max_pieces do local piece_title = mw.text.trim(args["标题" .. i] or "") if piece_title ~= "" then local piece_jp = mw.text.trim(args["日文" .. i] or "") local piece_cn = mw.text.trim(args["中文" .. i] or "") local piece_cond = mw.text.trim(args["条件" .. i] or "") local piece_file = mw.text.trim(args["语音" .. i] or "") local piece_file_cn = mw.text.trim(args["中文语音" .. i] or "") local piece_lack_file = (piece_file == "") local piece_lack_jp = (piece_jp == "" and piece_cn ~= "") local piece_lack_cn = (piece_jp ~= "" and piece_cn == "") local piece_lack_info = piece_lack_file or piece_lack_jp or piece_lack_cn table.insert(res_table, string.format("\n|-\n!style=\"width:120px;%s\"|'''%s'''\n", (piece_lack_info and "color:#000;" or ""), piece_title)) table.insert(res_table, "|style=\"text-align:left;\"|") if playable and piece_jp ~= "" and piece_cn ~= "" then table.insert(res_table, "<p lang=\"ja\" style=\"margin:5px;margin-bottom:10px\">" .. piece_jp .. "</p><p style=\"margin:5px;\">" .. piece_cn) elseif piece_cn ~= "" then table.insert(res_table, "<p style=\"margin:5px;\">" .. piece_cn) else table.insert(res_table, "<p lang=\"ja\" style=\"margin:5px;\">" .. piece_jp) end table.insert(res_table, ((piece_cond ~= "") and string.format("'''(%s)'''</p>", piece_cond) or "</p>")) table.insert(res_table, string.format("\n|style=\"width:%dpx;\"|", playable and 80 or 40)) if piece_file ~= "" then if piece_file == "-" then table.insert(res_table, "—") else local piece_file_url = (path == "") and frame:callParserFunction{name = 'filepath:' .. piece_file} or (path .. piece_file) local piece_file_url_cn = "" if piece_file_cn ~= "" then piece_file_url_cn = (path == "") and frame:callParserFunction{name = 'filepath:' .. piece_file_cn} or (path .. piece_file_cn) end local player_args = {icon_width = '36px', src = piece_file_url} if piece_file_url == "" then player_args["download_style"] = "display:none;" player_args["play_style"] = "display:none;" end if not playable then player_args["download_style"] = "display:none;" end table.insert(res_table, frame:callParserFunction{name = '#Widget:MiniAudioPlayer', args = player_args}) if piece_file_url_cn ~= "" then local player_args = {icon_width = '36px', src = piece_file_url_cn} player_args["download_style"] = "display:none;" player_args["play_style"] = "display:none;" table.insert(res_table, frame:callParserFunction{name = '#Widget:MiniAudioPlayer', args = player_args}) end end end lack_file = lack_file or piece_lack_file lack_cn = lack_cn or piece_lack_cn lack_jp = lack_jp or piece_lack_jp end end table.insert(res_table, "\n|}") -- Mobile Table table.insert(res_table, string.format("\n{|class=\"%s %s\" ", table_class, "nodesktop")) table.insert(res_table, "style=\"width:100%;line-height:18px;text-align:center;display:table;white-space:normal;font-size:unset;\"\n") if not playable then table.insert(res_table, string.format("|-\n! colspan=\"2\" |'''%s'''", title)) end for i = 1, max_pieces do local piece_title = mw.text.trim(args["标题" .. i] or "") if piece_title ~= "" then local piece_jp = mw.text.trim(args["日文" .. i] or "") local piece_cn = mw.text.trim(args["中文" .. i] or "") local piece_cond = mw.text.trim(args["条件" .. i] or "") local piece_file = mw.text.trim(args["语音" .. i] or "") table.insert(res_table, string.format("\n|-\n!style=\"position:sticky;top:0;\"|'''%s'''\n", piece_title)) table.insert(res_table, string.format("\n!style=\"position:sticky;top:0;width:%dpx;\"|", playable and 60 or 30)) if piece_file ~= "" then local piece_file_url = frame:callParserFunction{name = 'filepath:' .. piece_file} local player_args = {icon_width = '27px', src = piece_file_url} if piece_file_url == "" then player_args["download_style"] = "display:none;" player_args["play_style"] = "display:none;" end if not playable then player_args["download_style"] = "display:none;" end table.insert(res_table, frame:callParserFunction{name = '#Widget:MiniAudioPlayer', args = player_args}) end table.insert(res_table, string.format("\n|-\n|colspan=\"%d\" style=\"text-align:left;\"|", (playable and 3 or 2))) if playable and piece_jp ~= "" and piece_cn ~= "" then table.insert(res_table, "<p lang=\"ja\" style=\"margin:5px;margin-bottom:10px\">" .. piece_jp .. "</p><p style=\"margin:5px;\">" .. piece_cn) elseif piece_cn ~= "" then table.insert(res_table, "<p style=\"margin:5px;\">" .. piece_cn) else table.insert(res_table, "<p lang=\"ja\" style=\"margin:5px;\">" .. piece_jp) end table.insert(res_table, ((piece_cond ~= "") and string.format("'''(%s)'''</p>", piece_cond) or "</p>")) end end table.insert(res_table, "\n|}") if playable then --local category="干员语音" local category = (string.find(frame:getParent():getTitle(), "用户:") == 1) and "用户自定义语音" or "干员语音" --[从当前页面的父页面的标题中查找是否带有“用户:”这个关键词] 存在返回“用户自定义语音” 否则返回“干员语音” category = mw.text.trim(args["类别"] or category) table.insert(res_table, string.format("[[分类:%s]]", category)) if lack_file then table.insert(res_table, string.format("[[分类:语音文件不全的%s]]", category)) end if lack_jp then table.insert(res_table, string.format("[[分类:日文文本不全的%s]]", category)) end if lack_cn then table.insert(res_table, string.format("[[分类:中文文本不全的%s]]", category)) end end return table.concat(res_table) end return p
本页使用的模板:
模块:VoiceTable/doc
(
查看源代码
)
返回
模块:VoiceTable
。
首页
复制短链接
支持我们
赞助者一览
反馈与建议
热门页面
当前活动
危机合约 #2「潮曦作战」
SideStory「源石尘行动」复刻
生息演算「沙洲遗闻」
新增干员
NEW
艾拉
医生
双月
导火索
干员一览
菜单
通用
干员一览
敌人一览
道具一览
后勤技能
关卡一览
剧情记录
家具一览
时装回廊
采购中心
卡池一览
活动一览
公招计算
档案
画师一览
配音一览
分支一览
干员密录
干员模组
干员编号
角色真名
干员预告
干员专精
干员剧情一览
档案信息一览
玩法
危机合约
集成战略
多维合作
联锁竞赛
保全派驻
引航者试炼
生息演算
纷争演绎
系统
基建
任务列表
邮件记录
首页场景
界面主题
名片头像
名片主题
光荣之路
情报处理室
扩展
基础数据
作战机制
新人入门
贴士一览
词汇一览
制作组通讯
剧情角色一览
游戏内容前瞻
剧情资源概览
各类信息汇总
趣味
泰拉大典
音乐鉴赏
寻访模拟
衍生作品
光荣之路模拟器
随机页面
探索
Mooncell主站
官方网站
明日方舟简中服官网
塞壬唱片
泰拉记事社
明日方舟日服官网
明日方舟美服官网
明日方舟台服官网
明日方舟韩服官网
友情链接
拖把日记
少前百科GFwiki
企鹅物流数据统计
管理与编辑
最近更改
编辑指南
常用代码
模板一览
贡献分数
收支一览
特殊贡献
Languages
日本語
English
中文
工具
导航菜单
个人工具
中文(中国大陆)
创建账号
登录
命名空间
模块
讨论
English
查看
阅读
查看源代码
查看历史
更多
搜索
{{#ifeq:{{FULLPAGENAME}}|首页|{{#tsl:zh|{{#Widget:CopyURL|title=复制短链接|id=sidebar|url=https://prts.wiki/id/{{PAGEID}}}}}}{{#tsl:ja|{{#Widget:CopyURL|title=短縮URL|id=sidebar|url=https://prts.wiki/id/{{PAGEID}}}}}}{{#tsl:nozhja|{{#Widget:CopyURL|title=Short URL|id=sidebar|url=https://prts.wiki/id/{{PAGEID}}}}}}|{{#ifeq:{{NAMESPACENUMBER}}|-1|{{#tsl:zh|[[首页]]}}{{#tsl:ja|[[首页|メインページ]]}}{{#tsl:nozhja|[[首页|Main page]]}}|{{#tsl:zh|[[首页]]}}{{#tsl:ja|[[首页|メインページ]]}}{{#tsl:nozhja|[[首页|Main page]]}}
{{#tsl:zh|{{#Widget:CopyURL|title=复制短链接|id=sidebar|url=https://prts.wiki/id/{{PAGEID}}}}}}{{#tsl:ja|{{#Widget:CopyURL|title=短縮URL|id=sidebar|url=https://prts.wiki/id/{{PAGEID}}}}}}{{#tsl:nozhja|{{#Widget:CopyURL|title=Short URL|id=sidebar|url=https://prts.wiki/id/{{PAGEID}}}}}}}}}}
{{#tsl:zh|[[PRTS:如何帮助我们完善网站#资助我们改善访问质量|支持我们]]}}{{#tsl:ja|[[PRTS:如何帮助我们完善网站#资助我们改善访问质量|Support us]]}}{{#tsl:nozhja|[[PRTS:如何帮助我们完善网站#资助我们改善访问质量|Support us]]}}
{{#tsl:zh|[[PRTS:反馈与建议|反馈与建议]]}}{{#tsl:ja|[[PRTS:反馈与建议|報告·質問掲示板]]}}{{#tsl:nozhja|[[PRTS:反馈与建议|Help and advice]]}}
{{MenuSidebarAutoEvents}}
'''{{#tsl:zh|新增干员}}{{#tsl:ja|新オペレーター}}{{#tsl:nozhja|New Operators}}<span style="padding-left:10px;"><span style="font-size:10px;color: #ffffff;background-color:red;padding-right: 4px;padding-left: 4px;border-radius: 3px;text-shadow: 0 0 2px rgb(0 0 0 / 40%);font-weight:bold">NEW</span></span>'''
[[干员一览|{{#tsl:zh|干员一览}}{{#tsl:ja|オペレーター一覧}}{{#tsl:nozhja|Operators}}]]
'''{{#tsl:zh|通用}}{{#tsl:ja|基礎}}{{#tsl:nozhja|General}}'''
干员一览]]
敌人一览]]
道具一览]]
后勤技能]]
关卡一览]]
剧情记录]]
家具一览]]
时装回廊]]
采购中心]]
卡池一览]]
活动一览]]
'''{{#tsl:zh|档案}}{{#tsl:ja|資料}}{{#tsl:nozhja|Information}}'''
画师一览]]
配音一览]]
分支一览]]
干员密录]]
干员模组]]
干员编号]]
角色真名]]
干员预告]]
干员专精]]
干员剧情一览]]
档案信息一览]]
'''{{#tsl:zh|玩法}}{{#tsl:ja|ゲームモード}}{{#tsl:nozhja|Game Mode}}'''
危机合约]]
集成战略]]
多维合作]]
联锁竞赛]]
保全派驻]]
引航者试炼]]
生息演算]]
'''{{#tsl:zh|系统}}{{#tsl:ja|システム}}{{#tsl:nozhja|System}}'''
基建]]
任务列表]]
邮件记录]]
首页场景]]
名片头像]]
光荣之路]]
情报处理室]]
'''{{#tsl:zh|扩展}}{{#tsl:ja|詳細}}{{#tsl:nozhja|Expansion}}'''
基础数据]]
作战机制]]
新人入门]]
贴士一览]]
词汇一览]]
制作组通讯]]
剧情角色一览]]
游戏内容前瞻]]
剧情资源概览]]
各类信息汇总]]
'''{{#tsl:zh|趣味}}{{#tsl:ja|その他}}{{#tsl:nozhja|Funny}}'''
泰拉大典]]
音乐鉴赏]]
寻访模拟]]
衍生作品]]
光荣之路模拟器]]
[[特殊:随机|{{#tsl:zh|随机页面}}{{#tsl:ja|おまかせ表示}}{{#tsl:nozhja|Random Page}}]]
'''{{#tsl:zh|官方网站}}{{#tsl:ja|公式サイト}}{{#tsl:nozhja|Offical Website}}'''
'''{{#tsl:zh|友情链接}}{{#tsl:ja|相互リンク}}{{#tsl:nozhja|Link Exchange}}'''
[[特殊:最近更改|{{#tsl:zh|最近更改}}{{#tsl:ja|最近の更新}}{{#tsl:nozhja|Recent Changes}}]]
[[PRTS:编辑指南|{{#tsl:zh|编辑指南}}{{#tsl:ja|編集のガイドライン}}{{#tsl:nozhja|Edit Guideline}}]]
[[PRTS:常用代码|{{#tsl:zh|常用代码}}{{#tsl:ja|マークアップ早見表}}{{#tsl:nozhja|Useful Codes}}]]
[[:分类:PRTS模板|{{#tsl:zh|模板一览}}{{#tsl:ja|テンプレート一覧}}{{#tsl:nozhja|Templates Overview}}]]
[[特殊:贡献得分|{{#tsl:zh|贡献分数}}{{#tsl:ja|貢献得点}}{{#tsl:nozhja|Contribution Scores}}]]
[[PRTS:收支一览|{{#tsl:zh|收支一览}}{{#tsl:ja|収支報告}}{{#tsl:nozhja|Balance Overview}}]]
{{#Widget:LangSwitcher|langCode=ja|lang=日本語}}
{{#Widget:LangSwitcher|langCode=en|lang=English}}
{{#Widget:LangSwitcher|langCode=zh-cn|lang=中文}}
工具
链入页面
相关更改
特殊页面
页面信息
页面值