Adamski Posted June 1, 2007 Share Posted June 1, 2007 I want to mirror my main site contact page with my support ticket submit page. I'm pretty sure this can be done but I'm not sure which files to include/require. To do this with annoucnement you need the following: include("support/configuration.php"); include("support/includes/functions.php"); Do I need anymore for what I require? I think the rest should be fine Thanks Adam 0 Quote Link to comment Share on other sites More sharing options...
Adamski Posted June 1, 2007 Author Share Posted June 1, 2007 I've looked at this from a different angle and now think I may be able to use this: <?php require("whmcs/dbconnect.php"); require("whmcs/init.php"); if ($_SESSION['loggedinstatus']=="true") { # User is Logged In - put any code you like here echo "hello"; } # Define the template filename to be used without the .tpl extension $templatefile = ""; /* To assign variables in Smarty use the following syntax. $smarty->assign('variablename', $value); This can then be used as {$variablename} in the template */ include("whmcs/display.php"); ?> Can anyone confirm if the path to the template file can be absolute? ie I can use the page outside of the root of whmcs but call the template file directly? Using the code seems to work, apart form displaying the template file Thanks Adam 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted June 2, 2007 Share Posted June 2, 2007 I've looked at this from a different angle and now think I may be able to use this: <?php require("whmcs/dbconnect.php"); require("whmcs/init.php"); if ($_SESSION['loggedinstatus']=="true") { # User is Logged In - put any code you like here echo "hello"; } # Define the template filename to be used without the .tpl extension $templatefile = ""; /* To assign variables in Smarty use the following syntax. $smarty->assign('variablename', $value); This can then be used as {$variablename} in the template */ include("whmcs/display.php"); ?> Can anyone confirm if the path to the template file can be absolute? ie I can use the page outside of the root of whmcs but call the template file directly? Using the code seems to work, apart form displaying the template file Thanks Adam Hey, No thats to create custom pages with in WHMCS. I'm not sure you can include any pages on to your site as WHMCS needs that template_c folder. However you do have the path set in your config.php file so it should work. Try to include the file, submitticket.php or what ever its called on your site and see if it gives you an error. From, Adam 0 Quote Link to comment Share on other sites More sharing options...
trine Posted June 2, 2007 Share Posted June 2, 2007 It can be done. You can use relative or absolute paths for the necessary includes, and you can also turn off the smarty caching if you'd like: $smarty->caching = true; (you could also reset the path for templates_c, but not recommended.) 0 Quote Link to comment Share on other sites More sharing options...
Adamski Posted June 2, 2007 Author Share Posted June 2, 2007 I have it working - not sure how but I'll report back with details next week! Away at the moment! Adam 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.