integrate elfinder in my web-site
Added by christophe loza over 1 year ago
Hello from france,
I'm a beginner..and :
I don't manage to integrate elfinder, the demo'source doesn't help me neither the wicki
So
my web site is http://www.mysite.fr/index.php
I put all elfinder scripts in http://www.mysite.fr/scripts/elfinder-1.1/
All files I want to read with elfinder are in http://www.mysite.fr/scripts/elfinder-1.1/files/
In index.php I put this part:
<head>
<script src="scripts/elfinder-1.1/js/jquery-1.4.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="scripts/elfinder-1.1/js/jquery-ui-1.7.2.custom.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="scripts/elfinder-1.1/js/ui-themes/base/ui.all.css" type="text/css" media="screen" charset="utf-8">
<script src="scripts/elfinder-1.1/js/elfinder.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="scripts/elfinder-1.1/css/elfinder.css" type="text/css" media="screen" charset="utf-8">
<script type="text/javascript" charset="utf-8">
$(document).ready({
$('#finder').elfinder({
url : 'http://www.mysite.fr/scripts/elfinder-1.1/connectors/php/connector.php',
lang : 'fr'
});
});
</script>
</head>
<body> <div id=#finder></div>
</body>
In the connector.php file, how fill these lines : root and url ?
$opts = array(
'root' => '/../../files', // path to root directory
'URL' => 'http://www.mysite.fr/scripts/elfinder-1.1/files', // root directory URL
Thanks a lot for any help !
Replies (24)
RE: integrate elfinder in my web-site
-
Added by Dmitry Levashov over 1 year ago
christophe loza wrote:
In the connector.php file, how fill these lines : root and url ? $opts = array( 'root' => '/../../files', // path to root directory 'URL' => 'http://www.mysite.fr/scripts/elfinder-1.1/files', // root directory URL
What error you got? Need more details
Try to set "root" as absolute path
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
Sorry I don't know how to get the error. I've only a blank page between <body> </body>
Maybe the problem comes from the directories..
If my site is http://www.mysite.fr/ what is the root and url directory ?
Thanks
RE: integrate elfinder in my web-site
-
Added by Dmitry Levashov over 1 year ago
Empty page?
Use firebug in firefox browser to check included js and css files first
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
done its'ok, it's just blank beween <div id="finder"> </div>
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
Is that correct (from the connector.php)?
$opts = array(
'root' => '/../../files', // path to root directory
'URL' => 'http://www.mysite.fr/scripts/elfinder-1.1/files' // root directory URL
);
RE: integrate elfinder in my web-site
-
Added by Dmitry Levashov over 1 year ago
I see :)
div id=#finder></div>
is absolutely wrong!
div id="finder"></div>
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
Thanks but i correct it and it don't work
with debugbar I've this :
Ligne: 38
Caractère: 7
Code: 0
Message d'erreur: Expected ':'
It correspond to the line $('#finder').elfinder({
RE: integrate elfinder in my web-site
-
Added by Dmitry Levashov over 1 year ago
Another error
Please, read carefully example in elrte distr and doc on jQuery.ready function!
$().ready( function() {
$("#elfinder") .... etc
} )
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
Thank but.. it don't work, is that correct?
<script type="text/javascript">
$().ready( function() {
$('#finder').elfinder({
url : 'http://www.mysite.fr/scripts/elfinder-1.1/connectors/php/connector.php',
lang : 'fr'
} )
</script>
and the options
$opts = array(
'root' => '/../../files',
'URL' => 'http://www.mysite.fr/scripts/elfinder-1.1/files'
);
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
It work I forget one }) at the end !
Thank a lot and sorry for that
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
I've just a small problem, I've the message Invalid backend configuration!
Do you know where it come from ?
After that I stop annoying you anymore.. ;)
Thanks
RE: integrate elfinder in my web-site
-
Added by Dmitry Levashov over 1 year ago
This message - from connector
See firebug for server response
RE: integrate elfinder in my web-site
-
Added by Dmitry Levashov over 1 year ago
check php version(must be 5), root path and JSON module for php
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
Thank you
(From mimedetect : 500 Internal Server Error)
I don't know how define the root path..
RE: integrate elfinder in my web-site
-
Added by Dmitry Levashov over 1 year ago
Try add to connector options
'mimeDetect' => 'internal',
On what os and webserver you run elfinder?
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
I try on ubuntu and windows. My host has php5 (free-h.org).
Sorry Is 'root'=> '/scripts/elfinder-1.1/files', correct?
RE: integrate elfinder in my web-site
-
Added by Dmitry Levashov over 1 year ago
Is 'root'=> '/scripts/elfinder-1.1/files', correct?
No, set or correct relative path, like
'/../../files'
or path from system root, like
/users/dio/sites/my_site/files
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
Hi,
Evereythings works well.. thanks.
But I 've one more question : when I create folders or when I upload files. How to get them physically on the ftp server of my host?
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
Euh...Sorry, it works vell as well
Bye
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
Hello,
I try the french translation elrte.fr.js.
I put the include in the head : <script type="text/javascript" src="scripts/elfinder-1.1/js/i18n/elrte.fr.js" ></script>
I get this message from firebug at this line in elrte.fr.js : elRTE.prototype.i18Messages.fr = {
error : " elRTE is not defined "
I think I miss something important again..
RE: integrate elfinder in my web-site
-
Added by Dmitry Levashov over 1 year ago
You MUST include translation file AFTER elrte.js
RE: integrate elfinder in my web-site
-
Added by christophe loza over 1 year ago
Sorry I made a confusion between ELRte and elfinder.
So I translate elfinder.es in elfinder.fr
(I do not translate some errors like "Invalid backup config" which could be better to stay in english)
(Some accentuation in french do not work with some message of elfinder (even in replacing é with é), so sometimes I do not accentuate)
Hope it will be useful!
bye
elfinder.fr.js (10.9 kB)
RE: integrate elfinder in my web-site
-
Added by Dmitry Levashov over 1 year ago
Thanks for your help, but we already have french translation :) #204
(1-24/24)