打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

模板:Featured picture pack:修订间差异

来自从零开始
无编辑摘要
无编辑摘要
 
第1行: 第1行:
-- 第1行:定义模块表(Lua模块必须以这个为基础,避免{符号报错)
<templatestyles src="Featured picture pack/styles.css" /><div class="fpp">
local p = {}
<div class="fpp-image center">{{#invoke:InfoboxImage|InfoboxImage|image={{{1|{{{filename|Example.jpg}}}}}}|sizedefault={{{size|x340px}}}|maxsize={{{size|x340px}}}|center=yes|alt={{{2|{{{caption|{{{描述|}}}}}}}}}|title={{{2|{{{caption|{{{描述|}}}}}}}}}}}</div>
 
<div class="fpp-caption caption center">{{{2|{{{caption|{{{描述|描述}}}}}}}}}</div>
-- 定义可被#invoke调用的main函数
</div><noinclude>
function p.main(frame)
{{doc|content=
    -- 返回测试文本,验证调用是否正常
{{see also|Qiuwen:每日影像展示}}
    return "Lua模块调用成功,无语法错误!"
{{template shortcut|Fpp}}
end
{{Uses TemplateStyles|Template:Featured picture pack/styles.css}}
 
{{Uses Lua|InfoboxImage}}
-- 最后必须返回模块表,否则#invoke找不到函数
[[Category:每日影像展示|*]]
return p
}}
</noinclude>

2026年1月30日 (五) 15:18的最新版本

描述
文档图示 模板-{zh-hans:文档;zh-hant:文件}-[清除-{zh-hans:缓存;zh-hant:快取}-]

模板:See also 模板:Template shortcut 模板:Uses TemplateStyles ...ribunto/includes/Engines/LuaCommon/lualib/mwInit.lua第17行Lua错误:bad argument #1 to 'old_pairs' (table expected, got nil)

上述文档内容由模板本身直接提供,请查看页面源代码。
编者可以在本模板的沙盒创建 | 镜像和测试样例创建页面进行实验。
请将模板自身所属的分类添加在文档中。本模板的子页面