I mainly use DotProject software as dynamic information tracking management, quite good project management software, and time open source. After the XPlanner compared to the open source project, choose it because DotProject is more comprehensive. Install on redhat9, use PHP APACHE MySQL.
DotProject has a relatively good multi-language package, the item is Dot Modules, there is in the SourceForge. It is also very convenient to support Chinese support. However, an annoying problem is that the Chinese part of the project Gantt Chart is always garbled. It is finally solved now.
The DotProject version is 1.0.2. I downloaded the latest version of DotProject from the SourceForge CVS, which is 2.0 alpha, but found that this version increases the function, but is indeed unstable. In 2.0alpha, the graphics section has joined the Chinese processing, simplified and traditional. However, if the 2.0alpha graphic portion is placed in 1.0.2, the Gantt chart is displayed. No way, I have to modify it in 1.0.2. A modified file has been modified at the end of this article.
DotProject's graphics module uses JPGraph. The core of the problem is that there is no Chinese processing in JPGRAPH.
Modify lib / jpgraph / src / jpgraph.php file first.
1. Add the contents of the jpgraph_gb2312.php file to the end of this file, so that there is a GB2312TOUTF8 object in jpgraph.php.
2. Modify the LanguageConv object to increase the Function Convert ($ Atxt, $ AFF) function.
3. Add ff_simsun variable: Define ("ff_simsun", 18)
4. In the constructor of the TTF object, increase the definition of FF_SIMSUN:
FF_SIMSUN => Array (fs_normal => 'simsun', fs_bold => 'simhei', fs_italic => ', fs_bolditalic =>')
5. Modify the SET ($ alocale) function in the DateLocale object, because the first value is taken when returning in this function, and it will be wrong when the Chinese is converted.
$ this-> iDayabb [$ alocale] [] = $ day {0}
Change to
$ this-> iDayabb [$ alocale] [] = $ day
6. The directory of reading the font is incorrect, to be changed to: Define ("TTF_Dir", "/ USR / X11R6 / LIB / X11 / FONTS / TTF /")
Modify lib / jpgraph / src / jpgraph_gantt.php file.
The day and month is the TextProperty object, calling the setFont method, change their fonts to Chinese, such as $ this-> day-> setfont (ff_simsun, fs_normal);
Also modify the modules / tasks / gantt.php file.
The problem in this file is that when you take the task name, the value of the database takes out in advance, so when JPGRAPH is again transferred again, there will be an error. So, to put: $ name = strlen (UTF8_DECode ($ A ["task_name"])> 25? Substr (UTF8_DECode ($ A ["Task_name"]), 0, 22).'... ': utf8_decode $ a ["task_name"]) changed to:
$ Name = Strlen ($ a ["task_name"]> 25? Substr ($ A [Task_name "], 0, 22).'... ': $ a [" task_name "];
Now, Gantt chart shows no problem.
Three files above (have been changed):
Attachment DotProject_102_Rev.zip:
Http://blog.blogchina.com/upload/2005-03-01/20050301145023466505.zip
(If you can't download it, go
http://wilsonsun.blogchina.com/blog/Article_81040.999174.html)