View Single Post
  #8  
Old 06-29-2007, 05:11 AM
  Ene's Avatar 
Ene Ene is offline
 

X-Cart team
  
Join Date: Aug 2004
Posts: 907
 

Default Re: The template names in the source code

Quote:
Is there a performance hit asociated with this?

No.

Quote:
Now that's brilliant.

Use this code:

PHP Code:
function func_show_as_comment($string$end=false) {
global 
$identifiers;
     
$templates = array (
        
"buttons/go_image_menu.tpl",
        
"modules/Special_Offers/customer/cart_checkout_buttons.tpl",
        
"main/title_selector.tpl",
        
"modules/QuickBooks/orders.tpl",
        
"modules/UPS_OnLine_Tools/ups_currency.tpl",
        
"buttons/go_image.tpl",
        
"buttons/go_image_menu.tpl",
        
"main/image_property.tpl",
        
"main/include_js.tpl"
    
);
if (!
in_array($string$templates) && (array_key_exists("P"$identifiers) || array_key_exists("A"$identifiers))) {

echo 
"\n\n<!--";
if (
$end) echo " / ";
echo 
"$string -->\n\n";
}


: )
__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009)

ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager - X-Cart hosting
ex-X-Cart Technical Support Engineer


Note: For the official guaranteed tech support services please turn to the Customers HelpDesk.
Reply With Quote