No matter whether it is JCE or CKEDITOR, it does not solve the problem of the Chinese name file. Either the upload fails or the Chinese name is uploaded and cannot be accessed by the web. In contrast, JCE is more user-friendly. For example, after a file is uploaded, It is selected by default. You do not need to search for the uploaded file in a small pop-up window. The source code of JCE is studied, and the method of saving the file name is changed. Pure numbers are used as the file name.
Go to the joomla installation directory, find components/com_jce/editor/extensions/browser/file. php, and modify lines 1017-1020:
Copy codeThe Code is as follows:
// Strip extension
$ Name = WFUtility: stripExtension ($ name );
// Make file name 'web safe'
$ Name = WFUtility: makeSafe ($ name, $ this-> get ('websafe _ mode', 'utf-8 '));
Change
Copy codeThe Code is as follows:
$ Name = date ('ymd-His-', time (). rand (999 );
My joomla version is 1.5 and JCE version 2.1.3. The location of the changes may vary slightly.