模板: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=
).