Jump to content

How to remove custom sidebar from domainchecker.php


rabijit

Recommended Posts

Hello Everyone,

 

I rendered a custom sidebar using the code below,

 

add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $PrimarySidebar)

{

 

if (intval($_SESSION['uid'])==0){

return;

}

$PrimarySidebar->addChild('dashboard', array(

'label' => 'Quick Links',

'uri' => '#',

'icon' => 'fa-bars',

'order'=> 2,

));

$dashboardPanel = $PrimarySidebar->getChild('dashboard');

$dashboardPanel->addChild('Dashboard', array(

'uri' => 'clientarea.php',

'label' => 'Dashboard',

'order' => 2,

'icon' => 'fa-tachometer',

));

$dashboardPanel->addChild('My Services', array(

'uri' => 'clientarea.php?action=services',

'label' => 'My Services',

'order' => 3,

'icon' => 'fa-server',

));

$dashboardPanel->addChild('My Domains', array(

'uri' => 'clientarea.php?action=domains',

'label' => 'My Domains',

'order' => 4,

'icon' => 'fa-globe',

));

$dashboardPanel->addChild('Invoices', array(

'uri' => 'clientarea.php?action=invoices',

'label' => 'My invoices',

'order' => 5,

'icon' => 'fa-credit-card',

));

$dashboardPanel->addChild('Tickets', array(

'uri' => 'supporttickets.php',

'label' => 'Support Tickets',

'order' => 6,

'icon' => 'fa-ticket',

));

});

 

 

It works perfectly, appears to clients after login but also appear in domainchecker.php also

dc1.PNG

 

how to remove this sidebar in domainchecker.php for loggedin users

 

Thanks is advance

Link to comment
Share on other sites

we need to add additional condition ;)

 

add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $PrimarySidebar)
{

if (intval($_SESSION['uid'])==0 || APP::getCurrentFileName()=="domainchecker"){
return;
}
$PrimarySidebar->addChild('dashboard', array(
'label' => 'Quick Links',
'uri' => '#',
'icon' => 'fa-bars',
'order'=> 2,
));
$dashboardPanel = $PrimarySidebar->getChild('dashboard');
$dashboardPanel->addChild('Dashboard', array(
'uri' => 'clientarea.php',
'label' => 'Dashboard',
'order' => 2,
'icon' => 'fa-tachometer',
));
$dashboardPanel->addChild('My Services', array(
'uri' => 'clientarea.php?action=services',
'label' => 'My Services',
'order' => 3,
'icon' => 'fa-server',
));
$dashboardPanel->addChild('My Domains', array(
'uri' => 'clientarea.php?action=domains',
'label' => 'My Domains',
'order' => 4,
'icon' => 'fa-globe',
));
$dashboardPanel->addChild('Invoices', array(
'uri' => 'clientarea.php?action=invoices',
'label' => 'My invoices',
'order' => 5,
'icon' => 'fa-credit-card',
));
$dashboardPanel->addChild('Tickets', array(
'uri' => 'supporttickets.php',
'label' => 'Support Tickets',
'order' => 6,
'icon' => 'fa-ticket',
));
}); 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated