Jump to content

contact form


Adamski

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.)

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