Coder Social home page Coder Social logo

filemanager4tinymce's Introduction

********************************************************************************
********************************************************************************



NEW VERSION 9!!!!!

NEW version 9 released on http://www.responsivefilemanager.com





********************************************************************************
********************************************************************************
*********************************************************
! FileManager for TinyMCE Version 6.2.0
*********************************************************

FileManager for TinyMCE is a tool make with jQuery library that offers a nice and elegant way to upload and insert files, images and videos with tinyMCE v.4.x.
Now you can use also as normal filemanager, you can manage and select files.
The script automatically create a thumbs of images for preview list.
You can config if you want an automatic resizing of uploaded images.
You can set a subfolder as root and change the configuration for every user, page or filemanager call.


NEWS

Version 6.2.0
- Improve quality of images resizing using PHP Image Magician

Version 6.1.1
- Automatic compatibility with popup by pass the popup GET variable

Version 6.1.0
- Compatibility with Internet Explorer and old browser
- Fix delete bug
- Improve security

Version 6.0.1
- Improve Responsive design

Version 6.0.0
- New amazing flat interface
- Possibility to set subfolder as root
- Ajax files and folders cancellation
- Improve speed, code structure and image size optimization
- If image is smaller than thumbnail the file manager show the image centered  
- TinyMCE link_list now is supported and plugin.min.js files aren't minimized [thanks to Pål Schroeder]
- Fix bug in file selection on subfolder and Other bug fix
- Mobile version with swipe event to show options

DEMO: http://test.albertoperipolli.com/filemanager4tinymce/

Released under MIT license

Creator : [email protected] - tr1pp0
Creator until version 1: [email protected] - b3ez

*********************************************************
! Installation
*********************************************************
1. Upload each folder plugins (images, link, media and filemanager) to tinymce plugins folder (lang file is optional)
2. open filemanager/config.php and set your configurations like base_url, upload_dir, type extensions allowed , max file size, permits… and other specifications. save file. 
3. create folder where upload files and give write permits.
4. your work is finish!!! settings of tinymce should be like : (remember to add filemanager in plugins list)

 selector: "textarea",
    theme: "modern",
    width: 680,
    height: 300,
    subfolder:"",
    plugins: [
         "advlist autolink link image lists charmap print preview hr anchor pagebreak",
         "searchreplace wordcount visualblocks visualchars code insertdatetime media nonbreaking",
         "table contextmenu directionality emoticons paste textcolor filemanager"
   ],
   image_advtab: true,
   toolbar: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect forecolor backcolor | link unlink anchor | image media | print preview code"
 }); 

P.S.: If you not view the preview images remember to set the thumbs folder in plugin/filemanager/thumbs with write permits.
If you update from previous version delete the contents of thumbs folder.


USING AS STAND-ALONE FILEMANAGER

You can use normal popup, bootstrap modal, fancybox iframe , lightbox iframe to open the filemanager with this paths:

Only open filemanager(type=0 and not set field_id): 
path to filemanager../filemanager/dialog.php?type=0&editor=mce_0&lang=eng&fldr=

Select Image: (type=1 and set id of input text in field_id variable): 
path to filemanager../filemanager/dialog.php?type=1&editor=mce_0&lang=eng&fldr=&field_id=fieldID

Select Video: (type=3 and set id of input text in field_id variable): 
path to filemanager../filemanager/dialog.php?type=3&editor=mce_0&lang=eng&fldr=&field_id=fieldID

Select File: (type=2 and set id of input text in field_id variable): 
path to filemanager../filemanager/dialog.php?type=2&editor=mce_0&lang=eng&fldr=&field_id=fieldID

If you want use popup add in the address &popup=1

In demo page i use fancybox with this configuration:

    $('.iframe-btn').fancybox({	
	'width'		: 900,
	'height'	: 600,
	'type'		: 'iframe',
        'autoScale'    	: false
    });

and button have this code to open filemanager:

<a href="js/tinymce/plugins/filemanager/dialog.php?type=0&editor=mce_0&lang=eng&fldr=" class="btn iframe-btn" type="button">Open Filemanager</a>

Remember to include fancybox file in head section:

<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.4.css" media="screen" />
<script type="text/javascript" src="fancybox/jquery.fancybox-1.3.4.pack.js"></script>

If you not use fancybox, you must change the function to close the windows after file selection in filemanager/js/include.js:

function close_window() {
    parent.$.fancybox.close();
}



SET SUBFOLDER AS ROOT

You can set subfolder as root an change this parameter in tinymce init or in external-link  through the subfolder variables.
So you can have a root folder for every user or use.
Remember to create subfolder in your source folder before :)

In tinymce editor you must set the variable
    subfolder:"folder",
while in external link you can add in get parameters
    &subfolder=folder

Folder Example:

root
- folder1
  - subfolder1
  - subfolder2
- folder2
  -subfolder3

User1 subfolder=""
View:
folder1
  - subfolder1
  - subfolder2
folder2
  -subfolder3

User 2 subfolder="folder1"
View:
subfolder1
subfolder2


*********************************************************
! Localization
*********************************************************
- BGR [Stanislav Panev]
- BRA [paulomanrique]
- CZE [jlusticky]
- ENG
- FRA
- GER [Oliver Beta]
- HUN [Bende Roland]
- ITA
- NLD [johan12]
- POL [Michell Hoduń]
- POR [Sérgio Lima]
- RUS [vasromand]

*********************************************************
! Old version news
*********************************************************
Version 5:
- Stand-alone use of filemanager, you can open and select files also dividing them according to the type (video, images and all files)

Version 4:
- Further simplify the installation steps
- Now thumbs folder is inside the file manager script
- Fix resizing bug, create folder possible bug
- AUTOMATIC Realignment of THUMBS tree and images if you upload file from other client FTP or other method
- Add loading animation while the image lightbox loading
- Add possibility to config size width or/and height image limits
- Add possibility to config automatic resizing and set only width or height size
- white background in png thumbs
- fallback upload for old browser
- fix folder delete bug	

Version 3:
- With this plugin you can also set automatic resizing of uploaded images.
- Moreover you can set the permits to delete files, folder and create folder.
- This version support advanced tab on image plugin
- For preview img in files list the plugin NOW create a thumbnail image with low resolution!!!
- Simplify the installation steps

*********************************************************
! Credits
*********************************************************
Bootstrap => http://twitter.github.io/bootstrap/
Bootstrap Lightbox => http://jbutz.github.io/bootstrap-lightbox/
Dropzonejs => http://www.dropzonejs.com/
Fancybox => http://fancybox.net/
TouchSwipe => http://labs.rampinteractive.co.uk/touchSwipe/demos/
PHP Image Magician => http://phpimagemagician.jarrodoberto.com/‎
*********************************************************

filemanager4tinymce's People

Contributors

2b3ez avatar autowp avatar b44x avatar dr1ss avatar jlusticky avatar nic0g avatar raffcorreia avatar rame0 avatar trippo avatar vasromand avatar zhangv 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filemanager4tinymce's Issues

Tip: Multiple selection of files

Hello Responsive filemanager!

I am enjoying your work! It's a fantastic tool to work with. After you guys, gave the system a stand-alone function I became very enthusiastic!

Lately I came up with an idea of a multiple selecting function, in order to expand the functionality of the stand-alone function. I mentioned both uploaders already having the function of uploading multiple files, which is obviously great! But using this filemanager in it's stand-alone function, I'm really missing the multiple selecting of files.Maybe a button in the filemanager would bring this functionality. When you click this button the user gets a fucntion to select multiple files. After the user is done selecting, the user can click a submit button in order to send (I don't know how you call it) the multiple files to the webpage. The result then has to be that the chosen files are ligned-up under each other on the webpage(instead of only one file). Maybe to add more functionality to this multiple selection, is that the user not only can send the files to the webpage, but also delete multiple files (or rename or download etc).

I really hope you understand my comment :D and I do really apreciate your work!
I am surely looking forward to this function!

Regards,

Tom Groot

Upload large video more than 100 MB

I am trying to upload larger file size video using tinymce in s3 howerver video are completely uploaded in s3 using tinymce but video are not playable in tinymce editor.

On my server OK, on another, no thumbs displayed

Hi !

I've got a big problem. Everything is working fine on my server.
I gave it to someone and he put it on his server. Thumbs folder was set to the correct chmod (777). Pictures are correctly uploaded, thumbs are correctly generated (we checked both folders), but the popup doesn't display thumbs.

Any suggestions ?

Thanks a lot !

Folders don't get deleted in the 'thumbs folder'

When new folders and subfolders are created, they also get created in the preview-thumbs folder.
Deleting a complete folder with or without included files does not get deleted in the 'thumbs' folder.
So basically this 'thumbs'-folder builds up in time with old obsolete folders and files.

Bug in utils.php in function create_folder

mkdir fails with error if subdirectory is set to more than one directory (e.g. subfolder : /foo/bar) when called from the create_folder function in utils.php

This issue can be fixed by adding the recursive flag to the mkdir calls on lines 38 and 40 as follows:

function create_folder($path=false,$path_thumbs=false){
    $oldumask = umask(0); 
    if ($path && !file_exists($path))
        mkdir($path, 0777, true); // or even 01777 so you get the sticky bit set 
    if($path_thumbs && !file_exists($path_thumbs)) 
        mkdir($path_thumbs, 0777, true) or die("$path_thumbs cannot be found"); // or even 01777 so you get the sticky bit set 
    umask($oldumask);
}

subfolder doesn´t work anymore

Hi Alberto,

Thomas here ;). I just upgrade to newest Version, i load my same config (upload_dir/current_path).

It seems subfolder SESSION always empty now. When i add in dialog.php:

/***
SUB-DIR CODE
*
*/

if(!$_SESSION["subfolder"]) $_SESSION["subfolder"] = $_GET["subfolder"];

then your code

all works fine...

Regards
Thomas

PHP short tags <? results in 500 Internal Server Error

File: dialog.php

PHP short tags <? are used for few of the php code segments.

This throws "500 Internal Server Error" on servers which have disabled short tags. I think for consistent practice, change all code segments to use full PHP open tags. <?php

Vijay

how to migrate with laravel 5

how to change upload dir for laravel 5 base?

$base_url=""; //url base of site if you want only relative url leave empty $upload_dir = '/public/upload/'; // path from base_url to upload base dir $current_path = '../../../../upload/'; // relative path from filemanager folder to upload files folder

dropzone fallback

On some browsers the dropzone isn't supported. Therefore dropzone has a fallback, so you can upload with a browse button. The problem is that there is no submit button, so you can't upload the file.

Any solutions?

Upload file into subfolder

Hello, anybody knows why I can't upload a file into subfolder??

IS posible only upload file to folder root.

In config.php I have:

$base_url="http://www.programasi.org";
$upload_dir = '/images/docs/';
$current_path = '../../../../../../../../images/docs';

Thank's

Thomas

There is an error! The root folder not exist.

Hello
I am trying to use this plugin and i have following error
image

My Code is

<script type="text/javascript">
        tinymce.init({

            selector: "textarea",
            theme: "modern",
 skin: "lightgray",
subfolder:"uploads",
            plugins: [

                "paste advlist autolink lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualblocks visualchars code fullscreen media filemanager",

            ],

            toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
            toolbar2: "print preview media | forecolor backcolor emoticons | image media",
            image_advtab: true,
            templates: [
                {title: 'Test template 1', content: 'Test 1'},
                {title: 'Test template 2', content: 'Test 2'}
            ], 
paste_auto_cleanup_on_paste : true,
      paste_convert_middot_lists : false,
      paste_text_sticky : true,
      paste_strip_class_attributes : "all",
      paste_remove_styles : true,
      paste_remove_spans : true,
      paste_block_drop : true,
relative_urls: true,
document_base_url: '<?php echo base_url(); ?>',
open_manager_upload_path: 'uploads/'


        });
    </script>

Please tell me where i am doing wrong

Secuirity troubles

Different result image source and tinymce sourcecode

I have project with domain, http://pilihotel.dev
and all files will put in 'http://pilihotel.dev/files'
then admin page editor in 'http://pilihotel.dev/admin'
if edit some post 'http://pilihotel.dev/admin/berita/edit/14'

1

the problem, when i have selected the image. source on image modal in right path. example 'http://pilihotel.dev/files/avatar.jpg' but when I see in sourcecode tinymce it's change to '../../../files/avatar.jpg'.

2

any solution?

Sorry bad english.

License information

Hello there.

I have a couple of questions.
In Github, you post in the readme.txt that the software is MIT licensed ( http://programmers.stackexchange.com/questions/103273/can-i-use-mit-licence-plugins-in-my-commercial-web-site ) but in the website you state that the software is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

Which one is it? MIT or CC A-NC?

How much the amount donated would be fair, so that I can use the plugin on commercial websites? And in that case, will I get a license file or document stating i'm allowed to use this in my client's websites?

Thank you.
PS: This projects rocks!

Regards
Pedro

lang include vulnerabilities

maybe I'm wrong (I did not tried to hack it) but it looks little bit weird

file filemanager/execute.php line 9-13

if (isset($_GET['lang']) && $_GET['lang'] != 'undefined' && is_readable('lang/' . $_GET['lang'] . '.php')) {
require_once 'lang/' . $_GET['lang'] . '.php';
} else {
require_once 'lang/en_EN.php';
}

I think need to check $_GET['lang'] more carefully to prevent include custom files "../../../../filename.php"

at least do something like this:

$language_file = 'lang/en_EN.php';
if (isset($_GET['lang']) && $_GET['lang'] != 'undefined' && $_GET['lang']!='') {
$path_parts = pathinfo($_GET['lang']);
if(is_readable('lang/' .$path_parts['basename']. '.php')){
$language_file = 'lang/' .$path_parts['basename']. '.php';
}
}
require_once $language_file;
//------------------------------------------------------------------------------------

hope it helps

Javascript error due to wrong ' in dialog.php

File: dialog.php Line Number: 272

Actual Code:

<a href="#" title="<?php echo  lang_Select?>" onclick="<?php echo $apply.'("'.$file.'")'; ?>">

Above code renders html as:

<a href="#" title="Select" onclick="apply_img("test.jpg")">
      <img data-src="holder.js/140x100" alt="140x100" src="/staging/uploads/test.jpg" height="100">
      <h4>test</h4>
</a>

So because of " in javascript function apply_img(), this line throws javascript error.

Solution:

<a href="#" title="<?php echo  lang_Select?>" onclick="<?php echo $apply."('".$file."')"; ?>">

By the way, thanks for the awesome plugin.

Vijay

File not uploading

In this current version, the file is not uploading at all, it was file till the previous version. File is now even uploading now. I have properly set all the urls.
Issue:
I upload a new file, it rerfresh the page and keep showing only a single file only.

This is the error log inside filemanager folder. Link: http://txtup.co/gDyev

Try Here:
My app link where the problem is happening: http://html-email.isaumya.com/

Please help...... It's not working anymore....

Incompatible with latest TinyMCE version (4.0.2 (2013-07-18))

The file manager doesn't appear to work properly with the latest TinyMCE version (4.0.2 (2013-07-18)). You can still click on the "Insert file" item in the "Insert" menu but then cannot select any files.

The problem however seems to be that the small button beside the image and media dialogs is missing.

Syntax error

Hello,

I just downloaded your code and when I lanuch it I have :

Parse error: syntax error, unexpected $end in C:\wamp\www\app\webroot\js\tinymce\plugins\filemanager\dialog.php on line 370

Im' using Php 5.3.5.

Bye

can't upload images

I just downloaded FileManager4TinyMCE and somehow I can't upload images. The uploading seems to go ok, but when I press 'return to files list' no images are shown.

I suppose it is a problem with my config.php.
Right now the code is:
$base_url="http://mydomain.com"; //url base of site if you want only relative url leave empty
$upload_dir = '/algerhof/img/'; // path from base_url to upload base dir
$current_path = '../../../../../../img/'; // relative path from filemanager folder to upload files folder

filemanager folder: 'http://mydomain.com/algerhof/admin/tinymce/js/tinymce/plugins/filemanager/'
images folder: 'http://mydomain.com/algerhof/img/'

I tried adding and removing some '../' from $current_path, but it won't help.

Image are displayed upside down

Hi,
I'm trying to use this plugin (version 6.2.0) which is working pretty well BUT each images which are uploaded are upside down ?? Seems like an issue with EXIF. Could someone please help me to figure out how to fix this.
Thanks

PHP_AUTH_USER error

got an error when I tried to switch to Java upload Tab

file filemanager/uploader/index.php line 79

was
if($_SERVER['PHP_AUTH_USER'] != '' && $_SERVER['PHP_AUTH_USER'] != '')

must be
if(isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] != '')

403 Error

Hi,
I'm getting this error when trying to upload a file.
I get the uploading animation, but I get a red X and this message.

"403 Forbidden: You don't have permission to access /some_folder/assets/js/tinymce/plugins/filemanager/upload.php"

I can access the upload.php file directly via browser with no permission error.
And I'm sure all my directory permissions are as they are suppossed to be.

As a matter of fact, this same configuration works on my localhost, this only happens on the remote server.

I've pinned down the issue to somewhere between the dropzone plugin, and the upload.php script, but it's very hard to debug, and I can't seem to find any documentation of a similar problem.

I tried changing some parameters on Dropzone, mainly the method, from POST to GET, and then I get the green check, and no error, but the files are not being uploaded to the server.

Any clues?

Image upload

Hello
when i upload an image i see the thumb in the Windows but nothing is ine the folder, it desapear from the list , any idea ?
thanks
Edit:
Find it's in config.php

Encoding problem

Edited: Nevermind I figured out that it was my bad!

Hi,

When uploading a file / folder with special char, in server side it is correctly created but in filemanager it displays with encoded char and I'm not able to use that file / folder.
In your demo this does not happen. Any suggestion?

Security issue with subfolder

If subfolder GET parameter is set when calling /tinymce/plugins/filemanager/dialog.php then it is possible to traverse outside the containing folder by using '/../' in the query.
So a web visitor can browse directory structures of the website and upload images if the user running the PHP process has access to those directories.

Cannot select file once uploaded

Hi there, I was looking for a file picker and uploader and then I came across this FileManager which is awesome so far. But, everything works fine, uploading, thumbnails et cetera, but I assumed clicking on the thumbnail in the File Manager would close the File Manager window and insert the image in the tinyMCE (v4.x) content editor. Nothing happens, is this normal? Or am I doing something wrong.

EDIT: type is set to 1 and file_id not set but in:
if (external=="") {
var target = window_parent.document.getElementsByClassName('mce-img_'+track);
var closed = window_parent.document.getElementsByClassName('mce-filemanager');
$(target).val(base_url+path+file);
$(closed).find('.mce-close').trigger('click');
}

This does not work ->> $(target).val(base_url+path+file);

Cheers!

no image upload button

image
Here is the View of the insert/edit image on my side. Would you please help me regarding on this issue?

Thank you.

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.