This page is a translated version of the page Extension:PurgePage and the translation is 100% complete.
MediaWiki扩展手册
PurgePage
发行状态: 不再維護
实现 解析器函数
描述 提供#purge解析器功能
作者 Stephan Gambke (F.trott留言)
最新版本 1.0.0 (2016-07-07)
MediaWiki 1.26+
PHP 5.4+
数据库更改
Composer mediawiki/purge-page
许可协议 GNU通用公眾授權條款2.0或更新版本
下載
README
RELEASE-NOTES

The PurgePage extension provides the #purge parser function to MediaWiki. This parser function allows to trigger an update of the target page whenever the origin page on which this function is used is updated.

用法

On page Foo add the following parser function call to the wikitext:

{{#purge:Bar}}

Now every time Foo is purged (e.g., every time it is edited and saved), Bar will also be updated.

This can be useful, when the content of Bar depends on Foo, e.g. when using a Semantic MediaWiki query on Bar that contains data from Foo in the results.

安裝

The recommended way to install this extension is by using Composer. Just add the following to the MediaWiki "composer.local.json" file and run php composer.phar update mediawiki/purge-page from the MediaWiki installation directory.

{
	"require": {
		"mediawiki/purge-page": "~1.0"
	}
}

(Alternatively, you can download a tar ball or zip file from GitHub, extract it into the extensions directory of your MediaWiki installation and rename the extension's directory to PurgePage.)

Then add the following line to your "LocalSettings.php" file:

wfLoadExtension( 'PurgePage' );

參見