OK I have printed out my virtuemart modded index.php and also printed out the prehacked index.php and a plain unaltered index.php.
From here I can decipher whats going on and the changes made by both virtuemart and the smf bridge.
Virtuemart has (at a quick glance) the following added:
// VIRTUEMART MOD
// Let's see how long this page takes to load.
list($usec, $sec) = explode(" ", microtime());
$joomla_start = ((float)$usec + (float)$sec);
// loads template file
if ( !file_exists( $mosConfig_absolute_path .'/templates/'. $cur_template .'/index.php' ) ) {
echo _TEMPLATE_WARN . $cur_template;
} else {
///////////////////////
// VIRTUEMART MOD
ob_start();
require_once( $mosConfig_absolute_path .'/templates/'. $cur_template .'/index.php' );
echo "<!-- ".date("r")." -->";
// Catch the Site Output
$my_content = ob_get_contents();
ob_end_clean();
// XHTML compliance: Safely replace all occurences of & with &
$my_content = preg_replace("/&(?!([a-zA-z0-9|#]+[;]))/msi","&", $my_content);
// Javascripts sometimes contain such logical operators: &&
// we must re-convert them from & to &, otherwise the Scripts and links in it don't work
if (preg_match_all("'<script[^>]*?>(.*?)<\/script>'si", $my_content, $scripts) > 0) {
foreach( $scripts as $script ) {
$my_content = str_replace( $script, str_replace( "&", "&", $script ), $my_content );
}
}
// Finally output the HTML String to the Browser
echo $my_content;
// END VIRTUEMART MOD
////////////////////////
// Original Version follows:
/*
require_once( 'templates/'. $cur_template .'/index.php' );
echo "<!-- ".time()." -->";
*/
}