イルマリKaronen上記で述べたリンク:
また、MediaWikiの1.17以来、あなたはまた、 defining a hook in your LocalSettings.phpでフッターを変更することができます。
...は、フッターリンクの組み込みリストにリンクを追加する方法を示しています。表示されていないのは、元の質問があった既存のビルトインフッターリンクを削除する方法です。
これは、参照されるフックソリューションに簡単に追加されたことになります。テンプレート配列内の既存のフッターリンクを破棄するだけで済みます。
ほとんどの人は、組み込みフッターリンクを削除するだけでなく、独自のフッターリンクを追加することもできます。 StackOverflowの精神で、ここには両方を行う完全なサンプルソリューションがあります(これは既存のWikiからです)。
これはmediawiki-1.29.2で動作しますが、多くの古いバージョンでも動作します。既存のフッターのリンクを削除し、独自に追加する(私は一番下にそれを置く)あなたのLocalSettings.phpファイルにこのコードを入れてください:
# Remove all existing footer links and add my own
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = function($sk, &$tpl) {
# IMPORTANT: this is the secret sauce - remove all existing footer links
$tpl->data['footerlinks']['places'] = array();
# To add new footer links to local wiki pages:
#
# 1) You MUST create your new pages in your (Main) namespace first, for example:
#
# http://<your-site>/wiki/index.php/About_Us
# http://<your-site>/wiki/index.php/Contact_Us
# http://<your-site>/wiki/index.php/Disclaimer
# http://<your-site>/wiki/index.php/Download
# http://<your-site>/wiki/index.php/Privacy_Policy
#
# 2) You MUST then create each of these pages in your MediaWiki namespace:
#
# http://<your-site>/wiki/index.php/MediaWiki:Aboutpage
# - Insert 1 line, with "About Us" (no quotes)
# http://<your-site>/wiki/index.php/MediaWiki:Contactpage
# - Insert 1 line, with "Contact Us" (no quotes)
# http://<your-site>/wiki/index.php/MediaWiki:Disclaimerpage
# - Insert 1 line, with "Disclaimer" (no quotes)
# http://<your-site>/wiki/index.php/MediaWiki:Downloadpage
# - Insert 1 line, with "Download" (no quotes)
# http://<your-site>/wiki/index.php/MediaWiki:Privacypage
# - Insert 1 line, with "Privacy Policy" (no quotes)
#
# 3) Add new footer links like this:
$tpl->set('aboutpage', $sk->footerLink('aboutpage', 'aboutpage'));
$tpl->data['footerlinks']['places'][] = 'aboutpage';
$tpl->set('contactpage', $sk->footerLink('contactpage', 'contactpage'));
$tpl->data['footerlinks']['places'][] = 'contactpage';
$tpl->set('disclaimerpage', $sk->footerLink('disclaimerpage', 'disclaimerpage'));
$tpl->data['footerlinks']['places'][] = 'disclaimerpage';
$tpl->set('downloadpage', $sk->footerLink('downloadpage', 'downloadpage'));
$tpl->data['footerlinks']['places'][] = 'downloadpage';
$tpl->set('privacypage', $sk->footerLink('privacypage', 'privacypage'));
$tpl->data['footerlinks']['places'][] = 'privacypage';
return true;
};
重要:指示に従うと、あなたを作成することを忘れないでください自身のページとそれに対応するMediaWikiのリダイレクト、またはリンクが表示されない、またはリンクが壊れている可能性があります。
その詳細な回答ありがとうございました。 Wordpressのような普通のCMSから来たときに、wikiの仕組み(名前空間、フッターのリンクなど)を理解するのは簡単ではありません。問題は、サイドバーのリンクが赤いリンクではなかったことです。私はページを検索し、見つからなかったのでそれらを作成しなければなりませんでした。その後、意図どおりに動作しました。ユーザー権利について:ユーザーはページを作成する権限を持っています。あなたが言及した拡張子で試してみます。 – Gchtr