tag
* * @package templateSystem * @copyright Copyright 2003-2012 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version GIT: $Id: Author: DrByte Tue Jul 17 16:02:00 2012 -0400 Modified in v1.5.1 $ */ /** * load the module for generating page meta-tags */ require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php')); /** * output main page HEAD tag and related headers/meta-tags, etc */ ?> > <?php echo META_TAG_TITLE; ?> get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^style/', '.css'); while(list ($key, $value) = each($directory_array)) { echo ''."\n"; } /** * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza. */ $manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : ''; $tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : ''; $tmp_pagename = ($this_is_home_page) ? 'index_home' : $current_page_base; if ($current_page_base == 'page' && isset($ezpage_id)) $tmp_pagename = $current_page_base . (int)$ezpage_id; $sheets_array = array('/' . $_SESSION['language'] . '_stylesheet', '/' . $tmp_pagename, '/' . $_SESSION['language'] . '_' . $tmp_pagename, '/c_' . $cPath, '/' . $_SESSION['language'] . '_c_' . $cPath, '/m_' . $manufacturers_id, '/' . $_SESSION['language'] . '_m_' . (int)$manufacturers_id, '/p_' . $tmp_products_id, '/' . $_SESSION['language'] . '_p_' . $tmp_products_id ); while(list ($key, $value) = each($sheets_array)) { //echo "\n"; $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . $value . '.css'; if (file_exists($perpagefile)) echo ''."\n"; } /** * custom category handling for a parent and all its children ... works for any c_XX_XX_children.css where XX_XX is any parent category */ $tmp_cats = explode('_', $cPath); $value = ''; foreach($tmp_cats as $val) { $value .= $val; $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/c_' . $value . '_children.css'; if (file_exists($perpagefile)) echo ''."\n"; $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/' . $_SESSION['language'] . '_c_' . $value . '_children.css'; if (file_exists($perpagefile)) echo ''."\n"; $value .= '_'; } /** * load printer-friendly stylesheets -- named like "print*.css", alphabetically */ $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^print/', '.css'); sort($directory_array); while(list ($key, $value) = each($directory_array)) { echo ''."\n"; } /** * load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically */ $directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.js'); while(list ($key, $value) = each($directory_array)) { echo ''."\n"; } /** * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically */ $directory_array = $template->get_template_part($page_directory, '/^jscript_/', '.js'); while(list ($key, $value) = each($directory_array)) { echo '' . "\n"; } /** * load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically */ $directory_array = $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.php'); while(list ($key, $value) = each($directory_array)) { /** * include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically. * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page */ require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n"; } /** * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically. */ $directory_array = $template->get_template_part($page_directory, '/^jscript_/'); while(list ($key, $value) = each($directory_array)) { /** * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically. * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page */ require($page_directory . '/' . $value); echo "\n"; } // DEBUG: echo ''; ?>