zoukankan      html  css  js  c++  java
  • Mantis 1.2.3 图表乱码问题解决方案

    1.打开mantis\plugins\MantisGraph\core\graph_api.php

       找到下面一段,将'arial.ttf'直接改为‘simhei.ttf’,也可改为其它的中文字体。

            if( isset( $t_font_map[$t_font] ) ) {
                $t_font = $t_font_map[$t_font];
            } else {
                $t_font = 'simhei.ttf'; //'arial.ttf';
            }

    2.刷新就可以正常显示了。

    其它参考部分,测试未通过,不知道原因

    地址:http://blog.csdn.net/wirror800/archive/2010/05/23/5618334.aspx 

    1.1.8之后的版本安装配置

    默认的系统使用自己绑定的mantis graph, 我们也可以选择安装使用jpgraph。

    1、安装JPGRAPH及改程序

    (1)安装:JpGraph 3.0.7,从http://www.aditus.nu/jpgraph/jpdownload.php下载最新版本,记得看清对应的PHP版本。解压缩其中子目录src至mantis\library目录下,改名为jpgraph

    (2)修改文件mantis\library\jpgraph\jpgraph_ttf.inc.php:

           elseif( $aFF === FF_SIMSUN ) {

                // Do Chinese conversion

                if( $this->g2312 == null ) {

                    include_once 'jpgraph_gb2312.php' ;

                    $this->g2312 = new GB2312toUTF8();

                }

                return $this->g2312->gb2utf8($aTxt);

            }

    改为

           elseif( $aFF === FF_SIMSUN ) {

                // Do Chinese conversion

            return $aTxt;

            }

    2、后台设置:

    (1)安装插件:管理--》管理插件--》安装MantisGraph插件

    (2)修改程序:

      *文件mantis\plugins\MantisGraph\pages\config.php(记得本文件改完后用Ultraedit用ASC-II至UTF-8的转换功能保存为UTF-8格式文件,与总体字符集保持一致):

    $t_current_font_selected = array(

            'simsun' => false,  //增加这一行

            'arial' => false,

    //--------------------------------------

            Sans-serif:<br />

            <label><input type="radio" name="font" value="simsun"<?php echo print_font_checked( 'simsun' )?>/>宋体</label><br /> //增加这一行

            <label><input type="radio" name="font" value="arial"<?php echo print_font_checked( 'arial' )?>/>Arial</label><br />

    //---------------------------------------------------------------------

       *文件mantis\plugins\MantisGraph\pages\config_edit.php:

    if ( plugin_config_get( 'font' ) != $f_font ) {

            switch ( $f_font ) {

                    case 'simsun':    //增加这一行

                    case 'arial':

    //----------------------------------------------------------------------

       *文件mantis\plugins\MantisGraph\core\graph_api.php:

                    $t_font_map = array(

                            'simsun' => FF_SIMSUN,   //增加这一行

                            'arial' => FF_ARIAL,

    3、设置并启用:

    (1)管理--》管理插件--》点击“MantisGraph 1.0”名字进入设置界面,

    (2)Graph library to use选择“Jpgraph”,Font选择“宋体”

    (3)点击“更改配置”后再看看统计报表中内容,是否已如你所愿。

    MantisGraph插件的中文化文件,放在mantis\plugins\MantisGraph\lang目录下即可。

  • 相关阅读:
    【SQL触发器】类型 FOR 、AFTER、 Instead of到底是什么鬼
    Oracle两种临时表的创建与使用详解
    oracle 临时表(事务级、会话级)
    oracle存储过程游标的使用(批号分摊)
    delphi FastReport快速入门
    Vue 表情包输入组件的实现代码
    一个基于 JavaScript 的开源可视化图表库
    浅淡Webservice、WSDL三种服务访问的方式(附案例)
    记录一下遇到的问题 java将json数据解析为sql语句
    Oracle词汇表(事务表(transaction table)”)
  • 原文地址:https://www.cnblogs.com/s021368/p/1850398.html
Copyright © 2011-2022 走看看