Philip C Posted November 7, 2007 Share Posted November 7, 2007 I just came from the world of whm autopilot... I have to say this is a nice change, I have problems getting that thing even setup correctly. anyways, I have WHMCS installed and just about setup... I cannot get my mind wrapped around the idea of the tld templates. The code that tied in my main reseller website to autopilot was html code. I need someone to help me out with understanding that to do with the tld templates..... I'm not new to this, I just don't understand it.. Thanks for your help... Phil 0 Quote Link to comment Share on other sites More sharing options...
bear Posted November 7, 2007 Share Posted November 7, 2007 You can mostly use plain HTML in the TPL files, as long as you're careful with the Smarty tags. These look like {if} and {literal}, all inside curly braces. Just like HTML or PHP, most tags have opening "{if}" and closing "{/if}" tags. If you're at all familiar with PHP, it works nearly the same as that language. You can wrap your design around these without messing them up fairly easily, only needing to actually fool with these tags if you want to change functionality of your installation of WHMCS. Specific question, please ask, otherwise, have you looked at the manual? http://v3manual.whmcs.com/ 0 Quote Link to comment Share on other sites More sharing options...
Philip C Posted November 7, 2007 Author Share Posted November 7, 2007 Thank you for your reply.... Yes I did look at the manual... It wasn't that clear on how to do it... I will look at it again and see what I can do. Thanks for the help 0 Quote Link to comment Share on other sites More sharing options...
bear Posted November 7, 2007 Share Posted November 7, 2007 Ok, maybe this will help a bit. Create a new template set to be used with your new design: I copied the default template directory in the distribution with another name, but in the same place within the site. Then I edited the template "header.tpl" in that new set to include a few files right at the very top of the template that had my site design's top "half" in it. I included these files like this: {php} include('inc_header.php'); {/php} {php} include('inc_nav.php'); {/php} Placing the PHP tags inside {curly braces} cause Smarty to treat them like regular PHP includes. This will "import" those two files into the top of the header template file when it's called in the browser. You can do the same for the footer, if you want to include some sort of navigation or something there. As before, create a file (inc_footer.php or whatever name you like) and call it with an include: {php} include('inc_footer.php'); {/php} Be careful with links, since they will be relative to wherever the page loads (usually within the install directory for WHMCS), and images, if used, need to have correct paths as well. If you wanted to, you could just use plain HTML in the same TPL files to wrap your design around the WHMCS code. Simply add your code to the header and footer directly, instead of using the PHP include method. That should at least get you started. 0 Quote Link to comment Share on other sites More sharing options...
Philip C Posted November 7, 2007 Author Share Posted November 7, 2007 Bear, Thank you again for your quick replies... I got it figured out... IF you drink enough coffee and smoke enough over time you will always figure it out. or at least stay up all night trying to figure it out. 0 Quote Link to comment Share on other sites More sharing options...
fwebs Posted November 7, 2007 Share Posted November 7, 2007 philip, The smarty template system is pretty easy and powerful once you get the hang of it. take a look over at http://smarty.php.net for the full smarty manual. Im not sure what version of smarty is being used here but 99% of what you see there will apply 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.