DivaVocals:
Hard for anyone to say.. There are various mods which change/modify core files.. Only way for you to know what's diffeent is to use a file comparison tool like Winmerge or Beyond Compare and merge the differences..
Thank you DivaVocals for your quick response...
I have compared the files with winmerge and can identify the differences.. the problem is i don't know what they mean or which bits to change as PHP is rather new and alien to me.
Here is what I discovered:
- The following lines of code are missing from my current version of the file:
$jscript_files_to_load = $css_files_to_load = array();
if (file_exists(DIR_WS_CLASSES . 'browser.php')) {
include_once(DIR_WS_CLASSES . 'browser.php');
$browser = new browser();
$browser_name = strtolower($browser->Name);
if (($browser_name == 'msie') && $browser->Version <= 6) {
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ie6-/', '.css');
$js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^ie6-/', '.js');
} if (($browser_name == 'msie') && $browser->Version >= 7) {
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ie7-/', '.css');
$js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^ie7-/', '.js');
} elseif ($browser_name == 'firefox') {
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ff-/', '.css');
$js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^ff-/', '.js');
} elseif ($browser_name == 'safari') {
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^safari-/', '.css');
$js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^safari-/', '.js');
} elseif ($browser_name == 'chrome') {
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^chrome-/', '.css');
$js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^chrome-/', '.js');
}
while(list ($key, $value) = each($directory_array )) {
$css_files_to_load[$value] = -100;
}
while(list ($key, $value) = each($js_directory_array )) {
$js_files_to_load[$value] = -500;
}
}
- ```
$files = loadCssJsFiles($css_files_to_load, $jscript_files_to_load);
foreach($files['css'] as $file)
if($file['include']) include($file['string']);
else echo $file['string'];
foreach($files['js'] as $file)
if($file['include']) include($file['string']);
else echo $file['string'];
and the following lines of code are different in each file:
- line 48 says ```
echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
instead of
$css_files_to_load[$value] = -300;
- line 69 says ```
if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
instead of
if (file_exists($perpagefile)) $css_files_to_load[trim($value, '/').'.css'] = -200;
- line 86 says ```
echo '<script type="text/javascript" src="' . $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n";
}
instead of
$jscript_files_to_load[$value] = -400;
}
- line says ```
echo '<script type="text/javascript" src="' . $page_directory . '/' . $value . '"></script>' . "\n";
instead of
$jscript_files_to_load[$value] = -300;
- line 106 says ```
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n";
instead of
$jscript_files_to_load[$value] = -200;
- and line 117 says ```
require($page_directory . '/' . $value); echo "\n";
instead of
$jscript_files_to_load[$value] = -100;
I hope that sheds some light on the problem as I'm baffled.