meme avec la derniere modif?
meme avec la derniere modif?
argh desolé j'avais pas vu une erreur
dans le code de doResponse il faut remplacer
par
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 case 'GetFolders' : GetFolders( "", $sCurrentFolder ) ; break ;
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 case 'GetFolders' : GetFolders( $sResourceType, $sCurrentFolder ) ; break ;
si tu fais un affichage de $sResourceType ca donne quoi?
dans l'appel de la fonction doResponse
Je vois pas où je dois le faire...
sinon, quand je clic sur parcourir le serveur, j'ai un popup qui s'ouvre, et en haut à gauche, j'ai bien "Ressource Type" et dans le menu déroulant en dessous, c'est "image" et seulement ça...
Voici mes fichiers :
config.php :
et connector.php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 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/ * * File Name: config.php * Configuration file for the File Manager Connector for PHP. * * File Authors: * Frederico Caldeira Knabben (fredck@fckeditor.net) */ global $Config ; // Path to user files relative to the document root. // SECURITY TIP: Uncomment the following line to set a fixed path. $Config['UserFilesPath'] = '/UserFiles/' ; $Config['AllowedExtensions']['File'] = array() ; $Config['DeniedExtensions']['File'] = array('php','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg') ; $Config['AllowedExtensions']['Images'] = array('jpg','gif','jpeg','png','bmp') ; $Config['DeniedExtensions']['Images'] = 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() ; ?>
on sais jamais, j'ai peut-être mal fait une modif...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108 <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 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/ * * File Name: connector.php * This is the File Manager Connector for PHP. * * File Authors: * Frederico Caldeira Knabben (fredck@fckeditor.net) */ include('config.php') ; include('util.php') ; include('io.php') ; include('basexml.php') ; include('commands.php') ; if ( !$Config['Enabled'] ) SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/browser/default/connectors/php/config.php" file' ) ; // Get the "UserFiles" path. $GLOBALS["UserFilesDirectory"] = '/images' ; $GLOBALS["UserFilesPath"] = '/images/' ; if ( isset( $Config['UserFilesPath'] ) ) $GLOBALS["UserFilesPath"] = $Config['UserFilesPath'] ; else if ( isset( $_GET['ServerPath'] ) ) $GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ; else $GLOBALS["UserFilesPath"] = '/' ; if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) ) $GLOBALS["UserFilesPath"] .= '/' ; // Map the "UserFiles" path to a local directory. $GLOBALS["UserFilesDirectory"] = GetRootPath() . str_replace( '/', '\\', $GLOBALS["UserFilesPath"] ) ; $GLOBALS["UserFilesDirectory"] = GetRootPath() . $GLOBALS["UserFilesPath"] ; DoResponse() ; function DoResponse() { if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) ) return ; // Get the main request informaiton. $sCommand = $_GET['Command'] ; $sResourceType = $_GET['Type'] ; $sCurrentFolder = $_GET['CurrentFolder'] ; // Check if it is an allowed type. if ( !in_array( $sResourceType, array('File','Images','Flash','Media') ) ) return ; // Check the current folder syntax (must begin and start with a slash). if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ; if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ; // File Upload doesn't have to Return XML, so it must be intercepted before anything. if ( $sCommand == 'FileUpload' ) { //FileUpload( $sResourceType, $sCurrentFolder ) ; FileUpload( "", $sCurrentFolder ) ; return ; } // Prevent the browser from caching the result. // Date in the past header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ; // always modified header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ; // HTTP/1.1 header('Cache-Control: no-store, no-cache, must-revalidate') ; header('Cache-Control: post-check=0, pre-check=0', false) ; // HTTP/1.0 header('Pragma: no-cache') ; // Set the response format. header( 'Content-Type:text/xml; charset=utf-8' ) ; //CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ; CreateXmlHeader( $sCommand, "", $sCurrentFolder ) ; // Execute the required command. switch ( $sCommand ) { case 'GetFolders' : GetFolders( $sResourceType, $sCurrentFolder ) ; break ; case 'GetFoldersAndFiles' : GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ; break ; case 'CreateFolder' : CreateFolder( $sResourceType, $sCurrentFolder ) ; } CreateXmlFooter() ; exit ; } ?>
En attendant, je vais manger, on réfléchi mieu le ventre plein !! :d
moi j'arrive toujours pas a afficher mon editeur !
Bon pour glloq8, maintenant que j'ai egalement mange ca va mieux aussi.
Sinon as tu reussi a afficher le contenu de $sResourceType ?
et pour guy2004 : que renvoi le résultat de $oFCKeditor->CreateHtml() ; ?
Remplace le code de doResponse par celui-ci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 function DoResponse() { if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) ) return ; // Get the main request informaiton. $sCommand = $_GET['Command'] ; $sResourceType = $_GET['Type'] ; $sCurrentFolder = $_GET['CurrentFolder'] ; echo $sResourceType; // Check if it is an allowed type. if ( !in_array( $sResourceType, array('File','Image','Flash','Media') ) ) return ; // Check the current folder syntax (must begin and start with a slash). if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ; if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ; // File Upload doesn't have to Return XML, so it must be intercepted before anything. if ( $sCommand == 'FileUpload' ) { FileUpload( $sResourceType, $sCurrentFolder ) ; return ; } // Prevent the browser from caching the result. // Date in the past header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ; // always modified header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ; // HTTP/1.1 header('Cache-Control: no-store, no-cache, must-revalidate') ; header('Cache-Control: post-check=0, pre-check=0', false) ; // HTTP/1.0 header('Pragma: no-cache') ; // Set the response format. header( 'Content-Type:text/xml; charset=utf-8' ) ; CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ; // Execute the required command. switch ( $sCommand ) { case 'GetFolders' : GetFolders( $sResourceType, $sCurrentFolder ) ; break ; case 'GetFoldersAndFiles' : GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ; break ; case 'CreateFolder' : CreateFolder( $sResourceType, $sCurrentFolder ) ; break ; } CreateXmlFooter() ; exit ; }
si sur ma page qui appele FCKeditor je mets :
Cela me met 2 fois "ERREUR 404" page intouvable
Code : Sélectionner tout - Visualiser dans une fenêtre à part $oFCKeditor->CreateHtml() ;
moi, pour lancer FCKeditor, j'ai fait comme ça :
ensuite, dans ta page, tu crée un textarea avec id="texte"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <script type="text/javascript"> window.onload = function() { var sBasePath = '/admin/editeur/'; var oFCKeditor = new FCKeditor('texte','95%','350','Default',''); oFCKeditor.BasePath = sBasePath ; oFCKeditor.ReplaceTextarea() ; } </script>
chez moi ça marche en tout cas... (mais toujours pas la fonction parcourir le serveur !! )
bon un nouveau essai pour voir.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 function DoResponse() { if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) ) return ; // Get the main request informaiton. $sCommand = $_GET['Command'] ; $sResourceType = $_GET['Type'] ; $sCurrentFolder = $_GET['CurrentFolder'] ; // Check if it is an allowed type. if ( !in_array( $sResourceType, array('File','Image','Images','Flash','Media') ) ) return ; // Check the current folder syntax (must begin and start with a slash). if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ; if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ; // File Upload doesn't have to Return XML, so it must be intercepted before anything. if ( $sCommand == 'FileUpload' ) { FileUpload( $sResourceType, $sCurrentFolder ) ; return ; } // Prevent the browser from caching the result. // Date in the past header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ; // always modified header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ; // HTTP/1.1 header('Cache-Control: no-store, no-cache, must-revalidate') ; header('Cache-Control: post-check=0, pre-check=0', false) ; // HTTP/1.0 header('Pragma: no-cache') ; // Set the response format. header( 'Content-Type:text/xml; charset=utf-8' ) ; CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ; // Execute the required command. if ($sResourceType == "Image") { $sResourceType = "Images"; } switch ( $sCommand ) { case 'GetFolders' : GetFolders( $sResourceType, $sCurrentFolder ) ; break ; case 'GetFoldersAndFiles' : GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ; break ; case 'CreateFolder' : CreateFolder( $sResourceType, $sCurrentFolder ) ; break ; } CreateXmlFooter() ; exit ; }
Maintenant, il n'ouvre même plus le popup affichant le contenu du dossier... pas de panique !! on va y arriver...
Est-ce que je devrais pas remettre les fichiers config.php et connector.php d'origine ?? pour être sûr de repartir sur de bonnes bases !
lol direct apres le repas c'est pas forcément mieux que juste avant ^^.
Bon sinon oui le mieux reprends tout a l'initiale quand il te créait le dossier Image, et remplace juste le code de la fonction pour voir.
C'est parti !!!
C'est bien moi ça, je lance une idée, et maintenant, il faut que je galère pour retrouver mes sources...
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager