This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[SOLVED] Show Extention tab in QuiXplorer

Post/Debate your Suggestions & Requests of XigmaNAS here. This ONLY pertains to XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
Coincoin0017
Starter
Starter
Posts: 19
Joined: 15 Feb 2015 09:53
Location: France (17)
Status: Offline

[SOLVED] Show Extention tab in QuiXplorer

Post by Coincoin0017 »

Hello,

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 --//
Modified :

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 --//
Thanks

Coincoin
You do not have the required permissions to view the files attached to this post.
NAS-1: NAS4Free 9.3.0.2 (r1556) x64-embedded - Supermicro X10SL7-F - Intel Xeon E3-1231V3 - 32GB RAM - 8x3TB
NAS-2: NAS4Free 10.1.0.2 (r1557) x64-embedded - Asus P8H77-I - Intel Core i3 3210 - 16GB RAM - 4x1TB (Test)

Extensions: TheBrig, Extended GUI, WebGUI Themes, RRDGraphs

User avatar
daoyama
Developer
Developer
Posts: 394
Joined: 25 Aug 2012 09:28
Location: Japan
Status: Offline

Re: Show Extention tab in QuiXplorer

Post by daoyama »

Thank you.
I have added missing parts on filemanager. (r1484-1486)
NAS4Free 10.2.0.2.2115 (x64-embedded), 10.2.0.2.2258 (arm), 10.2.0.2.2258(dom0)
GIGABYTE 5YASV-RH, Celeron E3400 (Dual 2.6GHz), ECC 8GB, Intel ET/CT/82566DM (on-board), ZFS mirror (2TBx2)
ASRock E350M1/USB3, 16GB, Realtek 8111E (on-board), ZFS mirror (2TBx2)
MSI MS-9666, Core i7-860(Quad 2.8GHz/HT), 32GB, Mellanox ConnectX-2 EN/Intel 82578DM (on-board), ZFS mirror (3TBx2+L2ARC/ZIL:SSD128GB)
Develop/test environment:
VirtualBox 512MB VM, ESXi 512MB-8GB VM, Raspberry Pi, Pi2, ODROID-C1

Coincoin0017
Starter
Starter
Posts: 19
Joined: 15 Feb 2015 09:53
Location: France (17)
Status: Offline

Re: Show Extention tab in QuiXplorer

Post by Coincoin0017 »

daoyama wrote:Thank you.
I have added missing parts on filemanager. (r1484-1486)
Thanks to you ;)

Edit: oops I have missed something :
In the menu section the link to the forum is not good, sorry...
NAS-1: NAS4Free 9.3.0.2 (r1556) x64-embedded - Supermicro X10SL7-F - Intel Xeon E3-1231V3 - 32GB RAM - 8x3TB
NAS-2: NAS4Free 10.1.0.2 (r1557) x64-embedded - Asus P8H77-I - Intel Core i3 3210 - 16GB RAM - 4x1TB (Test)

Extensions: TheBrig, Extended GUI, WebGUI Themes, RRDGraphs

User avatar
zoon01
Developer
Developer
Posts: 724
Joined: 20 Jun 2012 21:06
Location: Netherlands
Contact:
Status: Offline

Re: [SOLVED] Show Extention tab in QuiXplorer

Post by zoon01 »

Hi,
thank you
fixed
System specs: XigmaNAS 11.2.0.4 -embedded on Samsung 860 EVO 256GB and Supermicro X10SL7-F w / Bios v3.2, IPMI v.03.86 / CPU E3-1241 v3 @ 3.50GHz - 32GB Crucial DDR3L 1600mhz ECC 1.35v , LSI 2308 on PH20.00.07.00 IT mode, Storage: 5x Western Digital Red (WD30EFRX) raidz

Development system is same system in virtualbox.

User avatar
ernie
Forum Moderator
Forum Moderator
Posts: 1458
Joined: 26 Aug 2012 19:09
Location: France - Val d'Oise
Status: Offline

Re: [SOLVED] Show Extention tab in QuiXplorer

Post by ernie »

Thanks Daoyama and coincoin17.

I used the corrected header of Daoyama. It works but there is a small issue with the extension phpbox.
The area where normaly there is the pathway where we are in quixexplorer has disappeared:
headerissue.png
Instead of the pathway, we have the words: 'Php info'. Php info is one of a menu of phpvbox.

Thanks for your help.
You do not have the required permissions to view the files attached to this post.
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2

Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)

Post Reply

Return to “Suggestions & Requests”