TestLink中国 博客申请成功了
TestLink中国 博客申请成功了

导航

 
   Testlink 170默认安装出来好像是使用ASP. 而我的是linux +php ,解决这个问题可以使用


HowTo configure: upload images using FCK editor    


Procedure was contributed by nyamanza

The solution is quite involved but for anyone else who encounters this, this should be very useful. The problem rears it's head, in different ways, but the basic gist of the issue is in the title 'cannot upload images'.

This solution assumes you are running apache with php and testlink 1.7.

Configure FCKEditor
Edit testlink"third_party"fckeditor"fckconfig.js

Uncomment the line
Code:
"" FCKConfig.ProtectedSource.Add( /<"?["s"S]*?"?>/g ) ; // PHP style server side code

to read

Code:
FCKConfig.ProtectedSource.Add( /<"?["s"S]*?"?>/g ) ; // PHP style server side code

Change the folllowing lines from;

Code:
var _FileBrowserLanguage = 'asp' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'asp' ; // asp | aspx | cfm | lasso | php
 
to;

Code:
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php

Edit testlink"third_party"fckeditor"editor"filemanager"browser"default"connectors"php"config.php

Change
Code:
$Config['Enabled'] = false ;

to
Code:
$Config['Enabled'] = true ;

Edit
"testlink"third_party"fckeditor"editor"filemanager"upload"php"config.php

Change
Code:
$Config['Enabled'] = false ;

to
Code:
$Config['Enabled'] = true ;


and
Code:
$Config['UserFilesPath'] = '/userfiles/' ;

to
Code:
$Config['UserFilesPath'] = '/userfiles/images/' ;


Edit php.ini (in your apache"bin and your php folder)

Change
Code:
upload_tmp_dir = "C:"xampp"tmp"

to
Code:

upload_tmp_dir = "C:"xampp"testlink"userfiles"

Edit
Code:
testlink"third_party"fckeditor"editor"filemanager"upload"php"upload.php


Change (line 93)
Code:
$sServerDir .= $sType . '/' ;

to
Code:
$sServerDir .= strtolower($sType) . '/' ;

Change (line119)
Code:
$sFileUrl = $Config["UserFilesPath"] . $sType . '/' . $sFileName ;

to
Code:
$sFileUrl = $Config["UserFilesPath"] . strtolower($sType) . '/' . $sFileName;

Create the folders;

      htdocs"userfiles
      htdocs"userfiles"file
      htdocs"userfiles"images
      htdocs"userfiles"flash
      htdocs"userfiles"media


Once I had done all of the above I was able to upload images and files.
posted on 2007-12-05 19:13  TestLink 中国  阅读(808)  评论(0编辑  收藏  举报