标签: elfinder

将自定义上下文菜单项添加到elFinder

我正在使用elfinder,我想通过向上下文菜单添加命令来添加新功能.我在项目的github问题跟踪器上找到了一个解决方案,但我无法让它工作.这是我做的:

var elf;
jQuery().ready(function() {
    elFinder.prototype._options.commands.push('editimage');
    elFinder.prototype._options.contextmenu.files.push('editimage');
    elFinder.prototype.i18.en.messages['cmdeditimage'] = 'Edit Image';          
    elFinder.prototype.i18.de.messages['cmdeditimage'] = 'Bild bearbeiten';
    elFinder.prototype.commands.editimage = function() {
        this.exec = function(hashes) {
             console.log('hallo');
        }
    }
    elf = jQuery('#elfinder').elfinder({
    ...
    //elfinder initialization
Run Code Online (Sandbox Code Playgroud)

上下文菜单项未显示,控制台中未找到任何错误消息.我还尝试将editimage放在initmen中的contextmenu - >"files"下,以防初始化时覆盖.

javascript elfinder

9
推荐指数
2
解决办法
6481
查看次数

自定义elfinder的右键菜单(一个jquery文件管理器插件)

我正在使用elfinder制作一个自定义的共享按钮,有关于如何自定义右键菜单的教程,我已经实现了它.但是,我想申请菜单有一些规则

1) For folder only,  exclude the button for file
2) For root level only, exclude the button for sub level folder 
3) For single folder only, if select more than one folder will exclude the button
Run Code Online (Sandbox Code Playgroud)

这是当前代码,现在有分享按钮但不符合上述规则:

    elFinder.prototype.i18.zh_TW.messages['cmdsharefolder'] = 'Share';
    elFinder.prototype._options.commands.push('sharefolder');
    elFinder.prototype.commands.sharefolder = function () {
        this.exec = function (hashes) {
            //open share menu
        }
        this.getstate = function () {
            return 0; 
        }
    }
Run Code Online (Sandbox Code Playgroud)

和elfinder实例:

var elfinder = $('#elfinder').elfinder({
    url: '<?= $connector; ?>',
    soundPath: '<?= site_url('assets/plugins/elFinder/sounds/rm.wav'); ?>',
    height: 700, …
Run Code Online (Sandbox Code Playgroud)

html javascript php jquery elfinder

6
推荐指数
1
解决办法
1649
查看次数

带有elFinder的TinyMCE 4

有人已经尝试将elFinder整合到TinyMCE的新版本(4b1)中吗?看起来先前的 实现不起作用.请发一些片段,非常感谢.

javascript jquery tinymce elfinder

5
推荐指数
2
解决办法
1万
查看次数

如何在elfinder插件(文件管理器插件)上获取上传前事件

我正在使用jquery处理文件管理器

这是代码:

 var elfinder = $('#elfinder').elfinder({
            url: '<?= $connector; ?>',
            soundPath: '<?= site_url('assets/plugins/elFinder/sounds/rm.wav'); ?>',
            height: 700,
            lang: 'zh_TW',
            uiOptions: {
                // toolbar configuration
                toolbar: [
                    ['back', 'forward'],
                    ['reload'],
                    ['mkdir', 'upload'],
                    ['copy', 'cut', 'paste', 'rm'],
                    ['rename'],
                    ['view', 'sort']
                ]
            },
            contextmenu: {
                navbar: ['open', '|', 'copy', 'cut', 'paste', 'duplicate', '|', 'rm', '|', 'info'],
                cwd: ['reload', 'back', '|', 'upload', 'mkdir', 'paste', '|', 'info'],
                files: [
                    'open', 'quicklook', 'sharefolder', '|', 'download', '|', 'copy', 'cut', 'paste', 'rm', '|', 'rename', '|', 'info'
                ]
            },
            ui: …
Run Code Online (Sandbox Code Playgroud)

html javascript php jquery elfinder

5
推荐指数
1
解决办法
1193
查看次数

Laravel Elfinder使用'auth'中间件重定向到主页

我使用https://github.com/barryvdh/laravel-elfinder每当我设置middlewareauthconfig/elfinder.php文件中,我重定向到主页,但whene我使用中间件NULL,elfinder打开完美的罚款.

如何在laravel中保护elfinder的路由,以便只允许访问的用户打开文件管理器?

谢谢

php elfinder laravel-routing laravel-5.2

4
推荐指数
1
解决办法
723
查看次数

模态对话框中的CKEditor和elFinder

我需要将elFinder集成到CKEditor.我跟着这个:

https://github.com/Studio-42/elFinder/wiki/Integration-with-CKEditor

它正在工作,但打开弹出窗口的图像选择不是很好,所以我想在模态对话框中打开elFinder.

对于"模态集成",我遵循这个主题:http: //bxuulgygd9.tal.ki/20110728/integration-with-ckeditor-759177/

那里的最后一篇文章部分有效.它真的打开了模态中的elfinder.但是:当我想在CKFinder中将图像URL插入URL字段时,我必须知道它的确切ID.也不填写图像分辨率并带来一些其他问题.最好的解决方案是运行在"普通弹出"集成中调用的函数,它处理所有事情:

window.opener.CKEDITOR.tools.callFunction(funcNum, file);
Run Code Online (Sandbox Code Playgroud)

但是在"弹出集成"中,funcNum回调被注册,在模态集成中它不是那么我无法调用它.你有任何提示在模态窗口中运行elfinder(或任何其他图像管理器 - 它会是相同的)吗?我很绝望.

javascript modal-dialog ckeditor elfinder

1
推荐指数
1
解决办法
5076
查看次数

如何禁用 elfinder 删除和编辑选项?

您好,我在 Laravel 应用程序中使用 elfinder。我无法从 elfinder 禁用删除选项。非常感谢任何帮助。

这是我的配置文件:

<?php

return array(

    'dir' => ['assets/uploads/news_upload'],

    'disks' => [

    ],

    'route' => [
        'prefix' => 'elfinder',
        'middleware' => array('web', 'auth'), //Set to null to disable middleware filter
    ],

    'access' => 'Barryvdh\Elfinder\Elfinder::checkAccess',

    'roots' => null,

    'options' => array(),

    'root_options' => array(

    ),

);
?>
Run Code Online (Sandbox Code Playgroud)

我无法禁用删除选项。

tinymce laravel elfinder

1
推荐指数
1
解决办法
1123
查看次数

无法限制其他文件在ElFinder中上传

我正在使用此配置让我的Elfinder与CKEditor一起使用.

$opts = array(
    // 'debug' => true,
    'roots' => array(
        array(
            'driver'        => 'LocalFileSystem',   // driver for accessing file system (REQUIRED)
            'path'          => '../../uploads/',         // path to files (REQUIRED)
            'URL'           => dirname($_SERVER['PHP_SELF']) . '/../../uploads/', // URL to files (REQUIRED)
            'accessControl' => 'access'  ,           // disable and hide dot starting files (OPTIONAL)
            'uploadAllow' => array('image/jpg', 'image/png'),
            'alias'      => 'Home',
            'mimeDetect' => 'internal',
            'imgLib'     => 'gd',
        ),


    ),


);
Run Code Online (Sandbox Code Playgroud)

但是,我能够上传所有文件甚至PHP文件!我只想上传图片.我无法限制上传.我哪里错了?

php security ckfinder elfinder

0
推荐指数
1
解决办法
4082
查看次数

浏览服务器时 Laravel 5 ElFinder 类替换这个与你的中间件不存在错误

我已经在 laravel 5 中配置了 elfinder,也使用了 CKEditor。每一件事都很好,直到我点击浏览服务器按钮然后我得到"Class replace-this-with-your-middleware does not exist“错误。我在谷歌上搜索了很多,但我没有找到任何合适的答案。所以我把我的问题放在了希望中。请帮助我尽快解决这个问题。

ckeditor elfinder laravel-5

0
推荐指数
1
解决办法
1325
查看次数