PDA

View Full Version : PHP include vs. Integrate my design on each WHMCS page



muchos
04-27-07, 01:16 PM
Ok.. so i have come to a stage where I have a design...

I need to integrate WHMCS which method is better

using PHP include in the blank area or code around the current templates ?

trine
04-27-07, 02:53 PM
If you can, use the templates and use smarty without using php includes. Use smarty plugins for performing php actions. Plus that allows you to reuse the plugs elsewhere, if constructed well.

if you need to use includes for page blocks, menus, headers and footers, you can use:

{include file='filename.tpl'}

instead of:

{php}include_once("filename.php");{/php}

(using php in your smarty templates is never the ideal, if you can avoid it. Why? because poorly coded php can lead to xss or sql injections, or if the template can be read, may divulge sensitive info.)