最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How do I add a donate link at the upper right in MediaWiki just like Wikipedia? - Stack Overflow

programmeradmin3浏览0评论

I am trying to add a donate link at the upper right in my MediaWiki website.

I have tried adding my donation URL to MediaWiki:Sitesupport-url and the text Donate to MediaWiki:Sitesupport just like what Wikipedia has but to no avail. I then tried adding

$wgHooks['SkinTemplateNavigation::Universal'][] = function ( $skinTemplate, &$links ) {
      $links['user_menu']['sitesupport'] = [
              'class' => '',
              'href' => '',
              'text' => 'Donate',
      ];
};

in the LocalSettings.php file but that just does nothing. I once got as far as adding the link to the drop down menu to logged in users but nothing for logged out visitors.

What I am trying to do is add a donate link that appears to the left of Create account link when logged out and next to the username link when logged in.

Using MediaWiki 1.43 and Vector 2022 skin.

发布评论

评论列表(0)

  1. 暂无评论