Witam!
W jaki sposób mogę ustawić upload plików w fck editorze? Jak wrzucam plik przez formularz to wyświetla mi się invalid file type, ustawiłem w editor\filemanager\upload\php\config.php
  1. <?php
  2. $Config['AllowedExtensions']['File'] = array('doc','xls','pdf','ppt') ;
  3. $Config['DeniedExtensions']['File'] = array('php','php3','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi') ;
  4. ?>
i nie działa, gdzie jeszcze się ustawia typy plików?

Jeszcz tak na wszelki wypadek, tak wygląda plik fckonfig.js
  1. /*
  2. * FCKeditor - The text editor for internet
  3. * Copyright (C) 2003-2005 Frederico Caldeira Knabben
  4. *
  5. * Licensed under the terms of the GNU Lesser General Public License:
  6. *
  7. * For further information visit:
  8. *
  9. * "Support Open Source software. What about a donation today?"
  10. *
  11. * File Name: fckconfig.js
  12. * Editor configuration settings.
  13. * See the documentation for more info.
  14. *
  15. * File Authors:
  16. * Frederico Caldeira Knabben (fredck@fckeditor.net)
  17. */
  18.  
  19. FCKConfig.CustomConfigurationsPath = '' ;
  20.  
  21. FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
  22.  
  23. FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ;
  24.  
  25. FCKConfig.BaseHref = '' ;
  26.  
  27. FCKConfig.FullPage = false ;
  28.  
  29. FCKConfig.Debug = false ;
  30. FCKConfig.AllowQueryStringDebug = true ;
  31.  
  32. FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/office2003/' ;
  33.  
  34. FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
  35.  
  36. // FCKConfig.Plugins.Add( 'placeholder', 'de,en,fr,it,pl' ) ;
  37.  
  38. FCKConfig.ProtectedSource.Add( /<script[\s\S]*?\/script>/gi ) ; // <script> tags.
  39. // FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%>
  40. // FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // php style server side code <?...?>
  41. // FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control>
  42.  
  43. FCKConfig.AutoDetectLanguage = true ;
  44. FCKConfig.DefaultLanguage = 'pl' ;
  45. FCKConfig.ContentLangDirection = 'ltr' ;
  46.  
  47. FCKConfig.EnableXHTML = true ; // Unsupported: Do not change.
  48. FCKConfig.EnableSourceXHTML = true ; // Unsupported: Do not change.
  49.  
  50. FCKConfig.ProcessHTMLEntities = true ;
  51. FCKConfig.IncludeLatinEntities = true ;
  52. FCKConfig.IncludeGreekEntities = true ;
  53.  
  54. FCKConfig.FillEmptyBlocks = true ;
  55.  
  56. FCKConfig.FormatSource = true ;
  57. FCKConfig.FormatOutput = true ;
  58. FCKConfig.FormatIndentator = ' ' ;
  59.  
  60. FCKConfig.ForceStrongEm = true ;
  61. FCKConfig.GeckoUseSPAN = true ;
  62. FCKConfig.StartupFocus = false ;
  63. FCKConfig.ForcePasteAsPlainText = false ;
  64. FCKConfig.AutoDetectPasteFromWord = true ; // IE only.
  65. FCKConfig.ForceSimpleAmpersand = false ;
  66. FCKConfig.TabSpaces = 0 ;
  67. FCKConfig.ShowBorders = true ;
  68. FCKConfig.UseBROnCarriageReturn = false ; // IE only.
  69. FCKConfig.ToolbarStartExpanded = true ;
  70. FCKConfig.ToolbarCanCollapse = true ;
  71. FCKConfig.IEForceVScroll = false ;
  72. FCKConfig.IgnoreEmptyParagraphValue = true ;
  73. FCKConfig.PreserveSessionOnFileBrowser = false ;
  74. FCKConfig.FloatingPanelsZIndex = 10000 ;
  75.  
  76. FCKConfig.ToolbarSets["Default"] = [
  77. ['Save','Cut','Copy','Paste','PasteText','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Link','Unlink','Image','Table','SpecialChar'],
  78. ['FontName','FontSize','TextColor'],
  79. '/',
  80. ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','OrderedList','UnorderedList','-','Outdent','Indent','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull']
  81.  
  82. ] ;
  83.  
  84. FCKConfig.ToolbarSets["Basic"] = [
  85. ['Bold','Italic','Underine','-','Undo','Redo','-','OrderedList','-','Link']
  86. ] ;
  87.  
  88. FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form'] ;
  89.  
  90. FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808
    080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,
    999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF
    99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ;
  91.  
  92. FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
  93. FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ;
  94. FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ;
  95.  
  96. FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
  97. FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;
  98.  
  99. FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages'
  100. FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/rel/ieSpellSetup211325.exe' ;
  101.  
  102. FCKConfig.MaxUndoLevels = 15 ;
  103.  
  104. FCKConfig.DisableImageHandles = false ;
  105. FCKConfig.DisableTableHandles = false ;
  106.  
  107. FCKConfig.LinkDlgHideTarget = false ;
  108. FCKConfig.LinkDlgHideAdvanced = false ;
  109.  
  110. FCKConfig.ImageDlgHideLink = false ;
  111. FCKConfig.ImageDlgHideAdvanced = false ;
  112.  
  113. FCKConfig.FlashDlgHideAdvanced = false ;
  114.  
  115. // The following value defines which File Browser connector and Quick Upload
  116. // "uploader" to use. It is valid for the default implementaion and it is here
  117. // just to make this configuration file cleaner.
  118. // It is not possible to change this value using an external file or even
  119. // inline when creating the editor instance. In that cases you must set the
  120. // values of LinkBrowserURL, ImageBrowserURL and so on.
  121. // Custom implementations should just ignore it.
  122. var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
  123. var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
  124.  
  125. // Don't care about the following line. It just calculates the correct connector
  126. // extension to use for the default File Browser (Perl uses "cgi").
  127. var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
  128.  
  129. FCKConfig.LinkBrowser = true ;
  130. FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
  131. FCKConfig.LinkBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70%
  132. FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70%
  133.  
  134. FCKConfig.ImageBrowser = true ;
  135. //dodane
  136. FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php';
  137. /*FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ; */
  138. FCKConfig.ImageBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% ;
  139. FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ;
  140.  
  141. FCKConfig.FlashBrowser = true ;
  142. FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
  143. FCKConfig.FlashBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; //70% ;
  144. FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ;
  145.  
  146. FCKConfig.LinkUpload = true ;
  147.  
  148. FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + FCKConfig.QuickUploadLanguage + '/upload.' + _QuickUploadLanguage ;
  149. FCKConfig.LinkUploadAllowedExtensions = "" ; // empty for all
  150. FCKConfig.LinkUploadDeniedExtensions = ".(php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi)$" ; // empty for no one
  151.  
  152. FCKConfig.ImageUpload = true ;
  153.  
  154. //dodane
  155. FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/php/upload.php?Type=Image';
  156. /*
  157. FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + FCKConfig.QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Image' ; */
  158. FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png)$" ; // empty for all
  159. FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one
  160.  
  161. FCKConfig.FlashUpload = true ;
  162. FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + FCKConfig.QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Flash' ;
  163. FCKConfig.FlashUploadAllowedExtensions = ".(swf|fla)$" ; // empty for all
  164. FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one
  165.  
  166. FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ;
  167. FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ;
  168. FCKConfig.SmileyColumns = 8 ;
  169. FCKConfig.SmileyWindowWidth = 320 ;
  170. FCKConfig.SmileyWindowHeight = 240 ;
  171.  
  172. if( window.console ) window.console.log( 'Config is loaded!' ) ; // @Packager.Compactor.RemoveLine