Extension:頁眉頁脚
Appearance
HeaderFooter 发行状态: 稳定版 |
|
---|---|
描述 | |
作者 | Jean-Lou Dupont, James Montalvo, Douglas Mason, Hallo Welt! GmbH |
最新版本 | 4.0 |
兼容性政策 | 对于每个有长期支持的MediaWiki发行版本,扩展内都有对应的分支。 |
MediaWiki | 1.39+ |
数据库更改 | 否 |
Composer | mediawiki/header-footer |
许可协议 | GNU通用公眾授權條款2.0或更新版本 |
下載 | |
|
|
前往translatewiki.net翻譯Header Footer扩展 | |
Header Footer扩展可在维基页面内容部分的顶部和底部为每个命名空间和每个页面添加内容。
功能
- 速度 - 与解析器缓存集成
- Secure - header and footer articles are located in the NS_MEDIAWIKI namespace
- Controllable - headers and/or footers can be disabled on pages which are edit protected
- Customizable - headers and footers are wrapped in
<div>
elements
安裝
- 下载文件,并将解压后的
HeaderFooter
文件夹移动到extensions/
目录中。
开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HeaderFooter - 将下列代码放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'HeaderFooter' );
- 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。
用法
Per-Namespace Header and Footer
Edit the pages:
MediaWiki:Hf-nsheader-namespace name
MediaWiki:Hf-nsfooter-namespace name
namespace name
must be in the language of the wiki (see Manual:$wgLanguageCode)
For the 'main' namespace, just use blank i.e. no string, but with the hyphen:
MediaWiki:Hf-nsheader-
MediaWiki:Hf-nsfooter-
每页的页眉和页脚
Edit the pages:
MediaWiki:Hf-header-page name
MediaWiki:Hf-footer-page name
禁用命令
On edit protected pages, one can add
__NOHEADER__
to suppress the page level header__NOFOOTER__
to suppress the page level footer__NONSHEADER__
to suppress the namespace level header__NONSFOOTER__
to suppress the namespace level footer
CSS
- Page Level Header: <div class="hf-header">
- Namespace Level Header: <div class="hf-nsheader">
- Page Level Footer: <div class="hf-footer">
- Namespace Level Footer: <div class="hf-nsfooter">
示例
- Page MediaWiki:hf-nsheader-Extension would contain the wikitext to be included as header for all pages of the Extension namespace.
- In this case, to suppress the header of the page Extension:HeaderFooter one should a) edit protect it, and b) add
__NONSHEADER__
in it.
- In this case, to suppress the header of the page Extension:HeaderFooter one should a) edit protect it, and b) add
- Page MediaWiki:hf-footer-Extension:HeaderFooter would contain the wikitext to be included as footer for the page Extension:HeaderFooter.
- In this case, to suppress the footer of the page Extension:HeaderFooter one should a) edit protect it, and b) add
__NOFOOTER__
in it.
- In this case, to suppress the footer of the page Extension:HeaderFooter one should a) edit protect it, and b) add
参见
- PageNotice extension – provides a way for you to define fixed notice messages for the top or the bottom of a page (by individual page name), or entire namespaces (by namespace number).
此扩展在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |
Categories:
- Stable extensions/zh
- Extensions with invalid or missing type/zh
- Pages using deprecated NoteTA template
- Extensions supporting Composer/zh
- GPL licensed extensions/zh
- Extensions in Wikimedia version control/zh
- OutputPageParserOutput extensions/zh
- ResourceLoaderGetConfigVars extensions/zh
- All extensions/zh
- Extensions included in BlueSpice/zh
- Extensions included in Canasta/zh
- Extensions included in ProWiki/zh
- View page extensions/zh
- Headers and footers extensions/zh