All Projects → helios-ag → Fmelfinderbundle

helios-ag / Fmelfinderbundle

Licence: mit
📁 ElFinderBundle provides ElFinder integration with TinyMCE, CKEditor, Summernote editors

Projects that are alternatives of or similar to Fmelfinderbundle

Filemanagerbundle
FileManager is a simple Multilingual File Manager Bundle for Symfony
Stars: ✭ 105 (-54.55%)
Mutual labels:  bundle, symfony, symfony-bundle, tinymce
Sonatanewsbundle
Symfony SonataNewsBundle
Stars: ✭ 153 (-33.77%)
Mutual labels:  bundle, symfony, symfony-bundle
Sonatapagebundle
This bundle provides a Site and Page management through container and block services
Stars: ✭ 181 (-21.65%)
Mutual labels:  bundle, symfony, symfony-bundle
Debug Bundle
The DebugBundle allows greater integration of the VarDumper component in the Symfony full-stack framework.
Stars: ✭ 2,033 (+780.09%)
Mutual labels:  bundle, symfony, symfony-bundle
Sonatanotificationbundle
Symfony SonataNotificationBundle
Stars: ✭ 136 (-41.13%)
Mutual labels:  bundle, symfony, symfony-bundle
Consolebundle
Commandline interface in browser for Symfony2
Stars: ✭ 138 (-40.26%)
Mutual labels:  bundle, symfony, symfony-bundle
Mercure Bundle
The MercureBundle allows to easily push updates to web browsers and other HTTP clients in the Symfony full-stack framework, using the Mercure protocol.
Stars: ✭ 195 (-15.58%)
Mutual labels:  bundle, symfony, symfony-bundle
Swiftmailer Bundle
Symfony Swiftmailer Bundle
Stars: ✭ 1,558 (+574.46%)
Mutual labels:  bundle, symfony, symfony-bundle
Sonataadminbundle
The missing Symfony Admin Generator
Stars: ✭ 2,039 (+782.68%)
Mutual labels:  bundle, symfony, symfony-bundle
Liiphellobundle
[DEPRECATED] Alternative Hello World Bundle for Symfony2 using several FriendsOfSymfony Bundles
Stars: ✭ 206 (-10.82%)
Mutual labels:  bundle, symfony, symfony-bundle
Lexikjwtauthenticationbundle
JWT authentication for your Symfony API
Stars: ✭ 2,184 (+845.45%)
Mutual labels:  bundle, symfony, symfony-bundle
Sonataintlbundle
Symfony SonataIntlBundle
Stars: ✭ 212 (-8.23%)
Mutual labels:  bundle, symfony, symfony-bundle
Webpack Bundle
Bundle to Integrate Webpack into Symfony
Stars: ✭ 124 (-46.32%)
Mutual labels:  bundle, symfony, symfony-bundle
Web Profiler Bundle
The WebProfilerBundle provides detailed technical information about each request execution and displays it in both the web debug toolbar and the profiler.
Stars: ✭ 1,905 (+724.68%)
Mutual labels:  bundle, symfony, symfony-bundle
Passwordstrengthbundle
Symfony Password strength and blacklisting validator bundle
Stars: ✭ 123 (-46.75%)
Mutual labels:  bundle, symfony, symfony-bundle
Craueconfigbundle
Database-stored settings made available via a service for your Symfony project.
Stars: ✭ 154 (-33.33%)
Mutual labels:  bundle, symfony, symfony-bundle
Victoire
Fullstack Symfony CMS: The perfect mix between a framework and a CMS
Stars: ✭ 227 (-1.73%)
Mutual labels:  bundle, symfony, symfony-bundle
Nelmiocorsbundle
The NelmioCorsBundle allows you to send Cross-Origin Resource Sharing headers with ACL-style per-URL configuration.
Stars: ✭ 1,615 (+599.13%)
Mutual labels:  bundle, symfony, symfony-bundle
Vichuploaderbundle
A simple Symfony bundle to ease file uploads with ORM entities and ODM documents.
Stars: ✭ 1,613 (+598.27%)
Mutual labels:  bundle, symfony, symfony-bundle
Nelmioapidocbundle
Generates documentation for your REST API from annotations
Stars: ✭ 2,009 (+769.7%)
Mutual labels:  bundle, symfony, symfony-bundle

FMElfinderBundle

ElFinder integration in Symfony

Code Quality Assurance

SL Insight TravisCI Coverage License Version
SensioLabsInsight Build Status 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 }

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].