Is it possible to Show the extension tab in Quixplorer
The code already exist in the file www/quixplorer/_include/header.php but it is a little bugged
I have fixed it for the WebGUI Themes Extension by crest
I have also add support for mobile touch devices like in fbegin.inc
Original :
Code: Select all
echo " <a href=\"{$link}\" onmouseover=\"mopen('{$menuid}')\" onmouseout=\"mclosetime()\">".htmlspecialchars($menu[$menuid]['desc'])."</a>\n";
echo " <div id=\"{$menuid}\" onmouseover=\"mcancelclosetime()\" onmouseout=\"mclosetime()\">\n";
...
//-- Begin extension section --//
if (Session::isAdmin() && isset($g) && isset($g['www_path']) && is_dir("{$g['www_path']}/ext")):
echo "<li>\n";
echo "<a href=\"index.php\" onmouseover=\"mopen('extensions')\" onmouseout=\"mclosetime()\">".gettext("Extensions")."</a>\n";
echo "<div id=\"extensions\" onmouseover=\"mcancelclosetime()\" onmouseout=\"mclosetime()\">\n";
$dh = @opendir("{$g['www_path']}/ext");
if ($dh) {
while (($extd = readdir($dh)) !== false) {
if (($extd === ".") || ($extd === ".."))
continue;
@include("{$g['www_path']}/ext/" . $extd . "../menu.inc");
}
closedir($dh);
}
echo "</div>\n";
echo "</li>\n";
endif;
//-- End extension section --//Code: Select all
$agent = $_SERVER['HTTP_USER_AGENT']; // Put browser name into local variable for desktop/mobile detection
if ((preg_match("/iPhone/i", $agent)) || (preg_match("/android/i", $agent))) {
echo "<a href=\"javascript:mopen('{$menuid}');\" onmouseout=\"mclosetime()\">".htmlspecialchars($menu[$menuid]['desc'])."</a>\n";
}
else {
echo "<a href=\"{$link}\" onmouseover=\"mopen('{$menuid}')\" onmouseout=\"mclosetime()\">".htmlspecialchars($menu[$menuid]['desc'])."</a>\n";
}
echo " <div id=\"{$menuid}\" onmouseover=\"mcancelclosetime()\" onmouseout=\"mclosetime()\">\n";
...
//-- Begin extension section --//
if (Session::isAdmin() && is_dir("{$g['www_path']}../ext")):
echo "<li>\n";
$agent = $_SERVER['HTTP_USER_AGENT']; // Put browser name into local variable for desktop/mobile detection
if ((preg_match("/iPhone/i", $agent)) || (preg_match("/android/i", $agent))) {
echo "<a href=\"javascript:mopen('extensions');\" onmouseout=\"mclosetime()\">".gettext("Extensions")."</a>\n";
}
else {
echo "<a href=\"../index.php\" onmouseover=\"mopen('extensions')\" onmouseout=\"mclosetime()\">".gettext("Extensions")."</a>\n";
}
echo "<div id=\"extensions\" onmouseover=\"mcancelclosetime()\" onmouseout=\"mclosetime()\">\n";
$dh = @opendir("{$g['www_path']}../ext");
if ($dh) {
while (($extd = readdir($dh)) !== false) {
if (($extd === ".") || ($extd === ".."))
continue;
$srcfile = "../ext/" . $extd . "/menu.inc";
$readfile = fopen($srcfile, "r");
$filecontent = fread($readfile, filesize($srcfile));
fclose($readfile);
$tmp1 = strrchr($filecontent, '=');
$extFile = substr($tmp1, 2, strpos($tmp1, '>') - 3);
$tmp2 = strstr($filecontent, '>');
$extName = substr($tmp2, 1);
echo '<a href="../' . $extFile . '">' . $extName . '</a>';
//@include("{$g['www_path']}../ext/" . $extd . "/menu.inc");//
}
closedir($dh);
}
echo "</div>\n";
echo "</li>\n";
endif;
//-- End extension section --//Coincoin


