can not connect to elfinder

Added by Josef Koller 5 months ago

Hello,

I found elRTE and it's a great tool. After minutes it was installed.

The editor works, but I have problems with elfinder option. I think I have not understand the concept.

I have the following entries in my index.php:

---- head section -----

<!DOCTYPE html>
<html>  
  <head>
    ...
    <link type="text/css" href="../jquery/css/custom-theme-blue/jquery-ui-1.8.16.custom.css" rel="stylesheet" >
    <link rel="stylesheet" href="../elrte-1.3/css/elrte.full.css" type="text/css" media="screen" charset="utf-8">
    <script type="text/javascript" src="../jquery/development-bundle/jquery-1.6.2.js" charset="utf-8"></script>
    <script type="text/javascript" src="../jquery/development-bundle/ui/jquery-ui-1.8.16.custom.js" charset="utf-8"></script>
    <script type="text/javascript" src="../elrte-1.3/js/elrte.full.js" charset="utf-8"></script>
    <script type="text/javascript" src="../elrte-1.3/js/i18n/elrte.de.js" charset="utf-8"></script>
    ...
  </head>

---- body section -----

...
<div id="myelfinder"></div>
</body>
</html>

in my javascript-file I have the following text:

$(document).ready(function(){

var opts = {
    lang         : 'de',   // set your language
    styleWithCSS : false,
    height       : 400,
    width         : 800,
    toolbar      : 'maxi',
    fmAllow         : true,
    fmOpen       : function(callback){
    $('#myelfinder').elfinder({
    //$('<div id="myelfinder" />').elfinder({
        url : '../elrte-1.3/connectors/php/connector.php',
        lang : 'de',
        dialog : { width : 900, modal : true, title : 'Files' }, // open in dialog window
        closeOnEditorCallback : true, // close after file select
        editorCallback : callback     // pass callback to file manager
        })
    } 
};
// create editor
$('#textarea-notizbuch').elrte(opts);

The text in the connector.php:

<?php
$opts = array(
    'root'            => '../../../uploads/images',                       // path to root directory
    'URL'             => 'http://localhost/uploads/images/', // root directory URL
    'rootAlias'       => 'Home',       // display this instead of root directory name
    'uploadAllow'   => array('images/*'),
    'uploadDeny'    => array('txt'),
    'uploadOrder'   => 'deny,allow',
    'dotFiles'     => false,        // display dot files
    'tmbDir'       => '_tmb',       // directory name for image thumbnails. Set to "" to avoid thumbnails generation
    'defaults'     => array(        // default permisions
        'read'   => true,
        'write'  => true,
        'rm'     => true
        ),
);
?>

After clicking to the button with the "dir-open-image" I get the following error in firebug:

$("#myelfinder").elfinder is not a function
[Bei diesem Fehler anhalten] editorCallback : callback // pass callback to file manager

What's wrong in my statement's?

Thank you.

Josef


Replies (2)

RE: can not connect to elfinder - Added by Troex Nevelin 5 months ago

elRTE and elFinder are separate products, you have included only elRTE but not elFinder. Follow instructions on elFinder wiki http://elrte.org/redmine/projects/elfinder/wiki

Download http://elrte.org/elfinder

RE: can not connect to elfinder - Added by Josef Koller 5 months ago

many thanks.

Josef

(1-2/2)