Ilyas Posted December 1, 2015 Share Posted December 1, 2015 Hey, I am trying to integrate my whole website (html) with whmcs. The header, footer and homepage went great and now I want to add other pages to whmcs. I tried this code -> <?php define("CLIENTAREA",true); //define("FORCESSL",true); // Uncomment to force the page to use https:// require("init.php"); $ca = new WHMCS_ClientArea(); $ca->setPageTitle("Windows Hosting"); $ca->addToBreadCrumb('index.php',$whmcs->get_lang('globalsystemname')); $ca->addToBreadCrumb('windows-hosting.php','Windows Hosting'); $ca->initPage(); //$ca->requireLogin(); // Uncomment this line to require a login to access this page # To assign variables to the template system use the following syntax. # These can then be referenced using {$variablename} in the template. $ca->assign('variablename', $value); # 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('windows-hosting'); $ca->output(); ?> This kind of works but it doesn't give me a blank working area. the title and some links appear when I visit the page. How can I build my pages completely around whmcs? It would be awesomne for customer experience if everything is integrated in whmcs. thx in advance! 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted December 1, 2015 Share Posted December 1, 2015 Create windows-hosting.tpl file inside the directory of your active template and write "I'm super cute!" inside of it. Now visit windows-hosting.php and you will find your "I'm super cute!" between the header and footer. 0 Quote Link to comment Share on other sites More sharing options...
Ilyas Posted December 1, 2015 Author Share Posted December 1, 2015 Create windows-hosting.tpl file inside the directory of your active template and write "I'm super cute!" inside of it. Now visit windows-hosting.php and you will find your "I'm super cute!" between the header and footer. I already knew that. This way it is displaying a title above the custom content of that page. https://client.phasehosting.be/windows-hosting.php'>https://client.phasehosting.be/windows-hosting.php <- like this But what I want to achieve is like my homepage. -> https://client.phasehosting.be/ If I can do that then I can build around whmcs and have my content blended with the client area. that way I can replace my main website with a fully integrated whmcs version. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.