sleemanj / xinha

WYSIWYG HTML Editor Component (turns <textarea> into HTML editors)
http://trac.xinha.org/
Other
13 stars 2 forks source link

Create MootoolsFileManager plugin, combining ExtendedFileManager and ImageManager (Trac #1502) #1502

Closed sleemanj closed 4 years ago

sleemanj commented 14 years ago

As mentioned in ticket:1478 and ticket:708

Mootools File Manager (http://cpojer.net/Scripts/FileManager/Demos/) is a php/ajax/dhtml/mootools based filemanager which allows the upload of multiple files simultaneously, progress bars, and a generally better experience when it comes to uploading and selecting files than ExtendedFileManager and ImageManager.

I will shortly commit a new plugin called MootoolsFileManager which utilises the Mootools File Manager to perform the basic function of both ExtendedFileManager and ImageManager.

Currently, the functionality is limited in that it is not possible to set the various other attributes of the image/link (border, alt, title, target etc), you may upload, rename, delete, create directories, and select the file you wish.

By default the configuration is locked down, it won't do anything until you configure it. The configure.php file has instructions, but in brief, this is the recommended way.

     /** STEP 3 ***************************************************************
       * We create a default configuration to be used by all the editors.
       * If you wish to configure some of the editors differently this will be
       * done in step 4.
       *
       * If you want to modify the default config you might do something like this.
       *
       *   xinha_config = new Xinha.Config();
       *   xinha_config.width  = 640;
       *   xinha_config.height = 420;
       *
       *************************************************************************/

       xinha_config = xinha_config ? xinha_config : new Xinha.Config();

       with (xinha_config.MootoolsFileManager)
        { 
          <?php 
            require_once('../contrib/php-xinha.php');
            xinha_pass_to_php_backend
            (       
              array
              (
                'images_dir' => /home/username/public_html/images',
                'images_url' => '/images',
                'allow_images_upload' => true,

                'files_dir' => /home/username/public_html/files',
                'files_url' => '/files',
                'allow_files_upload' => true,          
              )
            )
          ?>
        }

== Future == As indicated, this version is limited to the most basic functionality. We need to add the following...

  1. Add support for title and target when inserting links
  2. Add support for the various attributes that ImageManager allows you to edit (alt, border etc).
  3. Add support for resizing based on width/height attributes which get added in (2).
  4. Add support for editing images utilising "Ajax Image Editor" ( http://www.ajax-image-editor.com/ )

Reported by @sleemanj, migrated from http://trac.xinha.org/ticket/1502

sleemanj commented 14 years ago

Committed in changeset:1239

sleemanj commented 14 years ago

Also attaching a testbed.php file, put it in your examples make the examples/images and examples/files folders, you may need to adjust the url path in the testbed.php file for those. Attachment: testbed.php

sleemanj commented 14 years ago

@sleemanj changed description from:

As mentioned in ticket:1478 and ticket:708

Mootools File Manager (http://cpojer.net/Scripts/FileManager/Demos/) is a php/ajax/dhtml/mootools based filemanager which allows the upload of multiple files simultaneously, progress bars, and a generally better experience when it comes to uploading and selecting files than ExtendedFileManager and ImageManager.

I will shortly commit a new plugin called MootoolsFileManager which utilises the Mootools File Manager to perform the basic function of both ExtendedFileManager and ImageManager.

Currently, the functionality is limited in that it is not possible to set the various other attributes of the image/link (border, alt, title, target etc), you may upload, rename, delete, create directories, and select the file you wish.

By default the configuration is locked down, it won't do anything until you configure it. The configure.php file has instructions, but in brief, this is the recommended way.

     /** STEP 3 ***************************************************************
       * We create a default configuration to be used by all the editors.
       * If you wish to configure some of the editors differently this will be
       * done in step 4.
       *
       * If you want to modify the default config you might do something like this.
       *
       *   xinha_config = new Xinha.Config();
       *   xinha_config.width  = 640;
       *   xinha_config.height = 420;
       *
       *************************************************************************/

       xinha_config = xinha_config ? xinha_config : new Xinha.Config();
       xinha_config.fullPage = true;
       with (xinha_config.MootoolsFileManager)
        { 
          <?php 
            require_once('../contrib/php-xinha.php');
            xinha_pass_to_php_backend
            (       
              array
              (
                'images_dir' => /home/username/public_html/images',
                'images_url' => '/images',
                'allow_images_upload' => true,

                'files_dir' => /home/username/public_html/files',
                'files_url' => '/files',
                'allow_files_upload' => true,          
              )
            )
          ?>
        }

== Future == As indicated, this version is limited to the most basic functionality. We need to add the following...

  1. Add support for title and target when inserting links
  2. Add support for the various attributes that ImageManager allows you to edit (alt, border etc).
  3. Add support for resizing based on width/height attributes which get added in (2).
  4. Add support for editing images utilising "Ajax Image Editor" ( http://www.ajax-image-editor.com/ )

to:

As mentioned in ticket:1478 and ticket:708

Mootools File Manager (http://cpojer.net/Scripts/FileManager/Demos/) is a php/ajax/dhtml/mootools based filemanager which allows the upload of multiple files simultaneously, progress bars, and a generally better experience when it comes to uploading and selecting files than ExtendedFileManager and ImageManager.

I will shortly commit a new plugin called MootoolsFileManager which utilises the Mootools File Manager to perform the basic function of both ExtendedFileManager and ImageManager.

Currently, the functionality is limited in that it is not possible to set the various other attributes of the image/link (border, alt, title, target etc), you may upload, rename, delete, create directories, and select the file you wish.

By default the configuration is locked down, it won't do anything until you configure it. The configure.php file has instructions, but in brief, this is the recommended way.

     /** STEP 3 ***************************************************************
       * We create a default configuration to be used by all the editors.
       * If you wish to configure some of the editors differently this will be
       * done in step 4.
       *
       * If you want to modify the default config you might do something like this.
       *
       *   xinha_config = new Xinha.Config();
       *   xinha_config.width  = 640;
       *   xinha_config.height = 420;
       *
       *************************************************************************/

       xinha_config = xinha_config ? xinha_config : new Xinha.Config();

       with (xinha_config.MootoolsFileManager)
        { 
          <?php 
            require_once('../contrib/php-xinha.php');
            xinha_pass_to_php_backend
            (       
              array
              (
                'images_dir' => /home/username/public_html/images',
                'images_url' => '/images',
                'allow_images_upload' => true,

                'files_dir' => /home/username/public_html/files',
                'files_url' => '/files',
                'allow_files_upload' => true,          
              )
            )
          ?>
        }

== Future == As indicated, this version is limited to the most basic functionality. We need to add the following...

  1. Add support for title and target when inserting links
  2. Add support for the various attributes that ImageManager allows you to edit (alt, border etc).
  3. Add support for resizing based on width/height attributes which get added in (2).
  4. Add support for editing images utilising "Ajax Image Editor" ( http://www.ajax-image-editor.com/ )
sleemanj commented 14 years ago

@sleemanj commented:

Also should note, that if you don't load the plugin Mootools is not loaded either, so without the plugin, Xinha is mootools free.

If you do load the plugin, Mootools is automatically loaded if you have not loaded your own version of it already.

sleemanj commented 14 years ago

@sleemanj commented:

changeset:1245

Adds support for setting the image attributes when inserting an image with the MootoolsFileManager plugin.

sleemanj commented 14 years ago

@sleemanj commented:

changeset:1246

Adds support for setting the link attributes when inserting a file link with the MootoolsFileManager plugin.

sleemanj commented 14 years ago

@sleemanj changed milestone from 0.96 to 0.97

sleemanj commented 14 years ago

@sleemanj commented:

changeset:1297

Update to enhance reliability and functionality of MootoolsFileManager...

  1. A couple of race type conditions caused various issues with loading the MFM. Necessitated fixes to the assetLoader, reordering the scripts getting loaded, and adding a "Xinha._posturlcontent" method which performs a synchronous post.

  2. CSS fixes, including moving some styles from Xinha.css into the PersistentStorage plugin, they did not apply to anything else. I think this plugin is dead and should be removed anyway.

  3. Add preselection of current image

  4. Split margin into L/R and T/B when using HSpace/VSpace

  5. Add documentation for HSpace/VSpace in config.php

Also snuck in a couple of other bugfixes/additions:

  1. add support for having attribute "onxinhaready" on a textarea
  2. some PHP deprecation issues in the old ExtendedFileManager and ImageManager
  3. add a skin.xml to blue-look skin

Note: This is an older version of MFM, I am about to create a branch to work on bringing in a large update to MFM in a couple of stages.

sleemanj commented 14 years ago