Avatar billede mccookie Seniormester
30. august 2006 - 22:52 Der er 7 kommentarer og
1 løsning

FCKeditor og filemanager

Hejsa

Jeg kan ikke få filuploadet til at virke:(



$sBasePath = $_SERVER['PHP_SELF'] ;
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;

Min fckeditor mappe ligger her: domæne/test/fceditor

Men jeg kan ikke lige gennemskue hvordan den skal komme til at virke........

Jeg havde tidligere en version 2.3 og nu har jeg en 2.3.1 og kan ikke få den til at starte objektet.
Kommentar: mccookie
29/08-2006 08:55:07 Oki.....kom over trinet....der var nogle store/små bogstaver der lige drillede ;(

Men nu kører første del
Kommentar: mccookie
29/08-2006 09:39:33 To modify configuration settings in a separate file outside the editor's directory, add them to the Config property of the editor object:

$oFCKeditor->Config['CustomConfigurationsPath'] = '/myconfig.js' ;


--------------------------------------------------------------------------------


To set the path for saving uploaded files uncomment the following line in /FCKeditor/editor/filemanager/browser/default/connectors/php/config.php.

(do the same in /FCKeditor/editor/filemanager/upload/php/config.php, at least in version 2.3)


// $Config['UserFilesPath'] = '/UserFiles/' ;
Depending on your version, you may also need to set $Config['Enabled'] to true in /FCKeditor/editor/filemanager/browser/default/connectors/php/config.php.

(do the same in /FCKeditor/editor/filemanager/upload/php/config.php, at least in version 2.3)


// SECURITY: You must explicitly enable this "connector". (Set it to "true").
$Config['Enabled'] = true ;
Note: Set the permission of the upload directory properly. You should also uncomment the settings of LinkBrowserURL and the ImageBrowserURL in the /FCKeditor_2.0fc/fckconfig.js file for the browsing and uploading function to work properly.

Also set _FileBrowserLanguage and _QuickUploadLanguage to php in the fckconfig.js file.


var _FileBrowserLanguage        = 'php' ;
var _QuickUploadLanguage        = 'php' ;



Har udført ovenstående.....

SE config 1
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
*        http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
*        http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: config.php
*    Configuration file for the PHP File Uploader.
*
* File Authors:
*        Frederico Caldeira Knabben (fredck@fckeditor.net)
*/

global $Config ;

// SECURITY: You must explicitelly enable this "uploader".
$Config['Enabled'] = true;

// Path to uploaded files relative to the document root.
$Config['UserFilesPath'] = '/test/fckeditor/upload_files/' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Usefull if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\UserFiles\\' or '/root/mysite/UserFiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '/test/fckeditor/upload_files/' ;

// Due to security issues with Apache modules, it is reccomended to leave the
// following setting enabled.
$Config['ForceSingleExtension'] = true ;

$Config['AllowedExtensions']['File']    = array('txt') ;
$Config['DeniedExtensions']['File']        = array('php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi') ;

$Config['AllowedExtensions']['Image']    = array('jpg','gif','jpeg','png') ;
$Config['DeniedExtensions']['Image']    = array() ;

$Config['AllowedExtensions']['Flash']    = array('swf','fla') ;
$Config['DeniedExtensions']['Flash']    = array() ;

?>


Se config 2

<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
*        http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
*        http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: config.php
*    Configuration file for the File Manager Connector for PHP.
*
* File Authors:
*        Frederico Caldeira Knabben (fredck@fckeditor.net)
*/

global $Config ;

// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = true;

// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/test/fckeditor/upload_files/' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Usefull if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\UserFiles\\' or '/root/mysite/UserFiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '/test/fckeditor/upload_files/' ;

// Due to security issues with Apache modules, it is reccomended to leave the
// following setting enabled.
$Config['ForceSingleExtension'] = true ;

$Config['AllowedExtensions']['File']    = array('txt') ;
$Config['DeniedExtensions']['File']        = array('php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi') ;

$Config['AllowedExtensions']['Image']    = array('jpg','gif','jpeg','png') ;
$Config['DeniedExtensions']['Image']    = array() ;

$Config['AllowedExtensions']['Flash']    = array('swf','fla') ;
$Config['DeniedExtensions']['Flash']    = array() ;

$Config['AllowedExtensions']['Media']    = array('swf','fla','jpg','gif','jpeg','png','avi','mpg','mpeg') ;
$Config['DeniedExtensions']['Media']    = array() ;

?>


FCKeditor:
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
*        http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
*        http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckconfig.js
*    Editor configuration settings.
*    See the documentation for more info.
*
* File Authors:
*        Frederico Caldeira Knabben (fredck@fckeditor.net)
*/

FCKConfig.CustomConfigurationsPath = '' ;

FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;

FCKConfig.DocType = '' ;

FCKConfig.BaseHref = '' ;

FCKConfig.FullPage = false ;

FCKConfig.Debug = false ;
FCKConfig.AllowQueryStringDebug = true ;

FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ;

FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;

// FCKConfig.Plugins.Add( 'autogrow' ) ;
FCKConfig.AutoGrowMax = 400 ;

FCKConfig.ProtectedSource.Add( /<script[\s\S]*?<\/script>/gi ) ; // <SCRIPT> tags.
// FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ;    // ASP style server side code <%...%>
// FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ;    // PHP style server side code
// FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ;    // ASP.Net style tags <asp:control>

FCKConfig.AutoDetectLanguage    = true ;
FCKConfig.DefaultLanguage        = 'en' ;
FCKConfig.ContentLangDirection    = 'ltr' ;

FCKConfig.ProcessHTMLEntities    = true ;
FCKConfig.IncludeLatinEntities    = true ;
FCKConfig.IncludeGreekEntities    = true ;

FCKConfig.FillEmptyBlocks    = true ;

FCKConfig.FormatSource        = true ;
FCKConfig.FormatOutput        = true ;
FCKConfig.FormatIndentator    = '    ' ;

FCKConfig.ForceStrongEm = true ;
FCKConfig.GeckoUseSPAN    = false ;
FCKConfig.StartupFocus    = false ;
FCKConfig.ForcePasteAsPlainText    = false ;
FCKConfig.AutoDetectPasteFromWord = true ;    // IE only.
FCKConfig.ForceSimpleAmpersand    = false ;
FCKConfig.TabSpaces        = 0 ;
FCKConfig.ShowBorders    = true ;
FCKConfig.SourcePopup    = false ;
FCKConfig.UseBROnCarriageReturn    = false ;    // IE only.
FCKConfig.ToolbarStartExpanded    = true ;
FCKConfig.ToolbarCanCollapse    = true ;
FCKConfig.IgnoreEmptyParagraphValue = true ;
FCKConfig.PreserveSessionOnFileBrowser = false ;
FCKConfig.FloatingPanelsZIndex = 10000 ;

FCKConfig.ToolbarLocation = 'In' ;

FCKConfig.ToolbarSets["Default"] = [
    ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
    ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
    ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
    ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
    '/',
    ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
    ['OrderedList','UnorderedList','-','Outdent','Indent'],
    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
    ['Link','Unlink','Anchor'],
    ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak','UniversalKey'],
    '/',
    ['Style','FontFormat','FontName','FontSize'],
    ['TextColor','BGColor'],
    ['FitWindow','-','About']
] ;

FCKConfig.ToolbarSets["Basic"] = [
    ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
] ;

FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form'] ;

FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ;

FCKConfig.FontNames        = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
FCKConfig.FontSizes        = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ;
FCKConfig.FontFormats    = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ;

FCKConfig.StylesXmlPath        = FCKConfig.EditorPath + 'fckstyles.xml' ;
FCKConfig.TemplatesXmlPath    = FCKConfig.EditorPath + 'fcktemplates.xml' ;

FCKConfig.SpellChecker            = 'ieSpell' ;    // 'ieSpell' | 'SpellerPages'
FCKConfig.IeSpellDownloadUrl    = 'http://iespell.huhbw.com/ieSpellSetup220647.exe' ;

FCKConfig.MaxUndoLevels = 15 ;

FCKConfig.DisableObjectResizing = false ;
FCKConfig.DisableFFTableHandles = true ;

FCKConfig.LinkDlgHideTarget        = false ;
FCKConfig.LinkDlgHideAdvanced    = false ;

FCKConfig.ImageDlgHideLink        = false ;
FCKConfig.ImageDlgHideAdvanced    = false ;

FCKConfig.FlashDlgHideAdvanced    = false ;

// The following value defines which File Browser connector and Quick Upload
// "uploader" to use. It is valid for the default implementaion and it is here
// just to make this configuration file cleaner.
// It is not possible to change this value using an external file or even
// inline when creating the editor instance. In that cases you must set the
// values of LinkBrowserURL, ImageBrowserURL and so on.
// Custom implementations should just ignore it.
var _FileBrowserLanguage    = 'php' ;    // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage    = 'php' ;    // asp | aspx | cfm | lasso | php

// Don't care about the following line. It just calculates the correct connector
// extension to use for the default File Browser (Perl uses "cgi").
var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;

FCKConfig.LinkBrowser = true ;
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
FCKConfig.LinkBrowserWindowWidth    = FCKConfig.ScreenWidth * 0.7 ;        // 70%
FCKConfig.LinkBrowserWindowHeight    = FCKConfig.ScreenHeight * 0.7 ;    // 70%

FCKConfig.ImageBrowser = true ;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
FCKConfig.ImageBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;    // 70% ;
FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;    // 70% ;

FCKConfig.FlashBrowser = true ;
FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
FCKConfig.FlashBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;    //70% ;
FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;    //70% ;

FCKConfig.LinkUpload = true ;
FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage ;
FCKConfig.LinkUploadAllowedExtensions    = "" ;            // empty for all
FCKConfig.LinkUploadDeniedExtensions    = ".(php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi)$" ;    // empty for no one

FCKConfig.ImageUpload = true ;
FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Image' ;
FCKConfig.ImageUploadAllowedExtensions    = ".(jpg|gif|jpeg|png)$" ;        // empty for all
FCKConfig.ImageUploadDeniedExtensions    = "" ;                            // empty for no one

FCKConfig.FlashUpload = true ;
FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Flash' ;
FCKConfig.FlashUploadAllowedExtensions    = ".(swf|fla)$" ;        // empty for all
FCKConfig.FlashUploadDeniedExtensions    = "" ;                    // empty for no one

FCKConfig.SmileyPath    = FCKConfig.BasePath + 'images/smiley/msn/' ;
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'] ;
FCKConfig.SmileyColumns = 8 ;
FCKConfig.SmileyWindowWidth        = 320 ;
FCKConfig.SmileyWindowHeight    = 240 ;
Avatar billede medieroed Praktikant
31. august 2006 - 03:28 #1
Fileuploaden laver selv en mappe i din rod til dine filer - du skal ned i undermapperne til filuploaden og sætte tilladelserne til "true"
Avatar billede mccookie Seniormester
01. september 2006 - 15:11 #2
Ovenstående er fra min kode på serveren og der er de sat til true.....eller har jeg overset en??

VEnlig h
Avatar billede medieroed Praktikant
01. september 2006 - 23:33 #3
Du skal ind i filerne:
editor/filemanager/browser/default/connectors/php config.php
&
editor/filemanager/upload/php config.php

begge steder skal du sætte:
$Config['Enabled'] = true ;
Avatar billede medieroed Praktikant
02. september 2006 - 10:49 #4
Jeg downloaded lige FCKeditor2.3.1 bare for at være sikker på at vi talte om det samme. det tog 10min at få fileuploaden til at køre. Prøv evt. at geninstallere(læs:slet) editoren. Husk i øvrigt også at gøre flittig brug af ctlr+F5, da der godt kan være opstå problemer hvis fckeditoren ikke tvinges til at genindlæse configfilen, hvilket igen betyder at de ændringer man lige har lavet ikke vises.
Avatar billede medieroed Praktikant
02. september 2006 - 10:51 #5
Hvis du kun har problemer med uploaden når editoren er online, er det højst sandsynligt et problem med tilladelser til mappen hvori den skal ligge billederne.
Avatar billede mccookie Seniormester
02. september 2006 - 23:47 #6
Filuploaderen laver ikke en mappe sådan lige hvad jeg kan se.....

Alle de parameter du henviser til er sat til true
Mappen der uplaodes til er sat til 777

Nogen bud??
Avatar billede mccookie Seniormester
05. oktober 2006 - 18:46 #7
Har stadig ikke fået skidtet til at virke og lægger det på hylden indtil videre....
Avatar billede mccookie Seniormester
05. oktober 2006 - 18:46 #8
lukker
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester