Jump to content

WHMCS Custom Page Without sidebars


larryk

Recommended Posts

I am trying to create a custom WHMCS page without any sidebars. I only want it to show the top bar where clients can choose language, etc.

I have this code currently:

<?php
 
 define("CLIENTAREA",true);
 //define("FORCESSL",true); // Uncomment to force the page to use https://
 
 require("init.php");
 
 $ca = new WHMCS_ClientArea();
 
 $ca->setPageTitle("Support Center");
 
 $ca->addToBreadCrumb('index.php',$whmcs->get_lang('globalsystemname'));
 $ca->addToBreadCrumb('support.php','HostAble Support');
 $ca->addToBreadCrumb('support-center.php','Support Center');
 
 $ca->initPage();
 
 
 # Check login status
 if ($ca->isLoggedIn()) {
 
   # User is logged in - put any code you like here
 
   # Here's an example to get the currently logged in clients first name
 
   $result = mysql_query("SELECT firstname FROM tblclients WHERE id=".$ca->getUserID());
   $data = mysql_fetch_array($result);
   $clientname = $data[0];
 
   $ca->assign('clientname', $clientname);
 
 } else {
 
   # User is not logged in
 
 }
 
 # Define the template filename to be used without the .tpl extension
 
 $ca->setTemplate('supportcenter');
 
 $ca->output();
 
 ?>

But obviously it isnt working, it just shows the page but with the sidebars and navigation bar too.

Thank you if you can help me :)

Link to comment
Share on other sites

21 hours ago, larryk said:

I am trying to create a custom WHMCS page without any sidebars. I only want it to show the top bar where clients can choose language, etc.

that code isn't defining sidebars, so they must be being added elsewhere (possibly by a hook)...

21 hours ago, larryk said:

But obviously it isnt working, it just shows the page but with the sidebars and navigation bar too.

the navigation bar will always be there as it's not defined by the custom page - it would have to be removed with a hook, hidden with CSS or using a tweak in the supportcenter template (assuming this is Six or related).

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.

×
×
  • 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