跳转到内容

英文维基 | 中文维基 | 日文维基 | 草榴社区

Template:WPBannerMeta/hooks

维基百科,自由的百科全书

WPBannerMeta有一系列能强化或自订功能的钩子。它们应当以子模板形式,通过相关钩子参数传递。所有相关参数都需要在钩子模板中传递——即时参数已经在主模板输入了一遍(常见的如|category={{{category|¬}}}|class={{{class|¬}}})。如果您认为自己的钩子对其他专题有用,请将其列于下方列表。

编写钩子

[编辑]

钩子应模仿WPBannerMeta模板元功能谨慎设计,特别是分类输出和评级过滤器的大小写敏感性;为便于维护,钩子的参数命名应贴近WPBannerMeta默认参数。

可用钩子参数

[编辑]
  • |HOOK_ASSESS= – 位于质量和重要度评级间。
  • |HOOK_BOTTOM= – 紧接意见区,后接|BOTTOM_TEXT=。请使用此参数在模板底部添加功能,而非将钩子挂载到|BOTTOM_TEXT=
  • |HOOK_NOTE= – 在最后提示代码之后,意见区之前。
  • |HOOK_COLLAPSED= – 为页面触发的提示计数,超过后提示区会折叠。可以输入任何#expr:解析器能识别的内容;或者输入“auto”,which automatically sets to 1 if HOOK_NOTE is non-empty and 0 otherwise. This is the default setting and is suitable if HOOK_NOTE will not normally produce more than one row of output。
  • |HOOK_IMPORTANCE= - 在重要度评级和自动评级提示之间。
  • |HOOK_NESTED= – 在工作组列表后,横幅被{{WikiProjectBannerShell}}嵌套时生效。
  • |HOOK_TF= – 在工作组代码之后,|attention=之前。

现存钩子

[编辑]
  • /aclass – enables an A-Class review process to be integrated into the banner.
  • /article todolist – allows for easy adding of a article specific to-do list (hooks to |HOOK_BOTTOM=).
  • /bchecklist – enables a B-class checklist
  • /cats – add categories based on parameters with proper optout, case insensitivity, etc.
  • /collaboration – enables integration of project collaboration into the banner.
  • /collapsed – enables adding another collapsed section.
  • /image needed – adds an alert that an image is requested for the article.
  • /notecounter – allows notes, etc. added in HOOK_NOTE to contribute towards the counter that triggers the notes being collapsed.
  • /notes – provides ten additional notes. Hooks to |HOOK_NOTE=.
  • /peerreview – enables peer review functions.
  • /qualimpintersect – allows for quality and importance category intersection.
  • /qualitycats – enables categorisation with an additional quality scale.
  • /taskforces – provides ten additional taskforces (hooks to |HOOK_TF=).
  • /tfnested – nested summaries for ten additional taskforces. Works with /taskforces above. Hooks to |HOOK_NESTED=.
  • /todolist – allows for easy adding of a project wide to-do list (hooks to |HOOK_BOTTOM=).