1. Install and modify jpgraph Program
(1), installation: jpgraph PhP5 version Version: 3.0.7, from the http://www.aditus.nu/jpgraph/jpdownload.php Download For the latest version, see the corresponding PHP version. Decompress the SRC subdirectory to the Mantis \ library directory and change it to jpgraph.
(2) modify File 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 );
}
Change
Elseif ($ aff === ff_simsun ){
// Do Chinese Conversion
Return $ atxt;
}
2. Background Set :
(1) Installation Plug-ins : Management -- Manage plug-ins -- install the mantisgraph plug-in
(2) modify the program:
File mantis \ plugins \ mantisgraph \ pages \ config. php (remember this file after the change with ultraedit with ASC-II to UTF-8 conversion) Function Save as UTF-8 format file, consistent with the overall character set ):
$ T_current_font_selected = array (
'Simsun' => false, // Add this line
'Arial' => false,
//--------------------------------------
Sans-serif: <br/>
<Label> <input type = "radio" name = "font" value = "simsun" <? PHP echo print_font_checked ('simsun')?> /> </Label> <br/> // Add this line
<Label> <input type = "radio" name = "font" value = "Arial" <? PHP echo print_font_checked ('arial')?> /> Arial </label> <br/>
//---------------------------------------------------------------------
File mantis \ plugins \ mantisgraph \ pages \ config_edit.php:
If (plugin_config_get ('font ')! = $ F_font ){
Switch ($ f_font ){
Case 'simsun': // Add this line
Case 'arial ':
//----------------------------------------------------------------------
File mantis \ plugins \ mantisgraph \ core \ graph_api.php:
$ T_font_map = array (
'Simsun' => ff_simsun, // Add this line
'Arial' => ff_arial,
3. Set and enable:
(1) Management-> Management plug-in-> click "mantisgraph 1.0" to go to the configuration page,
(2) graph library to useSelect"Jpgraph", font select ""
(3) Click "change configuration" and check whether the content in the statistical report is as expected.
The attachment is provided by the mantisgraph plug-in.ChineseSave the file to the Mantis \ plugins \ mantisgraph \ Lang directory.
PS: There is no place to upload the attachment. The original post address is attached:
Http://bbs.51testing.com/thread-181242-1-7.html
PS, 1.2.4 The test failed font is not displayed, and most charts are not displayed