All,
I have been trying to make a start on documenting BTS for the Wiki.
However, I was wondering if people think that the buttons should be stored in template folder? At the moment you can only have one set of buttons per language which must be stored in /includes/languages/english/images/buttons.
I have had a bit of browse around the BTS forums and found this and was wondering if we should make the switch?
Basically an edit to html_output.php that will look for the button in the template folder ... if it doesn't find it in <your template> it looks in the fallback template folder.
I have cut and paste the info here ... credit to Alex Zuyev
Find in shop/includes/functions/html_output.php
Replace with:Code:// The HTML form submit button wrapper function // Outputs a button in the selected language function tep_image_submit($image, $alt = '', $parameters = '') { global $language; $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "'; if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= '>'; return $image_submit; } ////// Output a function button in the selected language function tep_image_button($image, $alt = '', $parameters = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters); }////
Any thoughts on if this should be implemented - I haven't installed yet - but will try later on today ... can anyone think of any problems in doing this?Code:// The HTML form submit button wrapper function // Outputs a button in the selected language function tep_image_submit($image, $alt = '', $parameters = '') { if (is_file(DIR_WS_TEMPLATES . 'images/' . $image)) { $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_TEMPLATES . 'images/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"'; } else { $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_TEMPLATES_FALLBACK . 'images/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"'; } if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "'; if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= '>'; return $image_submit; } ////// Output a function button in the selected languagefunction tep_image_button($image, $alt = '', $parameters = '') { if (is_file(DIR_WS_TEMPLATES . 'images/' . $image)) { return tep_image(DIR_WS_TEMPLATES . 'images/' . $image, $alt, '', '', $parameters); } else { return tep_image(DIR_WS_TEMPLATES_FALLBACK . 'images/' . $image, $alt, '', '', $parameters); }}////
Regards,





LinkBack URL
About LinkBacks













Bookmarks