2017 © Pedro Peláez
 

symfony-bundle roxyfileman-bundle

Provides a Roxyfileman integration for your Symfony2 Project, mainly for ckeditor and tinymce.

image

elendev/roxyfileman-bundle

Provides a Roxyfileman integration for your Symfony2 Project, mainly for ckeditor and tinymce.

  • Sunday, March 11, 2018
  • by Elendev
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2,558 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 5 Versions
  • 22 % Grown

The README.md

README

The bundle provide a Roxyfileman integration for Symfony2. It works well with IvoryCKEditorBundle., (*1)

Documentation

  1. Installation
  2. Configuration
    1. File location configuration
    2. Roxyfileman configuration
    3. Multiple profiles
  3. Advanced customization
    1. Custom filesystem service
    2. Custom version of Roxyfileman
  4. LICENSE

Installation

Require the bundle in your composer.json file:, (*2)

``` json { "require": { "elendev/roxyfileman-bundle": "~1.0" } }, (*3)


Register the bundle : ``` php // app/AppKernel.php public function registerBundles() { return array( new Elendev\RoxyFilemanBundle\ElendevRoxyFilemanBundle(), // ... ); }

Update composer :, (*4)

    $ composer update

Import the bundle's routes to your routing configuration file, e.g. routing.yml:, (*5)

ElendevRoxyFilemanBundle:
    resource: "@ElendevRoxyFilemanBundle/Resources/config/routing.yml"
    prefix:   /elendev-roxyfileman

The prefix can be changed. You can also add the path to the firewall to have the file manager service protected., (*6)

Configuration

RoxyFilemanBundle provide a simple configuration., (*7)

File location configuration

If you use the default LocalFileSystem (recommanded), this is the required configuration :, (*8)

``` yaml elendev_roxy_fileman: local_file_system: base_path: /path/to/your/file base_url: /url/to/the/base/path, (*9)


The `base_path` parameter should be absolute. The `base_url` parameter is appended to the file name / relative file path to create its url. The `LocalFileSystem` is used to access to a certain directory in the local file system. If you want to serve file from a distant server or located in database, you can take a look at the [Custom filesystem service](#custom-filesystem-service) section. ### Roxyfileman configuration Every configuration options are available on the [Roxyfileman configuration page](http://www.roxyfileman.com/install). ``` yaml elendev_roxy_fileman: conf: dirlist_route: elendev_roxyfileman_dir_list files_root: ...

The parameters have to be in lowercase. Be careful : every url parameter available on the Roxyfileman configuration page should be used as a route here and the parameter have to be postfixed by _route. For example : the parameter DIRLIST becomes dirlist_route., (*10)

Multiple profiles

Above shows how the bundle work in single profile mode. Occasionally, you may need different file manager instances to manage different directories - imagine a CMS with a "album" and a "blog" module, and you don't want the "album" administrator to touch the files in the "blog" module. This is possible by telling the bundle to operate in multi-profile mode. Here's how:, (*11)

``` yaml elendev_roxy_fileman: profiles: # Triggers multi-profile mode album: # Name of the profile local_file_system: base_path: /path/to/album/directory base_url: /web/album/directory conf: integration: tinymce4 blog: local_file_system: base_path: /path/to/blog/directory base_url: /web/blog/directory conf: integration: tinymce4, (*12)


Now we have two profiles defined, each with its own base path, URL settings, and configuration options. The bundle needs to know which profile it should work on when its certain URL is accessed. One way is to add the `profile` placeholder to the routing config: ``` yaml ElendevRoxyFilemanBundle: resource: "@ElendevRoxyFilemanBundle/Resources/config/routing.yml" prefix: /elendev-roxyfileman/{profile} requirements: profile: blog|album

Note: When profiles is not empty, the bundle will operate in multi-profile mode. conf, local_file_system and file_system_service_id values defined in the root configuration will be ignored., (*13)

Integration with rich text editor (CKEditor)

The original index path /fileman/index.html is served by the route elendev_roxyfileman_index in this bundle, and is what you need to integrate with rich text editors like CKEditor. For example:, (*14)

<script> 
$(function(){
   CKEDITOR.replace( 'editor1', {
        // Single profile mode
        filebrowserBrowseUrl: '{{ path('elendev_roxyfileman_index') }}',
        // To specify the profile name in multi-profile mode:
        // filebrowserBrowseUrl: '{{ path('elendev_roxyfileman_index', { 'profile': 'blog' }) }}',
        filebrowserImageBrowseUrl: '{{ path('elendev_roxyfileman_index') }}?type=image',
        removeDialogTabs: 'link:upload;image:upload'
   }); 
});
 </script>

Using this bundle with egeloen/IvoryCKEditorBundle is really simple, a small modification to the ivory_ck_editor configuration do the job :, (*15)

ivory_ck_editor:
    default_config: default
    configs:
        default:
            filebrowserBrowseRoute: elendev_roxyfileman_index

Advanced customization

Custom filesystem service

The filesystem service represent a file system for Roxyfileman. It is capable of serving files, file and directory trees, do operations on directories and files, ... You can create a custom filesystem service by implementing the Elendev\RoxyFilemanBundle\FileSystem\FileSystemInterface and provide it as a service to the elendev_roxy_fileman parameter., (*16)

``` yaml elendev_roxy_fileman: file_system_service_id: id_of_the_file_service, (*17)


### Custom version of Roxyfileman The bundle comes with a version of Roxyfileman library. If you want to use a custom version, you can specify the path to the directory containing the `index.html` file to the `roxyfileman_lib_path` parameter. ``` yaml elendev_roxy_fileman: roxyfileman_lib_path: /path/to/the/library

The library files are served by the Elendev\RoxyFilemanBundle\Controller\ResourcesController.php controller. It don't have to be publicly accessible., (*18)

LICENCE

The Elendev RoxyFileman BUndle is under the MIT license. For the full copyright and license information, please read the LICENSE file that was distributed with this source code., (*19)

A partial copy of Roxyfileman library is bundled with this bundle. The Roxyfileman library is under the GPLv3 license. A copy of the GPLv3 license was distributed with this source code., (*20)

The Versions

11/03 2018

dev-master

9999999-dev

Provides a Roxyfileman integration for your Symfony2 Project, mainly for ckeditor and tinymce.

  Sources   Download

MIT

The Requires

 

by Jonas Renaudot

ckeditor tinymce roxyfileman

11/03 2018

1.3.0

1.3.0.0

Provides a Roxyfileman integration for your Symfony2 Project, mainly for ckeditor and tinymce.

  Sources   Download

MIT

The Requires

 

by Jonas Renaudot

ckeditor tinymce roxyfileman

31/12 2015

1.2.0

1.2.0.0

Provides a Roxyfileman integration for your Symfony2 Project, mainly for ckeditor and tinymce.

  Sources   Download

MIT

The Requires

 

by Jonas Renaudot

ckeditor tinymce roxyfileman

13/12 2015

1.1.0

1.1.0.0

Provides a Roxyfileman integration for your Symfony2 Project, mainly for ckeditor and tinymce.

  Sources   Download

MIT

The Requires

 

by Jonas Renaudot

ckeditor tinymce roxyfileman

26/01 2015

1.0.0

1.0.0.0

Provides a Roxyfileman integration for your Symfony2 Project, mainly for ckeditor and tinymce.

  Sources   Download

MIT

The Requires

 

by Jonas Renaudot

ckeditor tinymce roxyfileman