Sentora Support Forums

Full Version: [Module] ELFileManager (build on elfinder)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10
Now it is my turn to build a file manager Smile

it is build on elFinder version 2.x

No login use your sentora info

How to install

Code:
zppy repo add repo.alio.dk zppy update zppy install ELFileManager


UPDATES
1.0.0 testet
1.0.1 never release
1.0.2 release to github
1.0.3 fix unpack zip files where .htaccess file are in and new version of elfinder
1.0.4 Just test never release
1.0.5 Added option to change the theme and language
1.0.6 Never Release
1.0.7 Elfinder update to version 2.1.6

[Image: filemanager.png]
Great module, but some small things..

Got a error when installing but it works after:
Code:
[root@mail ~]# zppy install FileManager Module to be installed FileManager --2015-10-23 10:22:51--  http://repo.alio.dk/FileManager.zpp Resolving repo.alio.dk... 2a03:b0c0:2:d0::49d:f001, 188.166.57.74 Connecting to repo.alio.dk|2a03:b0c0:2:d0::49d:f001|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 419639 (410K) Saving to: âFileManager.zppâ 100%[======================================>] 419,639     --.-K/s   in 0.04s 2015-10-23 10:22:51 (10.7 MB/s) - âFileManager.zppâ Notice: Undefined property: XMLTag::$type in /etc/sentora/panel/dryden/ui/module.class.php on line 82 Notice: Trying to get property of non-object in /etc/sentora/panel/dryden/ui/module.class.php on line 82 Module installed successfully!

There is something weird about the version number, and don't know if this needs to get fixed but you have to know that there is already a module with the same name (except the capital letters and a space) and may bring some confusion.. :

[Image: Mdyc7sh.png]
HMM I look straight at

it install at the well to find out what it is it does not damage the module that's something that was in zpanel not in sentora
Nice Very Nice, but zppy install elfinder_filemanager, it is a good change to de future...
I go Test this module, thanks man!
It's in Sentora also, it's the 'type' tag in the module.xml:

Code:
<?xml version="1.0" encoding="utf-8"?> <module>    <name>Deleted Records Manager</name>    <version>1.1.1</version>    <defaultcat>Admin</defaultcat>    <desc>This modules allows the admin to view and delete client database records that have been marked 'deleted' by Sentora.</desc> <type>user</type> <=== Right Here    <authorname>TGates</authorname>    <authoremail>tgates@mach-hosting.com</authoremail>    <authorurl>http://www.sentora.org/</authorurl>    <updateurl>http://zppy-repo.mach-hosting.com/deleted_records_manager.xml</updateurl> </module>
Yours:
Code:
<?xml version="1.0" encoding="utf-8"?> <module>    <name>FileManager</name>    <version>100</version>    <defaultcat>File Management</defaultcat>    <desc>Web filemanager</desc>    <authorname>Diablo925</authorname>    <authoremail>carsten@alio.dk</authoremail>    <authorurl>http://Alio.dk/</authorurl>    <updateurl></updateurl> </module>
Also, you left the update URL empty Huh 
An example of deleted_records_manager.xml: (Makes the module compliant with Repo Browser)

Code:
<?xml version="1.0" encoding="utf-8"?> <updateserver> <latestversion>1.1.1</latestversion> <downloadurl>http://zppy-repo.mach-hosting.com/deleted_records_manager.zpp</downloadurl> <desc>This modules allows the admin to view and delete client database records that have been marked 'deleted' by Sentora.</desc> <updatedesc>Deleting client also deletes their profile. DNS entries deleted by domain name instead of ID. (Faster)</updatedesc> <authorname>T.Gates</authorname> <authoremail>tgates@mach-hosting.com</authoremail> <authorurl>http://www.sentora.org</authorurl> <ostype>all</ostype> </updateserver>
Found it and change Angel

And the name has been change to ELFileManager now

and Windows friendly , I hope some will test
(10-23-2015, 11:59 PM)Diablo925 Wrote: [ -> ]I hope some will test

Tested it and it works great no errors what so ever, shadowing also works..
But when i removed the old one (file manager with elfinder)it also removed the database entry from the filemanager with explorer.. Tongue
I don't mind but you see it's better to have a unique name.. Wink


I remember there was a file manager module which gave you the option to open the browser in a new window like your does but also had the option to open it in a iframe so it is directly in Sentora.
I think it was a nice feature...
aah so it open filemanager inside the module and not a new window ?? can look at it
Working good here!
Here ya go @[Diablo925], iframe version:

module.zpm:

PHP Code:
<@ Init @>
<
div class="zmodule_content panel" id="zmodule_header_<@ ModuleName @>">
    <div class="panel-heading">
        <img src="<@ ModuleIcon @>" width="35" height="35" border="0" alt="<@ ModuleName @>">

        <div class="zmodule_title">
            <@ ModuleName @>
        </div>

        <div class="zmodule_desc" id="zmodule_desc_<@ ModuleName @>"><@ ModuleDesc @></div>
        
    
</div>
    
    
<form name="FileManager" action="modules/ELFileManager/app/elfinder.php?id=<@ UserID @>" target="FileManager" method="post" onsubmit="var w=window.open('', 'FileManager', 'scrollbars=no,menubar=no,height=600,width=1024,resizable=no,toolbar=no,location=no,status=no'); w.focus();">
            <table class="table table-striped">
                <tr>
                    <th nowrap="nowrap"><button class="btn btn-primary" type="submit" name="inOpen" value="<@ UseriD @>"><: Launch In New Window :></button></th>
                </tr>
            </table>
        </form>
<!-- 
iframe by TGates -->
<
iframe src="modules/ELFileManager/app/elfinder.php?id=<@ UserID @>" scrolling="no" width="100%" height="200px" id="iframe1" marginheight="0" frameborder="0" onLoad="autoResize('iframe1');"></iframe>
</
div

Controller.ext.php:

PHP Code:
<?php

class module_controller extends ctrl_module
{
 
   /* Load JS */
 
   static function getInit() {
 
       global $controller;
 
       $line '';
 
       $line .= '<!-- iframe by TGates -->
            <script language="JavaScript">
            <!--
            function autoResize(id){
                var newheight;
                var newwidth;

                if(document.getElementById){
                    newheight = document.getElementById(id).contentWindow.document .body.scrollHeight;
                    newwidth = document.getElementById(id).contentWindow.document .body.scrollWidth;
                }

                document.getElementById(id).height = (newheight) + "px";
                document.getElementById(id).width = (newwidth) + "px";
            }
            //-->
            </script>'

 
       return $line;
 
   }

    static function 
getUserID() 
 
      
 
             global $controller
            
$currentuser ctrl_users::GetUserDetail(); 
            
$userid $currentuser['userid']; 
            return 
$userid
    }

}
?>

And in elfinder.php change line 48 to:
PHP Code:
width 950
Pages: 1 2 3 4 5 6 7 8 9 10