Code Monkey home page Code Monkey logo

fmelfinderbundle's Introduction

FMElfinderBundle

ElFinder integration in Symfony

Code Quality Assurance

Proudly developed with PhpStorm

Tests Coverage License Version
Tests - Linux Coverage Status Software License Latest Stable Version
Downloads
Total Downloads

elFinder is an open-source file manager for web, written in JavaScript using jQuery UI. Creation is inspired by simplicity and convenience of Finder program used in Mac OS X operating system.

Recommended bundles to use with:

FMTinyMCEBundle FOSCKEditorBundle TrsteelCkeditorBundle FMSummernoteBundle
FMTinyMCEBundle FOSCKEditorBundle TrsteelCkeditorBundle FMSummernoteBundle

Table of contents

Installation

Step 1: Installation

For Symfony Flex installation you need to enable community recipes:

  composer config extra.symfony.allow-contrib true

Install

  composer require helios-ag/fm-elfinder-bundle

Copy elfinder assets to public folder

  bin/console elfinder:install

Step 2: Enable the bundle (Optional)

Enable the bundle in the kernel (not needed with symfony flex):

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new FM\ElfinderBundle\FMElfinderBundle(),
    );
}

Step 3: Import FMElfinderBundle routing file

# app/config/routing.yaml
elfinder:
     resource: "@FMElfinderBundle/Resources/config/routing.yaml"

Step 4: Configure your application's security.yaml

Secure ElFinder with access_control:

# app/config/security.yaml
security:

    //....
    access_control:
        - { path: ^/efconnect, role: ROLE_USER }
        - { path: ^/elfinder, role: ROLE_USER }

Basic configuration

Add configuration options to your config.yaml

fm_elfinder:
    #assets_path: / # default is /assets, this is where css/js elfinder files are
    instances:
        default:
            locale: '%locale%' # defaults to current request locale
            editor: ckeditor # other options are tinymce, tinymce4, fm_tinymce, form, simple, custom
            relative_path: false #default true, will produce absolute urls to specified file(s)
            #editor_template: custom template for your editor # default null
            #path_prefix: / # for setting custom assets path prefix, useful for non vhost configurations, i.e. http://127.0.0.1/mysite/
            #fullscreen: true|false # default is true, applies to simple and ckeditor editors
            #theme: smoothness # jquery theme, default is 'smoothness'
            #visible_mime_types: ['image/png', 'image/jpg', 'image/jpeg'] # only show these mime types, defaults to show all
            connector:
                #debug: true|false # defaults to false
                roots:       # at least one root must be defined, defines root filemanager directories
                    uploads:
                        #show_hidden: true|false # defaults to false, hides dotfiles
                        driver: LocalFileSystem
                        path: uploads
                        upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
                        upload_deny: ['all']
                        upload_max_size: 2M # also file upload sizes restricted in php.ini
                        #attributes: example of setting attributes permission
                        #    - { pattern: '/(.*?)/', read: true, write: false, locked: true }
  • default - instance of elfinder, can be used to define multiple configurations of ElFinder, allows simultaneous configuration for different types of WYSIWYG editors in your project
  • path - define root directory for the files inside web/ directory, default is "uploads". Make sure to set proper write/read and owner permissions to this directory.
  • url - url to be prefixed to image path, for displaying. Can be either absolute or relative. If absolute, you can use {homeFolder} string as placeholder which will be replaced automatically. If relative, it will be prefixed with the applications base-url. If left blank, url will be the base-url, append with the value of the 'path' parameter
  • driver - can be LocalFileSystem, FTP or MySQL, Flysystem, S3 and etc, check class FM\ElfinderBundle\DependencyInjection\Configuration
  • locale - locale determines, which language, ElFinder will use, to translate user interface, default is current request locale
  • cors_support - allows cross domain responses handling (default false)
  • editor - determines what template to render, to be compatible with WYSIWYG web editor, currently supported options are: "ckeditor" (to use with FOSCKEditorBundle or TrsteelCkeditorBundle), "fm_tinymce" for tinymce4 (to use with FMTinyMCEBundle), "form" for form type, "simple" for standalone and "custom" for custom template. How to configure CKEDitor and TinyMCE to work with this bundle, will be explained further in this document.
  • editor_template - define template to render when editor is set to "custom".
  • connector - root node for defining options for elfinder root directories.
  • roots - define "virtual directories" that reflect directories in your project.
  • path_prefix - path prefix with relative_path enabled, default is slash ('/')
  • show_hidden - show files and folders that starts from . (dot)
  • driver - driver type, LocalFileSystem, Dropbox, FTP
  • volume_id - (optional) can be used to force a volume id when mounting volume (default auto-increments). If provided, it must be an integer bigger than 0.
  • alias - directory alias
  • path - directory that contains files
  • upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
  • upload_deny: ['all']
  • upload_max_size: 2M

You can see the full list of roots options here. To use them, convert camelCased option name to snake_case name.

Use multiple upload folder by instance

You can set multiple upload root folder by instance configuration.

If you have configured your instance with /uploads path, you can provide an additional folder as a home folder (e.g. for a multi-users application) when accessing to the instance URL :

/elfinder/{instance}/{homeFolder} or /efconnect/{instance}/{homeFolder}

For example, accessing to /elfinder/acmeInstance/bob URL will open up elfinder with /uploads/bob as root directory which only contains Bob's files.

Then, accessing to /elfinder/acmeInstance/alice URL will re-use your instance, but open up elfinder with /uploads/alice folder as root directory, containing only Alice's files.

To use this feature, you must provide the instance name in the URL, and of course be sure to set proper write/read permissions on home folders.

Note: this feature is only available with LocalFileSystem driver.

If I want more one home folder is possible ?

Yes you can with this configuration in your fm_elfinder.yaml

where_is_multi:
    {connector}: {index of the connector}
multi_home_folder: true
folder_separator: {one char other of /}

Example

fm_elfinder:
    instances:
        default:
            locale: fr # defaults to current request locale
            editor: ckeditor # other options are tinymce, tinymce4, fm_tinymce, form, simple, custom
            #editor_template: custom template for your editor # default null
            #path_prefix: http://localhost/ # for setting custom assets path prefix, useful for non vhost configurations, i.e. http://127.0.0.1/mysite/
            fullscreen: false # default is true, applies to simple and ckeditor editors
            where_is_multi:
                roots: 0
            multi_home_folder: true
            folder_separator: "|"
            #theme: smoothness # jquery theme, default is 'smoothness'
            #visible_mime_types: ['image/png', 'image/jpg', 'image/jpeg'] # only show these mime types, defaults to show all
            connector:
                #debug: true|false # defaults to false
                roots:       # at least one root must be defined, defines root filemanager directories
                    uploads:
                        #show_hidden: true|false # defaults to false, hides dotfiles
                        driver: LocalFileSystem
                        path: "/var"
                        alias: Bibliothèque générale
                        upload_allow: ['all']
                        #upload_deny: ['all']
                        upload_max_size: 500M # also file upload sizes restricted in php.ini
                        attributes:
                            - {pattern: '..', read: true, write: true, locked: false}
                        #attributes: example of setting attributes permission
                        #    - { pattern: '/(.*?)/', read: true, write: false, locked: true }

fmelfinderbundle's People

Contributors

bobvandevijver avatar danut007ro avatar dependabot[bot] avatar devantoine avatar dlancea avatar gregwar avatar hason avatar helios-ag avatar jdecool avatar johjohan avatar jontjs avatar kix avatar lexxpavlov avatar napestershine avatar nursultanturdaliev avatar phpmike avatar pilip avatar qdequippe avatar rdohms avatar rehoehle avatar remmel avatar ronan-lenor avatar rsantellan avatar snamor avatar thibmonier avatar ulrichhp avatar vkalmuk avatar wouterb avatar zeno-ce avatar zorn-v avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fmelfinderbundle's Issues

unable to add symfony service as a volume driver

Hi,

My config:

fm_elfinder:
    instances:
        default_phpcr:
            connector:
                roots:
                    media:
                        driver: cmf_media.adapter.elfinder.phpcr_driver

Getting the error:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]                                                                                             
  Invalid configuration for path "fm_elfinder.instances.default_phpcr.connector.roots.media.driver": Invalid filesystem driver ""cmf_media.adapter.elfinder.phpcr_driver"" 

So it looks like it doesn't pass configuration validation in DependencyInjection\Configuration:

->scalarNode('driver')
    ->isRequired()
    ->validate()
    ->ifNotInArray(array('LocalFileSystem', 'FTP', 'FTPIIS', 'Dropbox', 'S3'))
       ->thenInvalid('Invalid filesystem driver "%s"')
    ->end()

If i'm not missing something then there's no way to implement custom driver at the moment until this validation exists or it is not altered in some way (issue exists only in version 2.*)

typo? in docs - step 3

Step 3: Import FMElfinderBundle routing file

app/config/routing.yml

elfinder:

should be:
fm_elfinder:

S3 integration

Most of the big website using s3 for static content. So can you help me in integration s3 with FMELfinderBundle

Customizing Elfinder form

I've added FMElfinderBundle to IvoryCKEditorBundle with apparent success. As can be seen in the image below, there are quite a few gray buttons and only a few active buttons once one gets to Elfinder. (Each of the gray buttons includes the class ui-disabled.)

How can I present a display that shows only the active buttons as well as add at least a select button? A more complete example of a custom configuration class might be helpful. (For example, it is not clear to me what is intended by arguments: ["%my_arguments%"] when building the service.)

The following has no impact on the display:


namespace Truckee\MatchingBundle\Tools;

use FM\ElfinderBundle\Model\ElFinderConfigurationProviderInterface;

/**
 * Description of ElfinderConfigurator
 */
class ElfinderConfigurator implements ElFinderConfigurationProviderInterface
{

    public function getConfiguration($instance)
    {
        return ['commands' => [
            'open', 'reload', 'getfile', 'quicklook',
            'download',  'upload', 'copy',
            'extract', 'archive', 'search', 'info', 'view', 'help',
            'resize', 'sort'
        ]];
    }

}

services

    elfinder_configurator:
        class:        Truckee\MatchingBundle\Tools\ElfinderConfigurator

fmelfinder

Standalone filebrowser

Hi,

Great work, CKEditor integration is amazing.
But i would like adding a standalone button that can open ElFinder and after use the getFileCallBack to put the path in a input type "text".

A try find this information in your wiki but i didn't.
Is it possible to do ? I will be great.

no _popup.js in STFalconTinyMCE public resources

fm_elfinder:
editor: tinymce
tinymce_popup_path: "asset[bundles/stfalcontinymce/vendor/tiny_mce/tiny_mce_popup.js]"

with latest version of stfalcontinymce (for TinyMCE version 4) there is no _popup.js file to reference ...

I'll keep on trying, since I have stfalcontinymce working, and just need to get an image uploader working to complete my current project ...

Problems with dump assets image path and CSSEMBED

Related with the Issue #25

Hi friends,

I try to install the 1.2 version and I have problem dumping the assets:

 [Assetic\Exception\FilterException]                                          
  An error occurred while running:                                             
  '/usr/bin/java' '-jar' '/home/samsung/vhosts/project/app/Resources/java  
  /cssembed-0.4.5.jar' '--charset' 'UTF-8' '--root' '/home/samsung/vhosts/  
  project/app/../web/bundles/fmelfinder/css' '/tmp/assetic_cssembedKje4wF'    

  Error Output:                                                                
  [ERROR] /home/samsung/vhosts/project/app/../web/bundles/fmelfinder/css/  
  ../../../../bundles/fmelfinder/img/crop.gif (No existe el archivo o el dire  
  ctorio)            

The assets files are correctly installed at web directory, so it's probably problem with the relative path. I have configurated cssembed-0.4.5.jar because for twitter bootstrap bundle. If I disable the CSS embed the assets are correctly dumped.

Thanks!

Elfinder slow loading

hi,
I've installed the bundle as showned in docs. I began trying standlone mode. The page appears but it take many times to load.When i saw firebug, it tell that there is an error in jquery like "too much recursion in jquery 1.9.1.min".

Integration with Tinymce 4

Hi (sorry for my English)
I update TinyMCEBundle and now, when i click on the folder icon, i have an error : "TypeError: r is not a function" tinymce.jquery.min.js (ligne 8)
Thank

in Prod mode error 500

hi
just try in prod mode, and :

[2013-08-16 16:39:16] request.INFO: Matched route "elfinder" (parameters: "_controller": "FM\ElfinderBundle\Controller\ElfinderController::showAction", "_locale": "en", "_route": "elfinder") [] []

in the debug route there are there?
i have to said all work well on dev mode.

ps: i m on windows7 and assetic is not working well.

thank

RangeError when loading elfinder

I'm having a strange error when trying to use the ELFinder and i'm not fully sure if it is relatied to the Bundle or ELFinder itself.

Anyway, when im trying to load finder im receiving after the api calls the following error from the compressed ElFinder javascript file:

RangeError {} main_elfinder.min_3.js:9
Uncaught RangeError: Maximum call stack size exceeded
p.extend.camelCase
p.extend.css
ca
p.cssHooks.(anonymous function).get
p.extend.css
(anonymous function)
p.extend.access
p.fn.(anonymous function)
(anonymous function)
p.extend.each
p.fn.p.each
(anonymous function)
p.event.dispatch
g.handle.h
p.event.trigger
(anonymous function)
p.extend.each
p.fn.p.each
p.fn.extend.trigger
p.fn.(anonymous function)
(anonymous function)
p.event.dispatch
g.handle.h
p.event.trigger
(anonymous function)
p.extend.each
p.fn.p.each
p.fn.extend.trigger
p.fn.(anonymous function)
(anonymous function)
p.event.dispatch
g.handle.h
p.event.trigger
(anonymous function)
p.extend.each
p.fn.p.each
p.fn.extend.trigger
p.fn.(anonymous function)
(anonymous function)
p.event.dispatch
g.handle.h
p.event.trigger
(anonymous function)
p.extend.each
p.fn.p.each
p.fn.extend.trigger
p.fn.(anonymous function)
(anonymous function)
p.event.dispatch
g.handle.h
etc....

Since it happens on line 9, which is the first line of code in the JS file im not able to debug the script itself. So before compressing a ELFinder version myself i was wondering if im the only one...

Thanks in advance!

Standalone filebrowser usage

Tried the solution in #13, but js doesn't seem to be able to find elfinder function:
Uncaught TypeError: Object [object Object] has no method 'elfinder'

And how does the standalone work exactly? I need it to be available in tinyMCE and as a standalone as well. Is this possible?

Im using Symfony 2.2 with Sonata Admin Bundle, stfalcon's TinymceBundle.

Image absolute/relative path

When I use elFinder with tinyMCE in my backend, everything seems to work..
Except I noticed (in my database) that the image path is saved as relative. So I've got something like ./../../..//upload/article/image.jpg when I expected something like /upload/article/image.jpg (mainly for the frontend : I don't want/need a relative path).
How can I do that ?
By the way I'm not using assetic.

Here is my config.yml :

    locale: %locale% # defaults to current request locale
    editor: tinymce4 # other choices are tinymce or simple
    showhidden: false # defaults to false
    fullscreen: true # defaults true, applies to simple and ckeditor editors
    include_assets: true # disable if you want to handle loading of the javascript and css assets yourself
    compression: false # enable if you configured the uglifycss and uglifyjs2 assetic filters and want compression
    connector:
        debug: false # defaults to false
        roots:       # at least one root must be defined
            uploads:
                driver: LocalFileSystem
                path: upload/article
                upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
                upload_deny: ['all']
                upload_max_size: 2M
                url: /upload/article```

BC between 2.5 and 2.5.1

 Declaration of XXX\XXXBundle\Controller\ElfinderController::showAction() should be compatible with FM\ElfinderBundle\Controller\ElFinderController::showAction(Symfony\Component\HttpFoundation\Request $request, $instance) in /var/www/xxx/vendor/yyyy/admin-bundle/xxxx/yyyyBundle/Controller/ElfinderController.php line 99

Imo, when you break your public api, you should update the major version...

Change of image URL

Hi,

I have a problem with the image URL. I've defined my conf.yml like this :

fm_elfinder:
instances:
default:
editor: tinymce4
connector:
roots:
uploads:
driver: LocalFileSystem
path: uploads

When I add a new image, its URL is well http://www.mydomain.com/web/uploads/mypicture.jpg.
But after confirmation, the url changes to be something like "../../../uploads/mypicture.png", and when I want to see the page, the image is not displayed.

I've tried to add the option :

url : http://www.mydomain.com/web/uploads

but that doesn't work either.

Do you know where is the problem ?

Thank you,

Upload file window

Guys, seems there is a problem here. When i try to upload in dev mode, it works (/app_dev.php)... but in production - it doesn't ( the page stucks.

Dependency error

There seems to be a problem with the dependency on the base FMELFinder package. It is not installable under a default composer.json. Probably because it depends on a dev version and Composer now defaults to using only tagged releases.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for helios-ag/fm-elfinder-bundle dev-master -> satisfiable by helios-ag/fm-elfinder-bundle dev-master.
    - helios-ag/fm-elfinder-bundle dev-master requires helios-ag/fm-elfinder 2.x-dev -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Standalone elfinder

I implemented elfinder with CKEditor and it works fine.

But I also want a standalone button (Like #13 and #28 mentioned which were closed due to inactivity) which will open the elfinder window and after the user selects an image I can use that data to fill the text input field. (This happens on the same page with the ckeditor)

I took the code from the elrte (which was linked in #13 ) and added the path change:

<div id="finder_browse"></div>
<input type="text" id="image_test" />
<input type="button" id="openit" value="Odaberi" />

<script>
$().ready(function() {
    var opt = {
        url: '{{path('ef_connect')}}',
        lang: 'en',
        editorCallback: function (url)
            {
            document.getElementById('image_test').value = url;
            },
        closeOnEditorCallback: true,
        docked: false,
        dialog: { title: 'File Manager', height: 500 }
    };

    $('#openit').click(function (){
        $('#finder_browse').elfinder(opt);
        $('#finder_browse').elfinder($(this).attr('id'));
    })
});
</script>

But I'm getting the "TypeError: $(...).elfinder is not a function" error. Probably because the elfinder is instantiated only inside the ckeditor's iframe.

Which javascript files do I need to include to have elfinder?

Relative path in 'form' instance

I have a problem with FMElfinderBundle in form mode (editor: form). Path which is returned to my input field in that mode is relative ('upload_folder/file.jpg') what makes urls to my images improper. Is it possible to get the absolute path like in editor:ckeditor mode?

Assetic cssrewrite css image path

Something is wrong with the assetic cssrewrite.

All icons or images won't showed up.

Changed the cssrewrite in tthe view to ?cssrewrite works.

Configuration of elfinder path

Hi,

I wanted to know if it is possible to set different root path when I call the elfinder javascript method. It could very useful for me.

Can you help please?

Overriding FMElfinderLoader

Hi,
my issue is more a question than an issue...

How may I override FMElfinderLoader to use my own (I'd like to manager different folders for my users...) ?

Thanks :)

CSS generation with assetic

when dumping assets main.css file is created in the same directory as public/css files, on further calls it will dump all css plus main.css (and his parts).
You have to use another path for compiled css (like assectic/css/compiled) or list only css used.

{% stylesheets output='bundles/fmelfinder/css/main.css'
        '@FMElfinderBundle/Resources/public/css/*' filter='?yui_css' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}

liip image

hi thank for this bundle 👍
i wanted to know if it was possible to use Liipimage with FMElfinder.

Variable "fullscreen" does not exist and images not loading

Hi,

I have added these two lines:

"helios-ag/fm-elfinder-php-connector": "1.0",
"helios-ag/fm-elfinder-bundle": "dev-master"

in composer.json and run "composer update".

I then followed your configuration and I have a new browse icon next to my TinyMCE's field url.

But when I click on the icon to open the file manager, a new window pops with the following error:

Variable "fullscreen" does not exist in FMElfinderBundle:Elfinder:tinymce.html.twig at line 67

If I remove the if block from line 67 to 75 the error disappears and ELFinder shows up but I have no images loaded.

If I check the path in CSS it contains "app_dev.php" before "bundles".

Related issue: #18

Injecting Non existent Service Symfony <=2.3

Hi,
I upgrade helios-ag/fm-elfinder-bundle to 2.*@dev but i have an error when i do composer update with symfony 2.2.

The service "fm_elfinder.configurator.default" has a dependency on a non-existent service "request_stack".

According to this news, http://symfony.com/blog/new-in-symfony-2-4-the-request-stack, the service request stack was added in symfont version 2.4.
How can the 2.1 helios-ag/fm-elfinder-bundle can work with symfony < 2.4 ?

Thank you

config error - parse asset[bundles/stfalcontinymce/vendor/

Hi i put config from manual and get

Unable to parse at line 34 (near " tinymce_popup_path: "asset[bundles/stfalcontinymce/vendor/tiny_mce/tiny_mce_popup.js]

this is

editor: tinymce
tinymce_popup_path: "asset[bundles/stfalcontinymce/vendor/tiny_mce/tiny_mce_popup.js]"

asset[bundles/stfalcontinymce/vendor/tiny_mce/tiny_mce_popup.js] is syntax correct ?

  • ok i put :

fm_elfinder:
editor: tinymce4

and dont have parse error - but dont see editor when edit file - how to configure it ?

i try erid .html file or .txt file - dont have any error, and dont see tiny editor - only simple textarea editor.

Cannot rename files/folders

I am using this bundle and I have it working with upload and deletion but renaming always throws an error "Unable to rename 'filename'". It is the same with folders.

The json returned by /efconnect?mode=&cmd=rename&target=p1_c3R1ZmY&name=stuff2&_=1380131334714

is

{"error":["errRename","stuff"]

install error

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for helios-ag/fm-elfinder-bundle * -> satisfiable by
helios-ag/fm-elfinder-bundle dev-master.
- helios-ag/fm-elfinder-bundle dev-master requires helios-ag/elfinder * -> n
o matching package found.

so slow ?

hi and thank for this job.

i have one question my config : SF 2.3.3 -> IvoryCKEditorBundle master.

why it is so slow to open by click on ckeditor or stray by url to elfinder ?

thank

Missing icon images

I recently did a pull and now all the el_finder icon images don't load. I've done an assetic dump and it's not working for either dev or prod environments.

The CSS shows the image location as:

/assetic/css/compiled/fmelfinder/main_part_1_elfinder.min_1.css

.elfinder-button-icon {
   ...
   url('../../../../Resources/public/img/toolbar.png') no-repeat
}

Which causes the image URL to be http://domain.com/Resources/public/img/toolbar.png when it should be http://domain.com/bundles/fmelfinder/img/toolbar.png.

Any ideas?

There is no "uglifycss" filter

Hi all,

i'm using this version:

"helios-ag/fm-elfinder-bundle": "2.3.*"

for each deploy, i've these errors:

assetic.ERROR: The template "FMElfinderBundle:Elfinder/compressed:tinymce4.html.twig" contains an error: There is no "uglifycss" filter. [] []
assetic.ERROR: The template "FMElfinderBundle:Elfinder/compressed:simple.html.twig" contains an error: There is no "uglifycss" filter. [] []
assetic.ERROR: The template "FMElfinderBundle:Elfinder/compressed:tinymce.html.twig" contains an error: There is no "uglifycss" filter. [] []
assetic.ERROR: The template "FMElfinderBundle:Elfinder/compressed:ckeditor.html.twig" contains an error: There is no "uglifycss" filter. [] []

Now, it's true, "uglifycss" is not installed in my system, but i've used this configuation:

fm_elfinder:
    instances:
        default:
            compression: false

so, i don't wan't use this filter.

Anyone have this problem ?

Thank you.

Installation problem

Hello,

I followed the instructions but I have an error 500(from Apache).
If I remove the declaration of the bundle in the assetic section of config.yml, it works...

Below is the apache error.log:
malformed header from script. Bad header=jxcL2I+Nzk8XC90ZD48XC90cj5cbjx: app_dev.php

I really don't understand what is going on, it would be great if you can help!
Thank a lot, bye

Unrecognized options "instances" under "fm_elfinder"

When I'm trying "Basic configuration" step and add the following to my config.yml:

fm_elfinder:
instances:
default:
locale: %locale% # defaults to current request locale
editor: ckeditor # other choices are tinymce or simple
showhidden: false # defaults to false
fullscreen: true # defaults true, applies to simple and ckeditor editors
include_assets: true # disable if you want to handle loading of the javascript and css assets yourself
compression: false # enable if you configured the uglifycss and uglifyjs2 assetic filters and want compression
connector:
debug: false # defaults to false
roots: # at least one root must be defined
uploads:
driver: LocalFileSystem
path: uploads
upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
upload_deny: ['all']
upload_max_size: 2M

then I get the following error: Unrecognized options "instances" under "fm_elfinder".

What am I doing wrong?

DataFixtures error?

I've created a project with this bundle as a dependency.

Then I run php app/console doctrine:schema:create -> OK
Then php app/console doctrine:fixtures:load -> ERROR

[Doctrine\DBAL\DBALException]
An exception occurred while executing 'INSERT INTO elfinder_file (parent_id, name, content, size, mtime, mime, read, write, locked, hidden, width, height) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [0, "DATABASE", "", 0, 0, "directory", 1, 1, 0, 0, 0, 0]:

And below another:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read, write, locked, hidden, width, height) VALUES (0, 'DATABASE', '', 0, 0, 'di' at line 1

Now, I have no idea why this does not work. I've opened MySql Workbench and run this query:

INSERT INTO prognozy_demo.elfinder_file (id, parent_id, name, content, size, mtime, mime, read, write, locked, hidden, width, height)
VALUES (1, 0, "DATABASE", "", 0, 0, "directory", 1, 1, 0, 0, 0, 0);

And it worked.

Also, I've tried commenting out the flush operation in LoadRootElement and run php app/console doctrine:fixtures:load again -> OK.

So.. it's something wrong with the ElFinderFile entity? Or the LoadRootElement fixture?

Elfinder form type in form type collection

Hello!

I added Elfinder form type to form type collection (accurately it was sonata_type_collection - extended collection form type from Sonata Admin Bundle).

->add('elfinder','elfinder', array('instance'=>'form', 'enable'=>true, 'mapped' => false))

Everything works except one thing.

For example, when I have 3 items in form collection, I get 3 different elfinder inputs - it's ok, but when I'm trying to add file by elfinder to only one elfinder input, this path file is added to every elfinder input.

Something like this:
clean_elfinder

And after upload one file:
dirty_elfinder

Is there a way to do something with this?

For this days, I will try to use jQuery to clean this inputs, which should be empty. When I clean them manually, insert to database is ok.

Feature Request: ability to inject the VolumeDriver as a Service

Hello, first let me thank you for this great bundle. As you suggested me, I'm opening this request so the 2.X version can have back again the ability to inject the VolumeDriver as a service with exists in version 1.5.

Current version only accepts as drivers 'LocalFileSystem', 'FTP', 'FTPIIS', 'Dropbox', 'S3', which sometimes need to be edited for custom needs and the only way to do this right know its to edit directly the class.

Thanks a lot.

Javascripts missing

Hello,
since the last update, when i use the assetic:dump command, the file "jquery-1.7.2.min" is missing.
I added it manually but now the file "jquery-ui-1.8.21.custom.min" is missing.

Bad asset URL

Hello,
i found an issue: the uploaded pictures path is wrong if the website is in a folder (so the image preview/open doesn't work).

In the file FMElFinderLoader.php, line 42,
i replaced:

'URL' => $request->getScheme() . '://' . $request->getHttpHost() . '/' . $path . '/',

by:

'URL' => $request->getScheme() . '://' . $request->getHttpHost() . $request->getBasePath() . '/' . $path . '/',

and it's working fine now.

assetic generation path

it would be cool if the path where assetic is to generate the js and stylesheet would be optional. or maybe simply offer an option if the js and stylesheet should be included at all, so that i can also add them to my own asset list and combine with the other assets and set that option to false.

/cc @chrootlogin

Hi

How can be opened by clicking on a button FMELfinderBundle ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.