2017-02-27, 07:07 AM
Hi there SvePu! 
I'm trying to load 'ElFinder' into MyBB Page-Manager but I get a parse error. It's nothing to do with Elfinder itself since it loads perfectly on an XenForo page with the exact same elfinder code.
The plugin doesn't seem to like the 'url' part of the elfinder code, this url loads the connector for elfinder.
If you would like to test this out yourself you can download ElFinder here - https://github.com/Studio-42/elFinder
Just tried it on OUGC Pages (Loving the categories that it has by the way) and it spits out the same error.. XenForo handles it fine. I'm lost.

I'm trying to load 'ElFinder' into MyBB Page-Manager but I get a parse error. It's nothing to do with Elfinder itself since it loads perfectly on an XenForo page with the exact same elfinder code.
Parse error: syntax error, unexpected 'url' (T_STRING) in E:\XAMPP\htdocs\mybb\inc\plugins\pagemanager.php(989) : eval()'d code on line 27
The plugin doesn't seem to like the 'url' part of the elfinder code, this url loads the connector for elfinder.
<?php
global $headerinclude, $header, $theme, $footer, $templates, $lang, $user;
$template = '<html>
<head>
<title>' . $pages['name'] . '</title>
{$headerinclude}
</head>
<body>
{$header}
{$errors}
<div class="forumthreadtitleleft"></div><div class="forumthreadtitle"><span class="cl6">Clearance</span> - File Manager</div><div class="forumthreadtitleright"></div>
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="http://localhost/filemanager/css/elfinder.min.css">
<script type="text/javascript" src="http://localhost/filemanager/js/elfinder.min.js"></script>
<!-- Mac OS X Finder style for jQuery UI smoothness theme (OPTIONAL) -->
<link rel="stylesheet" type="text/css" media="screen" href="localhost/filemanager/css/theme.css">
<script type="text/javascript" charset="utf-8">
$().ready(function() {
var elf = $('#elfinder').elfinder({
// lang: 'ru', // language (OPTIONAL)
url : 'http://localhost/filemanager/php/connector.minimal.php' // connector URL (REQUIRED)
}).elfinder('instance');
});
</script>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
{$footer}
</body>
</html>';
$template = str_replace("\'", "'", addslashes($template));
add_breadcrumb($pages['name']);
eval("\$page = \"" . $template . "\";");
output_page($page);
?>
If you would like to test this out yourself you can download ElFinder here - https://github.com/Studio-42/elFinder
Just tried it on OUGC Pages (Loving the categories that it has by the way) and it spits out the same error.. XenForo handles it fine. I'm lost.