• mediawiki 常见配置功能


    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.找到includesskinsSkin.php并打开,找到bottomScripts这个函数,修改$extraHtml为要添加的代码

    2.找到皮肤模板文件(例如skinsVectorincludesVectorTemplate.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

    文件:skinsVectorVectorTemplate.php 中,case 'TOOLBox' 条件执行语句中加入 if ( $this->data['loggedin'] ) 判断,如下:

    case 'TOOLBOX':

        if ( $this->data['loggedin'] ) {

            $this->renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' );

        }

  • 相关阅读:
    恕我直言,你可能误解了微服务
    准备情人节礼物比写代码难?来看看IT直男给女友们的礼物
    2019年微服务5大趋势,你pick哪个?
    拼多多通用优惠券漏洞被薅羊毛数千万 你的系统有反作弊防护吗?
    知物由学 | AI在Facebook清理有害内容上扮演了什么角色?
    打造业界最牛微服务,网易云这两位“大神”获了大奖
    网易云轻舟微服务斩获“创新产品奖”等两项大奖
    GIS中栅格数据结构的显示与计算
    未能找到tempselect2.cur的一部分
    地图下载3之超图瓦片下载工具
  • 原文地址:https://www.cnblogs.com/w1618/p/10768430.html
Copyright © 2020-2023  润新知