MediaWiki に従業員のリストを表示する PHP スクリプトがあります。また、どのユーザーが従業員であるかを管理できる特別なページもあり、非常にうまく機能しています。ただし、特別ページでバックエンドの変更を行うと、そのページを編集して何も変更せずに保存するまで、変更はタグで挿入されたウィキページに表示されません。
間違ったフックを使用していることが原因である可能性があります。代わりにこのフックを使用しようとしていますが、機能していないようです: http://www.mediawiki.org/wiki/Manual:Hooks/ArticlePageDataBefore
現在、私はこのフックを使用しています。変数名を変更するだけでは機能しません。
$wgHooks['ParserFirstCallInit'][] = 'wfEmployeesParserInit';
// Hook our callback function into the parser
function wfEmployeesParserInit( Parser $parser ) {
// When the parser sees the <sample> tag, it executes
// the wfEmployeesRender function (see below)
$parser->setHook( 'employees', 'wfEmployeesRender' );
// Always return true from this function. The return value does not denote
// success or otherwise have meaning - it just must always be true.
return true;
}
// Execute
function wfEmployeesRender( $input, array $args, Parser $parser, PPFrame $frame ) {
...