Code Monkey home page Code Monkey logo

elustrofm's Introduction

elustroFM

elustro File Manager - file and image manager for TinyMCE

Works both as standalone plugin and as filemanager for image/media/link windows.

Based on Image Manager by Antonov Andrey http://dustweb.ru/projects/tinymce_images/

elustroFm now only works with PHP and uses WideImage for image manipulation.

##Installation

  1. Copy 'elustrofm' directory to {path_to_TinyMCE}/plugins
  2. Make changes in your elustrofm/connector/php/config.php and set the upload folders. All other options are self-explanatory.

###As plugin In your tinyMCE.init function add 'elustrofm' to plugins line and add 'elustrofm' button to one of your buttons bar like this:

tinyMCE.init({
  ...
  plugins : "autolink,lists,advimage,inlinepopups,...,elustrofm",
  ...
  theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,...,elustrofm",
  ...
});

###As file manager for image/media/link popups In your tinyMCE.init function add line: file_browser_callback : "elustroFileManager" And then add this function right after tinyMce.init() function:

function elustroFileManager (field_name, url, type, win) {
  var ed = tinyMCE.activeEditor,
  cmsURL = "{path_to_tinyMCE}/plugins/elustrofm/index.html?integration=fm&lang="+ed.settings.language+"&filetype="+type;
  ed.windowManager.open({
    file : cmsURL,
    title : 'elustroFM',
    width : 700,
    height : 550,
    resizable : "yes",
    scrollbars : "no",
    inline : "yes",
    close_previous : "no",
    popup_css : false
  }, {
    window : win,
    input : field_name
  });
  return false;
  }

Just change {path_to_tinyMCE} to an absolute path to TinyMce directory on your site and you're ready to go.

###As file manager for image/media/link popups with dynamic folders In your tinyMCE.init function add line: file_browser_callback : "elustroFileManager" And then add this function right after tinyMce.init() function:

function elustroFileManager (field_name, url, type, win) {
  var ed = tinyMCE.activeEditor,
  cmsURL = "{path_to_tinyMCE}/plugins/elustrofm/index.html?integration=fm&lang="+ed.settings.language+"&filetype="+type+"folders={folder_alias}";
  ed.windowManager.open({
    file : cmsURL,
    title : 'elustroFM',
    width : 700,
    height : 550,
    resizable : "yes",
    scrollbars : "no",
    inline : "yes",
    close_previous : "no",
    popup_css : false
  }, {
    window : win,
    input : field_name
  });
  return false;
  }

Just change {path_to_tinyMCE} to an absolute path to TinyMce directory on your site and also change {folder_alias} to a convinient name.

Inside the elustrofm plugin folder edit connector/php/config.folders.php this folder returns an array where the key is you {folder_alias} see the sample path connfigured in it.

elustrofm's People

Contributors

shadowfax avatar h8every1 avatar

Watchers

 avatar

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.