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' );

        }

  • 相关阅读:
    Office EXCEL 如何设置最大行高
    网站SEO优化的方法
    ajax序列化表单,再也不用通过data去一个个的传值了
    java实现网站paypal支付功能并且异步修改订单的状态
    jquery报.live() is not a function的解决方法
    如何判断服务器是否挂掉
    mysql实现分页的几种方式
    sqlserver实现分页的几种方式
    十年前,女:“对不起,我不会喜欢你的,你不要再坚持了,就好比让 Linux 和 Windows 同时运行在一台PC机上,可能吗?
    实际项目开发中为什么引用的外部样式没有什么效果
  • 原文地址:https://www.cnblogs.com/w1618/p/10768430.html
Copyright © 2011-2022 走看看