社区中心
导航
首页
所有页面
社区
互动式地图
最新博文
新闻
新闻一览
技术更新
在线答疑
社区
论坛
最新功能
常规讨论
提问求助
高级编辑
提升wiki
领养wiki
Fandom网站首页
探索wiki(大陆简体)
探索wiki(臺灣正體)
主题社区
动漫
影视
音乐
阅读新知
游戏
生活
中文社区文章数排名
帮助
关于
关于Fandom
关于社区中心
Fandom职员团队
Fandom代表
Fandom国际团队
社区中心团队
预志愿团队
垃圾清理及预防大队
方针与指引
社区中心指引
格式手册
命名常规
字词转换
词汇表
字词转换方针
完整帮助页分类
wiki基础教程
设计您的wiki
管理您的社区
账号设置
技术问题
Fandom研讨会
联系我们
官方支持
交流群
Discord
QQ群
Telegram
LINE
申请
创建wiki
领养wiki
跨语言链接
机器人申请
举报滥用
举报垃圾信息
举报恶意破坏
举报wiki
报告防垃圾信息过滤器问题
FANDOM
游戏
电影
电视
wiki
探索wiki
社区中心
创建wiki
注册
尚未注册?
登录
Fandom社区中心
1,653
个页面
导航
首页
所有页面
社区
互动式地图
最新博文
新闻
新闻一览
技术更新
在线答疑
社区
论坛
最新功能
常规讨论
提问求助
高级编辑
提升wiki
领养wiki
Fandom网站首页
探索wiki(大陆简体)
探索wiki(臺灣正體)
主题社区
动漫
影视
音乐
阅读新知
游戏
生活
中文社区文章数排名
帮助
关于
关于Fandom
关于社区中心
Fandom职员团队
Fandom代表
Fandom国际团队
社区中心团队
预志愿团队
垃圾清理及预防大队
方针与指引
社区中心指引
格式手册
命名常规
字词转换
词汇表
字词转换方针
完整帮助页分类
wiki基础教程
设计您的wiki
管理您的社区
账号设置
技术问题
Fandom研讨会
联系我们
官方支持
交流群
Discord
QQ群
Telegram
LINE
申请
创建wiki
领养wiki
跨语言链接
机器人申请
举报滥用
举报垃圾信息
举报恶意破坏
举报wiki
报告防垃圾信息过滤器问题
查看“模块:NoteTA”的源代码
返回页面
| ←
模块:NoteTA
查看源代码
历史
讨论 (0)
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于这些用户组的用户执行:
用户
、Fandom助手、Wiki Representative、Wiki Specialist
本页面已经受到保护,不能编辑,因为它被嵌入于以下被“连锁保护”的页面:
Help:說明中心
Help:新手入門
Help:貢獻
Help:社区管理
Help:進階編輯
社区中心
Help:索引
您可以查看和复制此页面的源代码。
-- <nowiki> local z = {} local WikitextLC = require( 'Module:WikitextLC' ) function Tcode( args ) if args.T == nil or args.T == '' then return '' end local div = mw.html.create( 'div' ) :attr( 'class', 'noteTA-title' ) :attr( 'data-noteta-code', args.T ) :wikitext( WikitextLC.title( args.T ) ) if args.dt ~= nil and args.dt ~= '' then div:attr( 'data-noteta-desc', args.dt ) end return tostring( div ) end function group( name, frame ) if name == nil or name == '' then return '' end local moduleTitle = mw.title.makeTitle( 'Module', 'CGroup/' .. name ) if moduleTitle and moduleTitle.exists then local data = require( 'Module:CGroup/' .. name ) local pieces = {} if data.content then for i, v in ipairs( data.content ) do if v.type == 'item' and v.rule then table.insert( pieces, '-{H|' .. v.rule .. '}-' ) end end return tostring( mw.html.create( 'div' ) :attr( 'data-noteta-group-source', 'module' ) :attr( 'data-noteta-group', data.name or name ) :wikitext( table.concat( pieces ) ) ) end end -- local templateTitle = mw.title.makeTitle( 'Template', 'CGroup/' .. name ) -- if templateTitle and templateTitle.exists then -- return frame:expandTemplate{ title = templateTitle } -- end return tostring( mw.html.create( 'div' ) -- :attr( 'id', 'noteTA-group-' .. mw.uri.anchorEncode( name ) ) :attr( 'data-noteta-group-source', 'none' ) :attr( 'data-noteta-group', name ) ) end function Gcode( args, frame ) local code = {} -- Auto Add CGroups (Common + NS) if not args['aac'] then table.insert( code, group( 'Common', frame ) ) -- ns:0 if mw.title.getCurrentTitle():inNamespace( '' ) then table.insert( code, group( 'Main', frame ) ) -- ns:2 elseif mw.title.getCurrentTitle():inNamespace( 'User' ) then table.insert( code, group( 'User', frame ) ) -- ns:4 elseif mw.title.getCurrentTitle():inNamespace( 'Project' ) then table.insert( code, group( 'Project', frame ) ) -- ns:12 elseif mw.title.getCurrentTitle():inNamespace( 'Help' ) then table.insert( code, group( 'Help', frame ) ) -- ns:500 elseif mw.title.getCurrentTitle():inNamespace( 'User_blog' ) then table.insert( code, group( 'Blog', frame ) ) end end for i = 1, 30 do table.insert( code, group( args['G' .. i], frame ) ) end code = table.concat( code ) if code ~= '' then code = tostring( mw.html.create( 'div' ) :attr( 'class', 'noteTA-group' ) :wikitext( code ) ) if args.G31 ~= nil then code = code .. '[[Category:NoteTA模板參數使用數量超過限制的頁面|G]]' end end return code end function local_( i, code, desc ) if code == nil or code == '' then return '' end local div = mw.html.create( 'div' ) -- :attr( 'id', 'noteTA-local-' .. i ) :attr( 'data-noteta-code', code ) :wikitext( WikitextLC.hidden( code ) ) if desc ~= nil and desc ~= '' then div:attr( 'data-noteta-desc', desc ) end return tostring( div ) end function Lcode( args ) local code = {} for i = 1, 30 do table.insert( code, local_( i, args[i], args['d' .. i] ) ) end code = table.concat( code ) if code ~= '' then code = tostring( mw.html.create( 'div' ) :attr( 'class', 'noteTA-local' ) :wikitext( code ) ) if args[31] ~= nil then code = code .. '[[Category:NoteTA模板參數使用數量超過限制的頁面|L]]' end end return code end function z.main( frame ) local args if frame == mw.getCurrentFrame() then -- Being called from {{NoteTA}} args = frame:getParent().args else -- Being called from another module args = frame frame = mw.getCurrentFrame() end local Tc = Tcode( args ) local Gc = Gcode( args, frame ) local Lc = Lcode( args ) local code = Tc .. Gc .. Lc if code ~= '' and not args['noindicator'] then local hash = code:len() code = frame:extensionTag{ name = 'indicator', content = '[[File:Zh conversion icon m.svg|35px|本頁使用了標題或全文手工轉換|alt=本頁使用了標題或全文手工轉換|link=]]', args = { name = string.format( 'noteTA-%x', hash ) }, } .. tostring( mw.html.create( 'div' ) :attr( 'id', string.format( 'noteTA-%x', hash ) ) :attr( 'class', 'noteTA' ) :wikitext( code ) ) -- code = tostring( mw.html.create( 'div' ) -- :attr( 'id', 'mw-indicator-noteTA-' .. hash ) -- :attr( 'class', 'mw-indicator' ) -- :attr( 'style', 'float: right; clear: both;' ) -- :wikitext( '[[File:Zh conversion icon m.svg|35px|本頁使用了標題或全文手工轉換|alt=本頁使用了標題或全文手工轉換|link=]]' ) ) -- .. tostring( mw.html.create( 'div' ) -- :attr( 'id', 'noteTA-' .. hash ) -- :attr( 'class', 'noteTA' ) -- :wikitext( code ) ) -- .. '<div style="clear: both;"></div>' if mw.title.getCurrentTitle():inNamespace( 'Template' ) then code = code .. '[[Category:使用NoteTA的模板]]' end end return code end return z -- </nowiki> -- <noinclude>[[Category:模組]]</noinclude>
本页使用的模板:
Template:Documentation
(
查看源代码
)
Template:Documentation/docname
(
查看源代码
)
模块:NoteTA/doc
(
查看源代码
)
返回至“
模块:NoteTA
”。
Follow on IG
TikTok
Join Fan Lab