ChrisDeVe

Active Member
Apr 18, 2018
34
12
8
UK
cPanel Access Level
Root Administrator
Create a New WHM Interface in PHP

I follow the tutorial on how to include Cpanel Header

require_once('/usr/local/cpanel/php/WHM.php');

WHM::header('Engintron for cPanel/WHM',1,1);


Hides the interface's header.
  • Set this value to 1 to hide the header.
  • Set this value to 0 to display the header.
It seems if you want to display you must set 1 not 0 so I'm confused here.

The second issues I see all tabs from a navigation on left there are opened and is not saving every time one you refresh all tabs will be opened.

Can you please guide us or me specialty what I'm doing wrong?

Thank you
 

ChrisDeVe

Active Member
Apr 18, 2018
34
12
8
UK
cPanel Access Level
Root Administrator
Forgot to say this:

On request header the small difference I saw is this.
Code:
<script>
window.COMMON = window.COMMON || {};
window.COMMON.leftNavNVData = {};
</script>
<script src="/templates/menu/command.min.js"></script>


By default on the homepage on WHM, you will find like that

<script>
window.COMMON = window.COMMON || {};
window.COMMON.leftNavNVData = {"whmcommand:Transfers":"0","whmcommand:Support":"0","whmcommand:Server_Configuration":"0","whmcommand:System_Reboot":"0","whmcommand:Service_Configuration":"0","whmcommand:SQL_Services":"0","whmcommand:Networking_Setup":"0","whmcommand:Themes":"0","whmcommand:Market":"0","whmcommand:cPanel":"0","whmcommand:Backup":"0","whmcommand:navigation":"0","whmcommand:Email":"0","whmcommand:Security_Center":"0","whmcommand:SSL_TLS":"0","whmcommand:DNS_Functions":"0","whmcommand:Locales":"0","whmcommand:Account_Information":"0","whmcommand:Clusters":"0","whmcommand:Packages":"0","whmcommand:Resellers":"0","whmcommand:Server_Status":"0","whmcommand:Restart_Services":"0","whmcommand:Plugins":"0","whmcommand:Development":"0","whmcommand:System_Health":"0","whmcommand:Server_Contacts":"0","whmcommand:Multi_Account_Functions":"0","whmcommand:Software":"0","whmcommand:IP_Functions":"0","whmcommand:Account_Functions":"0"};
</script>
<script src="/cPanel_magic_revision_1509995947/templates/menu/command.min.js"></script>
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,293
1,279
313
Houston