1.修改默認logo
mediawiki站點默認logo圖片路徑名:$WIKI_HOME/skins/common/images/wiki.png,可以通過以下兩種方式修改默認logo:
(1)用圖片編輯工作打開wiki.png圖片,進行修改后覆蓋即可;或者自己新建一個135 x 135像素,圖片格式為.png的同名圖片覆蓋即可,建議使用透明背景,否則將嚴重影響視覺效果。
(2)將logo文件放在目錄$WIKI_HOME/skins/common/images下,再在根目錄下打開 LocalSettings.php文件,找到$wgLogo= "$wgStylePath/common/images/wiki.png",修改為$wglogo="$wgStylePath/common /images/logo文件名"
注:可以使用默認logo圖片同目錄下的mediawiki.png替代。
#個人wiki,禁止創建帳號功能,除非登陸才能訪問
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
#啟用詳細異常顯示.
$wgShowExceptionDetails = true;
#去除底部powered by圖標
unset($wgFooterIcons['poweredby']);
#增加網站訪問統計(51la)
1.找到\includes\skins\Skin.php並打開,找到bottomScripts這個函數,修改$extraHtml為要添加的代碼
2.找到皮膚模板文件(例如\skins\Vector\includes\VectorTemplate.php)在</body>和</html>之間增加代碼
#底部footerlinker設置
As of 1.17 and after you can modify the list of links in the footer using the SkinTemplateOutputPageBeforeExec
to modify the footerlinks arrays and setting new template keys for the values.
For example, putting this in your LocalSettings.php
file will add a new "Terms of Use" link after the disclaimer link.
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) { $tpl->set( 'termsofuse', $sk->footerLink( 'termsofuse', 'termsofusepage' ) ); // or to add non-link text: $tpl->set( 'footertext', 'Text to show in footer' ); $tpl->data['footerlinks']['places'][] = 'termsofuse'; return true; };
From there you can put "Terms of Use" in the page MediaWiki:Termsofuse on your wiki, for the link's text and in MediaWiki:Termsofusepage define the title of the page that you want the Terms of Use link to point to. Note, if you do not create these pages on your wiki, then nothing will appear in the footer.
#隱藏工具欄Toolbox
文件:skins\Vector\VectorTemplate.php 中,case 'TOOLBox' 條件執行語句中加入 if ( $this->data['loggedin'] ) 判斷,如下:
case 'TOOLBOX':
if ( $this->data['loggedin'] ) {
$this->renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' );
}