|
HowTo configure: upload images using FCK editor |
|
|
|
Monday, 22 October 2007 11:56 |
|
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/' ; | Verify validity of a path for temporary files. You possibly would like to edit php.ini (in your apache\bin and your php folder) Verify / update: | Example: | | upload_tmp_dir = "C:\xampp\tmp" | 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. You can interest to discussion on forum .
|
|
Last Updated on Wednesday, 07 May 2008 15:13 |