Here ya go Diablo925, iframe version:
module.zpm:
Controller.ext.php:
And in elfinder.php change line 48 to:
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,