zoukankan      html  css  js  c++  java
  • 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' );

        }

  • 相关阅读:
    《高校实验室低值易耗品和耗材的"一站式"管理探索 》论文笔记
    《浅谈MVC框架模式》论文笔记
    《低值易耗品的超市化和信息化管理模式探索》论文笔记
    《浅谈企业低值易耗品的管理》论文笔记
    《解说Spring MVC的处理流程及优点》论文笔记
    《基于SSM构建RESTfuI API服务》论文笔记
    《基于SSM的登录验证功能实现》论文笔记
    《基于SpringBoot+Shiro的权限管理实现》论文笔记
    《实验室设备管理系统》10
    《实验室设备管理系统》9
  • 原文地址:https://www.cnblogs.com/w1618/p/10768430.html
Copyright © 2011-2022 走看看