設置MediaWiki頁腳

字號+ 編輯: 种花家 修訂: 种花家 來源: 站长百科 2023-09-11 我要說兩句(0)

MediaWiki是個人博客建站者喜聞樂見的一套系統,可是調整起界面來不像普通MVC框架那麽好搞,本文講解如何修改其中的頁腳。

页脚文字设置

在Mediawiki的的模板中,例如/skins/MonoBook.php,页脚是通过下面的代码设置的:

$footerlinks = array(
    'lastmod',
    'viewcount',
    'numberofwatchingusers',
    'credits',
    'copyright',
    'privacy',
    'about',
    'disclaimer',
    'tagline',
);

根据需要可以添加和删除上面的每一项内容。下面具体说明每一项的含义以及设置方法:

lastmod - 最后修订,通过编辑 MediaWiki:Lastmodifiedat (版本 1.8 或更新) 或者 MediaWiki:Lastmodified (版本 1.7 and 更老)来修改显示的内容. 如果$wgMaxCredits 启用(设置要显示几位最后的编辑者), 那么通过编辑 MediaWiki:Lastmodifiedatby (verison 1.8 and after) 或者 MediaWiki:Lastmodifiedby (version 1.7 and before)来修改。$wgMaxCredits 不启用,仅显示最后的修正日期,启用以后会显示最后的修正日期已经最后几位编辑者(显示几位编辑者通过$wgMaxCredits设置)。

viewcount - 页面的浏览次数,通过编辑 MediaWiki:Viewcount页面来修改。

numberofwatchingusers - 关注用户,通过编辑 MediaWiki:Number 来修改显示方式. 只有在LocalSettings.php中设置 $wgPageShowWatchingUsers = true; 以后才会显示这项内容。

copyright - 版权edit MediaWiki:Copyright. The parameter $1 on that page is replaced with a link to the details of copyright for your wiki. In LocalSettings.php $wgRightsText for the link text and set either $wgRightsPage or $wgRightsUrl with the location of a wiki page or external URL.

privacy - 隐私政策this is a link only. Edit MediaWiki:Privacy for the link text and MediaWiki:Privacypage for the wiki page to which to link.

about -关于 this is a link only. Edit MediaWiki:Aboutsite for the link text and MediaWiki:Aboutpage for the wiki page to which to link.

disclaimer - 免责声明this is a link only. Edit MediaWiki:Disclaimers for the link text and MediaWiki:Disclaimerpage for the wiki page to which to link.

tagline - 目前没有使用

页脚图片设置

左侧图片: copyright图标, 通过$wgCopyrightIcon进行设置,设置方法如下:

在网站根目录所在的配置文件LocalSettings.php中设置$wgCopyrightIcon,例如:

$wgCopyrightIcon = '<a href="http://www.wkwkk.com"><img src="images/logo.gif" width="117" height="37" alt="我看" /></a>';

设置的时候注意内层和外层不能同时用双引号,内层用单引号或者是外层用单引号,否则会引起unexpected T_CONSTANT_ENCAPSED_STRING 的错误。

右侧图片: poweredby图标

閲完此文,您的感想如何?
  • 有用

    1

  • 沒用

    1

  • 開心

    2

  • 憤怒

    1

  • 可憐

    1

1.如文章侵犯了您的版權,請發郵件通知本站,該文章將在24小時内刪除;
2.本站標注原創的文章,轉發時煩請注明來源;
3.交流群: 2702237 13835667

相關課文
  • mac開發接入微信公衆號接口返回報錯 cURL error 56: SSLRead() return error -9806

  • PHP的換行符是什麽

  • pecl安裝程序時報錯Array and string offset access syntax with curly braces is no longer supported

  • 由於商家傳入的H5交易參數有誤,該筆交易暫時無法完成,請聯繫商家解決

我要說說
網上賓友點評